query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
bracketsOpt [ '=' variableIntitializer ]
private void variableDeclaratorRest(VariableType x, Scope scope, Vector queue) { x.type.dim += bracketsOpt(); if (nextSymbol == Keyword.ASSIGNSY) { Operation node, root = new Operation(); root.operator = (x.modify & Keyword.FINALSY.value) == 0?Keyword.ASSIGNSY:Keyword.FINALASSIGNSY; node = root.left = new Operation(); node.operator = Keyword.LEAFSY; node = node.left = new Operation(); node = node.left = new Operation(); node = node.left = new Operation(); node.name = x.name; node.type = x.type; lookAhead(); root.right = variableIntitializer(x.type, x.type.dim, scope, queue); queue.add(root); root = new Operation(); root.operator = Keyword.CLEARSY; queue.add(root); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBracket(String val)\r\n\t{\r\n\t\t_bracket = val;\r\n\t}", "public Variable(int power, char notation){\n\t\tthis.power = power;\n\t\tthis.notation = notation;\n\t}", "public String getBracket()\r\n\t{\r\n\t\treturn _bracket;\r\n\t}", "OPTION createOPTION();", "private String processShorthand() {\n line = line.replace(\" \",\"\");\n StringBuilder result = new StringBuilder();\n StringBuilder variable = new StringBuilder();\n StringBuilder value = new StringBuilder();\n //This is to get the shorthand operator used.\n boolean equalToCrossed = false;\n StringBuilder operate = new StringBuilder();\n for(int i=0; i<line.length(); i++) {\n char ch = line.charAt(i);\n //If the character ch is not a letter nor a digit,\n //and equal-to has not been crossed yet, then ch\n //is part of the operator.\n if(!Character.isLetterOrDigit(ch) && !equalToCrossed)\n operate.append(ch);\n //If the character is not part of the operator\n //and equal-to has not been crossed yet, then this\n //is part of the variable name.\n else if(!equalToCrossed)\n variable.append(ch);\n //Else, the character is part of value\n else\n value.append(ch);\n if(ch=='=')\n equalToCrossed = true;\n }\n String operator = operate.toString();\n result.append(variable);\n switch(operator) {\n case \"+=\" : result.append(\" is added with \"); break;\n case \"-=\" : result.append(\" is decreased by \"); break;\n case \"*=\" : result.append(\" is multiplied with \"); break;\n case \"/=\" : result.append(\" is divided by \"); break;\n case \"^=\" : result.append(\" is XOR'ed with \"); break;\n case \"|=\" : result.append(\" is OR'ed with \"); break;\n case \"&=\" : result.append(\" is AND'ed with \"); break;\n case \"<<=\" : result.append(\" is signed left-bit-shifted by \"); break;\n case \">>=\" : result.append(\" is signed right-bit-shifted by \"); break;\n case \">>>=\" : result.append(\" is unsigned right-bit-shifted by \"); break;\n default : result.append(\" \").append(operator).append(\" \"); break;\n }\n if(hasArrayAsMajorValue(value.toString())) {\n value = new StringBuilder(processArrayValue(value.toString()));\n }\n result.append(\"the value given by \").append(value);\n return result.toString();\n }", "private String addOptions() {\n\t\tStringBuilder tag = new StringBuilder();\n\t\tint OptionsNumber = Integer.parseInt(parameters[0]);\n\t\t// Nine Parameters: OptionsNumber, Option1, Option1Tag, Option2, Option2Tag, Option3, Option3Tag, Option4, Option4Tag\n\t\t// Minimum Three Parameters, Maximum Nine\n\t\t// If OptionsNumber = 1, Use Option1 and Option1Tag only. If OptionsNumber = 2, Use Option1 and Option2.\n\t\ttag.append(\"options:[\");\n\t\ttag.append(\"[\" + parameters[1] + \"|\" + parameters[2] + \"]\");\n\t\tif (OptionsNumber > 1) {\n\t\t\ttag.append(\", [\" + parameters[3] + \"|\" + parameters[4] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 2) {\n\t\t\ttag.append(\", [\" + parameters[5] + \"|\" + parameters[6] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 3) {\n\t\t\ttag.append(\", [\" + parameters[7] + \"|\" + parameters[8] + \"]\");\n\t\t}\n\t\ttag.append(\"]\");\n\t\treturn tag.toString();\n\n\t}", "VarAssignment createVarAssignment();", "double getExpoBracketingStopsPref();", "private void processBracket() {\r\n\t\tif (expression[currentIndex] == '(') {\r\n\t\t\ttoken = new Token(TokenType.OPEN_BRACKET, expression[currentIndex]);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.CLOSED_BRACKET, expression[currentIndex]);\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "@Override String opStr() { return \"var\"; }", "@Override\n\tpublic IKeyword option() { return option; }", "@Test\r\n public void deriveFromOrAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M|=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH|=9\", \"(long,km^2/h)\");\r\n }", "@Override\r\n\tpublic Object visit(YoyooAssignmentOperator node, Object data) {\r\n\t\tassignOptMark = new OperatorMark(node.first_token.image);\r\n\t\treturn null;\r\n\t}", "public static void assignCompoundTokens(ArrayList<String>scan){\n\nfor(int i=0;i<scan.size();i++){\n if( isUnaryPostOperator( scan.get(i) ) ){\n \n if(isNumber(scan.get(i-1))||isVariableString(scan.get(i-1))){ \n int index=i-1;\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\ni=j+1;\n }//end if\n\n else if(isClosingBracket(scan.get(i-1))){\n int index=MBracket.getComplementIndex(false, i-1, scan);\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\n i=j+1;\n }\n \n \n \n }\n \n \n \n}\n\n\n\n}", "public void a(eq ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public int k() {\r\n/* 55 */ return 9;\r\n/* */ }", "public Bracket getBracket() {\n return b;\n }", "public interface Option {\n\n String DEFAULT_PREFIX = \"<span style='color:red;'>\";\n\n String DEFAULT_SUFFIX = \"</span>\";\n\n String DEFAULT_REPLACEMENT = \"*\";\n\n Option DECORATE = new DecorateOption(DEFAULT_PREFIX, DEFAULT_SUFFIX);\n\n Option REPLACE = new ReplaceOption(DEFAULT_REPLACEMENT);\n\n Option REMOVE = new RemoveOption();\n\n String getPrefix();\n\n String getReplacement();\n\n String getSuffix();\n\n Option prefix(String prefix);\n\n Option replacement(String replacement);\n\n Option suffix(String suffix);\n\n Option cloneOption();\n}", "private void initOperators(Set<String> s) {\n\t\ts.add(\"=\");\n\t\ts.add(\"+\");\n\t\ts.add(\"-\");\n\t\ts.add(\"*\");\n\t\ts.add(\"/\");\n\t\ts.add(\"(\");\n\t\ts.add(\")\");\n\t\ts.add(\";\");\n }", "boolean isFocusBracketingPref();", "public VariType visit(BracketExpression n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t _ret = n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t return _ret;\n\t }", "public VariableNode(String attr)\n {\n this.name = attr;\n }", "private Term parseAssign(final boolean required) throws ParseException {\n Term t1 = parseConditional(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '=') {\n Term t2 = parseAssign(true);\n if (t1 instanceof Term.Ref && ((Term.Ref) t1).getVariable() != null) {\n t1 = new Term.Assign(t1, t2);\n } else {\n reportError(\"Variable expected on the left side of assignment '='.\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "@Test\r\n public void deriveFromAndAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M&=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH&=9\", \"(long,km^2/h)\");\r\n }", "public interface JavaGrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PLUS = 5;\n /** RegularExpression Id. */\n int MINUS = 6;\n /** RegularExpression Id. */\n int MULTIPLY = 7;\n /** RegularExpression Id. */\n int DIVIDE = 8;\n /** RegularExpression Id. */\n int OPEN_PARENTHESIS = 9;\n /** RegularExpression Id. */\n int CLOSED_PARENTHESIS = 10;\n /** RegularExpression Id. */\n int OPEN_BRACKET = 11;\n /** RegularExpression Id. */\n int CLOSED_BRACKET = 12;\n /** RegularExpression Id. */\n int OPEN_BRACE = 13;\n /** RegularExpression Id. */\n int CLOSED_BRACE = 14;\n /** RegularExpression Id. */\n int SEMICOLON = 15;\n /** RegularExpression Id. */\n int EQUALS = 16;\n /** RegularExpression Id. */\n int COMPARISON = 17;\n /** RegularExpression Id. */\n int LESS = 18;\n /** RegularExpression Id. */\n int GREATER = 19;\n /** RegularExpression Id. */\n int NUMBER = 20;\n /** RegularExpression Id. */\n int DIGIT = 21;\n /** RegularExpression Id. */\n int LETTER = 22;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"<COMPARISON>\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"<NUMBER>\",\n \"<DIGIT>\",\n \"<LETTER>\",\n \"\\\"new\\\"\",\n \"\\\",\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"for\\\"\",\n \"\\\"int\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n };\n\n}", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "protected Bracket() {\n _obj = null;\n _index = null;\n }", "private String syntax(ArrayList<String> tokens){\r\n String tkn=\"Done\";\r\n boolean VarDeclFlag = true;\r\n boolean exitFlag = false;\r\n ArrayList<String> temp = new ArrayList<>();\r\n //TODO return error\r\n //TODO return error method\r\n for(int i=0; i<tokens.size(); i++){\r\n if(VarDeclFlag){ \r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n tokensDef.add(\"LeftParen\");\r\n i++;\r\n while(!isRightParen(tokens.get(i)) && exitFlag){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n\t\t\t\t\t\t\t\t\t\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n }\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n exitFlag = true;\r\n tokensDef.add(\"Var\");\r\n i++; \r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n\t\tif(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n\t\t\ttokensDef.add(\"LeftParen\");\r\n i++;\r\n if(!isRightParen(tokens.get(i))){\r\n while(!isRightParen(tokens.get(i))){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n }\r\n else \r\n return \"error\";\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n }\r\n else\r\n return \"error\";\r\n }\r\n }\r\n \r\n }\r\n }\r\n else{\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n\t\t\r\n return tkn;\r\n \r\n }", "@Test\r\n public void deriveFromDoubleLeftAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M<<=9\", \"(int,m)\");\r\n //example with int m - char\r\n check(\"varI_M<<=\\'c\\'\", \"(int,m)\");\r\n }", "@Override\r\n\tpublic Instruction lexParse(String[] words, LexicalParser lexParser) {\r\n\t\tif (words.length!=3) return null;\r\n\t\t\r\n\t\tif (!words[1].equals(\"=\")) return null;\r\n\t\t\r\n\t\trhs=TermParser.parse(words[2]);\r\n\t\tif (rhs==null) return null;\r\n\t\t\r\n\t\tTerm var=TermParser.parse(words[0]);\r\n\t\tif (var==null) return null;\r\n\t\t\r\n\t\treturn new SimpleAssignment(words[0], rhs);\r\n\t}", "public void setBracketfont(String val)\r\n\t{\r\n\t\t_bracketFont = val;\r\n\t}", "private void superSuffix(Operation base, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.LPARSY)\r\n base.left.left = arguments(scope, null, queue);\r\n else\r\n {\r\n matchKeyword(Keyword.DOTSY);\r\n\r\n base = base.right = new Operation();\r\n base.left = new Operation();\r\n base.left.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n base.left.left = argumentsOpt(scope, null, queue);\r\n }\r\n }", "VariableExp createVariableExp();", "public void setOption( String opt )\r\n {\r\n option.set( 0, new COSString( opt ) );\r\n }", "public Arginfo visit(BracketExpression n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n Arginfo temp = n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n \n //System.err.println(argu.classname+\" \"+argu.methodname+\" \");\n if(temp==null){\n \t //System.err.println(\"noo\");\n }\n \n return temp;\n }", "java.lang.String getJavacOpt(int index);", "@NotNull\n String getSyntax();", "Syntax getSyntax();", "public String getVarimaxOption(){\n if(this. varimaxOption){\n return \"normal varimax option\";\n }\n else{\n return \"raw varimax option\";\n }\n }", "@Test\r\n public void deriveFromBinaryXorAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M^=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH^=9\", \"(long,km^2/h)\");\r\n }", "public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}", "public void addOption(String opiton, boolean correct);", "public void setBracket(Bracket target) {\n currentBracket = target;\n }", "public interface AssignmentConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int AND = 1;\n /** RegularExpression Id. */\n int OR = 2;\n /** RegularExpression Id. */\n int IMPLIES = 3;\n /** RegularExpression Id. */\n int EQUIVALENT = 4;\n /** RegularExpression Id. */\n int PREDICATE = 5;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<AND>\",\n \"<OR>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<PREDICATE>\",\n };\n\n}", "String getOption();", "public boolean parseBracket(String s) {\n return false;\n }", "private Term parseTerm(final boolean required) throws ParseException {\n return parseAssign(required);\n }", "public Snippet visit(ExplodedSpecification n, Snippet argu) {\n\t Snippet _ret=null;\n\t _ret = n.nodeChoice.accept(this, argu);\n\t return _ret;\n\t }", "public interface ParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int IMPLIES = 1;\n /** RegularExpression Id. */\n int EQUIVALENT = 2;\n /** RegularExpression Id. */\n int AND = 3;\n /** RegularExpression Id. */\n int OR = 4;\n /** RegularExpression Id. */\n int LBRACKET = 5;\n /** RegularExpression Id. */\n int RBRACKET = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int EQUALS = 8;\n /** RegularExpression Id. */\n int FORALL = 9;\n /** RegularExpression Id. */\n int THEREEXISTS = 10;\n /** RegularExpression Id. */\n int VARIABLE = 11;\n /** RegularExpression Id. */\n int PREDICATE = 12;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<AND>\",\n \"<OR>\",\n \"<LBRACKET>\",\n \"<RBRACKET>\",\n \"<NOT>\",\n \"<EQUALS>\",\n \"<FORALL>\",\n \"<THEREEXISTS>\",\n \"<VARIABLE>\",\n \"<PREDICATE>\",\n };\n\n}", "public T caseBracketExpCS(BracketExpCS object) {\r\n return null;\r\n }", "final public void OptionalGraphPattern(Exp stack) throws ParseException {\n Exp e;\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case OPTIONAL:\n jj_consume_token(OPTIONAL);\n break;\n case OPTION:\n jj_consume_token(OPTION);\n deprecated(\"option\",\"optional\");\n break;\n default:\n jj_la1[176] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n e = GroupGraphPattern();\n e= Option.create(e);\n stack.add(e);\n }", "void setOption(String name, Object value);", "boolean getFocusBracketingAddInfinityPref();", "public OptionKey(final String... alternatives) {\n super(String.class);\n final Set<String> options = new TreeSet<String>(Arrays.asList(alternatives));\n this.wildcard = options.remove(\"*\");\n this.options = Collections.unmodifiableSet(options);\n }", "public final ANTLRv3Parser.optionsSpec_return optionsSpec() throws RecognitionException {\r\n ANTLRv3Parser.optionsSpec_return retval = new ANTLRv3Parser.optionsSpec_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token OPTIONS28=null;\r\n Token char_literal30=null;\r\n Token char_literal31=null;\r\n ANTLRv3Parser.option_return option29 =null;\r\n\r\n\r\n CommonTree OPTIONS28_tree=null;\r\n CommonTree char_literal30_tree=null;\r\n CommonTree char_literal31_tree=null;\r\n RewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,\"token 92\");\r\n RewriteRuleTokenStream stream_OPTIONS=new RewriteRuleTokenStream(adaptor,\"token OPTIONS\");\r\n RewriteRuleTokenStream stream_76=new RewriteRuleTokenStream(adaptor,\"token 76\");\r\n RewriteRuleSubtreeStream stream_option=new RewriteRuleSubtreeStream(adaptor,\"rule option\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:138:2: ( OPTIONS ( option ';' )+ '}' -> ^( OPTIONS ( option )+ ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:138:4: OPTIONS ( option ';' )+ '}'\r\n {\r\n OPTIONS28=(Token)match(input,OPTIONS,FOLLOW_OPTIONS_in_optionsSpec738); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_OPTIONS.add(OPTIONS28);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:138:12: ( option ';' )+\r\n int cnt13=0;\r\n loop13:\r\n do {\r\n int alt13=2;\r\n int LA13_0 = input.LA(1);\r\n\r\n if ( (LA13_0==RULE_REF||LA13_0==TOKEN_REF) ) {\r\n alt13=1;\r\n }\r\n\r\n\r\n switch (alt13) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:138:13: option ';'\r\n \t {\r\n \t pushFollow(FOLLOW_option_in_optionsSpec741);\r\n \t option29=option();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_option.add(option29.getTree());\r\n\r\n \t char_literal30=(Token)match(input,76,FOLLOW_76_in_optionsSpec743); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_76.add(char_literal30);\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t if ( cnt13 >= 1 ) break loop13;\r\n \t if (state.backtracking>0) {state.failed=true; return retval;}\r\n EarlyExitException eee =\r\n new EarlyExitException(13, input);\r\n throw eee;\r\n }\r\n cnt13++;\r\n } while (true);\r\n\r\n\r\n char_literal31=(Token)match(input,92,FOLLOW_92_in_optionsSpec747); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_92.add(char_literal31);\r\n\r\n\r\n // AST REWRITE\r\n // elements: option, OPTIONS\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 138:30: -> ^( OPTIONS ( option )+ )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:138:33: ^( OPTIONS ( option )+ )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_OPTIONS.nextNode()\r\n , root_1);\r\n\r\n if ( !(stream_option.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_option.hasNext() ) {\r\n adaptor.addChild(root_1, stream_option.nextTree());\r\n\r\n }\r\n stream_option.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public Nawiasy(String str) {\r\n super(str);\r\n openBracket = str.equals(\"(\");\r\n }", "private Operation selector(Scope scope, Vector queue)\r\n {\r\n Operation root;\r\n\r\n root = new Operation();\r\n\r\n if (nextSymbol == Keyword.DOTSY)\r\n {\r\n lookAhead();\r\n\r\n root.operator = nextSymbol;\r\n\r\n if (nextSymbol == Keyword.IDENTSY)\r\n {\r\n root.name = nextToken;\r\n lookAhead();\r\n root.left = argumentsOpt(scope, null, queue);\r\n }\r\n else if (nextSymbol == Keyword.SUPERSY)\r\n {\r\n matchKeyword(Keyword.SUPERSY);\r\n root.left = arguments(scope, null, queue);\r\n }\r\n else\r\n {\r\n matchKeyword(Keyword.NEWSY);\r\n root.left = innerCreator(scope, queue);\r\n }\r\n }\r\n else\r\n {\r\n root.operator = nextSymbol;\r\n matchKeyword(Keyword.LBRACKETSY);\r\n follower.add(Keyword.RBRACKETSY);\r\n unresolved.add(\"JavaArray\");\r\n root.left = expression(scope, queue);\r\n follower.remove(follower.size() - 1);\r\n matchKeyword(Keyword.RBRACKETSY);\r\n }\r\n\r\n return root;\r\n }", "public Builder setSymbol(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n symbol_ = value;\n onChanged();\n return this;\n }", "public Value( String inName, Variable inVar, int inIndex )\n {\n _var = inVar;\n _name = inName;\n _index = inIndex;\n }", "Node getVariable();", "public final ANTLRv3Parser.option_return option() throws RecognitionException {\r\n ANTLRv3Parser.option_return retval = new ANTLRv3Parser.option_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token char_literal33=null;\r\n ANTLRv3Parser.id_return id32 =null;\r\n\r\n ANTLRv3Parser.optionValue_return optionValue34 =null;\r\n\r\n\r\n CommonTree char_literal33_tree=null;\r\n RewriteRuleTokenStream stream_LABEL_ASSIGN=new RewriteRuleTokenStream(adaptor,\"token LABEL_ASSIGN\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n RewriteRuleSubtreeStream stream_optionValue=new RewriteRuleSubtreeStream(adaptor,\"rule optionValue\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:142:5: ( id '=' optionValue -> ^( '=' id optionValue ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:142:9: id '=' optionValue\r\n {\r\n pushFollow(FOLLOW_id_in_option772);\r\n id32=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id32.getTree());\r\n\r\n char_literal33=(Token)match(input,LABEL_ASSIGN,FOLLOW_LABEL_ASSIGN_in_option774); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_LABEL_ASSIGN.add(char_literal33);\r\n\r\n\r\n pushFollow(FOLLOW_optionValue_in_option776);\r\n optionValue34=optionValue();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_optionValue.add(optionValue34.getTree());\r\n\r\n // AST REWRITE\r\n // elements: LABEL_ASSIGN, optionValue, id\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 142:28: -> ^( '=' id optionValue )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:142:31: ^( '=' id optionValue )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_LABEL_ASSIGN.nextNode()\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n adaptor.addChild(root_1, stream_optionValue.nextTree());\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "@Override\n public R visit(BrackettedExpression n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n return _ret;\n }", "public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }", "public final ANTLRv3Parser.elementOption_return elementOption() throws RecognitionException {\r\n ANTLRv3Parser.elementOption_return retval = new ANTLRv3Parser.elementOption_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token char_literal127=null;\r\n ANTLRv3Parser.id_return id126 =null;\r\n\r\n ANTLRv3Parser.optionValue_return optionValue128 =null;\r\n\r\n\r\n CommonTree char_literal127_tree=null;\r\n RewriteRuleTokenStream stream_LABEL_ASSIGN=new RewriteRuleTokenStream(adaptor,\"token LABEL_ASSIGN\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n RewriteRuleSubtreeStream stream_optionValue=new RewriteRuleSubtreeStream(adaptor,\"rule optionValue\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:289:2: ( id '=' optionValue -> ^( '=' id optionValue ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:289:4: id '=' optionValue\r\n {\r\n pushFollow(FOLLOW_id_in_elementOption2099);\r\n id126=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id126.getTree());\r\n\r\n char_literal127=(Token)match(input,LABEL_ASSIGN,FOLLOW_LABEL_ASSIGN_in_elementOption2101); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_LABEL_ASSIGN.add(char_literal127);\r\n\r\n\r\n pushFollow(FOLLOW_optionValue_in_elementOption2103);\r\n optionValue128=optionValue();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_optionValue.add(optionValue128.getTree());\r\n\r\n // AST REWRITE\r\n // elements: id, LABEL_ASSIGN, optionValue\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 289:23: -> ^( '=' id optionValue )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:289:26: ^( '=' id optionValue )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_LABEL_ASSIGN.nextNode()\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n adaptor.addChild(root_1, stream_optionValue.nextTree());\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public interface VariableExpander {\n /**\n * Return the input string with any variables replaced by their\n * corresponding value. If there are no variables in the string,\n * then the input parameter is returned unaltered.\n */\n public String expand(String param);\n }", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "public void setOperandA(int val);", "@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}", "public String visit(BracketExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t _ret = n.f1.accept(this, argu);\n\t return _ret;\n\t}", "@Override\r\n\tpublic String getNotationExample()\r\n\t{\r\n\t\treturn \"(in-subrange 'X1-number', 'Y1-number', 'X2-number', 'Y2-number')\";\r\n\t}", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "public void setParens(int i, int i2, int i3) {\n if (this.backTrackStackTop != null && this.backTrackStackTop.parens == this.parens) {\n this.parens = (long[]) this.parens.clone();\n }\n this.parens[i] = (((long) i2) & 4294967295L) | (((long) i3) << 32);\n }", "private Operation identifierSuffix(Operation root, Operation next, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n lookAhead();\r\n lookAhead();\r\n unresolved.add(\"JavaArray\");\r\n\r\n bracketsOpt();\r\n\r\n matchKeyword(Keyword.DOTSY);\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n next.left.operator = Keyword.CLASSSY;\r\n }\r\n else if (nextSymbol == Keyword.DOTSY)\r\n {\r\n lookAhead();\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n lookAhead();\r\n next.left.operator = Keyword.CLASSSY;\r\n }\r\n else\r\n {\r\n next = (next.right = new Operation());\r\n next.left = new Operation();\r\n next.left.operator = nextSymbol;\r\n matchKeyword(Keyword.THISSY);\r\n }\r\n }\r\n else\r\n {\r\n next.left.left = argumentsOpt(scope, null, queue);\r\n }\r\n\r\n return root;\r\n }", "private void putSymbol(String symbol, String type, String eqn){\n System.out.println(symbol+ \" \"+ type + \" \"+ eqn);\n }", "private CurveCharKind(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "String getParamsAsString(boolean bWithParantheses);", "public interface sym {\n /* terminals */\n public static final int SHORT = 47;\n public static final int ANDEQ = 94;\n public static final int IMPLEMENTS = 4;\n public static final int CONST = 27;\n public static final int BITNOT = 68;\n public static final int STRICTFP = 35;\n public static final int NOTEQ = 74;\n public static final int PLUSEQ = 90;\n public static final int RBRACK = 60;\n public static final int CATCH = 20;\n public static final int COMMA = 62;\n public static final int RBRACE = 58;\n public static final int THROW = 22;\n public static final int RPAREN = 56;\n public static final int LBRACK = 59;\n public static final int ANDAND = 75;\n public static final int NUMERO = 101;\n public static final int OROR = 76;\n public static final int DOUBLE = 51;\n public static final int LBRACE = 57;\n public static final int TRANSIENT = 32;\n public static final int LPAREN = 55;\n public static final int XOREQ = 96;\n public static final int PROTECTED = 37;\n public static final int FALSE = 54;\n public static final int NOT = 67;\n public static final int COMENTARIO = 102;\n public static final int FINAL = 29;\n public static final int FLOAT = 49;\n public static final int URSHIFTEQ = 45;\n public static final int PACKAGE = 25;\n public static final int MOD = 86;\n public static final int CLASS = 2;\n public static final int SUPER = 34;\n public static final int ABSTRACT = 28;\n public static final int TRUE = 53;\n public static final int NATIVE = 30;\n public static final int PLUS = 79;\n public static final int LONG = 50;\n public static final int QUESTION = 69;\n public static final int WHILE = 17;\n public static final int EQUAL = 64;\n public static final int EXTENDS = 3;\n public static final int INTERFACE = 5;\n public static final int CHAR = 46;\n public static final int BOOLEAN = 44;\n public static final int SWITCH = 16;\n public static final int DO = 11;\n public static final int FOR = 14;\n public static final int RSHIFTEQ = 99;\n public static final int GREATER = 65;\n public static final int DIV = 82;\n public static final int VOID = 40;\n public static final int MULT = 81;\n public static final int PUBLIC = 36;\n public static final int RETURN = 15;\n public static final int ELSE = 13;\n public static final int TRY = 19;\n public static final int GTEQ = 73;\n public static final int BREAK = 7;\n public static final int DOT = 63;\n public static final int INT = 48;\n public static final int THROWS = 23;\n public static final int EQEQ = 71;\n public static final int NULL = 41;\n public static final int EOF = 0;\n public static final int SEMICOLON = 61;\n public static final int THIS = 42;\n public static final int DEFAULT = 10;\n public static final int MULTEQ = 92;\n public static final int IMPORT = 24;\n public static final int MINUS = 80;\n public static final int LTEQ = 72;\n public static final int OR = 84;\n public static final int URSHIFT = 89;\n public static final int error = 1;\n public static final int SYNCHRONIZED = 31;\n public static final int DIVEQ = 93;\n public static final int LSHIFTEQ = 98;\n public static final int FINALLY = 21;\n public static final int CONTINUE = 9;\n public static final int IF = 12;\n public static final int INSTANCEOF = 43;\n public static final int ID = 100;\n public static final int MODEQ = 97;\n public static final int MINUSMINUS = 78;\n public static final int COLON = 70;\n public static final int ASSERT = 18;\n public static final int OREQ = 95;\n public static final int VOLATILE = 33;\n public static final int PLUSPLUS = 77;\n public static final int CASE = 8;\n public static final int NEW = 6;\n public static final int RSHIFT = 88;\n public static final int STRING = 52;\n public static final int LESS = 66;\n public static final int BYTE = 26;\n public static final int AND = 83;\n public static final int PRIVATE = 38;\n public static final int STATIC = 39;\n public static final int LSHIFT = 87;\n public static final int XOR = 85;\n public static final int MINUSEQ = 91;\n}", "public interface GHOptions {\n\t\n\t// routing profiles\n\tfinal String CAR = \"car\";\n\tfinal String BIKE = \"bike\";\n\tfinal String CAR4WD = \"car4wd\";\n\tfinal String MOUNTAINBIKE = \"mtb\";\n\tfinal String MOTORCYCLE = \"motorcycle\";\n\tfinal String RACINGBIKE = \"racingbike\";\n\tfinal String HIKE = \"hike\";\n\tfinal String FOOT = \"foot\";\n\tfinal String BIKE2 = \"bike2\";\n\tfinal String CUSTOMCAR = \"customCar\";\n\tfinal String CUSTOMBIKE = \"customBike\";\n\tfinal String CUSTOMFOOT = \"customFoot\";\n\t\n\t// weightings\n\tfinal String FASTEST = \"fastest\";\n\tfinal String SHORTEST = \"shortest\";\n\tfinal String CURVATURE = \"curvature\"; //not supported in version 0.8\n\tfinal String SHORT_FASTEST = \"short_fastest\";\n\tfinal String CUSTOM = \"customWeighting\";\n\t\n\t// algorithms\n\tfinal String DIJKSTRA = \"dijkstra\";\n\tfinal String DIJKSTRABI = \"dijkstrabi\"; // can handle contraction hierarchies\n\tfinal String DIJKSTRA_ONE_TO_MANY = \"dijkstra_one_to_many\";\n\tfinal String ASTAR = \"astar\";\n\tfinal String ASTARBI = \"astarbi\"; // can handle contraction hierarchies\n\tfinal String ROUND_TRIP = \"round_trip\";\n\tfinal String ALTERNATIVE_ROUTE = \"alternative_route\";\n}", "Syntax.Node ParseActualParameters(Token t) throws Exception{\n if (t.token.equals(\"(\")){\n var expList = ParseExpList();\n t = lexer.next();\n if (t.token.equals(\")\")){\n return new Syntax.NodeActualParameters( expList);\n }\n }\n throw new Exception(\"Error in ParseActualParameters !!! \");\n }", "public static VariableSelector<IntVar> lexico_var_selector() {\n return new InputOrder<>();\n }", "public Node parameter()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.IDENTIFIER)\r\n\t\t{\r\n\t\t\tif(lexer.getString().equals(\"p\"))\r\n\t\t\t{\r\n\t\t\t\tif(lexer.getToken()==Lexer.Token.LEFT_BRACKETS)\r\n\t\t\t\t{\r\n\t\t\t\t\tNode var = variable();\r\n\t\t\t\t\tif(var!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString name = lexer.getString();\r\n\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.NUM\r\n\t\t\t\t\t\t\t&& !lexer.getString().contains(\".\"))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tint derivative = Integer.parseInt(lexer.getString());\r\n\t\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.NUM\r\n\t\t\t\t\t\t\t\t\t&& !lexer.getString().contains(\".\"))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tint phase = Integer.parseInt(lexer.getString());\r\n\t\t\t\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tParameter parsed = new Parameter(name,derivative,phase,null);\r\n\t\t\t\t\t\t\t\t\t\t\tfor(Parameter pars : parameters)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(pars.equals(parsed))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn pars;\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tparameters.add(parsed);\r\n\t\t\t\t\t\t\t\t\t\t\treturn parsed;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}", "public Snippet visit(DotRegionDotSize n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t Snippet _ret1 = n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t String _ret2 = \"region \";\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t \n\t return new Snippet(\"\", _ret1.returnTemp+\".\"+_ret2+\".\"+\"size\", new X10Integer(), false);\n\t }", "public String visit(BracketExpression n, LLVMRedux argu) throws Exception {\n\n\n return n.f1.accept(this,argu);\n }", "AliasVariable createAliasVariable();", "public Formula(Variable var) {\n\t\t// TODO: implement this.\n\t\t//throw new RuntimeException(\"not yet implemented.\");\n\t\tClause c;\n\t\tc=new Clause(PosLiteral.make(var));\t\n\t\tclauses=new NonEmptyImList<Clause>(c);\n\t}", "public final void rule__AstValuedVariableDeclaration__Alternatives_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3431:1: ( ( ( rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0 ) ) | ( ':=' ) )\n int alt32=2;\n int LA32_0 = input.LA(1);\n\n if ( (LA32_0==19) ) {\n alt32=1;\n }\n else if ( (LA32_0==47) ) {\n alt32=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 32, 0, input);\n\n throw nvae;\n }\n switch (alt32) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3432:1: ( ( rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3432:1: ( ( rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3433:1: ( rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0 )\n {\n before(grammarAccess.getAstValuedVariableDeclarationAccess().getConstantAssignment_1_0_0()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3434:1: ( rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3434:2: rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0\n {\n pushFollow(FOLLOW_rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0_in_rule__AstValuedVariableDeclaration__Alternatives_1_07493);\n rule__AstValuedVariableDeclaration__ConstantAssignment_1_0_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstValuedVariableDeclarationAccess().getConstantAssignment_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3438:6: ( ':=' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3438:6: ( ':=' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:3439:1: ':='\n {\n before(grammarAccess.getAstValuedVariableDeclarationAccess().getColonEqualsSignKeyword_1_0_1()); \n match(input,47,FOLLOW_47_in_rule__AstValuedVariableDeclaration__Alternatives_1_07512); \n after(grammarAccess.getAstValuedVariableDeclarationAccess().getColonEqualsSignKeyword_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n\tpublic void setOperands(int first, int second, int third) {\n\t\tthis.first = first;\n\t\tthis.second = second;\n\t\tthis.third = third;\n\t}", "public Function setParameter(int index, Function var) throws IndexOutOfBoundsException;", "private void viewBracket(Bracket bracket, HashMap<String, Bracket> playerMap){\n displayPane(new BracketPane(bracket, playerMap));\n }", "public Var(String var) {\r\n this.variable = var;\r\n }", "String getVariableDefinition();", "@Override\r\n\tpublic void visit(RoundBracketExpression roundBracketExpression) {\n\r\n\t}", "public Snippet visit(Assignment n, Snippet argu) {\n\t\t Snippet _ret = new Snippet(\"\", \"\", null, false);\n\t Snippet f0 = n.identifier.accept(this, argu);\n\t if(!arrayInitializer)\n\t\t arrayInitVar = f0.returnTemp; \n\t Snippet f1 = n.nodeToken.accept(this, argu);\n\t identifierToAddToGlobalHash = f0.returnTemp;\n\t Snippet f2 = n.expression.accept(this, argu);\n\t identifierToAddToGlobalHash = \"\";\n\t Snippet f3 = n.nodeToken1.accept(this, argu);\n\t \n//\t if(arrayInitializer){\n//\t \t _ret.returnTemp = generateTabs(blockDepth)+f0.returnTemp+\" = \";\n//\t _ret.returnTemp+=arrayInit +\"\\n /*ArrayInitilizer*/\"+arrayInitializerBlock;\t \n//\t arrayInit = \"\";\n//\t arrayInitializerBlock = \"\";\n//\t arrayInitializer = false;\n//\t tPlasmaCode+=_ret.returnTemp+\"\\n\";\n//\t }else{\n\t \t \n\t \t _ret.returnTemp = generateTabs(blockDepth)+f0.returnTemp+\" = \";\n\t \t _ret.returnTemp +=f2.returnTemp;\n\t\t\ttPlasmaCode+= f2.preface+\"\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\";\\n\";\n\t\t\ttPlasmaCode+= f2.postface+\"\\n\";\n\t\t\t\n\t // }\n\t return _ret;\n\t }", "@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elementType.pushStack();\r\n }", "@DISPID(1611005960) //= 0x60060008. The runtime will prefer the VTID if present\n @VTID(35)\n short parameterNameSurroundedByTheSymbol();", "public interface ForteLangConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int COMPARATOR_OP = 1;\n /** RegularExpression Id. */\n int BOOLEAN_OP = 2;\n /** RegularExpression Id. */\n int SET_OP = 3;\n /** RegularExpression Id. */\n int OP = 4;\n /** RegularExpression Id. */\n int CONCAT = 5;\n /** RegularExpression Id. */\n int SELECT = 6;\n /** RegularExpression Id. */\n int CONTAINS = 7;\n /** RegularExpression Id. */\n int NUMBER = 8;\n /** RegularExpression Id. */\n int FLOATING_POINT_NUMBER = 9;\n /** RegularExpression Id. */\n int BOOLEAN = 10;\n /** RegularExpression Id. */\n int STRING = 11;\n /** RegularExpression Id. */\n int REGEX_STRING = 12;\n /** RegularExpression Id. */\n int INCLUDE = 13;\n /** RegularExpression Id. */\n int IN = 14;\n /** RegularExpression Id. */\n int MATCH = 15;\n /** RegularExpression Id. */\n int OPENBRACKET = 16;\n /** RegularExpression Id. */\n int CLOSEBRACKET = 17;\n /** RegularExpression Id. */\n int OPENSBRACKET = 18;\n /** RegularExpression Id. */\n int CLOSESBRACKET = 19;\n /** RegularExpression Id. */\n int COMMA = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int SEMICOLON = 22;\n /** RegularExpression Id. */\n int OPENCBRACKET = 23;\n /** RegularExpression Id. */\n int CLOSECBRACKET = 24;\n /** RegularExpression Id. */\n int NUM = 25;\n /** RegularExpression Id. */\n int LST = 26;\n /** RegularExpression Id. */\n int SET = 27;\n /** RegularExpression Id. */\n int FUN = 28;\n /** RegularExpression Id. */\n int BOO = 29;\n /** RegularExpression Id. */\n int STR = 30;\n /** RegularExpression Id. */\n int COLON = 31;\n /** RegularExpression Id. */\n int VAR_NAME = 32;\n /** RegularExpression Id. */\n int FUNCTION_ARROW = 33;\n /** RegularExpression Id. */\n int GUARD_START = 34;\n /** RegularExpression Id. */\n int GUARD = 35;\n /** RegularExpression Id. */\n int GUARD_ARROW = 36;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int BlockComment = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<COMPARATOR_OP>\",\n \"<BOOLEAN_OP>\",\n \"<SET_OP>\",\n \"<OP>\",\n \"\\\"++\\\"\",\n \"\\\".\\\"\",\n \"\\\"?\\\"\",\n \"<NUMBER>\",\n \"<FLOATING_POINT_NUMBER>\",\n \"<BOOLEAN>\",\n \"<STRING>\",\n \"<REGEX_STRING>\",\n \"\\\"include\\\"\",\n \"\\\"in\\\"\",\n \"\\\"match\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\",\\\"\",\n \"\\\"=\\\"\",\n \"\\\";\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"num\\\"\",\n \"\\\"list\\\"\",\n \"\\\"set\\\"\",\n \"\\\"func\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"str\\\"\",\n \"\\\":\\\"\",\n \"<VAR_NAME>\",\n \"\\\"->\\\"\",\n \"\\\"|>\\\"\",\n \"\\\"|\\\"\",\n \"\\\"->>\\\"\",\n \"<token of kind 37>\",\n \"<token of kind 38>\",\n \"\\\"#[\\\"\",\n \"\\\"#[\\\"\",\n \"<token of kind 41>\",\n \"\\\"]#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n };\n\n}", "private FkCascadeActionOptions(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}", "public double getParameterValue (Assignment input) ;", "public interface SimpleGrParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int NumberLit = 6;\n /** RegularExpression Id. */\n int BooleanLit = 7;\n /** RegularExpression Id. */\n int StringLit = 8;\n /** RegularExpression Id. */\n int Null = 9;\n /** RegularExpression Id. */\n int And = 10;\n /** RegularExpression Id. */\n int Or = 11;\n /** RegularExpression Id. */\n int Not = 12;\n /** RegularExpression Id. */\n int Identifier = 13;\n /** RegularExpression Id. */\n int Equal = 14;\n /** RegularExpression Id. */\n int NotEqual = 15;\n /** RegularExpression Id. */\n int LessThan = 16;\n /** RegularExpression Id. */\n int LessEqualThan = 17;\n /** RegularExpression Id. */\n int GreaterThan = 18;\n /** RegularExpression Id. */\n int GreaterEqualThan = 19;\n /** RegularExpression Id. */\n int Plus = 20;\n /** RegularExpression Id. */\n int Minus = 21;\n /** RegularExpression Id. */\n int Div = 22;\n /** RegularExpression Id. */\n int Mult = 23;\n /** RegularExpression Id. */\n int Open = 24;\n /** RegularExpression Id. */\n int Close = 25;\n /** RegularExpression Id. */\n int Comma = 26;\n /** RegularExpression Id. */\n int Letter = 27;\n /** RegularExpression Id. */\n int Digit = 28;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"<NumberLit>\",\n \"<BooleanLit>\",\n \"<StringLit>\",\n \"\\\"NULL\\\"\",\n \"\\\"AND\\\"\",\n \"\\\"OR\\\"\",\n \"\\\"NOT\\\"\",\n \"<Identifier>\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"/\\\"\",\n \"\\\"*\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\",\\\"\",\n \"<Letter>\",\n \"<Digit>\",\n };\n\n}", "public int parensIndex(int i) {\n return (int) this.parens[i];\n }", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}" ]
[ "0.60432357", "0.5108466", "0.5074971", "0.5022312", "0.49492884", "0.49155238", "0.48643288", "0.4858962", "0.48210385", "0.48027745", "0.47747746", "0.47712", "0.47253755", "0.46971428", "0.4620098", "0.4598972", "0.45611584", "0.4553007", "0.45362785", "0.45211178", "0.44931334", "0.4479869", "0.44712326", "0.44567713", "0.44536877", "0.44530448", "0.44437763", "0.44431192", "0.44338852", "0.44282615", "0.4416647", "0.44128856", "0.4410894", "0.4410503", "0.44100112", "0.44040063", "0.44031617", "0.43967244", "0.4394591", "0.4381698", "0.43769476", "0.43730584", "0.43671554", "0.43652874", "0.4364423", "0.43565002", "0.4346562", "0.43412104", "0.4328698", "0.43263853", "0.43140915", "0.43113828", "0.43085033", "0.43037617", "0.4299356", "0.42935395", "0.42834994", "0.4279793", "0.42787564", "0.42766768", "0.4267495", "0.4266235", "0.4263354", "0.42551538", "0.42547372", "0.42509195", "0.42470652", "0.42276177", "0.4219154", "0.42176783", "0.4217554", "0.42131552", "0.42085698", "0.4198888", "0.4195166", "0.41948944", "0.41921455", "0.41686732", "0.41661072", "0.41655546", "0.4164045", "0.4159986", "0.41583365", "0.41565743", "0.41560718", "0.415341", "0.41522497", "0.41519654", "0.41450727", "0.41400185", "0.41372383", "0.41369078", "0.41347247", "0.41344288", "0.4133049", "0.4129277", "0.4125665", "0.41200256", "0.4115448", "0.41126972" ]
0.4189154
77
"class" ident [ "extend" type ] [ "implement" typeList ] classBody
private void classDeclaration(Modifier modifier, Scope scope, String basename) { Vector queue = new Vector(); HashSet dummy = unresolved; ClassType x = new ClassType(); unresolved = x.unresolved; if (comment != null && comment.length() > 0) { x.comment = comment + '\n'; resetComment(); } matchKeyword(Keyword.CLASSSY); if (!scopeStack.contains(scope)) scopeStack.add(scope); x.name = nextToken; //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0) // modifier.access &= ~Keyword.PUBLICSY.value; modifier.check(modifier.classes | modifier.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1)); if ((modifier.cur & Keyword.ABSTRACTSY.value) == 0) modifier.methods &= ~Keyword.ABSTRACTSY.value; else modifier.methods |= Keyword.ABSTRACTSY.value; x.modify |= modifier.cur; matchKeyword(Keyword.IDENTSY); declMember(scope, x); x.scope = new Scope(scope, Scope.classed, x.name.string); if (nextSymbol == Keyword.EXTENDSSY) { lookAhead(); Type t = type(); x.extend = new ClassType(t.ident.string.substring(t.ident.string.lastIndexOf('.') + 1)); } else if (((x.modify & Keyword.STATICSY.value) != 0 || (Scope)scopeStack.get(0) == scope) && x.name.string.compareTo("Object") != 0) { x.extend = new ClassType("Object"); unresolved.add(x.extend.name.string); } else x.extend = new ClassType(); if (nextSymbol == Keyword.IMPLEMENTSSY) { lookAhead(); x.implement = typeList(); } else x.implement = new ClassType[0]; if ((modifier.cur & Keyword.ABSTRACTSY.value) != 0 && (modifier.cur & modifier.constructors) == 0) modifier.cur |= Keyword.PUBLICSY.value ; modifier.cur &= modifier.constructors; classBody(x, new Modifier(), "", queue); Iterator iter = x.scope.iterator(); while(iter.hasNext()) { Basic b = (Basic)iter.next(); if (b instanceof MethodType) if ((b.modify & Keyword.STATICSY.value) != 0) { // remove this from static method MethodType m = (MethodType)b; m.scope.remove("§this"); if (m.parameter.length > 0 && m.parameter[0].name.string.compareTo("§this") == 0) { Parameter [] p = new Parameter[m.parameter.length - 1]; for(int i = 0; i < p.length; i++) p[i] = m.parameter[i + 1]; m.parameter = p; } } } // add queue to constructors addToConstructor(x, queue); unresolved = dummy; writeList(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void inAClassBody(AClassBody node) {\n // Determine the start and end line numbers.\n int begin = findBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AClassDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AClassDeclaration parent = (AClassDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n } else if (parentNode instanceof\n ASimpleClassInstanceCreationExpression\n || parentNode instanceof\n AQualifiedClassInstanceCreationExpression\n || parentNode instanceof\n AInnerclassClassInstanceCreationExpression) {\n // This handles an anonymous inner class declaration.\n // Use special value of 'new' for anonymous classes.\n cname = ANONYMOUS_CLASS_NAME;\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}", "@Override\n\tpublic void VisitClassNode(BunClassNode Node) {\n\n\t}", "@Override\n\tpublic Void visit(ClassDef classDef) {\n\t\tprintIndent(\"class\");\n\t\tindent++;\n\t\tclassDef.self_type.accept(this);\n\t\tclassDef.base_type.accept(this);\n\t\tfor (var v : classDef.body)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "Object getClass_();", "Object getClass_();", "@Override\n\tpublic void extends_(JDefinedClass cls) {\n\n\t}", "private void writeClass( TypeItem type, XMLWriter out ) {\n\t\t\n\t\tout.start(\n\t\t\t(type instanceof ClassItem)?\"class\":\"interface\",\n\t\t\tnew String[]{\"name\",type.name});\n\t\t\n\t\tif( type.getSuperType()!=null )\n\t\t\tout.element(\"extends\",\n\t\t\t\tnew String[]{\"name\",type.getSuperType().getTypeName()});\n\t\t\n\t\twriteType( type, out );\n\n\t\t\n\t\t// output miscellaneous information which may be useful.\n\t\tout.start(\"info\");\n\t\tout.start(\"derivedTypes\");\n\t\twriteDerivedTypes(\"class\",type,grammar.iterateClasses(),out);\n\t\twriteDerivedTypes(\"interface\",type,grammar.iterateInterfaces(),out);\n\t\tout.end(\"derivedTypes\");\n\t\tout.end(\"info\");\n\t\t\n\t\t\n\t\tout.end(\"class\");\n\t}", "public void buildClassSignature() {\n\t\tStringBuffer modifiers = new StringBuffer(classDoc.modifiers() + \" \");\n\t\tif (isEnum) {\n\t\t\tmodifiers.append(\"enum \");\n\t\t\tint index;\n\t\t\tif ((index = modifiers.indexOf(\"abstract\")) >= 0) {\n\t\t\t\tmodifiers.delete(index, index + (new String(\"abstract\")).length());\n\t\t\t\tmodifiers = new StringBuffer(Util.replaceText(modifiers.toString(), \" \", \" \"));\n\t\t\t}\n\t\t\tif ((index = modifiers.indexOf(\"final\")) >= 0) {\n\t\t\t\tmodifiers.delete(index, index + (new String(\"final\")).length());\n\t\t\t\tmodifiers = new StringBuffer(Util.replaceText(modifiers.toString(), \" \", \" \"));\n\t\t\t}\n\t\t} else if (!isInterface) {\n\t\t\tmodifiers.append(\"class \");\n\t\t}\n\t\twriter.writeClassSignature(modifiers.toString());\n\t}", "public final PythonParser.classdef_return classdef() throws RecognitionException {\n PythonParser.classdef_return retval = new PythonParser.classdef_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token CLASS271=null;\n Token NAME272=null;\n Token LPAREN273=null;\n Token RPAREN275=null;\n Token COLON276=null;\n PythonParser.decorators_return decorators270 = null;\n\n PythonParser.testlist_return testlist274 = null;\n\n PythonParser.suite_return suite277 = null;\n\n\n PythonTree CLASS271_tree=null;\n PythonTree NAME272_tree=null;\n PythonTree LPAREN273_tree=null;\n PythonTree RPAREN275_tree=null;\n PythonTree COLON276_tree=null;\n\n\n stmt stype = null;\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:5: ( ( decorators )? CLASS NAME ( LPAREN ( testlist[expr_contextType.Load] )? RPAREN )? COLON suite[false] )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:7: ( decorators )? CLASS NAME ( LPAREN ( testlist[expr_contextType.Load] )? RPAREN )? COLON suite[false]\n {\n root_0 = (PythonTree)adaptor.nil();\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:7: ( decorators )?\n int alt139=2;\n int LA139_0 = input.LA(1);\n\n if ( (LA139_0==AT) ) {\n alt139=1;\n }\n switch (alt139) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:7: decorators\n {\n pushFollow(FOLLOW_decorators_in_classdef7334);\n decorators270=decorators();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, decorators270.getTree());\n\n }\n break;\n\n }\n\n CLASS271=(Token)match(input,CLASS,FOLLOW_CLASS_in_classdef7337); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CLASS271_tree = (PythonTree)adaptor.create(CLASS271);\n adaptor.addChild(root_0, CLASS271_tree);\n }\n NAME272=(Token)match(input,NAME,FOLLOW_NAME_in_classdef7339); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n NAME272_tree = (PythonTree)adaptor.create(NAME272);\n adaptor.addChild(root_0, NAME272_tree);\n }\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:30: ( LPAREN ( testlist[expr_contextType.Load] )? RPAREN )?\n int alt141=2;\n int LA141_0 = input.LA(1);\n\n if ( (LA141_0==LPAREN) ) {\n alt141=1;\n }\n switch (alt141) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:31: LPAREN ( testlist[expr_contextType.Load] )? RPAREN\n {\n LPAREN273=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_classdef7342); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n LPAREN273_tree = (PythonTree)adaptor.create(LPAREN273);\n adaptor.addChild(root_0, LPAREN273_tree);\n }\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:38: ( testlist[expr_contextType.Load] )?\n int alt140=2;\n int LA140_0 = input.LA(1);\n\n if ( (LA140_0==NAME||(LA140_0>=LAMBDA && LA140_0<=NOT)||LA140_0==LPAREN||(LA140_0>=PLUS && LA140_0<=MINUS)||(LA140_0>=TILDE && LA140_0<=LBRACK)||LA140_0==LCURLY||(LA140_0>=BACKQUOTE && LA140_0<=STRING)) ) {\n alt140=1;\n }\n switch (alt140) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1565:38: testlist[expr_contextType.Load]\n {\n pushFollow(FOLLOW_testlist_in_classdef7344);\n testlist274=testlist(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, testlist274.getTree());\n\n }\n break;\n\n }\n\n RPAREN275=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_classdef7348); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n RPAREN275_tree = (PythonTree)adaptor.create(RPAREN275);\n adaptor.addChild(root_0, RPAREN275_tree);\n }\n\n }\n break;\n\n }\n\n COLON276=(Token)match(input,COLON,FOLLOW_COLON_in_classdef7352); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COLON276_tree = (PythonTree)adaptor.create(COLON276);\n adaptor.addChild(root_0, COLON276_tree);\n }\n pushFollow(FOLLOW_suite_in_classdef7354);\n suite277=suite(false);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, suite277.getTree());\n if ( state.backtracking==0 ) {\n\n Token t = CLASS271;\n if ((decorators270!=null?((Token)decorators270.start):null) != null) {\n t = (decorators270!=null?((Token)decorators270.start):null);\n }\n stype = new ClassDef(t, actions.cantBeNone(NAME272),\n actions.makeBases(actions.castExpr((testlist274!=null?((PythonTree)testlist274.tree):null))),\n actions.castStmts((suite277!=null?suite277.stypes:null)),\n actions.castExprs((decorators270!=null?decorators270.etypes:null)));\n \n }\n\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = stype;\n\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "ClassInstanceCreationExpression getClass_();", "public interface IClass extends IVisible, IMetaDataListHolder, INamableNode, IAsDocHolder, ICommentHolder\n{\n /**\n * @return\n */\n List< IAttribute > getAttributes();\n\n /**\n * @return\n */\n double getAverageCyclomaticComplexity();\n\n /**\n * @return\n */\n IParserNode getBlock();\n\n /**\n * @return\n */\n List< IConstant > getConstants();\n\n /**\n * @return\n */\n IFunction getConstructor();\n\n /**\n * @return\n */\n String getExtensionName();\n\n /**\n * @return\n */\n List< IFunction > getFunctions();\n\n /**\n * @return\n */\n List< IParserNode > getImplementations();\n\n /**\n * @return\n */\n boolean isBindable();\n\n /**\n * @return\n */\n boolean isFinal();\n}", "public static String startClass(String className, String isInterface, String isAbstract, String isInner, String comment, int sloc) {\n\t\treturn \"\\t\\t<class name=\\\"\" + className + \"\\\" intfc=\\\"\"+ isInterface + \"\\\" abs=\\\"\" + isAbstract + \"\\\" inn=\\\"\" + isInner + \n\t\t\t\"\\\" sloc=\\\"\" + sloc + \"\\\" jdoc=\\\"\" + comment + \"\\\">\" + \"\\n\";\n\t}", "@Override\n\tpublic String typeKey() {\n\t return \"class\";\n\t}", "InstrumentedType.WithFlexibleName subclass(String name, int modifiers, TypeDescription.Generic superClass);", "public interface ClassNode\n{\n}", "@Override\n public void visit(ClassDefinitionNode classDefinitionNode) {\n }", "public interface ClassType extends Importable, ReferenceType, MemberInstance\n{\n public static class Kind extends Enum {\n public Kind(String name) {\n super(name);\n }\n }\n\n public static final Kind TOP_LEVEL = new Kind(\"top-level\");\n public static final Kind MEMBER = new Kind(\"member\");\n public static final Kind LOCAL = new Kind(\"local\");\n public static final Kind ANONYMOUS = new Kind(\"anonymous\");\n\n /** Get the class's kind. */\n Kind kind();\n\n /**\n * Return true if the class is top-level (i.e., not inner).\n * Equivalent to kind() == TOP_LEVEL.\n */\n boolean isTopLevel();\n\n /**\n * Return true if the class is an inner class.\n * Equivalent to kind() == MEMBER || kind() == LOCAL || kind() == ANONYMOUS.\n * @deprecated Was incorrectly defined. Use isNested for nested classes,\n * and isInnerClass for inner classes.\n */\n boolean isInner();\n\n /**\n * Return true if the class is a nested.\n * Equivalent to kind() == MEMBER || kind() == LOCAL || kind() == ANONYMOUS.\n */\n boolean isNested();\n\n /**\n * Return true if the class is an inner class, that is, it is a nested\n * class that is not explicitly or implicitly declared static; an interface\n * is never an inner class.\n */\n boolean isInnerClass();\n\n /**\n * Return true if the class is a member class.\n * Equivalent to kind() == MEMBER.\n */\n boolean isMember();\n\n /**\n * Return true if the class is a local class.\n * Equivalent to kind() == LOCAL.\n */\n boolean isLocal();\n\n /**\n * Return true if the class is an anonymous class.\n * Equivalent to kind() == ANONYMOUS.\n */\n boolean isAnonymous();\n\n /**\n * Return true if the class declaration occurs in a static context.\n * Is used to determine if a nested class is implicitly static.\n */\n boolean inStaticContext();\n\n /**\n * The class's constructors.\n * A list of <code>ConstructorInstance</code>.\n * @see polyglot.types.ConstructorInstance\n */\n List constructors();\n\n /**\n * The class's member classes.\n * A list of <code>ClassType</code>.\n * @see polyglot.types.ClassType\n */\n List memberClasses();\n\n /** Returns the member class with the given name, or null. */\n ClassType memberClassNamed(String name);\n\n /** Get a field by name, or null. */\n FieldInstance fieldNamed(String name);\n\n /** Return true if the class is strictly contained in <code>outer</code>. */\n boolean isEnclosed(ClassType outer);\n\n /**\n * Implementation of <code>isEnclosed</code>.\n * This method should only be called by the <code>TypeSystem</code>\n * or by a subclass.\n */\n boolean isEnclosedImpl(ClassType outer);\n\n /** Return true if an object of the class has\n * an enclosing instance of <code>encl</code>. */\n boolean hasEnclosingInstance(ClassType encl);\n\n /**\n * Implementation of <code>hasEnclosingInstance</code>.\n * This method should only be called by the <code>TypeSystem</code>\n * or by a subclass.\n */\n boolean hasEnclosingInstanceImpl(ClassType encl);\n\n /** The class's outer class if this is a nested class, or null. */\n ClassType outer();\n}", "Class createClass();", "private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }", "public String getType() {\n\t\treturn \"class\";\n\t}", "DOMType(char[] document, int[] sourceRange, String name, int[] nameRange, int[] commentRange, int flags, int[] modifierRange, int[] typeRange, int[] superclassRange, int[] extendsRange, String[] implementsList, int[] implementsRange, int[] implementsKeywordRange, int[] openBodyRange, int[] closeBodyRange, boolean isClass) {\n super(document, sourceRange, name, nameRange, commentRange, flags, modifierRange);\n this.fTypeRange = typeRange;\n setMask(MASK_TYPE_IS_CLASS, isClass);\n this.fExtendsRange = extendsRange;\n this.fImplementsRange = implementsKeywordRange;\n this.fSuperclassRange = superclassRange;\n this.fInterfacesRange = implementsRange;\n this.fCloseBodyRange = closeBodyRange;\n setMask(MASK_TYPE_HAS_SUPERCLASS, superclassRange[0] > 0);\n setMask(MASK_TYPE_HAS_INTERFACES, implementsList != null);\n this.fSuperInterfaces = implementsList;\n this.fOpenBodyRange = openBodyRange;\n this.fCloseBodyRange = closeBodyRange;\n setMask(MASK_DETAILED_SOURCE_INDEXES, true);\n }", "@Override\n\tpublic void annotate(JDefinedClass cls) {\n\n\t}", "public static String endClass() {\n\t\treturn \"\\t\\t</class>\" + \"\\n\";\n\t}", "public void visit(ClassDeclExtends node) {\n Symbol key = Symbol.symbol(node.name.s);\n ClassInfo data = new ClassInfo(key);\n\n // Chama o firstPass() para as variaveis\n VarDeclListHandler.firstPass(env, data, node.varList);\n\n // Chama o firstPass() para os metodos\n MethodDeclListHandler.firstPass(env, data, node.methodList);\n\n // Insere a classe na tabela\n if (!env.classes.put(key, data)) {\n env.err.Error(node, new Object[] {\"Nome de classe redefinido: \" + key});\n }\n }", "public ObjectClassDefinitionImpl() {\n\t\t// empty\n\t}", "public RubyClass defineClass(String name, RubyClass superClass, ObjectAllocator allocator, CallSite[] callSites) {\n return defineClassUnder(name, superClass, allocator, objectClass, callSites);\n }", "byte[] createJCas_TypeCoverClass(TypeImpl type) {\n this.type = type;\n typeJavaDescriptor = type.getJavaDescriptor();\n typeJavaClassName = type.getName().replace('.', '/') + \"_Type\";\n cn = new ClassNode(ASM5); // java 8\n cn.version = JAVA_CLASS_VERSION;\n cn.access = ACC_PUBLIC + ACC_SUPER;\n cn.name = typeJavaClassName; \n cn.superName = type.getSuperType().getName().replace('.', '/') + \"_Type\";\n\n // TODO\n \n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cn.accept(cw);\n return cw.toByteArray();\n }", "public interface KClass<T> extends KDeclarationContainer, KAnnotatedElement {\n}", "@Override\n protected String className(ClassType t, boolean longform, Locale locale) {\n Symbol sym = t.tsym;\n if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) {\n return OBJECT;\n } else if (sym.name.length() == 0) {\n // Anonymous\n String s;\n ClassType norm = (ClassType) t.tsym.type;\n if (norm == null) {\n s = OBJECT;\n } else if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) {\n s = visit(norm.interfaces_field.head, locale);\n } else {\n s = visit(norm.supertype_field, locale);\n }\n return s;\n } else if (longform) {\n String pkg = \"\";\n for (Symbol psym = sym; psym != null; psym = psym.owner) {\n if (psym.kind == PCK) {\n pkg = psym.getQualifiedName().toString();\n break;\n }\n }\n return fullClassNameAndPackageToClass.apply(\n sym.getQualifiedName().toString(),\n pkg\n );\n } else {\n return sym.name.toString();\n }\n }", "@Override\n\tpublic void inAInterfaceBody(AInterfaceBody node) {\n // Determine the start and end line numbers.\n int begin = findInterfaceBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AInterfaceDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AInterfaceDeclaration parent = (AInterfaceDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "public RubyClass defineClass(String name, RubyClass superClass, ObjectAllocator allocator) {\n return defineClassUnder(name, superClass, allocator, objectClass);\n }", "public Class() {\n\t\tarrayMethods = new ArrayList<Method>();\n\t\tcode_Smells = new HashMap<String, Boolean>();\n\n\t}", "java.lang.String getClass_();", "java.lang.String getClass_();", "private void classBodyDeclaration(ClassType object, Modifier modifier, Vector queue)\r\n {\r\n Modifier x = new Modifier(modifier);\r\n x.cur = 0;\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n if (nextSymbol == Keyword.STATICSY)\r\n {\r\n x.add(modifier());\r\n queue = object.statics;\r\n }\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n Vector label = new Vector();\r\n //label.add(\"\" + Operation.newLabel());\r\n block(null, null, object.scope, label, Scope.MAIN, null, queue);\r\n }\r\n else\r\n {\r\n for(int y = modifier1(); y != 0; y = modifier())\r\n x.add(y);\r\n\r\n if ((x.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n if ((x.cur & x.constructors) == 0)\r\n x.cur |= modifier.cur & modifier.constructors;\r\n\r\n if ((x.cur & Keyword.STATICSY.value) != 0)\r\n queue = object.statics;\r\n\r\n memberDecl(x, object, queue);\r\n }\r\n }", "public static String classDecl()\n {\n read_if_needed_();\n \n return _class_decl;\n }", "private void __setClassDescription() {\n\t\tEOClassDescription cd = EOClassDescription.classDescriptionForClass(getClass());\n\t\tif (cd == null) {\n\t\t\tthrow new IllegalStateException(\"Unabled to find an EOClassDescription for objects of \" + getClass());\n\t\t}\n\t\t__setClassDescription(cd);\n\t}", "@Override\n\tpublic void inAClass(AClass node) {\n\t\tString className = node.getType().getText();\n\t\tcurrentClass = topLevelSymbolTable.get(className);\n\t\tif (currentClass.isAbstract()){\n\t\t\tcg = new ClassGen(className, currentClass.getSuper().getType().className, this.fileName, Constants.ACC_PUBLIC | Constants.ACC_SUPER | Constants.ACC_ABSTRACT, null);\n\t\t}else{\n\t\t\tcg = new ClassGen(className, currentClass.getSuper().getType().className, this.fileName, Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);\n\t\t}\n\t\tcp = cg.getConstantPool(); \n\t}", "public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }", "protected abstract Result createClasses( Outline outline, CClassInfo bean );", "DescribedClass createDescribedClass();", "SootClassBuilder(SootClass klass) {\n\t\tsuper(Opcodes.ASM4);\n\t\tthis.klass = klass;\n\t\tthis.deps = new HashSet();\n\t}", "west.twouse.language.sparqlas.Class getClass_();", "@Override\n\tpublic void attendClass() {\n\t\tSystem.out.println(\"Attanding class locally\");\n\t}", "protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "protected static ClassDecl createClass(String name, String superName) {\n\t\tErrorMsg errorMsg = new ErrorMsg(\"Sem1Visitor\");\n\t\treturn new ClassDecl(-1, name, superName, new DeclList());\n\t}", "byte[] createJCasCoverClass(TypeImpl type) {\n this.type = type;\n typeJavaDescriptor = type.getJavaDescriptor();\n typeJavaClassName = type.getName().replace('.', '/');\n cn = new ClassNode(ASM5); // java 8\n cn.version = JAVA_CLASS_VERSION;\n cn.access = ACC_PUBLIC + ACC_SUPER;\n cn.name = typeJavaClassName; \n cn.superName = type.getSuperType().getName().replace('.', '/');\n// cn.interfaces = typeImpl.getInterfaceNamesArray(); // TODO\n \n // add the \"_typeImpl\" field - this has a ref to the TypeImpl for this class\n cn.fields.add(new FieldNode(ACC_PUBLIC + ACC_FINAL + ACC_STATIC,\n \"_typeImpl\", \"Lorg/apache/uima/type_system/impl/TypeImpl;\", null, null));\n \n // add field declares, and getters and setters, and special getters/setters for array things \n type.getMergedStaticFeaturesIntroducedByThisType().stream()\n .forEach(this::addFeatureFieldGetSet);\n \n addStaticInitAndConstructors();\n \n createSwitchGettersAndSetters();\n \n \n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);\n cn.accept(cw);\n return cw.toByteArray();\n }", "private void buildClass(ast.classs.Class c) {\r\n\t\tthis.classTable.put(c.id, new ClassBinding(c.extendss));\r\n\t\tfor (ast.dec.T dec : c.decs) {\r\n\t\t\tast.dec.Dec d = (ast.dec.Dec) dec;\r\n\t\t\tthis.classTable.put(c.id, d.id, d.type, d.lineNum);\r\n\t\t}\r\n\t\tfor (ast.method.T method : c.methods) {\r\n\t\t\tast.method.Method m = (ast.method.Method) method;\r\n\t\t\tthis.classTable.put(c.id, m.id,\r\n\t\t\t\t\tnew MethodType(m.retType, m.formals));\r\n\t\t}\r\n\t}", "public void setExtClass(Class clas){\n\t\t\n\t\tthis.clas = clas;\n\t}", "public TYPE SemantMe() throws SemantMeException{\n if(!this.st.IsVarNameNew(idName,true))\n\t\t\tthrow new SemantMeException(lineNumber,\"The name \"+idName+\" aleady exists in the symbol table!\\n\");\t\t\n\n \n /* [1] Make sure the class extends a previously defined class */\n TYPE parent = null;\n if (parentName != null) {\n parent = this.st.find(parentName);\n if (parent == null || !parent.isClass()) {\n String info = (parent == null) ? \"Parent name is not declared\" : \"Parent name is not a class\";\n throw new SemantMeException(lineNumber, info);\n }\n }\n TYPE_CLASS parentClass = (TYPE_CLASS) parent;\n \n /* [2] Begin Class Scope */\n this.st.beginScope();\n this.st.setCurrParentClass(parentClass);\n \n /* [3] Enter current class for recursive references. Will be removed when scope ends. */\n /* For example - when implemnting a comparator between two instances of the same class */\n TYPE_CLASS currClass = new TYPE_CLASS(parentClass, idName, null, null);\n this.st.enter(idName, currClass);\n \n /* [4] Semant data members */\n if (dataMembers != null) {\n currClass.AddDataMember((TYPE_CLASS_VAR_DEC) dataMembers.head.SemantBody());\n for (AST_C_FIELD_LIST list = dataMembers.tail; list != null; list = list.tail) {\n // Call semantMe on current C_FIELD and store its returned type in class's dataMembers list.\n currClass.AddDataMember((TYPE_CLASS_VAR_DEC) list.head.SemantBody());\n }\n }\n \n /* Semant Signature */\n if (methods != null) {\n currClass.AddMethod(methods.head.SemantSignature());\n for (AST_C_FIELD_LIST list = methods.tail; list != null; list = list.tail) {\n // Call semantMe on current C_FIELD and store its returned type in class's methods list.\n currClass.AddMethod(list.head.SemantSignature());\n }\n }\n // Semant Body\n if (methods != null) {\n methods.head.SemantBody();\n for (AST_C_FIELD_LIST list = methods.tail; list != null; list = list.tail) {\n // Call semantMe on current C_FIELD and store its returned type in class's methods list.\n list.head.SemantBody();\n }\n }\n \n /* [7] End Scope */\n this.st.setCurrParentClass(null);\n this.st.endScope();\n \n /* [8] Enter the Class Type to the Symbol Table */\n this.st.enter(idName, currClass);\n\n /* [9] Return value is irrelevant for class declarations */\n return null;\n \n \n }", "static Identifier makeTypeClass(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CLASS, name);\r\n }\r\n }", "private static boolean classModifiers_1_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classModifiers_1_1_0\")) return false;\n boolean r;\n r = consumeToken(b, BASE);\n if (!r) r = consumeToken(b, INTERFACE);\n if (!r) r = consumeToken(b, FINAL);\n return r;\n }", "public static boolean classDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classDefinition\")) return false;\n if (!nextTokenIs(b, \"<class definition>\", ABSTRACT, AT,\n BASE, CLASS, FINAL, INTERFACE, MIXIN, SEALED)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, CLASS_DEFINITION, \"<class definition>\");\n r = classDefinition_0(b, l + 1);\n r = r && classDefinition_1(b, l + 1);\n r = r && consumeToken(b, CLASS);\n r = r && componentName(b, l + 1);\n p = r; // pin = 4\n r = r && report_error_(b, classDefinition_4(b, l + 1));\n r = p && classDefinition_5(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public final void normalClassDeclaration() throws RecognitionException {\n int normalClassDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"normalClassDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(226, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 10) ) { return ; }\n // Java.g:227:5: ( 'class' Identifier ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody )\n dbg.enterAlt(1);\n\n // Java.g:227:9: 'class' Identifier ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody\n {\n dbg.location(227,9);\n match(input,37,FOLLOW_37_in_normalClassDeclaration448); if (state.failed) return ;\n dbg.location(227,17);\n match(input,Identifier,FOLLOW_Identifier_in_normalClassDeclaration450); if (state.failed) return ;\n dbg.location(227,28);\n // Java.g:227:28: ( typeParameters )?\n int alt17=2;\n try { dbg.enterSubRule(17);\n try { dbg.enterDecision(17);\n\n int LA17_0 = input.LA(1);\n\n if ( (LA17_0==40) ) {\n alt17=1;\n }\n } finally {dbg.exitDecision(17);}\n\n switch (alt17) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: typeParameters\n {\n dbg.location(227,28);\n pushFollow(FOLLOW_typeParameters_in_normalClassDeclaration452);\n typeParameters();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(17);}\n\n dbg.location(228,9);\n // Java.g:228:9: ( 'extends' type )?\n int alt18=2;\n try { dbg.enterSubRule(18);\n try { dbg.enterDecision(18);\n\n int LA18_0 = input.LA(1);\n\n if ( (LA18_0==38) ) {\n alt18=1;\n }\n } finally {dbg.exitDecision(18);}\n\n switch (alt18) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:228:10: 'extends' type\n {\n dbg.location(228,10);\n match(input,38,FOLLOW_38_in_normalClassDeclaration464); if (state.failed) return ;\n dbg.location(228,20);\n pushFollow(FOLLOW_type_in_normalClassDeclaration466);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(18);}\n\n dbg.location(229,9);\n // Java.g:229:9: ( 'implements' typeList )?\n int alt19=2;\n try { dbg.enterSubRule(19);\n try { dbg.enterDecision(19);\n\n int LA19_0 = input.LA(1);\n\n if ( (LA19_0==39) ) {\n alt19=1;\n }\n } finally {dbg.exitDecision(19);}\n\n switch (alt19) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:229:10: 'implements' typeList\n {\n dbg.location(229,10);\n match(input,39,FOLLOW_39_in_normalClassDeclaration479); if (state.failed) return ;\n dbg.location(229,23);\n pushFollow(FOLLOW_typeList_in_normalClassDeclaration481);\n typeList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(19);}\n\n dbg.location(230,9);\n pushFollow(FOLLOW_classBody_in_normalClassDeclaration493);\n classBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 10, normalClassDeclaration_StartIndex); }\n }\n dbg.location(231, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"normalClassDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void consulterClassement() {\n\t\t\n\t}", "public Class(String name) {\n\t\tthis.name = name;\n\t\tarrayMethods = new ArrayList<Method>();\n\t\tcode_Smells = new HashMap<String, Boolean>();\n\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"class FatherClass\";\n\t}", "public abstract Annotations getClassAnnotations();", "public void setDefiningType(Class cls) {\n _class = cls;\n }", "public Object VisitClass(ASTClass asclass) {\n ResetOffsets();\n \n if (typeEnv.find(asclass.name()) != null) {\n CompError.message(asclass.line(), \"Cannot have classes with the same name.\");\n return IntegerType.instance();\n }\n \n VariableEnvironment variables = new VariableEnvironment();\n ASTInstanceVariableDefs variabledefs = asclass.variabledefs();\n Type type;\n if (variabledefs != null) {\n variabledefs.Accept(this);\n //Go through each variable definition and insert it into class's \n //variable environment\n ASTInstanceVariableDef vardef;\n for (int i = 0; i < variabledefs.size(); i++) {\n vardef = variabledefs.elementAt(i);\n type = CheckType(vardef.type(), vardef.arraydimension(), vardef.line());\n //If there is a variable def of same name already in the class's variable enviro,\n //give an error\n if (variables.find(vardef.name()) != null) {\n CompError.message(vardef.line(), \"Cannot have 2 instance variables\"\n + \"of the same name within the same class.\");\n return IntegerType.instance();\n }\n variables.insert(vardef.name(), new VariableEntry(type, IncrementOffset()));\n }\n }\n ClassType classType = new ClassType(variables);\n //Create new Type entry for class\n typeEnv.insert(asclass.name(), classType);\n //functionEnv.insert(asclass.name(), new FunctionEntry(classType, new Vector<Type>()));\n return classType;\n }", "public Document compileClass() throws ParserConfigurationException, DOMException, CloneNotSupportedException {\n\t\tElement ele = null;\n\t\tString token;\n\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = null;\n\t\tbuilder = factory.newDocumentBuilder();\n\t\tdocument = builder.newDocument();\n\n\t\t// Root level XML\n\t\troot = document.createElement(\"class\");\n\t\tdocument.appendChild(root);\n\n\t\t// First token is \"class\"\n\t\tjTokenizer.advance();\n\t\tele = createXMLnode(\"keyword\");\n\t\troot.appendChild(ele);\n\n\t\t// Second token is the class name\n\t\tjTokenizer.advance();\n\t\tclassName = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(\"identifier\");\n\t\troot.appendChild(ele);\n\n\t\t// Third token is '{'\n\t\tjTokenizer.advance();\n\t\tele = createXMLnode(\"symbol\");\n\t\troot.appendChild(ele);\n\n\t\t// Fourth token is the datatype of the class var declaration\n\t\tjTokenizer.advance();\n\t\tString tokenType;\n\t\ttoken = jTokenizer.returnTokenVal(\"keyword\");\n\n\t\tdo {\n\t\t\t// Declare the class variables\n\t\t\tif (token.matches(\"field|static\")) {\n\t\t\t\tcompileClassVarDec();\n\n\t\t\t}\n\t\t\t// Subroutine Declaration\n\t\t\tif (token.matches(\"constructor|function|method\")) {\n\t\t\t\tcompileSubroutine();\n\t\t\t}\n\t\t\tif (jTokenizer.hasNext()) {\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\t}\n\n\t\t} while (!token.equals(\"}\"));\n\n\t\t// Token \"}\"\n\t\tele = createXMLnode(\"symbol\");\n\t\troot.appendChild(ele);\n\n\t\twriter.close();\n\t\treturn document;\n\t}", "public ClassNode(OClass clas) {\n\t\tname = clas.getName();\n\t\tsource = clas;\n\t}", "public void inAClass(AClass node) {\n TIdentifier id = node.getIdentifier();\n \n if (node.getExtension() == null && \n ! id.getText().equals(\"Object\")) {\n node.setExtension(\n new AExtension(new TIdentifier(\"Object\",id.getLine(),id.getPos())));\n }\n }", "public ClassInfo declaringClass();", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "static boolean classModifiers(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classModifiers\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, SEALED);\n if (!r) r = classModifiers_1(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "public interface ClassDeclaring extends SymDeclaring {\n public ModsAttrs getMods();\n}", "@Override\n\tpublic void implements_(JDefinedClass cls) {\n\n\t}", "NamedClass createNamedClass();", "@Override\n\tpublic void visit(OWLClass cls) {\n\t\taddFact(RewritingVocabulary.CLASS, cls.getIRI());\n\t}", "public void visit(ClassOrInterfaceDeclaration arg0, Object arg1) {\n\t \tclassName = arg0.getName();\n\t \tisInterface = arg0.toString().indexOf(\"interface\")!=-1;\n\t \tisAbstract = arg0.toString().indexOf(\"abstract\")!=-1;\n\t \tmyClasses.add(className);\n\t \tfor(Iterator<?> it = arg0.getImplements().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ..|> \" + it.next() + \"\\n\";\n\t \tfor(Iterator<?> it = arg0.getExtends().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ---|> \" +it.next() + \"\\n\";\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "Object yangAugmentedInfo(Class classObject);", "Object yangAugmentedInfo(Class classObject);", "@Override\n public ASTNode visitCoolClass(CoolParser.CoolClassContext ctx) {\n List<FeatureNode> featureNodes = new LinkedList<>();\n for (var feature : ctx.feature()) {\n featureNodes.add((FeatureNode) feature.accept(this));\n }\n\n return new CoolClassNode(\n ctx.CLASS().getSymbol(),\n new IdNode(ctx.id),\n ctx.parentClass == null ? null : new TypeNode(ctx.parentClass),\n featureNodes);\n }", "void compileClass() throws IOException {\n tagBracketPrinter(CLASS_TAG, OPEN_TAG_BRACKET);\n try {\n compileClassHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(CLASS_TAG, CLOSE_TAG_BRACKET);\n\n }", "public void buildClassHeader() {\n\t\tString key;\n\t\tif (isInterface) {\n\t\t\tkey = \"doclet.Interface\";\n\t\t} else if (isEnum) {\n\t\t\tkey = \"doclet.Enum\";\n\t\t} else {\n\t\t\tkey = \"doclet.Class\";\n\t\t}\n\n\t\twriter.writeHeader(configuration.getText(key) + \" \" + classDoc.name());\n\t}", "public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) {\n // This method is intended only for defining new classes in Ruby code,\n // so it uses the allocator of the specified superclass or default to\n // the Object allocator. It should NOT be used to define classes that require a native allocator.\n \n Ruby runtime = getRuntime();\n IRubyObject classObj = getConstantAt(name);\n RubyClass clazz;\n \n if (classObj != null) {\n if (!(classObj instanceof RubyClass)) throw runtime.newTypeError(name + \" is not a class\");\n clazz = (RubyClass)classObj;\n \n if (superClazz != null) {\n RubyClass tmp = clazz.getSuperClass();\n while (tmp != null && tmp.isIncluded()) tmp = tmp.getSuperClass(); // need to skip IncludedModuleWrappers\n if (tmp != null) tmp = tmp.getRealClass();\n if (tmp != superClazz) throw runtime.newTypeError(\"superclass mismatch for class \" + name);\n // superClazz = null;\n }\n \n if (runtime.getSafeLevel() >= 4) throw runtime.newTypeError(\"extending class prohibited\");\n } else if (classProviders != null && (clazz = searchProvidersForClass(name, superClazz)) != null) {\n // reopen a java class\n } else {\n if (superClazz == null) superClazz = runtime.getObject();\n clazz = RubyClass.newClass(runtime, superClazz, name, superClazz.getAllocator(), this, true);\n }\n \n return clazz;\n }", "@Override\n\tpublic void buildAttributes(JDefinedClass cls) {\n\n\t}", "public abstract Class getDescriptedClass();", "default boolean isClass() {\n return false;\n }", "public String getClazz();", "@Override\n\tpublic String visitClassDeclaration(ClassDeclarationContext ctx){\n\t\ttable.enterScope();\t\t\n\t\tvisit(ctx.getChild(4)); //visit methodList. \n\t\ttable.exitScope();\n\t\treturn null;\n\t}", "public ASCompilationUnit newClass(String qualifiedClassName) {\n\t\treturn ASTBuilder.synthesizeClass(qualifiedClassName);\n\t}", "void addClass(ClassDefinition cd) throws ResultException, DmcValueException {\n\n// if (checkAndAdd(cd.getObjectName(),cd,classDefs) == false){\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsg(cd.getObjectName(),cd,classDefs,\"class names\"));\n// \tthrow(ex);\n// }\n \n classDefinitions.add(cd);\n \n // This name is used to identify references to the class\n DotName refName \t= new DotName((DotName) cd.getDotName().getParentName(),\"ClassDefinitionREF\");\n \n if (debugClassAdditions)\n \tDebugInfo.debug(\"Adding class: \" + cd.getDotName() + \" \" + refName);\n \n if (checkAndAddDOT(cd.getDotName(),cd,globallyUniqueMAP,refName) == false){\n \tResultException ex = new ResultException();\n \tex.addError(clashMsgDOT(cd.getObjectName(),cd,globallyUniqueMAP,\"definition names\"));\n throw(ex);\n }\n\n // TODO: revisit abbreviations - this was originally required for LDAP naming, which, if\n // it's ever done, should be handled in the LDAP mechanisms.\n// if (cd.getAbbrev() != null){\n// // We have an abbreviation - so it must also be unique and\n// // added to the appropriate maps\n// \tDefinitionName abbrevName = new DefinitionName(cd.getAbbrev());\n// if (checkAndAdd(abbrevName,cd,classDefs) == false){\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsg(abbrevName,cd,classDefs,\"class abbreviations\"));\n// \tthrow(ex);\n// }\n// \n// DotName dotAbbrevName = new DotName(cd.getDefinedIn().getName() + \".\" + cd.getAbbrev());\n// \n// if (checkAndAddDOT(dotAbbrevName,cd,globallyUniqueMAP,null) == false){\n// DefinitionName errName = new DefinitionName(cd.getDefinedIn().getName() + \".\" + cd.getAbbrev());\n// \tResultException ex = new ResultException();\n// \tex.addError(clashMsgDOT(errName,cd,globallyUniqueMAP,\"definition names\"));\n// throw(ex);\n// }\n// \n// classAbbrevs.put(abbrevName,cd);\n// }\n \n ///////////////////////////////////////////////////////////////////////\n \n if (cd.getDmdID() == null){\n \tResultException ex = new ResultException(\"Missing dmdID for class: \" + cd.getName());\n \tex.setLocationInfo(cd.getFile(), cd.getLineNumber());\n \tthrow(ex);\n }\n\n if (cd.getDefinedIn() == null){\n \tResultException ex = new ResultException(\"definedIn missing for class: \" + cd.getName());\n \tex.setLocationInfo(cd.getFile(), cd.getLineNumber());\n \tthrow(ex);\n }\n else{\n \tif (performIDChecks){\n\t \tif ( (cd.getDefinedIn().getSchemaBaseID() == null) ||\n\t \t\t (cd.getDefinedIn().getSchemaIDRange() == null) ){\n\t \tResultException ex = new ResultException(\"schemaBaseID or schemaIDRange missing for schema: \" + cd.getDefinedIn().getName());\n\t \tthrow(ex);\n\t \t}\n \t}\n \t\n }\n \n if (performIDChecks){\n\t // Bump up the DMD ID by the amount of schemaBaseID\n\t int base = cd.getDefinedIn().getSchemaBaseID();\n\t int range = cd.getDefinedIn().getSchemaIDRange();\n\t int current = base + cd.getDmdID();\n\t \n\t if (current > (base+range)){\n\t \tResultException ex = new ResultException(\"Number of classes exceeds schema ID range: \" + cd.getName());\n\t \tex.moreMessages(\"The dmdID must be less than \" + range);\n\t \tex.setLocationInfo(cd.getFile(), cd.getLineNumber());\n\t \tthrow(ex); \t\n\t }\t \t\n\n\t cd.setDmdID(base + current);\n }\n \n if (classesByID.get(cd.getDmdID()) != null){\n \tResultException ex = new ResultException();\n \tex.addError(clashingIDsMsg(cd.getDmdID(),cd,classesByID,\"dmdID\"));\n \tthrow(ex);\n }\n classesByID.put(cd.getDmdID(), cd);\n \n ///////////////////////////////////////////////////////////////////////\n\n if (cd.getObjectName().getNameString().length() > longestClassName)\n longestClassName = cd.getObjectName().getNameString().length();\n\n // Another bit of trickiness here. We don't resolve references for the entire schema\n // until we've loaded the whole thing, but, in this case, we need to pre-resolve\n // the ClassDefinition - which should be okay, because classes are the last things\n // that're loaded.\n try {\n\t\t\tcd.resolveReferences(this,currentResolver);\n\t\t} catch (DmcValueExceptionSet e) {\t\t\t\n\t\t\tResultException ex = new ResultException();\n\t\t\tex.addError(\"Unresolved references in ClassDefinition: \" + cd.getName());\n\t\t\tex.addError(cd.toOIF());\n\t\t\t\n\t\t\tfor(DmcValueException dve : e.getExceptions()){\n\t\t\t\tex.moreMessages(dve.getMessage());\n\t\t\t}\n\t\t\tthrow(ex);\n\t\t}\n \n if (cd.getDerivedFrom() != null){\n cd.getDerivedFrom().updateDerived(cd);\n }\n \n cd.setDmoImport(cd.getDefinedIn().getSchemaPackage() + \".generated.dmo.\" + cd.getName() + \"DMO\");\n cd.setDmoClass(cd.getName() + \"DMO\");\n \n cd.setDmwImport(cd.getDefinedIn().getDmwPackage() + \".generated.dmw.\" + cd.getName() + \"DMW\");\n cd.setDmwClass(cd.getName() + \"DMW\");\n \n cd.setDmwIteratorImport(cd.getDefinedIn().getDmwPackage() + \".generated.dmw.\" + cd.getName() + \"IterableDMW\");\n cd.setDmwIteratorClass(cd.getName() + \"IterableDMW\");\n \n cd.setDmtImport(cd.getDefinedIn().getSchemaPackage() + \".generated.types.DmcType\" + cd.getName() + \"REF\");\n cd.setDmtREFImport(cd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + cd.getName() + \"REF\");\n cd.setDmtClass(cd.getName() + \"REF\");\n \n if (cd.getUseWrapperType() == WrapperTypeEnum.EXTENDED){\n \tif (cd.getSubpackage() == null)\n \tcd.setDmeImport(cd.getDefinedIn().getDmwPackage() + \".extended.\" + cd.getName()); \t\t\n \telse\n \tcd.setDmeImport(cd.getDefinedIn().getDmwPackage() + \".extended.\" + cd.getSubpackage() + \".\" + cd.getName());\n cd.setDmeClass(cd.getName());\n }\n else{\n cd.setDmeImport(\"THE WRAPPER FOR \" + cd.getName() + \" ISN'T EXTENDED - YOU'VE GOT A CODE GENERATION ERROR! DWEEB!\"); \t\t\n cd.setDmeClass(\"THE WRAPPER FOR \" + cd.getName() + \" ISN'T EXTENDED - YOU'VE GOT A CODE GENERATION ERROR! DWEEB!\");\n }\n \n if (cd.getClassType() == ClassTypeEnum.AUXILIARY){\n \tcd.setDmoAuxClass(cd.getName() + \"DMO\");\n \tcd.setDmoAuxClassImport(cd.getDefinedIn().getSchemaPackage() + \".generated.auxw.\" + cd.getName() + \"DMO\");\n \t\n \tif (cd.getDefinedIn().getDmwPackage() != null){\n \tcd.setDmwAuxClass(cd.getName());\n \tcd.setDmwAuxClassImport(cd.getDefinedIn().getDmwPackage() + \".generated.auxw.\" + cd.getName());\n \t}\n }\n \n // And now, set the java class that will be used with the DmwObjectFactory\n if (cd.getJavaClass() == null){\n \tif (cd.getUseWrapperType() == WrapperTypeEnum.BASE)\n \t\tcd.setJavaClass(cd.getDmwImport());\n \telse if (cd.getUseWrapperType() == WrapperTypeEnum.EXTENDED){\n \t\tcd.setJavaClass(cd.getDmeImport());\n \t}\n }\n \n // Add the class to our java class to class definition map\n classesByJavaClass.put(cd.getJavaClass(), cd);\n \n Iterator<AttributeDefinition> adit = null;\n if ( (adit = cd.getMay()) != null){\n while(adit.hasNext()){\n AttributeDefinition ad = adit.next();\n ad.addUsingClass(cd);\n }\n }\n\n if ( (adit = cd.getMust()) != null){\n while(adit.hasNext()){\n AttributeDefinition ad = adit.next();\n ad.addUsingClass(cd);\n }\n }\n \n Iterator<ActionDefinition> acdit = null;\n if ( (acdit = cd.getActions()) != null){\n while(acdit.hasNext()){\n ActionDefinition ad = acdit.next();\n ad.addUsingClass(cd);\n }\n }\n \n \t////////////////////////////////////////////////////////////////////////////////\n \t// CREATE INTERNAL TYPE FOR REFERENCES\n \n if (cd.getClassType() != ClassTypeEnum.AUXILIARY){\n\t // Things get a little tricky here - we want to be able to refer to objects without\n\t // having to manually define wrapper types for them, so we create internal TypeDefinitions\n\t // for them. The internal type is DmcType<classname>REF.\n\t \n\t TypeDefinition td = new TypeDefinition();\n\t \n\t td.setInternallyGenerated(true);\n\t td.setName(cd.getName());\n\t \n\t // The name of a class definition is schema.class.ClassDefinition\n\t // For the associated type, it will be schema.class.TypeDefinition\n\t DotName typeName \t= new DotName((DotName) cd.getDotName().getParentName(),\"TypeDefinition\");\n//\t DotName nameAndTypeName \t= new DotName(td.getName() + \".TypeDefinition\");\n\t \n\t td.setDotName(typeName);\n//\t td.setNameAndTypeName(nameAndTypeName);\n\t \n\t td.addDescription(\"This is an internally generated type to allow references to \" + cd.getName() + \" values.\");\n\t td.setIsEnumType(false);\n\t td.setIsRefType(true);\n\t \n\t if (cd.getIsNamedBy() != null){\n\t \t// We only need a helper class when we have named objects - regular old object references\n\t \t// can get by without this\n\t \ttd.setHelperClassName(cd.getDefinedIn().getSchemaPackage() + \".generated.types.\" + cd.getName() + \"REF\");\n\t \t\n\t \t// TODO: MAKE THIS A RULE\n\t \tif (cd.getIsNamedBy().getValueType() != ValueTypeEnum.SINGLE){\n\t \t\tResultException ex = new ResultException();\n\t \t\tex.addError(\"The naming attribute: \" + cd.getIsNamedBy().getName() + \" for class: \" + cd.getName() + \" must be valueType SINGLE\");\n\t \t\tex.result.lastResult().fileName(cd.getIsNamedBy().getFile());\n\t \t\tex.result.lastResult().lineNumber(cd.getIsNamedBy().getLineNumber());\n\t \t\tthrow(ex);\n\t \t}\n\t }\n\t \n\t td.setTypeClassName(cd.getDmtImport());\n\t td.setPrimitiveType(cd.getDmoImport());\n\t td.setDefinedIn(cd.getDefinedIn());\n\t \n\t if (cd.getJavaClass() != null){\n\t \t// Tricky stuff needed for code generation. If the ClassDefinition has a javaClass specified,\n\t \t// it means that the object is wrapped and we need this javaClass to know what the auxHolder\n\t \t// type should be in the generated wrapper class.\n\t \ttd.setAuxHolderImport(cd.getJavaClass());\n\t }\n\t \n\t td.setDmwIteratorClass(cd.getDmwIteratorClass());\n\t td.setDmwIteratorImport(cd.getDmwIteratorImport());\n\t \n\t // Set a reference to the original class so that we can get any of its info\n\t // if required.\n\t td.setOriginalClass(cd);\n\n\t // Set the class's internally generated type so that we can resolve references\n\t // to the class used as a type\n\t cd.setInternalTypeRef(td);\n\t \n\t // We add the new type to the schema's list of internally generated types\n\t cd.getDefinedIn().addInternalTypeDefList(td);\n\t \n\t internalTypeDefs.put(td.getName(), td);\n\t \n\t if (checkAndAddDOT(td.getDotName(),td,globallyUniqueMAP,null) == false){\n\t \tResultException ex = new ResultException();\n\t \tex.addError(clashMsgDOT(td.getObjectName(),td,globallyUniqueMAP,\"definition names\"));\n\t \tthrow(ex);\n\t }\n\n }\n\n if (extensions.size() > 0){\n \tfor(SchemaExtensionIF ext : extensions.values()){\n \t\text.addClass(cd);\n \t}\n }\n\n }", "XClass getElementClass();", "private void classOrInterfaceDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n for(int x; (x = classModifier()) != 0; modifier.add(x));\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n classDeclaration(modifier, scope, basename);\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n interfaceDeclaration(modifier, scope, basename);\r\n else\r\n {\r\n error(\"Keyword \" + Keyword.CLASSSY.string + \" or \" + Keyword.INTERFACESY.string + \" expected, not \" + nextToken.string);\r\n lookAhead();\r\n }\r\n }", "public X10ClassDoc getUnspecClass(X10ClassDef classDef) {\n if (classDef == null) return null;\n\n String ckey = classKey(classDef);\n X10ClassDoc cd = (X10ClassDoc) classNamed(ckey);\n if (cd != null) return cd;\n\n Ref<? extends ClassDef> ref = classDef.outer();\n X10ClassDef contClassDef = ((ref == null) ? null : (X10ClassDef) ref.get());\n X10ClassDoc containingClass = getUnspecClass(contClassDef);\n\n // cd = createUnspecClass(classDef, containingClass);\n cd = new X10ClassDoc(classDef, containingClass, \"\");\n otherClasses.put(ckey, cd);\n\n cd.initializeRelatedEntities();\n\n // X10PackageDoc containingPackage = getPackage(classDef.package_());\n // cd.setPackage(containingPackage);\n // containingPackage.addClass(cd);\n // // obtain ClassDoc and Type objects for superclass\n // Ref<? extends polyglot.types.Type> reft = classDef.superType();\n // polyglot.types.Type t = ((reft==null) ? null : reft.get());\n // X10ClassDef cdef = (X10ClassDef) ((t == null) ? null :\n // t.toClass().def());\n // X10ClassDoc superClass = getUnspecClass(cdef);\n // Type superType = getType(t);\n // cd.setSuperclass(superClass);\n // cd.setSuperclassType(superType);\n // addInterfaces(classDef, cd);\n\n for (FieldDef fd : classDef.fields()) {\n // cd.addField(new X10FieldDoc(((X10FieldDef) fd), cd, \"\"));\n if (!isSynthetic((X10FieldDef) fd))\n cd.updateField((X10FieldDef) fd, \"\");\n }\n for (ConstructorDef constrDef : classDef.constructors()) {\n // X10ConstructorDoc doc = new\n // X10ConstructorDoc(((X10ConstructorDef) constrDef), cd, \"\");\n if (!isSynthetic((X10ConstructorDef) constrDef))\n cd.updateConstructor((X10ConstructorDef) constrDef, \"\");\n }\n for (MethodDef md : classDef.methods()) {\n // X10MethodDoc doc = new X10MethodDoc(((X10MethodDef) md), cd, \"\");\n // update cd with a MethodDoc object for method md\n if (!isSynthetic((X10MethodDef) md))\n cd.updateMethod(((X10MethodDef) md), \"\");\n }\n // inner classes may need to be added\n return cd;\n }", "public RubyClass defineClassUnder(String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent) {\n return defineClassUnder(name, superClass, allocator, parent, null);\n }", "void genClassMutants(ClassDeclarationList cdecls) {\n\tgenClassMutants1(cdecls);\n\tgenClassMutants2(cdecls);\n }", "public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}", "@Override\n public String getClassType(){\n return \"Assistant Professor\";\n }", "@Override\n\t/**\n\t * sets the class ID for the created class, the class ID is the\n\t * primary method for identifying a class's name and all of its methods,\n\t * variables, and comments \n\t * \n\t * @param s \n\t */\n\tpublic void setClassID(int s) {\n\t\tID = s;\n\t}", "@Override\r\n\tpublic void visit(ClassDeclNode classDeclaration) {\n\t\tsuper.visit(classDeclaration);\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"class ChildClass\";\n\t}", "public Map<String, AClassDecl> basicClasses() {\n\t\tLinkedList<PFeature> featList;\n\t\tLinkedList<PFormal> formalList;\n\t\tPFeature pf;\n\t\t\n\t\tfeatList = new LinkedList<PFeature>();\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"abort\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"type_name\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\n\t\tfeatList.add(pf);\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"copy\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"SELF_TYPE\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\n\t\tfeatList.add(pf);\n\t\t\n\t\tAClassDecl ObjectClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tnew TTypeId(\"_no_class\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\t\t\n\t\t// The IO class inherits from Object. Its methods are\n\t\t// out_string(Str) : SELF_TYPE writes a string to the output\n\t\t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n\t\t// in_string() : Str reads a string from the input\n\t\t// in_int() : Int \" an int \" \" \"\n\t\tfeatList = new LinkedList<PFeature>();\n\t\t\n\t\tformalList = new LinkedList<PFormal>();\t\t\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"String\")));\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"out_string\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"SELF_TYPE\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tformalList = new LinkedList<PFormal>();\t\t\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"Int\")));\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"out_int\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"SELF_TYPE\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tformalList = new LinkedList<PFormal>();\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"in_string\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"in_int\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"Int\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tAClassDecl IOClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"IO\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\n\n\t\t// The Int class has no methods and only a single attribute, the\n\t\t// \"val\" for the integer.\n\t\tfeatList = new LinkedList<PFeature>();\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_val\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tAClassDecl IntClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"Int\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\n\t\t// Bool also has only the \"val\" slot.\n\t\tfeatList = new LinkedList<PFeature>();\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_val\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tAClassDecl BoolClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"Bool\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\n\t\t// The class Str has a number of slots and operations:\n\t\t// val the length of the string\n\t\t// str_field the string itself\n\t\t// length() : Int returns length of the string\n\t\t// concat(arg: Str) : Str performs string concatenation\n\t\t// substr(arg: Int, arg2: Int): Str substring selection\n\t\tfeatList = new LinkedList<PFeature>();\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_val\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tpf = new AAttributeFeature(\n\t\t\t\tnew TObjectId(\"_str_field\"),\n\t\t\t\tnew TTypeId(\"_prim_slot\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"length\"),\n\t\t\t\tnew LinkedList<PFormal>(),\n\t\t\t\tnew TTypeId(\"Int\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\n\t\tfeatList.add(pf);\t\t\n\n\t\tformalList = new LinkedList<PFormal>();\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"String\")));\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"concat\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\n\t\tformalList = new LinkedList<PFormal>();\n\t\tformalList.add(new AFormal(new TObjectId(\"arg\"), new TTypeId(\"Int\")));\n\t\tformalList.add(new AFormal(new TObjectId(\"arg2\"), new TTypeId(\"Int\")));\n\t\tpf = new AMethodFeature(\n\t\t\t\tnew TObjectId(\"substr\"),\n\t\t\t\tformalList,\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew ANoExpr()\n\t\t\t\t);\t\t\n\t\tfeatList.add(pf);\n\t\t\n\t\t\n\t\tAClassDecl StringClass = new AClassDecl(\n\t\t\t\tnew TTypeId(\"String\"),\n\t\t\t\tnew TTypeId(\"Object\"),\n\t\t\t\tfeatList\n\t\t\t\t);\n\t\t\n\n\t\t/*\n\t\t * Do something with Object_class, IO_class, Int_class, Bool_class, and\n\t\t * Str_class here \n\t\t * \n\t\t */\n\n\t\tMap<String, AClassDecl> map = new TreeMap<String, AClassDecl>();\n\t\t\t\tOBJECT = new Klass();\n\t\t\t\tOBJECT.name = \"Object\";\n\t\t\t\tOBJECT.parent = null;\n\t\t\t\tOBJECT.methods = null;\n\t\t \t\tOBJECT.vars = null;\n\t\t \t\t\n\t\t \t\tIO = new Klass();\n\t\t \t\tIO.name = \"IO\";\n\t\t \t\tIO.parent = OBJECT;\n\n\t\t \t\t\n\t\t \t\tINT = new Klass();\n\t\t \t\tINT.name = \"Int\";\n\t\t \t\tINT.parent = OBJECT;\n\n\t\t \t\t\n\t\t \t\tBOOL = new Klass();\n\t\t \t\tBOOL.name = \"Bool\";\n\t\t \t\tBOOL.parent = OBJECT;\n\n\t\t\t\t\n\t\t \t\tSTR = new Klass();\n\t\t\t\tSTR.name =\"String\";\n\t\t\t\tSTR.parent = OBJECT;\n\n\t\t\t\t\n\t\t\t\tERROR = new Klass();\n\t\t\t\tERROR.name = \"ERROR\";\n\t\t\t\tERROR.parent = OBJECT;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tVOID = new Klass();\n\t\t\t\tVOID.name = \"VOID\";\n\t\t\t\tVOID.parent = OBJECT;\n\n\t\t\t\tklasses.put(\"Object\", OBJECT);\n\t\t\t\tklasses.put(\"IO\", IO);\n\t\t\t\tklasses.put(\"Int\", INT);\n\t\t\t\tklasses.put(\"Bool\", BOOL);\n\t\t\t klasses.put(\"String\", STR);\n\t\t\t\t\n\t\tmap.put(\"Object\", ObjectClass);\n\t\tmap.put(\"IO\", IOClass);\n\t\tmap.put(\"Int\", IntClass);\n\t\tmap.put(\"Bool\", BoolClass);\n\t\tmap.put(\"String\", StringClass);\n\t\t\n\t\treturn map;\n\t\t\n\t}", "DsmlClass createDsmlClass();", "public RubyClass defineClassUnder(String name, RubyClass superClass, ObjectAllocator allocator, RubyModule parent, CallSite[] callSites) {\n IRubyObject classObj = parent.getConstantAt(name);\n \n if (classObj != null) {\n if (!(classObj instanceof RubyClass)) throw newTypeError(name + \" is not a class\");\n RubyClass klazz = (RubyClass)classObj;\n if (klazz.getSuperClass().getRealClass() != superClass) {\n throw newNameError(name + \" is already defined\", name);\n }\n // If we define a class in Ruby, but later want to allow it to be defined in Java,\n // the allocator needs to be updated\n if (klazz.getAllocator() != allocator) {\n klazz.setAllocator(allocator);\n }\n return klazz;\n }\n \n boolean parentIsObject = parent == objectClass;\n \n if (superClass == null) {\n String className = parentIsObject ? name : parent.getName() + \"::\" + name; \n warnings.warn(ID.NO_SUPER_CLASS, \"no super class for `\" + className + \"', Object assumed\");\n \n superClass = objectClass;\n }\n \n return RubyClass.newClass(this, superClass, name, allocator, parent, !parentIsObject, callSites);\n }", "@Override\n\tpublic void classroom() {\n\t\t\n\t}" ]
[ "0.678461", "0.6756421", "0.66587484", "0.6647105", "0.65516627", "0.65516627", "0.63856184", "0.6340203", "0.6275696", "0.62755233", "0.6154287", "0.6125933", "0.61142445", "0.606991", "0.6004471", "0.60039735", "0.59692943", "0.5952569", "0.5952352", "0.5945607", "0.5922005", "0.5907575", "0.5815614", "0.5805798", "0.5802275", "0.5769843", "0.57590276", "0.57586354", "0.5751688", "0.57494617", "0.5720064", "0.570869", "0.5668486", "0.56682575", "0.56682575", "0.5613033", "0.5604378", "0.55986625", "0.55869395", "0.55568725", "0.5556101", "0.55443543", "0.55390155", "0.5538906", "0.5538065", "0.55176044", "0.5515119", "0.54942507", "0.5485041", "0.54705405", "0.54677486", "0.5456505", "0.54463", "0.54411435", "0.5439603", "0.54295814", "0.54283255", "0.54226494", "0.5415861", "0.5411206", "0.5398902", "0.5386063", "0.5385285", "0.53819627", "0.53640455", "0.536072", "0.5356963", "0.53567904", "0.53557307", "0.5355133", "0.5353628", "0.5349928", "0.53488976", "0.5348373", "0.5348373", "0.53457075", "0.53358054", "0.533287", "0.5322699", "0.53191024", "0.5308381", "0.52958363", "0.5295332", "0.5293925", "0.52913797", "0.5284225", "0.5282773", "0.5281877", "0.5279988", "0.5258009", "0.5249262", "0.5247664", "0.52434546", "0.52432305", "0.52403337", "0.5238028", "0.5237466", "0.52317023", "0.5231565", "0.52300674" ]
0.6610336
4
';' | [ STATICSY ] ( block | [ modifiers ] memberDecl )
private void classBodyDeclaration(ClassType object, Modifier modifier, Vector queue) { Modifier x = new Modifier(modifier); x.cur = 0; if (nextSymbol == Keyword.SEMICOLONSY) { lookAhead(); return; } if (nextSymbol == Keyword.STATICSY) { x.add(modifier()); queue = object.statics; } if (nextSymbol == Keyword.LBRACESY) { Vector label = new Vector(); //label.add("" + Operation.newLabel()); block(null, null, object.scope, label, Scope.MAIN, null, queue); } else { for(int y = modifier1(); y != 0; y = modifier()) x.add(y); if ((x.cur & Keyword.NATIVESY.value) != 0) Errors.warning(nextToken.source, nextToken.line, nextToken.col, "native detected!", false); if ((x.cur & x.constructors) == 0) x.cur |= modifier.cur & modifier.constructors; if ((x.cur & Keyword.STATICSY.value) != 0) queue = object.statics; memberDecl(x, object, queue); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void memberDecl(Modifier modify, ClassType object, Vector queue)\r\n {\r\n Type dummy = returns;\r\n\r\n if (identAndLPar())\r\n {\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modify.check(modify.constructors | modify.methods);\r\n MethodType x = member = new MethodType(modify.cur | Keyword.CONSTRUCTORSY.value);\r\n\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.NONESY;\r\n x.type.ident = object.name;\r\n x.type.version = object.version;\r\n returns = x.type;\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n \r\n if (x.name.string.compareTo(object.name.string) != 0)\r\n error(\"missing type of method\");\r\n \r\n constructorDeclaratorRest(x, object);\r\n member = null;\r\n }\r\n else if (nextSymbol == Keyword.VOIDSY)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = member = new MethodType(modify.cur);\r\n\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.VOIDSY;\r\n returns = x.type;\r\n lookAhead();\r\n if (nextSymbol == Keyword.INVERTSY)\r\n { // allow prefix ~ for destructor method\r\n lookAhead();\r\n nextToken.string = '~' + nextToken.string;\r\n }\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n voidMethodDeclaratorRest(modify, x, object);\r\n member = null;\r\n }\r\n else if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n modify.check(modify.classes | modify.access);\r\n classDeclaration(modify, object.scope, \"\");\r\n }\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n {\r\n modify.check(modify.interfaces | modify.access);\r\n interfaceDeclaration(modify, object.scope, \"\");\r\n }\r\n else\r\n methodOrFieldDeclaration(modify, object, queue);\r\n\r\n returns = dummy;\r\n }", "JStaticBlock(int line, JBlock body) {\r\n\t\tsuper(line);\r\n\t\tthis.block = body;\r\n\t}", "public final void memberDecl() throws RecognitionException {\n int memberDecl_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"memberDecl\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(292, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 25) ) { return ; }\n // Java.g:293:5: ( genericMethodOrConstructorDecl | memberDeclaration | 'void' Identifier voidMethodDeclaratorRest | Identifier constructorDeclaratorRest | interfaceDeclaration | classDeclaration )\n int alt40=6;\n try { dbg.enterDecision(40);\n\n switch ( input.LA(1) ) {\n case 40:\n {\n alt40=1;\n }\n break;\n case Identifier:\n {\n int LA40_2 = input.LA(2);\n\n if ( (LA40_2==66) ) {\n alt40=4;\n }\n else if ( (LA40_2==Identifier||LA40_2==29||LA40_2==40||LA40_2==48) ) {\n alt40=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 40, 2, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n break;\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n {\n alt40=2;\n }\n break;\n case 47:\n {\n alt40=3;\n }\n break;\n case 46:\n case 73:\n {\n alt40=5;\n }\n break;\n case ENUM:\n case 37:\n {\n alt40=6;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 40, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(40);}\n\n switch (alt40) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:293:9: genericMethodOrConstructorDecl\n {\n dbg.location(293,9);\n pushFollow(FOLLOW_genericMethodOrConstructorDecl_in_memberDecl956);\n genericMethodOrConstructorDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:294:9: memberDeclaration\n {\n dbg.location(294,9);\n pushFollow(FOLLOW_memberDeclaration_in_memberDecl966);\n memberDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:295:9: 'void' Identifier voidMethodDeclaratorRest\n {\n dbg.location(295,9);\n match(input,47,FOLLOW_47_in_memberDecl976); if (state.failed) return ;\n dbg.location(295,16);\n match(input,Identifier,FOLLOW_Identifier_in_memberDecl978); if (state.failed) return ;\n dbg.location(295,27);\n pushFollow(FOLLOW_voidMethodDeclaratorRest_in_memberDecl980);\n voidMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:296:9: Identifier constructorDeclaratorRest\n {\n dbg.location(296,9);\n match(input,Identifier,FOLLOW_Identifier_in_memberDecl990); if (state.failed) return ;\n dbg.location(296,20);\n pushFollow(FOLLOW_constructorDeclaratorRest_in_memberDecl992);\n constructorDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:297:9: interfaceDeclaration\n {\n dbg.location(297,9);\n pushFollow(FOLLOW_interfaceDeclaration_in_memberDecl1002);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 6 :\n dbg.enterAlt(6);\n\n // Java.g:298:9: classDeclaration\n {\n dbg.location(298,9);\n pushFollow(FOLLOW_classDeclaration_in_memberDecl1012);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 25, memberDecl_StartIndex); }\n }\n dbg.location(299, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"memberDecl\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private SingletonStatementGenerator() {\n\t}", "private JCBlock makeInitStaticAttributesBlock(DiagnosticPosition diagPos, \n JFXClassDeclaration cDecl,\n List<TranslatedAttributeInfo> translatedAttrInfo) {\n // Add the initialization of this class' attributesa\n ListBuffer<JCStatement> stmts = ListBuffer.lb();\n for (TranslatedAttributeInfo tai : translatedAttrInfo) {\n assert tai.attribute != null && tai.attribute.getTag() == JavafxTag.VAR_DEF && tai.attribute.pos != Position.NOPOS;\n if (tai.isStatic()) {\n if (tai.isDirectOwner()) {\n stmts.append(tai.getDefaultInitializtionStatement());\n stmts.append( toJava.callStatement(diagPos, make.at(diagPos).Ident(tai.getName()), locationInitializeName));\n }\n JCStatement stat = makeStaticChangeListenerCall(tai);\n if (stat != null) {\n stmts.append(stat);\n }\n }\n }\n return make.Block(Flags.STATIC, stmts.toList());\n }", "public Snippet visit(MethodDeclaration n, Snippet argu) {\n\t\t Snippet _ret=null;\n\t\t\ttPlasmaCode = \"\";\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.returnType.accept(this, argu);\n\t String tempString = \"\";\n\t\t\tif(f2 != null){\n\t\t\t\t//System.out.println(\" \"+f2.expType+\" \"+f2.returnTemp);\n\t\t\t\ttempString = f2.expType.typeName;\n\t\t\t}else{\n\t\t\t\ttempString = \"void \";\n\t\t\t}\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t String methodName = f3.expType.getTypeName();\n\t memberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = methodName;\n\t\t\tcurrentMethod = currentClass.methods.get(methodName);\n\t\t\t\n\t\t\t\n\t\t\ttempCounter = tempZero;\n\t\t\tblockId = 1;\n\t\t\tcurrentBlock = 1;\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t // n.nodeToken3.accept(this, argu);\n\t memberSig = null;\n\t\t\tblockId = 0;\n\t\t\tcurrentBlock = 0;\n\t\t\t\n\t\t\tString tempFormal = \"\";\n\t\t\tif(f5 != null){\n\t\t\t\ttempFormal = f5.returnTemp+\",\";\n\t\t\t}else{\n\t\t\t\ttempFormal = \"\";\n\t\t\t}\n\t\t\t\n\t\t\ttempString+=\" \"+methodName+\" \"+\"( \"+tempFormal+\" int myUniquePlacePoint)\";\n\t\t\t\n\t\t\ttPlasmaCode += \"public static \"+tempString+\"\\n\";\n\t\t\t//String placeCheckString = \"final HashMap<Integer, HashSet<Integer>> globalPointerHashMap = new final HashMap<Integer, HashSet<Integer>>(4)\";\n\t\t\t//placeCheckString += \"final int maxPlaces = 4; \\n for(int i =0; i <maxPlaces; ++i){globalPointerHashMap.put(i, new HashSet<Integer>());}\";\n\t\t\tn.block.accept(this, argu);\n\t currentClassBody.methods += tPlasmaCode;\n\t\t\ttPlasmaCode = \"\";\n\t return _ret;\n\t }", "private B() {\n void var2_-1;\n void var1_-1;\n }", "public Snippet visit(ConstantDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"public static final \",null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f3 = n.type.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f6 = n.methodCall.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t _ret.returnTemp += f3.returnTemp+\" \"+f4.returnTemp+\" = \"+f6.returnTemp+\";\\n\";\n\t\t\tcurrentClassBody.constants += _ret.returnTemp;\n\t\t\treturn _ret;\n\t }", "StatementBlock createStatementBlock();", "public BlockStmt\ngetInitiationPart();", "VarDecl createVarDecl();", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "public Snippet visit(ConstructorDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f1 = n.identifier.accept(this, argu);\n\t tPlasmaCode=\"\";\n\t\t\tString constructorName = f1.expType.getTypeName();\n\t\t\tmemberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = constructorName;\n\n\t\t\ttempCounter = tempZero;\n\n\t n.nodeToken1.accept(this, argu);\n\t blockId = 1;\n\t\t\tcurrentBlock = 1;\n\t\t\tSnippet f3 = n.nodeOptional.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t blockId = 0;\n\t\t\tcurrentBlock = 0;\n\n\t\t\tcurrentMethod = currentClass.constructors.get(memberSig.getCompleteMethodSignature());\n\t\t\t\n\t\t\tmemberSig = null;\n\n\t\t\t\n\t\t\tString tempFormalParamList = \"\";\n\t\t\tif(f3!=null){\n\t\t\t\ttempFormalParamList += f3.returnTemp+\",\";\n\t\t\t}\n\t\t\t//f5 is added in tPlasmaCode\n\t\t\t_ret.returnTemp = generateTabs(0)+\"public \"+constructorName+\" ( \"+tempFormalParamList+\" int myUniquePlacePoint)\\n\";//+f5.returnTemp;\n\t\t\t\n\t\t\ttPlasmaCode += _ret.returnTemp;\n\t\t\tinConstructor = true;\n\t\t\t\n\t n.block.accept(this, argu);\n\t \tinConstructor = false;\n\t currentClassBody.constructors += tPlasmaCode;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }", "public final void classBodyDeclaration() throws RecognitionException {\n int classBodyDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classBodyDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(286, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 24) ) { return ; }\n // Java.g:287:5: ( ';' | ( 'static' )? block | modifiers memberDecl )\n int alt39=3;\n try { dbg.enterDecision(39);\n\n switch ( input.LA(1) ) {\n case 26:\n {\n alt39=1;\n }\n break;\n case 28:\n {\n int LA39_2 = input.LA(2);\n\n if ( ((LA39_2>=Identifier && LA39_2<=ENUM)||LA39_2==28||(LA39_2>=31 && LA39_2<=37)||LA39_2==40||(LA39_2>=46 && LA39_2<=47)||(LA39_2>=52 && LA39_2<=63)||LA39_2==73) ) {\n alt39=3;\n }\n else if ( (LA39_2==44) ) {\n alt39=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 2, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n break;\n case 44:\n {\n alt39=2;\n }\n break;\n case Identifier:\n case ENUM:\n case 31:\n case 32:\n case 33:\n case 34:\n case 35:\n case 36:\n case 37:\n case 40:\n case 46:\n case 47:\n case 52:\n case 53:\n case 54:\n case 55:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n case 73:\n {\n alt39=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(39);}\n\n switch (alt39) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:287:9: ';'\n {\n dbg.location(287,9);\n match(input,26,FOLLOW_26_in_classBodyDeclaration908); if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:288:9: ( 'static' )? block\n {\n dbg.location(288,9);\n // Java.g:288:9: ( 'static' )?\n int alt38=2;\n try { dbg.enterSubRule(38);\n try { dbg.enterDecision(38);\n\n int LA38_0 = input.LA(1);\n\n if ( (LA38_0==28) ) {\n alt38=1;\n }\n } finally {dbg.exitDecision(38);}\n\n switch (alt38) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: 'static'\n {\n dbg.location(288,9);\n match(input,28,FOLLOW_28_in_classBodyDeclaration918); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(38);}\n\n dbg.location(288,19);\n pushFollow(FOLLOW_block_in_classBodyDeclaration921);\n block();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:289:9: modifiers memberDecl\n {\n dbg.location(289,9);\n pushFollow(FOLLOW_modifiers_in_classBodyDeclaration931);\n modifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(289,19);\n pushFollow(FOLLOW_memberDecl_in_classBodyDeclaration933);\n memberDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 24, classBodyDeclaration_StartIndex); }\n }\n dbg.location(290, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classBodyDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n\tvoid populateMethodImplBlock(Block block) {\n\t\tfinal DataConstructorExp newLocExp = new DataConstructorExp();\n\t\tnewLocExp.setConstructor(LOCATION_CONSTRUCTOR);\n\t\tfinal FnApp memExp = new FnApp();\n\t\tmemExp.setName(MEMORY_SELECTOR);\n\t\tmemExp.addParamNoTransform(arrayArg.getVarUse());\n\t\tnewLocExp.addParamNoTransform(memExp);\n\t\tfinal FnApp offsetExp = new FnApp();\n\t\toffsetExp.setName(OFFSET_SELECTOR);\n\t\toffsetExp.addParamNoTransform(arrayArg.getVarUse());\n\t\tnewLocExp.addParamNoTransform(new AddAddExp(offsetExp, new MultMultExp(sizeArg.getVarUse(), indexArg.getInnerExp())));\n\t\tfinal ReturnStmt returnStmt = new ReturnStmt();\n\t\treturnStmt.setRetExp(newLocExp);\n\t\tblock.addStmt(returnStmt);\n\t}", "private Stmt compoundStmt() {\n if (lexer.token == Symbol.IF) {\n return iftStmt();\n } else if (lexer.token == Symbol.WHILE) {\n return whileStmt();\n }\n return forStmt();\n }", "public void\naddInitiationStmt( Stmt pInitiationStmt );", "DefineBlock createDefineBlock();", "ProcedureDecl createProcedureDecl();", "private void blockStatement(Scope scope, Vector queue)\r\n {\r\n Modifier modify = new Modifier();\r\n\r\n modify.access = 0;\r\n modify.classes &= Keyword.FINALSY.value | Keyword.STRICTFPSY.value;\r\n modify.fields &= Keyword.FINALSY.value | Keyword.TRANSIENTSY.value | Keyword.VOLATILESY.value;\r\n modify.methods &= Keyword.FINALSY.value | Keyword.SYNCHRONIZEDSY.value | Keyword.NATIVESY.value | Keyword.STRICTFPSY.value;\r\n modify.constants &= Keyword.FINALSY.value;\r\n\r\n Token t;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n queue.add(op);\r\n resetComment();\r\n }\r\n\r\n if (isLocalVarDecl(false))\r\n {\r\n localVariableDeclaration(modify, scope, queue);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n else\r\n {\r\n peekReset();\r\n \r\n t = nextToken;\r\n\r\n while(t.kind == Keyword.PUBLICSY || t.kind == Keyword.PROTECTEDSY ||\r\n t.kind == Keyword.PRIVATESY || t.kind == Keyword.ABSTRACTSY ||\r\n t.kind == Keyword.STATICSY || t.kind == Keyword.FINALSY ||\r\n t.kind == Keyword.STRICTFPSY)\r\n t = peek();\r\n \r\n if (t.kind == Keyword.CLASSSY || t.kind == Keyword.INTERFACESY)\r\n classOrInterfaceDeclaration(modify, scope, \"\");\r\n else\r\n statement(modify, scope, Scope.SEQUENCE, null, queue, true);\r\n }\r\n }", "public interface InitializerDef extends CodeDef, MemberDef\n{\n InitializerInstance asInstance();\n}", "public final void memberDeclaration() throws RecognitionException {\n int memberDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"memberDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(301, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 26) ) { return ; }\n // Java.g:302:5: ( type ( methodDeclaration | fieldDeclaration ) )\n dbg.enterAlt(1);\n\n // Java.g:302:9: type ( methodDeclaration | fieldDeclaration )\n {\n dbg.location(302,9);\n pushFollow(FOLLOW_type_in_memberDeclaration1035);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(302,14);\n // Java.g:302:14: ( methodDeclaration | fieldDeclaration )\n int alt41=2;\n try { dbg.enterSubRule(41);\n try { dbg.enterDecision(41);\n\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==Identifier) ) {\n int LA41_1 = input.LA(2);\n\n if ( (LA41_1==66) ) {\n alt41=1;\n }\n else if ( (LA41_1==26||LA41_1==41||LA41_1==48||LA41_1==51) ) {\n alt41=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(41);}\n\n switch (alt41) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:302:15: methodDeclaration\n {\n dbg.location(302,15);\n pushFollow(FOLLOW_methodDeclaration_in_memberDeclaration1038);\n methodDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:302:35: fieldDeclaration\n {\n dbg.location(302,35);\n pushFollow(FOLLOW_fieldDeclaration_in_memberDeclaration1042);\n fieldDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(41);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 26, memberDeclaration_StartIndex); }\n }\n dbg.location(303, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"memberDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void visit(StaticInitDeclNode d) {\n\t\tOperation functionBefore = curOperation;\r\n\t\tLoopSemantics loopBefore = curLoop;\r\n\t\t\r\n\t\t//A function begins not in a loop\r\n\t\tcurLoop = null;\r\n\t\t\r\n\t\t//We are on top of the function\r\n\t\tisOnTop = true;\r\n\t\t\r\n\t\t//Set current function\r\n\t\tcurOperation = (Function)d.getSemantics();\r\n\t\tStmtNode body = d.getBody();\r\n\t\t\r\n\t\t//Analyze the body\r\n\t\tbody.accept(this);\r\n\t\t\t\r\n\t\t//Get the local variable result\r\n\t\tcurOperation.setLocals(nameResolver.methodFinished(0));\r\n\r\n\t\t//Check if the control flow reaches the end of the function\r\n\t\tcurOperation.setFlowReachesEnd(!execPathStack.isTopFrameEmpty());\r\n\t\t\r\n\t\t//Pop the last frame from the method and check if the stack is empty\r\n\t\texecPathStack.popFrameAndDiscard();\r\n\t\tif(!execPathStack.isStackEmpty()){\r\n\t\t\tthrow new InternalError(curOperation.getUid() + \": Execution path stack is not empty at the end of a function. Please contact gex!\");\r\n\t\t}\r\n\t\t\r\n\t\t//Restore function before\r\n\t\tcurOperation = functionBefore;\r\n\t\tcurLoop = loopBefore;\r\n\t}", "private void addStaticInitAndConstructors() {\n MethodNode mn = new MethodNode(ASM5, ACC_STATIC, \"<clinit>\", \"()V\", null, null);\n InsnList il = mn.instructions;\n il.add(new MethodInsnNode(INVOKESTATIC, \n \"org/apache/uima/type_system/impl/TypeSystemImpl\", \n \"getTypeImplBeingLoaded\", \n \"()Lorg/apache/uima/type_system/impl/TypeImpl;\", \n false));\n il.add(new FieldInsnNode(PUTSTATIC, \n \"pkg/sample/name/SeeSample\", \n \"_typeImpl\", \n \"Lorg/apache/uima/type_system/impl/TypeImpl;\"));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 1;\n mn.maxLocals = 0;\n cn.methods.add(mn);\n \n // instance constructors method\n \n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(ILorg/apache/uima/jcas/cas/TOP_Type;)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 1));\n il.add(new VarInsnNode(ALOAD, 2));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(ILorg/apache/uima/jcas/cas/TOP_Type;)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 3;\n mn.maxLocals = 3;\n cn.methods.add(mn);\n \n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ALOAD, 1));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 2;\n mn.maxLocals = 2;\n cn.methods.add(mn);\n \n // constructor for annotation\n if (type.isAnnotation) {\n mn = new MethodNode(ACC_PUBLIC, \"<init>\", \"(Lorg/apache/uima/jcas/JCas;II)V\", null, null);\n il = mn.instructions;\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ALOAD, 1));\n il.add(new MethodInsnNode(INVOKESPECIAL, \"org/apache/uima/jcas/tcas/Annotation\", \"<init>\", \"(Lorg/apache/uima/jcas/JCas;)V\", false));\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 2));\n il.add(new MethodInsnNode(INVOKEVIRTUAL, \"org/apache/uima/tutorial/RoomNumberv3\", \"setBegin\", \"(I)V\", false));\n il.add(new VarInsnNode(ALOAD, 0));\n il.add(new VarInsnNode(ILOAD, 3));\n il.add(new MethodInsnNode(INVOKEVIRTUAL, \"org/apache/uima/tutorial/RoomNumberv3\", \"setEnd\", \"(I)V\", false));\n il.add(new InsnNode(RETURN));\n mn.maxStack = 2;\n mn.maxLocals = 4;\n cn.methods.add(mn);\n }\n }", "InstanceDecl createInstanceDecl();", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "public void masterDeclaration();", "BlockConstant createBlockConstant();", "public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "private void BlockDeclarationInstantiation(Collection<Declaration> declarations,\n StatementVisitor mv) {\n // stack: [env] -> [env, envRec]\n mv.dup();\n mv.invoke(Methods.LexicalEnvironment_getEnvRec);\n \n for (Declaration d : declarations) {\n for (String dn : BoundNames(d)) {\n if (IsConstantDeclaration(d)) {\n mv.dup();\n mv.aconst(dn);\n // FIXME: spec bug (CreateImmutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createImmutableBinding);\n } else {\n mv.dup();\n mv.aconst(dn);\n mv.iconst(false);\n // FIXME: spec bug (CreateMutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createMutableBinding);\n }\n }\n }\n \n // stack: [env, envRec] -> [envRec, env]\n mv.swap();\n \n for (Declaration d : declarations) {\n if (d instanceof FunctionDeclaration) {\n FunctionDeclaration f = (FunctionDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateFunctionObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n } else if (d instanceof GeneratorDeclaration) {\n GeneratorDeclaration f = (GeneratorDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateGeneratorObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n }\n }\n \n // stack: [envRec, env] -> [env]\n mv.swap();\n mv.pop();\n }", "void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.equals(\";\") || theToken.equals(\"[\"))\r\n\t\t\t\tvarDec();\r\n\r\n\t\t\t// if int ID ( param ) compoundStatment\r\n\t\t\telse if (theToken.equals(\"(\"))\r\n\t\t\t\tfunDec();\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn;\r\n\t}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "GeneralClauseContinuation createGeneralClauseContinuation();", "private void methodDeclaratorRest(Modifier modify, Type t, Token name, ClassType object)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = member = new MethodType(modify.cur);\r\n\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n\r\n x.type = t;\r\n returns = x.type;\r\n x.name = name;\r\n x.parameter = formalParameters();\r\n x.type.dim += bracketsOpt();\r\n\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n if ((modify.cur & Keyword.NATIVESY.value) == 0)\r\n {\r\n if ( (object.modify & Keyword.ABSTRACTSY.value) == 0)\r\n error(\"missing modifier abstract\");\r\n\r\n if ( (modify.cur & modify.access) == 0)\r\n modify.add(Keyword.PUBLICSY.value);\r\n }\r\n\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n insertThis(object, x);\r\n lookAhead();\r\n }\r\n else\r\n {\r\n if ((object.modify & Keyword.ABSTRACTSY.value) == 0)\r\n {\r\n if ((x.modify & new Modifier().constructors) == 0)\r\n x.modify |= Keyword.PUBLICSY.value ;\r\n }\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, object.scope, label, Scope.MAIN, null, x.operation);\r\n }\r\n\r\n object.scope.declInsertOverload(x);\r\n \r\n member = null;\r\n }", "private void decls() throws IOException\n {\n type();\n match(Tag.ID);\n match(';');\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "public Symbol getMemberSymbol() {\n return member;\n }", "public Snippet visit(InitializableConstantDeclaration n, Snippet argu) {\n\t Snippet _ret=new Snippet(\"\",\"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.type.accept(this, argu);\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t _ret.returnTemp += f2.expType.getTypeName()+\" \"+f3.returnTemp+\";\";\n\t\t\t//?? possible here\n\t tPlasmaCode=\"\";\n\t\t\t//tPlasmaCode += \n\t\t\tcurrentClassBody.initConstants+=generateTabs(0)+\"public final \" + f2.expType.getTypeName()+\" \"+f3.returnTemp+\";\\n\";;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }", "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "@Override\n public CssDeclarationBlockNode getBlock() {\n return (CssDeclarationBlockNode) super.getBlock();\n }", "public Block(){\n\t\tthis.type = Code.Type.NULL;\n\t}", "public List<Declaration> implicitMembers();", "private List<Node> getStaticInitializers(ClassBody nd) {\n List<Node> nodes = new ArrayList<>();\n for (MemberDefinition<?> node : nd.getBody()) {\n if (node instanceof FieldDefinition && ((FieldDefinition)node).isStatic()) nodes.add(node);\n if (node instanceof StaticInitializer) nodes.add(node.getValue());\n }\n return nodes;\n }", "InitDeclRule createInitDeclRule();", "public TYPE SemantMe() throws SemantMeException{\n if(!this.st.IsVarNameNew(idName,true))\n\t\t\tthrow new SemantMeException(lineNumber,\"The name \"+idName+\" aleady exists in the symbol table!\\n\");\t\t\n\n \n /* [1] Make sure the class extends a previously defined class */\n TYPE parent = null;\n if (parentName != null) {\n parent = this.st.find(parentName);\n if (parent == null || !parent.isClass()) {\n String info = (parent == null) ? \"Parent name is not declared\" : \"Parent name is not a class\";\n throw new SemantMeException(lineNumber, info);\n }\n }\n TYPE_CLASS parentClass = (TYPE_CLASS) parent;\n \n /* [2] Begin Class Scope */\n this.st.beginScope();\n this.st.setCurrParentClass(parentClass);\n \n /* [3] Enter current class for recursive references. Will be removed when scope ends. */\n /* For example - when implemnting a comparator between two instances of the same class */\n TYPE_CLASS currClass = new TYPE_CLASS(parentClass, idName, null, null);\n this.st.enter(idName, currClass);\n \n /* [4] Semant data members */\n if (dataMembers != null) {\n currClass.AddDataMember((TYPE_CLASS_VAR_DEC) dataMembers.head.SemantBody());\n for (AST_C_FIELD_LIST list = dataMembers.tail; list != null; list = list.tail) {\n // Call semantMe on current C_FIELD and store its returned type in class's dataMembers list.\n currClass.AddDataMember((TYPE_CLASS_VAR_DEC) list.head.SemantBody());\n }\n }\n \n /* Semant Signature */\n if (methods != null) {\n currClass.AddMethod(methods.head.SemantSignature());\n for (AST_C_FIELD_LIST list = methods.tail; list != null; list = list.tail) {\n // Call semantMe on current C_FIELD and store its returned type in class's methods list.\n currClass.AddMethod(list.head.SemantSignature());\n }\n }\n // Semant Body\n if (methods != null) {\n methods.head.SemantBody();\n for (AST_C_FIELD_LIST list = methods.tail; list != null; list = list.tail) {\n // Call semantMe on current C_FIELD and store its returned type in class's methods list.\n list.head.SemantBody();\n }\n }\n \n /* [7] End Scope */\n this.st.setCurrParentClass(null);\n this.st.endScope();\n \n /* [8] Enter the Class Type to the Symbol Table */\n this.st.enter(idName, currClass);\n\n /* [9] Return value is irrelevant for class declarations */\n return null;\n \n \n }", "public final void rule__StructType__Group_3__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:5686:1: ( ( ( ';' )? ) )\r\n // InternalGo.g:5687:1: ( ( ';' )? )\r\n {\r\n // InternalGo.g:5687:1: ( ( ';' )? )\r\n // InternalGo.g:5688:2: ( ';' )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getStructTypeAccess().getSemicolonKeyword_3_1()); \r\n }\r\n // InternalGo.g:5689:2: ( ';' )?\r\n int alt56=2;\r\n int LA56_0 = input.LA(1);\r\n\r\n if ( (LA56_0==42) ) {\r\n alt56=1;\r\n }\r\n switch (alt56) {\r\n case 1 :\r\n // InternalGo.g:5689:3: ';'\r\n {\r\n match(input,42,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getStructTypeAccess().getSemicolonKeyword_3_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "public List<Declaration> localMembers() throws LookupException;", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "private static class <init> extends dq\n{\n\n public void a(dg dg1, ch ch)\n throws cn\n {\n b(dg1, (cr)ch);\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParameters_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "private void interfaceMemberDecl(Modifier modify, ClassType object)\r\n {\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n object.statics.add(op);\r\n resetComment();\r\n }\r\n\r\n if (nextSymbol == Keyword.VOIDSY)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.VOIDSY;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n\r\n lookAhead();\r\n if (nextSymbol == Keyword.INVERTSY)\r\n { // allow prefix ~ for destructor method\r\n lookAhead();\r\n nextToken.string = '~' + nextToken.string;\r\n }\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n voidInterfaceMethodDeclaratorRest(x);\r\n insertThis(object, x);\r\n object.scope.declInsertOverload(x);\r\n }\r\n else if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n modify.check(modify.classes | modify.access);\r\n Modifier m = new Modifier(modify);\r\n m.cur = modify.cur | Keyword.STATICSY.value;\r\n classDeclaration(m, object.scope, \"\");\r\n }\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n {\r\n modify.check(modify.interfaces | modify.access);\r\n interfaceDeclaration(modify, object.scope, \"\");\r\n }\r\n else\r\n interfaceMethodOrFieldDeclaration(modify, object);\r\n }", "private Stmt simpleStmt() {\n if (null != lexer.token) {\n switch (lexer.token) {\n case PRINT:\n return printStmt();\n case BREAK:\n return breakStmt();\n case IDENT:\n lexer.nextToken();\n if (lexer.token == Symbol.LEFTPAR) {\n lexer.backToken();\n return funcStmt();\n } else {\n lexer.backToken();\n return exprStmt();\n }\n case RETURN:\n return returnStmt();\n default:\n break;\n }\n }\n return null;\n }", "public final void rule__XMemberFeatureCall__ExplicitStaticAssignment_1_1_0_0_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17838:1: ( ( ( '::' ) ) )\r\n // InternalDroneScript.g:17839:2: ( ( '::' ) )\r\n {\r\n // InternalDroneScript.g:17839:2: ( ( '::' ) )\r\n // InternalDroneScript.g:17840:3: ( '::' )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getExplicitStaticColonColonKeyword_1_1_0_0_1_2_0()); \r\n }\r\n // InternalDroneScript.g:17841:3: ( '::' )\r\n // InternalDroneScript.g:17842:4: '::'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getExplicitStaticColonColonKeyword_1_1_0_0_1_2_0()); \r\n }\r\n match(input,95,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getExplicitStaticColonColonKeyword_1_1_0_0_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getExplicitStaticColonColonKeyword_1_1_0_0_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final PythonParser.stmt_return stmt() throws RecognitionException {\n PythonParser.stmt_return retval = new PythonParser.stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.simple_stmt_return simple_stmt56 = null;\n\n PythonParser.compound_stmt_return compound_stmt57 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:546:5: ( simple_stmt | compound_stmt )\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( (LA26_0==NAME||(LA26_0>=ASSERT && LA26_0<=BREAK)||LA26_0==CONTINUE||LA26_0==DELETE||LA26_0==EXEC||LA26_0==FROM||LA26_0==GLOBAL||LA26_0==IMPORT||(LA26_0>=LAMBDA && LA26_0<=NOT)||(LA26_0>=PASS && LA26_0<=RETURN)||LA26_0==YIELD||LA26_0==LPAREN||(LA26_0>=PLUS && LA26_0<=MINUS)||(LA26_0>=TILDE && LA26_0<=LBRACK)||LA26_0==LCURLY||(LA26_0>=BACKQUOTE && LA26_0<=STRING)) ) {\n alt26=1;\n }\n else if ( (LA26_0==CLASS||LA26_0==DEF||LA26_0==FOR||LA26_0==IF||(LA26_0>=TRY && LA26_0<=WITH)||LA26_0==AT) ) {\n alt26=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 26, 0, input);\n\n throw nvae;\n }\n switch (alt26) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:546:7: simple_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_simple_stmt_in_stmt1386);\n simple_stmt56=simple_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, simple_stmt56.getTree());\n if ( state.backtracking==0 ) {\n\n retval.stypes = (simple_stmt56!=null?simple_stmt56.stypes:null);\n \n }\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:550:7: compound_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_compound_stmt_in_stmt1402);\n compound_stmt57=compound_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, compound_stmt57.getTree());\n if ( state.backtracking==0 ) {\n\n retval.stypes = new ArrayList();\n retval.stypes.add((compound_stmt57!=null?((PythonTree)compound_stmt57.tree):null));\n \n }\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public AccessSymbol(Symbol base, Symbol member) {\n this.base = base;\n this.member = member;\n buildName();\n }", "public T caseVariableDeclarationCS(VariableDeclarationCS object) {\r\n return null;\r\n }", "private static boolean methodDeclaration_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"methodDeclaration_1_0\")) return false;\n boolean r;\n r = consumeToken(b, EXTERNAL);\n if (!r) r = consumeToken(b, STATIC);\n if (!r) r = consumeToken(b, CONST);\n return r;\n }", "@Test\n\tpublic void test_ClassDeclarationAnonymousInMethodPackage_Dec_0_Ref_1() {\n\t\tconfigureParser(\"package bar; public class Other { public void method() { Bar bar = new Bar(); bar.accept(new Foo() {public void fooMethod(){}} ); } } \", \"bar.Foo\", 0, 1);\n\t}", "public RenderedMemberStatementRecord() {\n\t\tsuper(de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.RenderedMemberStatement.RENDERED_MEMBER_STATEMENT);\n\t}", "static boolean classMemberDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classMemberDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = factoryConstructorDeclaration(b, l + 1);\n if (!r) r = namedConstructorDeclaration(b, l + 1);\n if (!r) r = getterOrSetterDeclaration(b, l + 1);\n if (!r) r = methodDeclaration(b, l + 1);\n if (!r) r = varDeclarationListWithSemicolon(b, l + 1);\n if (!r) r = incompleteDeclaration(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::class_member_recover);\n return r;\n }", "@Test\n\tpublic void test_ClassDeclarationAnonymousInMethod_Dec_0_Ref_1() {\n\t\tconfigureParser(\"public class Other { public void method() { Bar bar = new Bar(); bar.accept(new Foo() {public void fooMethod(){}} ); } } \", \"Foo\", 0, 1);\n\t}", "public Block(){\n\t\tinstns = new ArrayList<Instruction>();\n\t}", "public void visit(BlockStatement n) {\n n.f0.accept(this);\n }", "final public void block() throws ParseException {\n jj_consume_token(35);\n jj_consume_token(BLOCK);\n label_3:\n while (true) {\n if (jj_2_35(4)) {\n ;\n } else {\n break label_3;\n }\n jj_consume_token(34);\n }\n if (jj_2_36(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(36);\n }", "@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }", "public final void rule__XBlockExpression__Group_2__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12668:1: ( ( ( ';' )? ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12669:1: ( ( ';' )? )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12669:1: ( ( ';' )? )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12670:1: ( ';' )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXBlockExpressionAccess().getSemicolonKeyword_2_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12671:1: ( ';' )?\r\n int alt78=2;\r\n int LA78_0 = input.LA(1);\r\n\r\n if ( (LA78_0==105) ) {\r\n alt78=1;\r\n }\r\n switch (alt78) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12672:2: ';'\r\n {\r\n match(input,105,FOLLOW_105_in_rule__XBlockExpression__Group_2__1__Impl25768); if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXBlockExpressionAccess().getSemicolonKeyword_2_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void testInClosureDeclaringType4() throws Exception {\n String contents = \n \"class Bar {\\n\" +\n \" def method() { }\\n\" +\n \"}\\n\" +\n \"new Bar().method {\\n \" +\n \" this\\n\" +\n \"}\";\n int start = contents.lastIndexOf(\"this\");\n int end = start + \"this\".length();\n assertDeclaringType(contents, start, end, \"Search\", false);\n }", "private void classDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n Vector queue = new Vector();\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modifier.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modifier.check(modifier.classes | modifier.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) == 0)\r\n modifier.methods &= ~Keyword.ABSTRACTSY.value;\r\n else\r\n modifier.methods |= Keyword.ABSTRACTSY.value;\r\n\r\n x.modify |= modifier.cur;\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n Type t = type();\r\n x.extend = new ClassType(t.ident.string.substring(t.ident.string.lastIndexOf('.') + 1));\r\n }\r\n else if (((x.modify & Keyword.STATICSY.value) != 0 || (Scope)scopeStack.get(0) == scope) && x.name.string.compareTo(\"Object\") != 0)\r\n {\r\n x.extend = new ClassType(\"Object\");\r\n unresolved.add(x.extend.name.string);\r\n }\r\n else\r\n x.extend = new ClassType();\r\n\r\n if (nextSymbol == Keyword.IMPLEMENTSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) != 0 && (modifier.cur & modifier.constructors) == 0)\r\n modifier.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modifier.cur &= modifier.constructors;\r\n\r\n classBody(x, new Modifier(), \"\", queue);\r\n\r\n Iterator iter = x.scope.iterator();\r\n\r\n while(iter.hasNext())\r\n {\r\n Basic b = (Basic)iter.next();\r\n\r\n if (b instanceof MethodType)\r\n if ((b.modify & Keyword.STATICSY.value) != 0)\r\n { // remove this from static method\r\n MethodType m = (MethodType)b;\r\n m.scope.remove(\"§this\");\r\n if (m.parameter.length > 0 && m.parameter[0].name.string.compareTo(\"§this\") == 0)\r\n {\r\n Parameter [] p = new Parameter[m.parameter.length - 1];\r\n\r\n for(int i = 0; i < p.length; i++)\r\n p[i] = m.parameter[i + 1];\r\n\r\n m.parameter = p;\r\n }\r\n }\r\n }\r\n\r\n // add queue to constructors\r\n addToConstructor(x, queue);\r\n unresolved = dummy;\r\n\r\n writeList(x);\r\n }", "private static void staticFun()\n {\n }", "public void b(gy ☃) {}\r\n/* */ \r\n/* */ \r\n/* */ \r\n/* */ public void a(gy ☃) {}", "public static void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "public T caseVariableDeclarationWithInitListCS(VariableDeclarationWithInitListCS object) {\r\n return null;\r\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParametersPackage_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "private /* synthetic */ SpeedRunType() {\n void var2_-1;\n void var1_-1;\n SpeedRunType a2;\n }", "Syntax getSyntax();", "public StructMember() { }", "private void parseStatementTokens(ArrayList<String> tokens) {\r\n Accessibility accessibility = Accessibility.PACKAGE;\r\n boolean isFinal = false, isStatic = false;\r\n for (int i = 0, numTokens = tokens.size(); i < numTokens; ++i) {\r\n String token = tokens.get(i);\r\n switch (token) {\r\n // Look for accessibility modifiers.\r\n case \"public\":\r\n accessibility = Accessibility.PUBLIC;\r\n break;\r\n case \"private\":\r\n accessibility = Accessibility.PRIVATE;\r\n break;\r\n case \"protected\":\r\n accessibility = Accessibility.PROTECTED;\r\n break;\r\n // Check if it is static.\r\n case \"static\":\r\n isStatic = true;\r\n break;\r\n // Check if it is final.\r\n case \"final\":\r\n isFinal = true;\r\n break;\r\n // Keep track of the package.\r\n case \"package\":\r\n // Set package if there is a token after 'package'.\r\n if (++i < numTokens)\r\n currentPackage = tokens.get(i);\r\n break;\r\n // Keep track of imports.\r\n case \"import\":\r\n // Import type if there is a token after 'import'.\r\n if (++i < numTokens) {\r\n String fullName = tokens.get(i);\r\n int dotIndex = fullName.lastIndexOf('.');\r\n if (dotIndex >= 0) {\r\n // Let the part after the final dot be the 'nickname'.\r\n String shortName = fullName.substring(fullName.lastIndexOf('.') + 1);\r\n imports.put(shortName, fullName);\r\n }\r\n }\r\n break;\r\n // Start parsing a new class, enum or interface.\r\n case \"class\":\r\n case \"enum\":\r\n case \"interface\":\r\n if (++i < numTokens) {\r\n String className = tokens.get(i);\r\n // Back up information to return to after parsing the class (helps\r\n // deal with nested classes).\r\n int endIndex = index;\r\n HashMap<String, String> outerImports = imports;\r\n ClassBuilder outerClass = currentClass;\r\n String previousPackage = currentPackage;\r\n // Make imports for this class separate from the imports for the outer class\r\n // (this is convenient because inner class resolution is dealt with by\r\n // treating the definition as an \"import\").\r\n imports = new HashMap<>();\r\n imports.putAll(outerImports);\r\n // Go inside the current class (so a class within an outer class would have\r\n // a full name like package.OuterClass.InnerClass).\r\n currentPackage += \".\" + className;\r\n // Go to the code inside the brackets (where the class fields and such are).\r\n index = insideBracketsIndex;\r\n // Start building the new class (at this point 'currentPackage' is the full\r\n // name of the class).\r\n currentClass = new ClassBuilder(this, currentPackage, token);\r\n imports.put(className, currentPackage);\r\n currentClass.addImports(imports);\r\n // If this is an inner class, then add a relation for that.\r\n if (outerClass != null) {\r\n currentClass.setOuterClassName(outerClass.getName());\r\n outerClass.addImport(className, currentPackage);\r\n currentClass.addImports(outerClass);\r\n }\r\n if (++i < numTokens && tokens.get(i).equals(\"extends\") && ++i < numTokens) {\r\n // Check for the extends keyword to add a superclass.\r\n currentClass.setSuperClassName(tokens.get(i));\r\n } else {\r\n --i;\r\n }\r\n if (++i < numTokens && tokens.get(i).equals(\"implements\") && ++i < numTokens) {\r\n // Check for the implements keyword to add an interface.\r\n for (String interfaceName : tokens.get(i).split(\",\")) {\r\n currentClass.addInterfaceName(interfaceName);\r\n }\r\n }\r\n // Start parsing the class.\r\n parse();\r\n // Finish building the class and register it.\r\n ClassInfo classInfo = currentClass.toClassInfo();\r\n classes.add(classInfo);\r\n classMap.put(classInfo.getFullName(), classInfo);\r\n // Return to parsing the outer class, if any.\r\n index = endIndex;\r\n currentPackage = previousPackage;\r\n currentClass = outerClass;\r\n imports = outerImports;\r\n }\r\n break;\r\n default:\r\n if (inMethod) {\r\n if (i == 0 && IGNORED_KEYWORDS.contains(token)) {\r\n // Ignore the entire statement if it's inside a method and starts\r\n // with a keyword.\r\n return;\r\n }\r\n } else if (IGNORED_KEYWORDS.contains(token)) {\r\n // If not inside a method, then ignore certain keywords regardless of\r\n // position, but don't end the statement.\r\n break;\r\n }\r\n // Look for type or member name (identifier).\r\n // Members are only relevant inside classes.\r\n if (currentClass != null) {\r\n if (numTokens == 1) {\r\n // Add enum values, which may be separated by a ','.\r\n if (inMethod) {\r\n // Methods don't have enum values, so ignore the statement if the parser\r\n // is currently looking for variables in a method.\r\n return;\r\n }\r\n for (String enumValue : token.split(\",\")) {\r\n // Represent fields as enums with no type.\r\n currentClass.addField(Accessibility.PUBLIC, enumValue, null, false, false);\r\n }\r\n } else {\r\n String memberTypeName = token;\r\n String memberName;\r\n ArrayList<ParameterInfo> parameters = null;\r\n if (++i < numTokens) {\r\n token = tokens.get(i);\r\n if (\"(\".equals(token)) {\r\n // If the identifier is followed directly by '(', it has no return type\r\n // (it's a constructor).\r\n memberName = memberTypeName;\r\n memberTypeName = null;\r\n --i;\r\n } else {\r\n // Otherwise, the previous token was the return type or field type, meaning\r\n // the next one is the name of the method or field.\r\n memberName = token;\r\n }\r\n if (++i < numTokens && \"(\".equals(tokens.get(i))) {\r\n // If the next token exists and is '(', then parse the parameters.\r\n if (inMethod) {\r\n // But if it's already inside a method, then ignore the statement (as\r\n // it's a method call instead of a definition).\r\n return;\r\n }\r\n parameters = new ArrayList<>();\r\n // Keep going until end of statement or if ')' is found.\r\n while (++i < numTokens && !\")\".equals(token = tokens.get(i))) {\r\n boolean isParameterFinal = token.equals(\"final\");\r\n if (isParameterFinal) {\r\n // Go to the next token and stop if it was the final token.\r\n if (++i >= numTokens)\r\n break;\r\n token = tokens.get(i);\r\n }\r\n String parameterName = null, parameterTypeName = null;\r\n int varargIndex = token.indexOf(\"...\");\r\n if (varargIndex != -1) {\r\n // The tokenizer incorrectly turns things like \"String... args\"\r\n // into a single token (\"String...args\"). Split them up again if\r\n // that is the case.\r\n parameterTypeName = token.substring(0, varargIndex + 3);\r\n parameterName = token.substring(varargIndex + 3);\r\n } else if (++i < numTokens) {\r\n // Otherwise, the parameter name is the next token.\r\n parameterTypeName = token;\r\n parameterName = tokens.get(i);\r\n }\r\n if (parameterName != null) {\r\n // Add the parameter.\r\n parameters.add(new ParameterInfo(parameterName, parameterTypeName, isParameterFinal));\r\n }\r\n }\r\n }\r\n if (parameters == null) {\r\n // If no parameter list was found, then add fields instead, which may\r\n // be separated by a ',' if multiple fields are declared at once (Like\r\n // \"int var1, var2, var3;\"\r\n for (String fieldName : memberName.split(\",\")) {\r\n if (isJavaIdentifier(fieldName)) {\r\n currentClass.addField(accessibility, fieldName, memberTypeName, isFinal, isStatic);\r\n }\r\n }\r\n } else {\r\n // Otherwise, add a method with the parameters that were found.\r\n int endIndex = index;\r\n index = insideBracketsIndex;\r\n inMethod = true;\r\n ClassBuilder outerClass = currentClass;\r\n currentClass = new ClassBuilder(this, \"<variable search>\", null);\r\n currentClass.addImports(outerClass);\r\n curlyBracketsLevel = 0;\r\n parse();\r\n ValueInfo[] variables = currentClass.getFieldsAsVariables();\r\n currentClass = outerClass;\r\n currentClass.addMethod(accessibility, memberName, memberTypeName, parameters, variables, isFinal, isStatic);\r\n inMethod = false;\r\n index = endIndex;\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }", "@Override\n\tpublic Void visit(ClauseModifier clause, Void ctx) {\n\t\treturn null;\n\t}", "private boolean eatStaticIfNotElementName() {\n if (peek(TokenType.STATIC) && isClassElementStart(peekToken(1))) {\n eat(TokenType.STATIC);\n return true;\n }\n return false;\n }", "public T caseVariableDeclarationWithInitCS(VariableDeclarationWithInitCS object) {\r\n return null;\r\n }", "@Test\n\tpublic void test_ClassDeclarationAnonymousFieldDeclaration_Dec_0_Ref_1() {\n\t\tconfigureParser(\"public class Other { Bar bar = new Foo() { public void method(){} }; } \", \"Foo\", 0, 1);\n\t}", "ConstDecl createConstDecl();", "private void classOrInterfaceDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n for(int x; (x = classModifier()) != 0; modifier.add(x));\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n classDeclaration(modifier, scope, basename);\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n interfaceDeclaration(modifier, scope, basename);\r\n else\r\n {\r\n error(\"Keyword \" + Keyword.CLASSSY.string + \" or \" + Keyword.INTERFACESY.string + \" expected, not \" + nextToken.string);\r\n lookAhead();\r\n }\r\n }", "public Snippet visit(MethodCallInConstructor n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t String className = \"NEED TO PUT CLASS NAME\";\n\t n.nodeToken.accept(this, argu);\n\t String methodName = n.identifier.accept(this, argu).expType.getTypeName();\n\t this.identifierList = new ArrayList<String>(0);\n\t\t\tidentifierList.add(\"this\");\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeOptional.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t SymbolTableClassEntry stce = classSymbolTable.get(className);\n\t\t\tSymbolTableMethodEntry stme = stce.methods.get(methodName);\n\t\t\tSnippet retExp = new Snippet(\"\", \"\", stme.returnType, false);\n\t\t\tretExp.returnTemp = className + \".\" + methodName + \"(\";\n\t\t\tint i = 0;\n\t\t\tfor(String str : identifierList)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t\tretExp.returnTemp += str;\n\t\t\t\telse\n\t\t\t\t\tretExp.returnTemp += \", \" + str;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tString toAdd =\"\";\n\t\t\t//if(!classes.containsKey(className)){\n\t\t\tif(!inAsync){\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=\"myUniquePlacePoint\";\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=asyncPoint+\"\";\n\t\t\t}\n\t\t\t//}\n\t\t\tretExp.returnTemp +=toAdd+ \")\";\n\t return retExp;\n\t }", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void visit(Start s) {\n /// Declarations //\n ///////////////////\n setEmitTarget(decl);\n emitIndentation(\"package com.BattleSim;\\n\");\n emitIndentation(\"import java.io.*;\\n\");\n emitIndentation(\"import java.util.*;\\n\");\n emitIndentation(\"import java.util.Scanner;\\n\");\n emitIndentation(\"import java.util.HashMap;\\n\");\n emitComment(\"BattleSim automatically generated code file.\\n\");\n emitIndentation(\"public class Declarations {\\n\");\n indentLevel++;\n if(Main.stdLibIncluded){\n emitIndentation(\"public static HashMap<String, SimObj> SimObjMap = new HashMap<String, SimObj>();\\n\");\n emitIndentation(\"public static ArrayList<Barrier> barriers = new ArrayList<Barrier>();\\n\");\n }\n s.dclBlock.accept(this);\n indentLevel--;\n emitIndentation(\"}\\n\");\n\n ///////////////////\n //// SimBlock//////\n ///////////////////\n s.simBlock.accept(this);\n\n ///////////////////\n //// Main /////////\n ///////////////////\n setEmitTarget(main);\n emitIndentation(\"package com.BattleSim;\\n\");\n emitIndentation(\"import java.io.*;\\n\");\n emitIndentation(\"import java.util.*;\\n\");\n emitIndentation(\"import java.util.Scanner;\\n\");\n emitIndentation(\"import static com.BattleSim.Declarations.*;\\n\");\n emitComment(\"BattleSim automatically generated code file.\\n\");\n emitIndentation(\"public class Main {\\n\");\n\n indentLevel++;\n\n for (int i = 0; i < s.typeDeclarationList.size(); i++) {\n s.typeDeclarationList.elementAt(i).accept(this);\n }\n\n for (int i = 0; i < s.functionDclList.size(); i++) {\n s.functionDclList.elementAt(i).accept(this);\n }\n\n emitIndentation(\"public static void main(String[] args) {\\n\");\n indentLevel++;\n emitIndentation(\"Declarations decl795030_declarationblock = new Declarations();\\n\");\n\n for(int i = 0; i < s.simBlock.simulationList.size(); i++){\n String simName = s.simBlock.simulationList.elementAt(i).identifier.name;\n emitIndentation(\"Simulation \" + simName.toLowerCase() + \" = new \" + simName + \"(SimObjMap);\\n\");\n }\n\n s.program.accept(this);\n\n indentLevel--;\n emitIndentation(\"}\\n\");\n }", "public Snippet visit(MethodCallStatementInConstructor n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\", \"\", null, false);;\n\t\t\tSnippet f0 = n.methodCallInConstructor.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp + \";\";\n\t\t\ttPlasmaCode+=generateTabs(blockDepth)+_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public final void rule__XImportDeclaration__StaticAssignment_1_0_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:4145:1: ( ( ( 'static' ) ) )\n // InternalCsv.g:4146:2: ( ( 'static' ) )\n {\n // InternalCsv.g:4146:2: ( ( 'static' ) )\n // InternalCsv.g:4147:3: ( 'static' )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getStaticStaticKeyword_1_0_0_0()); \n }\n // InternalCsv.g:4148:3: ( 'static' )\n // InternalCsv.g:4149:4: 'static'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXImportDeclarationAccess().getStaticStaticKeyword_1_0_0_0()); \n }\n match(input,41,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getStaticStaticKeyword_1_0_0_0()); \n }\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXImportDeclarationAccess().getStaticStaticKeyword_1_0_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Code visitBlockNode(BlockNode node) {\n beginGen(\"Block\");\n /** Generate code to allocate space for local variables on\n * procedure entry.\n */\n Code code = new Code();\n code.genAllocStack(node.getBlockLocals().getVariableSpace());\n /* Generate the code for the body */\n code.append(node.getBody().genCode(this));\n /** Generate code for local procedures. */\n /* Static level is one greater for the procedures. */\n staticLevel++;\n node.getProcedures().accept(this);\n staticLevel--;\n endGen(\"Block\");\n return code;\n }", "static void m2(){\n\t}", "@Test\n\tpublic void test_ClassDeclarationAnonymousFieldDeclarationPackage_Dec_0_Ref_1() {\n\t\tconfigureParser(\"package bar; public class Other { Bar bar = new Foo() { public void method(){} }; } \", \"bar.Foo\", 0, 1);\n\t}", "private void voidMethodDeclaratorRest(Modifier modify, MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n if ((modify.cur & Keyword.NATIVESY.value) == 0)\r\n {\r\n if ( (x.modify & Keyword.ABSTRACTSY.value) == 0)\r\n error(\"missing modifier abstract\");\r\n\r\n if ( (modify.cur & modify.access) == 0)\r\n modify.add(Keyword.PUBLICSY.value);\r\n }\r\n\r\n x.scope = new Scope(scope, Scope.automatic, \"\");\r\n insertThis(object, x);\r\n lookAhead();\r\n }\r\n else\r\n {\r\n if ((x.modify & Keyword.ABSTRACTSY.value) == 0)\r\n {\r\n if ((x.modify & new Modifier().constructors) == 0)\r\n x.modify |= Keyword.PUBLICSY.value ;\r\n }\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n }\r\n\r\n scope.declInsertOverload(x);\r\n }", "public void doMember(String callerName) throws LexemeException {\n\t\tlogMessage(\"<member>-->[pubic][static]<type> ID (<field> | <method>)\");\n\t\tfunctionStack.push(\"<member>\");\n\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\tconsumeToken();\n\t\t}\n\t\tif (ifPeek(\"STATIC_\")) {\n\t\t\tconsumeToken();\n\t\t}\n\t\t// <type>\n\t\tif (ifPeekIsType()) {\n\t\t\tdoType(\"<member>\");\n\t\t\tif (ifPeek(\"SEMI_COL_\")) {\n\t\t\t\tdoField(\"<member>\");\n\t\t\t\tlogMessage(\"(return)-->\" + callerName);\n\t\t\t\tlogVerboseMessage(callerName);\n\t\t\t\tfunctionStack.pop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// ID\n\t\tifPeekThenConsume(\"ID_\");\n\t\tif (ifPeek(\"COMMA_\") || ifPeek(\"SEMI_COL_\")) {\n\t\t\tdoField(\"<member>\");\n\t\t\tlogVerboseMessage(callerName);\n\t\t\tfunctionStack.pop();\n\t\t\treturn;\n\t\t} else {\n\t\t\tif (ifPeek(\"L_PAREN_\")) {\n\t\t\t\tdoMethod(\"<member>\");\n\t\t\t\tlogVerboseMessage(callerName);\n\t\t\t\tfunctionStack.pop();\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tlogErrorMessage(peekToken.getType(), \"COMMA_ | L_PAREN_\");\n\t\t\t}\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "protected EditorLanguage funcDefPrefix(EditorDataType funcRetType)\n\t{\n\t\treturn text(\"private static \").text(getTypeName(funcRetType)).text(' ');\n\t}", "public interface langBConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int BREAK = 12;\n /** RegularExpression Id. */\n int CLASS = 13;\n /** RegularExpression Id. */\n int CONSTRUCTOR = 14;\n /** RegularExpression Id. */\n int ELSE = 15;\n /** RegularExpression Id. */\n int EXTENDS = 16;\n /** RegularExpression Id. */\n int FOR = 17;\n /** RegularExpression Id. */\n int IF = 18;\n /** RegularExpression Id. */\n int THEN = 19;\n /** RegularExpression Id. */\n int INT = 20;\n /** RegularExpression Id. */\n int NEW = 21;\n /** RegularExpression Id. */\n int PRINT = 22;\n /** RegularExpression Id. */\n int READ = 23;\n /** RegularExpression Id. */\n int RETURN = 24;\n /** RegularExpression Id. */\n int STRING = 25;\n /** RegularExpression Id. */\n int SUPER = 26;\n /** RegularExpression Id. */\n int BOOLEAN = 27;\n /** RegularExpression Id. */\n int TRUE = 28;\n /** RegularExpression Id. */\n int FALSE = 29;\n /** RegularExpression Id. */\n int WHILE = 30;\n /** RegularExpression Id. */\n int SWITCH = 31;\n /** RegularExpression Id. */\n int CASE = 32;\n /** RegularExpression Id. */\n int int_constant = 33;\n /** RegularExpression Id. */\n int string_constant = 34;\n /** RegularExpression Id. */\n int null_constant = 35;\n /** RegularExpression Id. */\n int IDENT = 36;\n /** RegularExpression Id. */\n int LETTER = 37;\n /** RegularExpression Id. */\n int DIGIT = 38;\n /** RegularExpression Id. */\n int UNDERSCORE = 39;\n /** RegularExpression Id. */\n int LPAREN = 40;\n /** RegularExpression Id. */\n int RPAREN = 41;\n /** RegularExpression Id. */\n int LBRACE = 42;\n /** RegularExpression Id. */\n int RBRACE = 43;\n /** RegularExpression Id. */\n int LBRACKET = 44;\n /** RegularExpression Id. */\n int RBRACKET = 45;\n /** RegularExpression Id. */\n int SEMICOLON = 46;\n /** RegularExpression Id. */\n int COMMA = 47;\n /** RegularExpression Id. */\n int DOT = 48;\n /** RegularExpression Id. */\n int DDOT = 49;\n /** RegularExpression Id. */\n int QUESTIONMARK = 50;\n /** RegularExpression Id. */\n int ASSIGN = 51;\n /** RegularExpression Id. */\n int GT = 52;\n /** RegularExpression Id. */\n int LT = 53;\n /** RegularExpression Id. */\n int EQ = 54;\n /** RegularExpression Id. */\n int LE = 55;\n /** RegularExpression Id. */\n int GE = 56;\n /** RegularExpression Id. */\n int NEQ = 57;\n /** RegularExpression Id. */\n int PLUS = 58;\n /** RegularExpression Id. */\n int MINUS = 59;\n /** RegularExpression Id. */\n int STAR = 60;\n /** RegularExpression Id. */\n int SLASH = 61;\n /** RegularExpression Id. */\n int REM = 62;\n /** RegularExpression Id. */\n int OR = 63;\n /** RegularExpression Id. */\n int AND = 64;\n /** RegularExpression Id. */\n int INVALID_LEXICAL = 65;\n /** RegularExpression Id. */\n int INVALID_CONST = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int multilinecomment = 1;\n /** Lexical state. */\n int singlelinecomment = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"/*\\\"\",\n \"\\\"//\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 9>\",\n \"<token of kind 10>\",\n \"<token of kind 11>\",\n \"\\\"parar\\\"\",\n \"\\\"classe\\\"\",\n \"\\\"construtor\\\"\",\n \"\\\"senao\\\"\",\n \"\\\"herda\\\"\",\n \"\\\"para\\\"\",\n \"\\\"se\\\"\",\n \"\\\"entao\\\"\",\n \"\\\"inteiro\\\"\",\n \"\\\"novo\\\"\",\n \"\\\"imprimir\\\"\",\n \"\\\"ler\\\"\",\n \"\\\"retornar\\\"\",\n \"\\\"texto\\\"\",\n \"\\\"super\\\"\",\n \"\\\"cara_coroa\\\"\",\n \"\\\"cara\\\"\",\n \"\\\"coroa\\\"\",\n \"\\\"enquanto\\\"\",\n \"\\\"trocar\\\"\",\n \"\\\"caso\\\"\",\n \"<int_constant>\",\n \"<string_constant>\",\n \"\\\"nulo\\\"\",\n \"<IDENT>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"<UNDERSCORE>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\"?\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"<INVALID_LEXICAL>\",\n \"<INVALID_CONST>\",\n };\n\n}", "public Latent(String internalName,\n TypeDescription declaringType,\n TypeDescription returnType,\n List<? extends TypeDescription> parameterTypes,\n int modifiers,\n List<? extends TypeDescription> exceptionTypes) {\n this.internalName = internalName;\n this.declaringType = declaringType;\n this.returnType = returnType;\n this.parameterTypes = parameterTypes;\n this.modifiers = modifiers;\n this.exceptionTypes = exceptionTypes;\n }", "VariableDeclaration createVariableDeclaration();" ]
[ "0.58545095", "0.5813793", "0.55439675", "0.54482913", "0.5428254", "0.5399601", "0.5341742", "0.5340609", "0.5314068", "0.529766", "0.52619797", "0.5233506", "0.52189875", "0.52033615", "0.5181773", "0.51719254", "0.5166159", "0.51636165", "0.51569986", "0.51545876", "0.5123428", "0.51205504", "0.5106089", "0.508917", "0.50695693", "0.500385", "0.50013", "0.4998759", "0.49826616", "0.4979841", "0.49617708", "0.4961448", "0.49567237", "0.4952438", "0.49518484", "0.4934194", "0.49323866", "0.49293402", "0.49266618", "0.49209058", "0.4906073", "0.48970702", "0.4888679", "0.4872401", "0.48707846", "0.4866111", "0.48658365", "0.4857829", "0.48568574", "0.48459685", "0.48417288", "0.4840161", "0.48361856", "0.48287892", "0.4828286", "0.48260832", "0.48234257", "0.48135453", "0.48085144", "0.4807796", "0.47974035", "0.47927213", "0.47900558", "0.47849548", "0.47846445", "0.47773385", "0.47582036", "0.4757875", "0.47408396", "0.47364226", "0.47358537", "0.4733312", "0.47320032", "0.47238526", "0.4723146", "0.47149888", "0.47147316", "0.47134003", "0.47091165", "0.47053504", "0.470475", "0.46941173", "0.4691121", "0.4684672", "0.46717092", "0.46662077", "0.465789", "0.46511438", "0.46484303", "0.46397984", "0.46391085", "0.46376055", "0.46300054", "0.4626897", "0.46202025", "0.46194336", "0.46178615", "0.4615161", "0.46122482", "0.46075895" ]
0.5989149
0
constructorDeclaratorRest | "void" voidMethodDeclaratorRest | classDeclaration | interfaceDeclaration | methodOrFieldDeclaration
private void memberDecl(Modifier modify, ClassType object, Vector queue) { Type dummy = returns; if (identAndLPar()) { if ((modify.cur & modify.constructors) == 0) modify.cur |= Keyword.PUBLICSY.value ; modify.check(modify.constructors | modify.methods); MethodType x = member = new MethodType(modify.cur | Keyword.CONSTRUCTORSY.value); x.comment = comment + '\n'; resetComment(); x.type = new Type(); x.type.type = Keyword.NONESY; x.type.ident = object.name; x.type.version = object.version; returns = x.type; x.name = nextToken; matchKeyword(Keyword.IDENTSY); if (x.name.string.compareTo(object.name.string) != 0) error("missing type of method"); constructorDeclaratorRest(x, object); member = null; } else if (nextSymbol == Keyword.VOIDSY) { modify.check(modify.methods | modify.access); MethodType x = member = new MethodType(modify.cur); x.comment = comment + '\n'; resetComment(); x.type = new Type(); x.type.type = Keyword.VOIDSY; returns = x.type; lookAhead(); if (nextSymbol == Keyword.INVERTSY) { // allow prefix ~ for destructor method lookAhead(); nextToken.string = '~' + nextToken.string; } x.name = nextToken; matchKeyword(Keyword.IDENTSY); voidMethodDeclaratorRest(modify, x, object); member = null; } else if (nextSymbol == Keyword.CLASSSY) { modify.check(modify.classes | modify.access); classDeclaration(modify, object.scope, ""); } else if (nextSymbol == Keyword.INTERFACESY) { modify.check(modify.interfaces | modify.access); interfaceDeclaration(modify, object.scope, ""); } else methodOrFieldDeclaration(modify, object, queue); returns = dummy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "declaration getDeclaration();", "private void methodDeclaratorRest(Modifier modify, Type t, Token name, ClassType object)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = member = new MethodType(modify.cur);\r\n\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n\r\n x.type = t;\r\n returns = x.type;\r\n x.name = name;\r\n x.parameter = formalParameters();\r\n x.type.dim += bracketsOpt();\r\n\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n if ((modify.cur & Keyword.NATIVESY.value) == 0)\r\n {\r\n if ( (object.modify & Keyword.ABSTRACTSY.value) == 0)\r\n error(\"missing modifier abstract\");\r\n\r\n if ( (modify.cur & modify.access) == 0)\r\n modify.add(Keyword.PUBLICSY.value);\r\n }\r\n\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n insertThis(object, x);\r\n lookAhead();\r\n }\r\n else\r\n {\r\n if ((object.modify & Keyword.ABSTRACTSY.value) == 0)\r\n {\r\n if ((x.modify & new Modifier().constructors) == 0)\r\n x.modify |= Keyword.PUBLICSY.value ;\r\n }\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, object.scope, label, Scope.MAIN, null, x.operation);\r\n }\r\n\r\n object.scope.declInsertOverload(x);\r\n \r\n member = null;\r\n }", "private static boolean namedConstructorDeclaration_7_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"namedConstructorDeclaration_7_0\")) return false;\n boolean r;\n r = consumeToken(b, SEMICOLON);\n if (!r) r = functionBodyOrNative(b, l + 1);\n if (!r) r = redirection(b, l + 1);\n return r;\n }", "void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.equals(\";\") || theToken.equals(\"[\"))\r\n\t\t\t\tvarDec();\r\n\r\n\t\t\t// if int ID ( param ) compoundStatment\r\n\t\t\telse if (theToken.equals(\"(\"))\r\n\t\t\t\tfunDec();\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn;\r\n\t}", "public final void constantDeclaratorsRest() throws RecognitionException {\n int constantDeclaratorsRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constantDeclaratorsRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(388, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return ; }\n // Java.g:389:5: ( constantDeclaratorRest ( ',' constantDeclarator )* )\n dbg.enterAlt(1);\n\n // Java.g:389:9: constantDeclaratorRest ( ',' constantDeclarator )*\n {\n dbg.location(389,9);\n pushFollow(FOLLOW_constantDeclaratorRest_in_constantDeclaratorsRest1712);\n constantDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(389,32);\n // Java.g:389:32: ( ',' constantDeclarator )*\n try { dbg.enterSubRule(59);\n\n loop59:\n do {\n int alt59=2;\n try { dbg.enterDecision(59);\n\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==41) ) {\n alt59=1;\n }\n\n\n } finally {dbg.exitDecision(59);}\n\n switch (alt59) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:389:33: ',' constantDeclarator\n \t {\n \t dbg.location(389,33);\n \t match(input,41,FOLLOW_41_in_constantDeclaratorsRest1715); if (state.failed) return ;\n \t dbg.location(389,37);\n \t pushFollow(FOLLOW_constantDeclarator_in_constantDeclaratorsRest1717);\n \t constantDeclarator();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop59;\n }\n } while (true);\n } finally {dbg.exitSubRule(59);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 44, constantDeclaratorsRest_StartIndex); }\n }\n dbg.location(390, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constantDeclaratorsRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void constructorDeclaratorRest() throws RecognitionException {\n int constructorDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(372, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; }\n // Java.g:373:5: ( formalParameters ( 'throws' qualifiedNameList )? constructorBody )\n dbg.enterAlt(1);\n\n // Java.g:373:9: formalParameters ( 'throws' qualifiedNameList )? constructorBody\n {\n dbg.location(373,9);\n pushFollow(FOLLOW_formalParameters_in_constructorDeclaratorRest1603);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(373,26);\n // Java.g:373:26: ( 'throws' qualifiedNameList )?\n int alt56=2;\n try { dbg.enterSubRule(56);\n try { dbg.enterDecision(56);\n\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==50) ) {\n alt56=1;\n }\n } finally {dbg.exitDecision(56);}\n\n switch (alt56) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:373:27: 'throws' qualifiedNameList\n {\n dbg.location(373,27);\n match(input,50,FOLLOW_50_in_constructorDeclaratorRest1606); if (state.failed) return ;\n dbg.location(373,36);\n pushFollow(FOLLOW_qualifiedNameList_in_constructorDeclaratorRest1608);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(56);}\n\n dbg.location(373,56);\n pushFollow(FOLLOW_constructorBody_in_constructorDeclaratorRest1612);\n constructorBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 40, constructorDeclaratorRest_StartIndex); }\n }\n dbg.location(374, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n\t\t\tpublic void visit(ConstructorDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) > 0)\n\t\t\t\t\tfields.add(\"+\" + arg0.getDeclarationAsString(false, false));\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "@Override\n\tpublic void inAConstructorDeclaration(AConstructorDeclaration node) {\n // Get constructor descriptor.\n List modifiers = node.getModifier();\n StringBuffer desc = new StringBuffer();\n Iterator iter = modifiers.iterator();\n while (iter.hasNext()) {\n desc.append(iter.next());\n if (iter.hasNext()) {\n desc.append(' ');\n }\n }\n AConstructorDeclarator acd = (AConstructorDeclarator)\n node.getConstructorDeclarator();\n desc.append(acd);\n\n // Get the line number.\n AConstructorBody acb = (AConstructorBody) node.getConstructorBody();\n int line = acb.getLBrace().getLine();\n String descStr = desc.toString();\n String sign = getMethodDescShort(descStr);\n MethodDefinition md = new MethodDefinition(descStr, sign, line);\n methodLines.add(md);\n }", "public void masterDeclaration();", "public final void genericMethodOrConstructorRest() throws RecognitionException {\n int genericMethodOrConstructorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"genericMethodOrConstructorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(309, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 28) ) { return ; }\n // Java.g:310:5: ( ( type | 'void' ) Identifier methodDeclaratorRest | Identifier constructorDeclaratorRest )\n int alt43=2;\n try { dbg.enterDecision(43);\n\n int LA43_0 = input.LA(1);\n\n if ( (LA43_0==Identifier) ) {\n int LA43_1 = input.LA(2);\n\n if ( (LA43_1==Identifier||LA43_1==29||LA43_1==40||LA43_1==48) ) {\n alt43=1;\n }\n else if ( (LA43_1==66) ) {\n alt43=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 43, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else if ( (LA43_0==47||(LA43_0>=56 && LA43_0<=63)) ) {\n alt43=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 43, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(43);}\n\n switch (alt43) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:310:9: ( type | 'void' ) Identifier methodDeclaratorRest\n {\n dbg.location(310,9);\n // Java.g:310:9: ( type | 'void' )\n int alt42=2;\n try { dbg.enterSubRule(42);\n try { dbg.enterDecision(42);\n\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==Identifier||(LA42_0>=56 && LA42_0<=63)) ) {\n alt42=1;\n }\n else if ( (LA42_0==47) ) {\n alt42=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 42, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(42);}\n\n switch (alt42) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:310:10: type\n {\n dbg.location(310,10);\n pushFollow(FOLLOW_type_in_genericMethodOrConstructorRest1088);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:310:17: 'void'\n {\n dbg.location(310,17);\n match(input,47,FOLLOW_47_in_genericMethodOrConstructorRest1092); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(42);}\n\n dbg.location(310,25);\n match(input,Identifier,FOLLOW_Identifier_in_genericMethodOrConstructorRest1095); if (state.failed) return ;\n dbg.location(310,36);\n pushFollow(FOLLOW_methodDeclaratorRest_in_genericMethodOrConstructorRest1097);\n methodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:311:9: Identifier constructorDeclaratorRest\n {\n dbg.location(311,9);\n match(input,Identifier,FOLLOW_Identifier_in_genericMethodOrConstructorRest1107); if (state.failed) return ;\n dbg.location(311,20);\n pushFollow(FOLLOW_constructorDeclaratorRest_in_genericMethodOrConstructorRest1109);\n constructorDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 28, genericMethodOrConstructorRest_StartIndex); }\n }\n dbg.location(312, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"genericMethodOrConstructorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public Snippet visit(ConstructorDeclaration n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f1 = n.identifier.accept(this, argu);\n\t tPlasmaCode=\"\";\n\t\t\tString constructorName = f1.expType.getTypeName();\n\t\t\tmemberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = constructorName;\n\n\t\t\ttempCounter = tempZero;\n\n\t n.nodeToken1.accept(this, argu);\n\t blockId = 1;\n\t\t\tcurrentBlock = 1;\n\t\t\tSnippet f3 = n.nodeOptional.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t blockId = 0;\n\t\t\tcurrentBlock = 0;\n\n\t\t\tcurrentMethod = currentClass.constructors.get(memberSig.getCompleteMethodSignature());\n\t\t\t\n\t\t\tmemberSig = null;\n\n\t\t\t\n\t\t\tString tempFormalParamList = \"\";\n\t\t\tif(f3!=null){\n\t\t\t\ttempFormalParamList += f3.returnTemp+\",\";\n\t\t\t}\n\t\t\t//f5 is added in tPlasmaCode\n\t\t\t_ret.returnTemp = generateTabs(0)+\"public \"+constructorName+\" ( \"+tempFormalParamList+\" int myUniquePlacePoint)\\n\";//+f5.returnTemp;\n\t\t\t\n\t\t\ttPlasmaCode += _ret.returnTemp;\n\t\t\tinConstructor = true;\n\t\t\t\n\t n.block.accept(this, argu);\n\t \tinConstructor = false;\n\t currentClassBody.constructors += tPlasmaCode;\n\t\t\ttPlasmaCode=\"\";\n\t return _ret;\n\t }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParameters_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "@Override\n public ClassTree declaration() {\n return null;\n }", "public final void memberDecl() throws RecognitionException {\n int memberDecl_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"memberDecl\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(292, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 25) ) { return ; }\n // Java.g:293:5: ( genericMethodOrConstructorDecl | memberDeclaration | 'void' Identifier voidMethodDeclaratorRest | Identifier constructorDeclaratorRest | interfaceDeclaration | classDeclaration )\n int alt40=6;\n try { dbg.enterDecision(40);\n\n switch ( input.LA(1) ) {\n case 40:\n {\n alt40=1;\n }\n break;\n case Identifier:\n {\n int LA40_2 = input.LA(2);\n\n if ( (LA40_2==66) ) {\n alt40=4;\n }\n else if ( (LA40_2==Identifier||LA40_2==29||LA40_2==40||LA40_2==48) ) {\n alt40=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 40, 2, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n break;\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n {\n alt40=2;\n }\n break;\n case 47:\n {\n alt40=3;\n }\n break;\n case 46:\n case 73:\n {\n alt40=5;\n }\n break;\n case ENUM:\n case 37:\n {\n alt40=6;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 40, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(40);}\n\n switch (alt40) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:293:9: genericMethodOrConstructorDecl\n {\n dbg.location(293,9);\n pushFollow(FOLLOW_genericMethodOrConstructorDecl_in_memberDecl956);\n genericMethodOrConstructorDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:294:9: memberDeclaration\n {\n dbg.location(294,9);\n pushFollow(FOLLOW_memberDeclaration_in_memberDecl966);\n memberDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:295:9: 'void' Identifier voidMethodDeclaratorRest\n {\n dbg.location(295,9);\n match(input,47,FOLLOW_47_in_memberDecl976); if (state.failed) return ;\n dbg.location(295,16);\n match(input,Identifier,FOLLOW_Identifier_in_memberDecl978); if (state.failed) return ;\n dbg.location(295,27);\n pushFollow(FOLLOW_voidMethodDeclaratorRest_in_memberDecl980);\n voidMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:296:9: Identifier constructorDeclaratorRest\n {\n dbg.location(296,9);\n match(input,Identifier,FOLLOW_Identifier_in_memberDecl990); if (state.failed) return ;\n dbg.location(296,20);\n pushFollow(FOLLOW_constructorDeclaratorRest_in_memberDecl992);\n constructorDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:297:9: interfaceDeclaration\n {\n dbg.location(297,9);\n pushFollow(FOLLOW_interfaceDeclaration_in_memberDecl1002);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 6 :\n dbg.enterAlt(6);\n\n // Java.g:298:9: classDeclaration\n {\n dbg.location(298,9);\n pushFollow(FOLLOW_classDeclaration_in_memberDecl1012);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 25, memberDecl_StartIndex); }\n }\n dbg.location(299, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"memberDecl\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private static boolean methodDeclaration_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"methodDeclaration_1_0\")) return false;\n boolean r;\n r = consumeToken(b, EXTERNAL);\n if (!r) r = consumeToken(b, STATIC);\n if (!r) r = consumeToken(b, CONST);\n return r;\n }", "private void classBodyDeclaration(ClassType object, Modifier modifier, Vector queue)\r\n {\r\n Modifier x = new Modifier(modifier);\r\n x.cur = 0;\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n if (nextSymbol == Keyword.STATICSY)\r\n {\r\n x.add(modifier());\r\n queue = object.statics;\r\n }\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n Vector label = new Vector();\r\n //label.add(\"\" + Operation.newLabel());\r\n block(null, null, object.scope, label, Scope.MAIN, null, queue);\r\n }\r\n else\r\n {\r\n for(int y = modifier1(); y != 0; y = modifier())\r\n x.add(y);\r\n\r\n if ((x.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n if ((x.cur & x.constructors) == 0)\r\n x.cur |= modifier.cur & modifier.constructors;\r\n\r\n if ((x.cur & Keyword.STATICSY.value) != 0)\r\n queue = object.statics;\r\n\r\n memberDecl(x, object, queue);\r\n }\r\n }", "public Optional<IDeclaration> nextDeclaration() {\n final var tok = peekToken();\n switch (tok.kind()) {\n case EOF:\n return Optional.empty();\n case ID:\n return parseDeclaration();\n default:\n Error.add(\"unexpected token \" + tok + \" at toplevel\",\n tok.pos());\n return Optional.empty();\n }\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "public static boolean namedConstructorDeclaration(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"namedConstructorDeclaration\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMED_CONSTRUCTOR_DECLARATION, \"<named constructor declaration>\");\n r = namedConstructorDeclaration_0(b, l + 1);\n r = r && namedConstructorDeclaration_1(b, l + 1);\n r = r && componentName(b, l + 1);\n r = r && consumeToken(b, DOT);\n r = r && namedConstructorDeclaration_4(b, l + 1);\n r = r && formalParameterList(b, l + 1);\n p = r; // pin = 6\n r = r && report_error_(b, namedConstructorDeclaration_6(b, l + 1));\n r = p && namedConstructorDeclaration_7(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "private void voidMethodDeclaratorRest(Modifier modify, MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n if ((modify.cur & Keyword.NATIVESY.value) == 0)\r\n {\r\n if ( (x.modify & Keyword.ABSTRACTSY.value) == 0)\r\n error(\"missing modifier abstract\");\r\n\r\n if ( (modify.cur & modify.access) == 0)\r\n modify.add(Keyword.PUBLICSY.value);\r\n }\r\n\r\n x.scope = new Scope(scope, Scope.automatic, \"\");\r\n insertThis(object, x);\r\n lookAhead();\r\n }\r\n else\r\n {\r\n if ((x.modify & Keyword.ABSTRACTSY.value) == 0)\r\n {\r\n if ((x.modify & new Modifier().constructors) == 0)\r\n x.modify |= Keyword.PUBLICSY.value ;\r\n }\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n }\r\n\r\n scope.declInsertOverload(x);\r\n }", "public FunctionDeclaration(String name, int nameStart, int nameEnd,\n\t int start, int end) {\n\tsuper(name, nameStart, nameEnd, start, end);\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "public final void constantDeclarator() throws RecognitionException {\n int constantDeclarator_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constantDeclarator\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(376, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 41) ) { return ; }\n // Java.g:377:5: ( Identifier constantDeclaratorRest )\n dbg.enterAlt(1);\n\n // Java.g:377:9: Identifier constantDeclaratorRest\n {\n dbg.location(377,9);\n match(input,Identifier,FOLLOW_Identifier_in_constantDeclarator1631); if (state.failed) return ;\n dbg.location(377,20);\n pushFollow(FOLLOW_constantDeclaratorRest_in_constantDeclarator1633);\n constantDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 41, constantDeclarator_StartIndex); }\n }\n dbg.location(378, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constantDeclarator\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public TableDeclaration() {\n }", "private static boolean methodDeclaration_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"methodDeclaration_4_0\")) return false;\n boolean r;\n r = consumeToken(b, SEMICOLON);\n if (!r) r = functionBodyOrNative(b, l + 1);\n if (!r) r = redirection(b, l + 1);\n return r;\n }", "VariableDeclaration createVariableDeclaration();", "public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}", "InitDeclRule createInitDeclRule();", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "private void __sep__Constructors__() {}", "declaration_list2 getDeclaration_list2();", "protected int matchLevelForDeclarations(ConstructorDeclaration constructor) {\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, constructor.selector))\n return IMPOSSIBLE_MATCH;\n if (this.pattern.parameterSimpleNames != null) {\n int length = this.pattern.parameterSimpleNames.length;\n Argument[] args = constructor.arguments;\n int argsLength = args == null ? 0 : args.length;\n if (length != argsLength)\n return IMPOSSIBLE_MATCH;\n }\n // Verify type arguments (do not reject if pattern has no argument as it can be an erasure match)\n if (this.pattern.hasConstructorArguments()) {\n if (constructor.typeParameters == null || constructor.typeParameters.length != this.pattern.constructorArguments.length)\n return IMPOSSIBLE_MATCH;\n }\n return this.pattern.mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n }", "public T caseDeclaration(Declaration object)\n {\n return null;\n }", "public T caseDeclaration(Declaration object)\n {\n return null;\n }", "private boolean isConstructor() {\n \tif (line.contains(\"new \")) {\n \t\treturn false;\n \t}\n int bracket = line.indexOf(\"(\");\n if(bracket==-1) {\n return false;\n }\n String declaration = line.substring(0,bracket);\n String[] words = declaration.split(\"\\\\s+\");\n return words[words.length-1].equals(className);\n }", "public FunctionDeclaration(SimpleReference name, int start, int end) {\n\tthis(name.getName(), name.sourceStart(), name.sourceEnd(), start, end);\n }", "private void decls() throws IOException\n {\n type();\n match(Tag.ID);\n match(';');\n }", "FuncDecl createFuncDecl();", "@Override\n\tpublic String visitClassDeclaration(ClassDeclarationContext ctx){\n\t\ttable.enterScope();\t\t\n\t\tvisit(ctx.getChild(4)); //visit methodList. \n\t\ttable.exitScope();\n\t\treturn null;\n\t}", "@Override\n public void visit(ClassOrInterfaceDeclaration n, Object arg) {\n \tif(n.getJavaDoc()!=null){\n \t\tclassInfo.add(n.getName());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tcomment = comment.replaceAll(\"(?s)\\\\*(.*)\",\"\");\n\t \tclassInfo.add(comment.trim()); \n \t}\n \t}", "public static void main(String [] args) {\n List<Ast.Param> pl = new ArrayList<Ast.Param>(); // empty param list\n List<Ast.VarDecl> vl = new ArrayList<Ast.VarDecl>(); // empty var list\n List<Ast.Stmt> sl = new ArrayList<Ast.Stmt>(); // empty stmt list\n\n // Construct a print stmt and add it to stmt list\n Ast.Exp arg = new Ast.StrLit(\"Hello World!\"); // create an arg\n Ast.Stmt s = new Ast.Print(arg); // create a print stmt\n sl.add(s); // add stmt to list\n \n // Construct a MethodDecl ---\n // Ast.MethodDecl(Ast.Type rt, String m, List<Ast.Param> pl, \n // List<Ast.VarDecl> vl, List<Ast.Stmt> sl)\n Ast.MethodDecl md = new Ast.MethodDecl(null, \t// null represents 'void'\n\t\t\t\t\t \"main\",\t// method's name\n\t\t\t\t\t pl, \t\t// formal params\n\t\t\t\t\t vl, \t\t// local var decls\n\t\t\t\t\t sl); \t// method body\n List<Ast.MethodDecl> ml = new ArrayList<Ast.MethodDecl>();\n ml.add(md);\n\n // Construct a ClassDecl ---\n // Ast.ClassDecl(String nm, String pnm, \n // List<Ast.VarDecl> vl, List<Ast.MethodDecl> ml)\n Ast.ClassDecl cd = new Ast.ClassDecl(\"Hello\",\t// class name\n\t\t\t\t\t null, \t\t// parent's name\n\t\t\t\t\t vl, \t\t// field decls \n\t\t\t\t\t ml); \t\t// method decls\n List<Ast.ClassDecl> cl = new ArrayList<Ast.ClassDecl>();\n cl.add(cd);\n\n // Construct a Program ---\n // Ast.Program(List<Ast.ClassDecl> cl)\n Ast.Program p = new Ast.Program(cl); \t// create the whole AST\n System.out.print(p); \t\t\t// dump out the AST\n }", "public T caseVariableDeclarationCS(VariableDeclarationCS object) {\r\n return null;\r\n }", "public final void methodDeclaration() throws RecognitionException {\n int methodDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"methodDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(314, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 29) ) { return ; }\n // Java.g:315:5: ( Identifier methodDeclaratorRest )\n dbg.enterAlt(1);\n\n // Java.g:315:9: Identifier methodDeclaratorRest\n {\n dbg.location(315,9);\n match(input,Identifier,FOLLOW_Identifier_in_methodDeclaration1128); if (state.failed) return ;\n dbg.location(315,20);\n pushFollow(FOLLOW_methodDeclaratorRest_in_methodDeclaration1130);\n methodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 29, methodDeclaration_StartIndex); }\n }\n dbg.location(316, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"methodDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private void classOrInterfaceDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n for(int x; (x = classModifier()) != 0; modifier.add(x));\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n classDeclaration(modifier, scope, basename);\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n interfaceDeclaration(modifier, scope, basename);\r\n else\r\n {\r\n error(\"Keyword \" + Keyword.CLASSSY.string + \" or \" + Keyword.INTERFACESY.string + \" expected, not \" + nextToken.string);\r\n lookAhead();\r\n }\r\n }", "public T caseVariableDeclarationWithInitListCS(VariableDeclarationWithInitListCS object) {\r\n return null;\r\n }", "@Test\n\tpublic void test_ClassDeclarationNested_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public class Foo {} }\", \"Other.Foo\", 1, 0);\n\t}", "@Override\n public String visit(InitializerDeclaration n, Object arg) {\n return null;\n }", "@Test\n\tpublic void testDeclaration(){\n\t\tVariable x = new Variable(\"x\");\n\t\tStatement decl = f.createDeclNode(x);\n\t\tassertEquals(decl.textRepresentation(), \"var x;\");\n\t\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tdecl.accept(v);\n\t\tassertEquals(\"declaration test1 fail\", v.numCount, 0);\n\t\tassertEquals(\"declaration test2 fail\", v.infixCount, 0);\n\t\tassertEquals(\"declaration test3 fail\", v.decCount, 1);\n\t\tassertEquals(\"declaration test4 fail\", v.seqCount, 0);\n\t\tassertEquals(\"declaration test5 fail\", v.assignCount, 0);\n\t\tassertEquals(\"declaration test6 fail\", v.varCount, 0);\n\t\tassertEquals(\"declaration test7 fail\", v.strCount, 0);\n\t\tassertEquals(\"declaration test8 fail\", v.prefixCount, 0);\n\n\t}", "public final void memberDeclaration() throws RecognitionException {\n int memberDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"memberDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(301, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 26) ) { return ; }\n // Java.g:302:5: ( type ( methodDeclaration | fieldDeclaration ) )\n dbg.enterAlt(1);\n\n // Java.g:302:9: type ( methodDeclaration | fieldDeclaration )\n {\n dbg.location(302,9);\n pushFollow(FOLLOW_type_in_memberDeclaration1035);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(302,14);\n // Java.g:302:14: ( methodDeclaration | fieldDeclaration )\n int alt41=2;\n try { dbg.enterSubRule(41);\n try { dbg.enterDecision(41);\n\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==Identifier) ) {\n int LA41_1 = input.LA(2);\n\n if ( (LA41_1==66) ) {\n alt41=1;\n }\n else if ( (LA41_1==26||LA41_1==41||LA41_1==48||LA41_1==51) ) {\n alt41=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(41);}\n\n switch (alt41) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:302:15: methodDeclaration\n {\n dbg.location(302,15);\n pushFollow(FOLLOW_methodDeclaration_in_memberDeclaration1038);\n methodDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:302:35: fieldDeclaration\n {\n dbg.location(302,35);\n pushFollow(FOLLOW_fieldDeclaration_in_memberDeclaration1042);\n fieldDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(41);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 26, memberDeclaration_StartIndex); }\n }\n dbg.location(303, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"memberDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private void BlockDeclarationInstantiation(Collection<Declaration> declarations,\n StatementVisitor mv) {\n // stack: [env] -> [env, envRec]\n mv.dup();\n mv.invoke(Methods.LexicalEnvironment_getEnvRec);\n \n for (Declaration d : declarations) {\n for (String dn : BoundNames(d)) {\n if (IsConstantDeclaration(d)) {\n mv.dup();\n mv.aconst(dn);\n // FIXME: spec bug (CreateImmutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createImmutableBinding);\n } else {\n mv.dup();\n mv.aconst(dn);\n mv.iconst(false);\n // FIXME: spec bug (CreateMutableBinding concrete method of `env`)\n mv.invoke(Methods.EnvironmentRecord_createMutableBinding);\n }\n }\n }\n \n // stack: [env, envRec] -> [envRec, env]\n mv.swap();\n \n for (Declaration d : declarations) {\n if (d instanceof FunctionDeclaration) {\n FunctionDeclaration f = (FunctionDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateFunctionObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n } else if (d instanceof GeneratorDeclaration) {\n GeneratorDeclaration f = (GeneratorDeclaration) d;\n codegen.compile(f);\n String fn = BoundName(f);\n \n // stack: [envRec, env] -> [envRec, env, envRec, realm, env, fd]\n mv.dup2();\n mv.loadExecutionContext();\n mv.swap();\n mv.invokestatic(codegen.getClassName(), codegen.methodName(f) + \"_rti\",\n Type.getMethodDescriptor(Types.RuntimeInfo$Function));\n \n // stack: [envRec, env, envRec, realm, env, fd] -> [envRec, env, envRec, fo]\n mv.invoke(Methods.ScriptRuntime_InstantiateGeneratorObject);\n \n // stack: [envRec, env, envRec, fn, fo] -> [envRec, env]\n mv.aconst(fn);\n mv.swap();\n mv.invoke(Methods.EnvironmentRecord_initialiseBinding);\n }\n }\n \n // stack: [envRec, env] -> [env]\n mv.swap();\n mv.pop();\n }", "private static boolean namedConstructorDeclaration_7(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"namedConstructorDeclaration_7\")) return false;\n namedConstructorDeclaration_7_0(b, l + 1);\n return true;\n }", "public void handleDeclaration(HtmlObjects.Declaration t)\n {\n }", "private void classDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n Vector queue = new Vector();\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modifier.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modifier.check(modifier.classes | modifier.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) == 0)\r\n modifier.methods &= ~Keyword.ABSTRACTSY.value;\r\n else\r\n modifier.methods |= Keyword.ABSTRACTSY.value;\r\n\r\n x.modify |= modifier.cur;\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n Type t = type();\r\n x.extend = new ClassType(t.ident.string.substring(t.ident.string.lastIndexOf('.') + 1));\r\n }\r\n else if (((x.modify & Keyword.STATICSY.value) != 0 || (Scope)scopeStack.get(0) == scope) && x.name.string.compareTo(\"Object\") != 0)\r\n {\r\n x.extend = new ClassType(\"Object\");\r\n unresolved.add(x.extend.name.string);\r\n }\r\n else\r\n x.extend = new ClassType();\r\n\r\n if (nextSymbol == Keyword.IMPLEMENTSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n if ((modifier.cur & Keyword.ABSTRACTSY.value) != 0 && (modifier.cur & modifier.constructors) == 0)\r\n modifier.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modifier.cur &= modifier.constructors;\r\n\r\n classBody(x, new Modifier(), \"\", queue);\r\n\r\n Iterator iter = x.scope.iterator();\r\n\r\n while(iter.hasNext())\r\n {\r\n Basic b = (Basic)iter.next();\r\n\r\n if (b instanceof MethodType)\r\n if ((b.modify & Keyword.STATICSY.value) != 0)\r\n { // remove this from static method\r\n MethodType m = (MethodType)b;\r\n m.scope.remove(\"§this\");\r\n if (m.parameter.length > 0 && m.parameter[0].name.string.compareTo(\"§this\") == 0)\r\n {\r\n Parameter [] p = new Parameter[m.parameter.length - 1];\r\n\r\n for(int i = 0; i < p.length; i++)\r\n p[i] = m.parameter[i + 1];\r\n\r\n m.parameter = p;\r\n }\r\n }\r\n }\r\n\r\n // add queue to constructors\r\n addToConstructor(x, queue);\r\n unresolved = dummy;\r\n\r\n writeList(x);\r\n }", "public T caseVariableDeclarationWithInitCS(VariableDeclarationWithInitCS object) {\r\n return null;\r\n }", "FunctionDecl createFunctionDecl();", "public final void interfaceMethodOrFieldRest() throws RecognitionException {\n int interfaceMethodOrFieldRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMethodOrFieldRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(339, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 34) ) { return ; }\n // Java.g:340:5: ( constantDeclaratorsRest ';' | interfaceMethodDeclaratorRest )\n int alt46=2;\n try { dbg.enterDecision(46);\n\n int LA46_0 = input.LA(1);\n\n if ( (LA46_0==48||LA46_0==51) ) {\n alt46=1;\n }\n else if ( (LA46_0==66) ) {\n alt46=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 46, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(46);}\n\n switch (alt46) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:340:9: constantDeclaratorsRest ';'\n {\n dbg.location(340,9);\n pushFollow(FOLLOW_constantDeclaratorsRest_in_interfaceMethodOrFieldRest1303);\n constantDeclaratorsRest();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(340,33);\n match(input,26,FOLLOW_26_in_interfaceMethodOrFieldRest1305); if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:341:9: interfaceMethodDeclaratorRest\n {\n dbg.location(341,9);\n pushFollow(FOLLOW_interfaceMethodDeclaratorRest_in_interfaceMethodOrFieldRest1315);\n interfaceMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 34, interfaceMethodOrFieldRest_StartIndex); }\n }\n dbg.location(342, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMethodOrFieldRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "List constructors();", "public MethodDecl(int _line_, int _pos_, \n IType _type_, String _name_,\n List<Formal> _formals_, List<VarDecl> _varDecls_,\n List<IStatement> _statements_)\n {\n super(_line_, _pos_);\n \n setType(_type_);\n\n setName(_name_);\n\n setFormals(_formals_);\n\n setVarDecls(_varDecls_);\n\n setStatements(_statements_);\n\n setExp(null);\n\n }", "@Override\n public Void visit(FunctionDeclaration nd, Void v) {\n if (!nd.hasDeclareKeyword()) {\n decls.add(nd.getId());\n }\n return null;\n }", "public final void formalParameterDeclsRest() throws RecognitionException {\n int formalParameterDeclsRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"formalParameterDeclsRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(482, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 62) ) { return ; }\n // Java.g:483:5: ( variableDeclaratorId ( ',' formalParameterDecls )? | '...' variableDeclaratorId )\n int alt80=2;\n try { dbg.enterDecision(80);\n\n int LA80_0 = input.LA(1);\n\n if ( (LA80_0==Identifier) ) {\n alt80=1;\n }\n else if ( (LA80_0==68) ) {\n alt80=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 80, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(80);}\n\n switch (alt80) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:483:9: variableDeclaratorId ( ',' formalParameterDecls )?\n {\n dbg.location(483,9);\n pushFollow(FOLLOW_variableDeclaratorId_in_formalParameterDeclsRest2392);\n variableDeclaratorId();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(483,30);\n // Java.g:483:30: ( ',' formalParameterDecls )?\n int alt79=2;\n try { dbg.enterSubRule(79);\n try { dbg.enterDecision(79);\n\n int LA79_0 = input.LA(1);\n\n if ( (LA79_0==41) ) {\n alt79=1;\n }\n } finally {dbg.exitDecision(79);}\n\n switch (alt79) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:483:31: ',' formalParameterDecls\n {\n dbg.location(483,31);\n match(input,41,FOLLOW_41_in_formalParameterDeclsRest2395); if (state.failed) return ;\n dbg.location(483,35);\n pushFollow(FOLLOW_formalParameterDecls_in_formalParameterDeclsRest2397);\n formalParameterDecls();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(79);}\n\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:484:9: '...' variableDeclaratorId\n {\n dbg.location(484,9);\n match(input,68,FOLLOW_68_in_formalParameterDeclsRest2409); if (state.failed) return ;\n dbg.location(484,15);\n pushFollow(FOLLOW_variableDeclaratorId_in_formalParameterDeclsRest2411);\n variableDeclaratorId();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 62, formalParameterDeclsRest_StartIndex); }\n }\n dbg.location(485, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"formalParameterDeclsRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "ProcedureDecl createProcedureDecl();", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParametersPackage_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "Declaration declaration() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tToken type = consume();\r\n\t\tToken name = match(IDENTIFIER);\r\n\t\tExpression w = null;\r\n\t\tExpression h = null;\r\n\t\tif (type.kind == KW_image) {\r\n\t\t\tif(isKind(LSQUARE)) {\r\n\t\t\t\tconsume();\r\n\t\t\t\tw = expression();\r\n\t\t\t\tmatch(COMMA);\r\n\t\t\t\th = expression();\r\n\t\t\t\tmatch(RSQUARE);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Declaration(first,type,name, w, h);\r\n\t}", "public final void voidMethodDeclaratorRest() throws RecognitionException {\n int voidMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(352, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; }\n // Java.g:353:5: ( formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:353:9: formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(353,9);\n pushFollow(FOLLOW_formalParameters_in_voidMethodDeclaratorRest1421);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(353,26);\n // Java.g:353:26: ( 'throws' qualifiedNameList )?\n int alt50=2;\n try { dbg.enterSubRule(50);\n try { dbg.enterDecision(50);\n\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==50) ) {\n alt50=1;\n }\n } finally {dbg.exitDecision(50);}\n\n switch (alt50) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:353:27: 'throws' qualifiedNameList\n {\n dbg.location(353,27);\n match(input,50,FOLLOW_50_in_voidMethodDeclaratorRest1424); if (state.failed) return ;\n dbg.location(353,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidMethodDeclaratorRest1426);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(50);}\n\n dbg.location(354,9);\n // Java.g:354:9: ( methodBody | ';' )\n int alt51=2;\n try { dbg.enterSubRule(51);\n try { dbg.enterDecision(51);\n\n int LA51_0 = input.LA(1);\n\n if ( (LA51_0==44) ) {\n alt51=1;\n }\n else if ( (LA51_0==26) ) {\n alt51=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 51, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(51);}\n\n switch (alt51) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:354:13: methodBody\n {\n dbg.location(354,13);\n pushFollow(FOLLOW_methodBody_in_voidMethodDeclaratorRest1442);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:355:13: ';'\n {\n dbg.location(355,13);\n match(input,26,FOLLOW_26_in_voidMethodDeclaratorRest1456); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(51);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 36, voidMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(357, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "ConstDecl createConstDecl();", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "public T caseDeclaration(Declaration object) {\r\n\t\treturn null;\r\n\t}", "private void interfaceMethodDeclaratorRest(Modifier modify, Type t, Token ident, ClassType object)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.name = ident;\r\n x.type = t;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n x.parameter = formalParameters();\r\n x.type.dim += bracketsOpt();\r\n object.scope.declInsertOverload(x);\r\n\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n insertThis(object, x);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "public final void methodDeclaratorRest() throws RecognitionException {\n int methodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"methodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(344, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return ; }\n // Java.g:345:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:345:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(345,9);\n pushFollow(FOLLOW_formalParameters_in_methodDeclaratorRest1338);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(345,26);\n // Java.g:345:26: ( '[' ']' )*\n try { dbg.enterSubRule(47);\n\n loop47:\n do {\n int alt47=2;\n try { dbg.enterDecision(47);\n\n int LA47_0 = input.LA(1);\n\n if ( (LA47_0==48) ) {\n alt47=1;\n }\n\n\n } finally {dbg.exitDecision(47);}\n\n switch (alt47) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:345:27: '[' ']'\n \t {\n \t dbg.location(345,27);\n \t match(input,48,FOLLOW_48_in_methodDeclaratorRest1341); if (state.failed) return ;\n \t dbg.location(345,31);\n \t match(input,49,FOLLOW_49_in_methodDeclaratorRest1343); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop47;\n }\n } while (true);\n } finally {dbg.exitSubRule(47);}\n\n dbg.location(346,9);\n // Java.g:346:9: ( 'throws' qualifiedNameList )?\n int alt48=2;\n try { dbg.enterSubRule(48);\n try { dbg.enterDecision(48);\n\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==50) ) {\n alt48=1;\n }\n } finally {dbg.exitDecision(48);}\n\n switch (alt48) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:346:10: 'throws' qualifiedNameList\n {\n dbg.location(346,10);\n match(input,50,FOLLOW_50_in_methodDeclaratorRest1356); if (state.failed) return ;\n dbg.location(346,19);\n pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaratorRest1358);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(48);}\n\n dbg.location(347,9);\n // Java.g:347:9: ( methodBody | ';' )\n int alt49=2;\n try { dbg.enterSubRule(49);\n try { dbg.enterDecision(49);\n\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==44) ) {\n alt49=1;\n }\n else if ( (LA49_0==26) ) {\n alt49=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 49, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(49);}\n\n switch (alt49) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:347:13: methodBody\n {\n dbg.location(347,13);\n pushFollow(FOLLOW_methodBody_in_methodDeclaratorRest1374);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:348:13: ';'\n {\n dbg.location(348,13);\n match(input,26,FOLLOW_26_in_methodDeclaratorRest1388); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(49);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 35, methodDeclaratorRest_StartIndex); }\n }\n dbg.location(350, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"methodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "int getDeclarationSourceStart();", "static boolean classMemberDefinition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"classMemberDefinition\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = factoryConstructorDeclaration(b, l + 1);\n if (!r) r = namedConstructorDeclaration(b, l + 1);\n if (!r) r = getterOrSetterDeclaration(b, l + 1);\n if (!r) r = methodDeclaration(b, l + 1);\n if (!r) r = varDeclarationListWithSemicolon(b, l + 1);\n if (!r) r = incompleteDeclaration(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::class_member_recover);\n return r;\n }", "@Test\n\tpublic void test_ClassDeclarationAnonymousFieldDeclaration_Dec_0_Ref_1() {\n\t\tconfigureParser(\"public class Other { Bar bar = new Foo() { public void method(){} }; } \", \"Foo\", 0, 1);\n\t}", "@Override\n public String visit(ExplicitConstructorInvocationStmt n, Object arg) {\n return null;\n }", "TypedObjectDecl createTypedObjectDecl();", "DeclRule createDeclRule();", "private void interfaceMemberDecl(Modifier modify, ClassType object)\r\n {\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n object.statics.add(op);\r\n resetComment();\r\n }\r\n\r\n if (nextSymbol == Keyword.VOIDSY)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.VOIDSY;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n\r\n lookAhead();\r\n if (nextSymbol == Keyword.INVERTSY)\r\n { // allow prefix ~ for destructor method\r\n lookAhead();\r\n nextToken.string = '~' + nextToken.string;\r\n }\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n voidInterfaceMethodDeclaratorRest(x);\r\n insertThis(object, x);\r\n object.scope.declInsertOverload(x);\r\n }\r\n else if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n modify.check(modify.classes | modify.access);\r\n Modifier m = new Modifier(modify);\r\n m.cur = modify.cur | Keyword.STATICSY.value;\r\n classDeclaration(m, object.scope, \"\");\r\n }\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n {\r\n modify.check(modify.interfaces | modify.access);\r\n interfaceDeclaration(modify, object.scope, \"\");\r\n }\r\n else\r\n interfaceMethodOrFieldDeclaration(modify, object);\r\n }", "protected int findBeginLine(AClassBody node) {\n LinkedList list = node.getClassBodyDeclaration();\n Iterator iter = list.iterator();\n // Start with a nice default.\n int line = node.getLBrace().getLine();\n while (iter.hasNext()) {\n Object o = iter.next();\n\n if (o instanceof AClassMemberDeclarationClassBodyDeclaration) {\n AClassMemberDeclarationClassBodyDeclaration acmdcbd =\n (AClassMemberDeclarationClassBodyDeclaration) o;\n PClassMemberDeclaration pcmd =\n acmdcbd.getClassMemberDeclaration();\n\n if (pcmd instanceof AMethodDeclarationClassMemberDeclaration) {\n AMethodDeclarationClassMemberDeclaration amdcmd =\n (AMethodDeclarationClassMemberDeclaration) pcmd;\n AMethodDeclaration amd = (AMethodDeclaration)\n amdcmd.getMethodDeclaration();\n PMethodHeader pmh = amd.getMethodHeader();\n\n if (pmh instanceof ATypeMethodHeader) {\n ATypeMethodHeader atmh = (ATypeMethodHeader) pmh;\n PMethodDeclarator pmd = atmh.getMethodDeclarator();\n if (pmd instanceof AIdentifierMethodDeclarator) {\n AIdentifierMethodDeclarator aimd =\n (AIdentifierMethodDeclarator) pmd;\n TIdentifier ti = aimd.getIdentifier();\n line = ti.getLine();\n break;\n }\n\n } else if (pmh instanceof AVoidMethodHeader) {\n AVoidMethodHeader avmh = (AVoidMethodHeader) pmh;\n PMethodDeclarator pmd = avmh.getMethodDeclarator();\n if (pmd instanceof AIdentifierMethodDeclarator) {\n AIdentifierMethodDeclarator aimd =\n (AIdentifierMethodDeclarator) pmd;\n TIdentifier ti = aimd.getIdentifier();\n line = ti.getLine();\n break;\n }\n }\n }\n\n } else if (o instanceof\n AConstructorDeclarationClassBodyDeclaration) {\n AConstructorDeclarationClassBodyDeclaration acdcbd =\n (AConstructorDeclarationClassBodyDeclaration) o;\n AConstructorDeclaration acd = (AConstructorDeclaration)\n acdcbd.getConstructorDeclaration();\n AConstructorDeclarator acdr = (AConstructorDeclarator)\n acd.getConstructorDeclarator();\n ASimpleName asn = (ASimpleName) acdr.getSimpleName();\n TIdentifier ti = asn.getIdentifier();\n line = ti.getLine();\n break;\n\n } else if (o instanceof AStaticInitializerClassBodyDeclaration) {\n AStaticInitializerClassBodyDeclaration asicbd =\n (AStaticInitializerClassBodyDeclaration) o;\n AStaticInitializer asi = (AStaticInitializer)\n asicbd.getStaticInitializer();\n ABlock ab = (ABlock) asi.getBlock();\n TLBrace tlb = ab.getLBrace();\n line = tlb.getLine();\n break;\n\n } else if (o instanceof ABlockClassBodyDeclaration) {\n ABlockClassBodyDeclaration abcbd =\n (ABlockClassBodyDeclaration) o;\n ABlock ab = (ABlock) abcbd.getBlock();\n TLBrace tlb = ab.getLBrace();\n line = tlb.getLine();\n break;\n }\n }\n return line;\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "public final void mDECLARATION() throws RecognitionException {\n try {\n int _type = DECLARATION;\n // /Users/benjamincoe/HackWars/C.g:13:13: ( 'declaration' )\n // /Users/benjamincoe/HackWars/C.g:13:15: 'declaration'\n {\n match(\"declaration\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "InputDecl createInputDecl();", "public T caseTypeDeclaration(TypeDeclaration object)\n {\n return null;\n }", "public FragmentConstructor getFragmentConstructorForType(FieldDescriptor descriptor);", "public String getDeclaration() {\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tsb.append(myName+\" \"+myType);\n\t\tfor(String arg : myArgs) {\n\t\t\tsb.append(\" \" + arg);\n\t\t}\n\t\treturn sb.toString();\n\t}", "ResolvedReferenceTypeDeclaration declaringType();", "public interface IConstructorFunctionSymbol {\n\n public IConstructorInfo getConstructorInfo();\n \n}", "public void visit(ClassBodyDeclaration n) {\n n.f0.accept(this);\n }", "public List<Identifier> getDeclarations() \n {\n return this.declarations;\n }", "@Override\r\n\tpublic void visit(ClassDeclNode classDeclaration) {\n\t\tsuper.visit(classDeclaration);\r\n\t}", "private void voidInterfaceMethodDeclaratorRest(MethodType x)\r\n {\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "InstanceDecl createInstanceDecl();", "private void handleDeclaration(Declaration declaration) {\n if (declaration == null) return;\n this.intermediateNodes.add(declaration);\n // todo FieldDeclarations have initializers that may be appropriate to\n // expressionRefersToDeclaration to the\n // constructer body over eog edges\n if (declaration instanceof TranslationUnitDeclaration) {\n // loop through functions\n for (Declaration child : ((TranslationUnitDeclaration) declaration).getDeclarations()) {\n handleDeclaration(child);\n }\n lang.clearProcessed();\n } else if (declaration instanceof RecordDeclaration) {\n\n lang.getScopeManager().enterScope(declaration);\n this.currentEOG.clear();\n for (ConstructorDeclaration constructor :\n ((RecordDeclaration) declaration).getConstructors()) {\n handleDeclaration(constructor);\n }\n\n for (MethodDeclaration method : ((RecordDeclaration) declaration).getMethods()) {\n handleDeclaration(method);\n }\n lang.getScopeManager().leaveScope(declaration);\n } else if (declaration instanceof FunctionDeclaration) {\n FunctionDeclaration funcDecl = (FunctionDeclaration) declaration;\n // reset EOG\n this.currentEOG.clear();\n lang.getScopeManager().enterScope(declaration);\n // push the function declaration\n pushToEOG(declaration);\n\n // analyze the body\n if (funcDecl.hasBody()) createEOG(((FunctionDeclaration) declaration).getBody());\n FunctionScope scope = ((FunctionScope) lang.getScopeManager().getCurrentScope());\n List<Node> uncaughtEOGThrows =\n scope.getCatchesOrRelays().values().stream()\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n // Connect uncaught throws to block node\n addMultipleIncomingEOGEdges(uncaughtEOGThrows, funcDecl.getBody());\n lang.getScopeManager().leaveScope(declaration);\n } else if (declaration instanceof VariableDeclaration) {\n // analyze the initializer\n createEOG(((VariableDeclaration) declaration).getInitializer());\n pushToEOG(declaration);\n } else {\n // In this case the ast -> cpg translation has to implement the cpg node creation\n pushToEOG(declaration);\n }\n }", "@Override\n\tpublic Void visit(ClassDef classDef) {\n\t\tprintIndent(\"class\");\n\t\tindent++;\n\t\tclassDef.self_type.accept(this);\n\t\tclassDef.base_type.accept(this);\n\t\tfor (var v : classDef.body)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/tools/clang/include/clang/AST/DeclarationName.h\", line = 427,\n FQN=\"clang::DeclarationNameLoc::DeclarationNameLoc\", NM=\"_ZN5clang18DeclarationNameLocC1Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclarationName.cpp -nm=_ZN5clang18DeclarationNameLocC1Ev\")\n //</editor-fold>\n public DeclarationNameLoc() {\n// memset(reinterpret_cast(Object/*void P*/ .class, this), 0, sizeof(/*Deref*/this));\n }", "@Override\r\n\tpublic void visit(FunctionDeclaration functionDeclaration) {\n\r\n\t}", "public final void formalParameterDecls() throws RecognitionException {\n int formalParameterDecls_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"formalParameterDecls\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(478, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 61) ) { return ; }\n // Java.g:479:5: ( variableModifiers type formalParameterDeclsRest )\n dbg.enterAlt(1);\n\n // Java.g:479:9: variableModifiers type formalParameterDeclsRest\n {\n dbg.location(479,9);\n pushFollow(FOLLOW_variableModifiers_in_formalParameterDecls2365);\n variableModifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(479,27);\n pushFollow(FOLLOW_type_in_formalParameterDecls2367);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(479,32);\n pushFollow(FOLLOW_formalParameterDeclsRest_in_formalParameterDecls2369);\n formalParameterDeclsRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 61, formalParameterDecls_StartIndex); }\n }\n dbg.location(480, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"formalParameterDecls\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Test\n\tpublic void test_ClassDeclarationNested2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public class Bar { public class Foo{} } }\", \"Other.Bar.Foo\", 1, 0);\n\t}", "@Override\n public String visit(LocalClassDeclarationStmt n, Object arg) {\n return null;\n }", "@Override\n\tpublic void inAClassBody(AClassBody node) {\n // Determine the start and end line numbers.\n int begin = findBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AClassDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AClassDeclaration parent = (AClassDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n } else if (parentNode instanceof\n ASimpleClassInstanceCreationExpression\n || parentNode instanceof\n AQualifiedClassInstanceCreationExpression\n || parentNode instanceof\n AInnerclassClassInstanceCreationExpression) {\n // This handles an anonymous inner class declaration.\n // Use special value of 'new' for anonymous classes.\n cname = ANONYMOUS_CLASS_NAME;\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "@Override\n public void visit(FieldDeclaration n, Object arg) {\n \tArrayList<String> field = new ArrayList<String>();\n \tif(n.getJavaDoc()!=null){\n \t\tString declare = n.toString();\n \t\tdeclare = declare.replaceAll(\"(?s)(.*)private\", \"private\");\n \t\tdeclare = declare.replaceAll(\"(?s)=(.*)\", \"\");\n \t\tfield.add(declare.trim());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tfield.add(comment.trim()); \n\t \tfields.add(field);\n \t}\n \t}" ]
[ "0.65380704", "0.5930811", "0.58458734", "0.5827123", "0.5815849", "0.57605064", "0.5726339", "0.5661342", "0.5634226", "0.56117094", "0.55589527", "0.5535946", "0.5476149", "0.5463186", "0.5443858", "0.54358107", "0.54241204", "0.5392496", "0.5357239", "0.535134", "0.532802", "0.53252465", "0.5318324", "0.5314805", "0.5289198", "0.5260309", "0.5255213", "0.5246656", "0.5194314", "0.51926523", "0.5190645", "0.5187193", "0.5187039", "0.5181777", "0.5181777", "0.51629263", "0.5159555", "0.5155123", "0.5150413", "0.5146222", "0.51358247", "0.5126326", "0.5124541", "0.51238626", "0.51155365", "0.51115835", "0.5081675", "0.50744045", "0.5070754", "0.5070283", "0.5062407", "0.50543785", "0.5048487", "0.5047377", "0.5038827", "0.5032497", "0.50279444", "0.50222373", "0.50181574", "0.50128853", "0.50089234", "0.5004931", "0.49886912", "0.49657542", "0.49642503", "0.49582404", "0.49534744", "0.4952838", "0.4937962", "0.49348095", "0.49294993", "0.49288696", "0.49263975", "0.49062467", "0.49042803", "0.48976347", "0.48975942", "0.48952052", "0.48890272", "0.4888691", "0.48784426", "0.4866789", "0.48594216", "0.48531103", "0.48519766", "0.48501742", "0.48473233", "0.48441812", "0.484332", "0.48418367", "0.48383358", "0.48187235", "0.481667", "0.4816374", "0.48050052", "0.48020157", "0.47990447", "0.4788037", "0.47878426", "0.47775614" ]
0.5753441
6
formalParameters bracketsOpt [ "throws" qualidentList ] ( ';' | block )
private void methodDeclaratorRest(Modifier modify, Type t, Token name, ClassType object) { modify.check(modify.methods | modify.access); MethodType x = member = new MethodType(modify.cur); x.comment = comment + '\n'; resetComment(); x.type = t; returns = x.type; x.name = name; x.parameter = formalParameters(); x.type.dim += bracketsOpt(); if (nextSymbol == Keyword.THROWSSY) { lookAhead(); x.throwing = qualidentList(); } else x.throwing = new String[0]; if (nextSymbol == Keyword.SEMICOLONSY) { if ((modify.cur & Keyword.NATIVESY.value) == 0) { if ( (object.modify & Keyword.ABSTRACTSY.value) == 0) error("missing modifier abstract"); if ( (modify.cur & modify.access) == 0) modify.add(Keyword.PUBLICSY.value); } x.scope = new Scope(object.scope, Scope.automatic, ""); insertThis(object, x); lookAhead(); } else { if ((object.modify & Keyword.ABSTRACTSY.value) == 0) { if ((x.modify & new Modifier().constructors) == 0) x.modify |= Keyword.PUBLICSY.value ; } Vector label = new Vector(); label.add(Operation.newLabel() + ""); x.scope = block(x, null, object.scope, label, Scope.MAIN, null, x.operation); } object.scope.declInsertOverload(x); member = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void constructorDeclaratorRest() throws RecognitionException {\n int constructorDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(372, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; }\n // Java.g:373:5: ( formalParameters ( 'throws' qualifiedNameList )? constructorBody )\n dbg.enterAlt(1);\n\n // Java.g:373:9: formalParameters ( 'throws' qualifiedNameList )? constructorBody\n {\n dbg.location(373,9);\n pushFollow(FOLLOW_formalParameters_in_constructorDeclaratorRest1603);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(373,26);\n // Java.g:373:26: ( 'throws' qualifiedNameList )?\n int alt56=2;\n try { dbg.enterSubRule(56);\n try { dbg.enterDecision(56);\n\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==50) ) {\n alt56=1;\n }\n } finally {dbg.exitDecision(56);}\n\n switch (alt56) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:373:27: 'throws' qualifiedNameList\n {\n dbg.location(373,27);\n match(input,50,FOLLOW_50_in_constructorDeclaratorRest1606); if (state.failed) return ;\n dbg.location(373,36);\n pushFollow(FOLLOW_qualifiedNameList_in_constructorDeclaratorRest1608);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(56);}\n\n dbg.location(373,56);\n pushFollow(FOLLOW_constructorBody_in_constructorDeclaratorRest1612);\n constructorBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 40, constructorDeclaratorRest_StartIndex); }\n }\n dbg.location(374, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {\n int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(368, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; }\n // Java.g:369:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:369:9: formalParameters ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(369,9);\n pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1571);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(369,26);\n // Java.g:369:26: ( 'throws' qualifiedNameList )?\n int alt55=2;\n try { dbg.enterSubRule(55);\n try { dbg.enterDecision(55);\n\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==50) ) {\n alt55=1;\n }\n } finally {dbg.exitDecision(55);}\n\n switch (alt55) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:369:27: 'throws' qualifiedNameList\n {\n dbg.location(369,27);\n match(input,50,FOLLOW_50_in_voidInterfaceMethodDeclaratorRest1574); if (state.failed) return ;\n dbg.location(369,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1576);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(55);}\n\n dbg.location(369,56);\n match(input,26,FOLLOW_26_in_voidInterfaceMethodDeclaratorRest1580); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 39, voidInterfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(370, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void methodDeclaratorRest() throws RecognitionException {\n int methodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"methodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(344, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return ; }\n // Java.g:345:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:345:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(345,9);\n pushFollow(FOLLOW_formalParameters_in_methodDeclaratorRest1338);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(345,26);\n // Java.g:345:26: ( '[' ']' )*\n try { dbg.enterSubRule(47);\n\n loop47:\n do {\n int alt47=2;\n try { dbg.enterDecision(47);\n\n int LA47_0 = input.LA(1);\n\n if ( (LA47_0==48) ) {\n alt47=1;\n }\n\n\n } finally {dbg.exitDecision(47);}\n\n switch (alt47) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:345:27: '[' ']'\n \t {\n \t dbg.location(345,27);\n \t match(input,48,FOLLOW_48_in_methodDeclaratorRest1341); if (state.failed) return ;\n \t dbg.location(345,31);\n \t match(input,49,FOLLOW_49_in_methodDeclaratorRest1343); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop47;\n }\n } while (true);\n } finally {dbg.exitSubRule(47);}\n\n dbg.location(346,9);\n // Java.g:346:9: ( 'throws' qualifiedNameList )?\n int alt48=2;\n try { dbg.enterSubRule(48);\n try { dbg.enterDecision(48);\n\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==50) ) {\n alt48=1;\n }\n } finally {dbg.exitDecision(48);}\n\n switch (alt48) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:346:10: 'throws' qualifiedNameList\n {\n dbg.location(346,10);\n match(input,50,FOLLOW_50_in_methodDeclaratorRest1356); if (state.failed) return ;\n dbg.location(346,19);\n pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaratorRest1358);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(48);}\n\n dbg.location(347,9);\n // Java.g:347:9: ( methodBody | ';' )\n int alt49=2;\n try { dbg.enterSubRule(49);\n try { dbg.enterDecision(49);\n\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==44) ) {\n alt49=1;\n }\n else if ( (LA49_0==26) ) {\n alt49=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 49, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(49);}\n\n switch (alt49) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:347:13: methodBody\n {\n dbg.location(347,13);\n pushFollow(FOLLOW_methodBody_in_methodDeclaratorRest1374);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:348:13: ';'\n {\n dbg.location(348,13);\n match(input,26,FOLLOW_26_in_methodDeclaratorRest1388); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(49);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 35, methodDeclaratorRest_StartIndex); }\n }\n dbg.location(350, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"methodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final ANTLRv3Parser.throwsSpec_return throwsSpec() throws RecognitionException {\r\n ANTLRv3Parser.throwsSpec_return retval = new ANTLRv3Parser.throwsSpec_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal58=null;\r\n Token char_literal60=null;\r\n ANTLRv3Parser.id_return id59 =null;\r\n\r\n ANTLRv3Parser.id_return id61 =null;\r\n\r\n\r\n CommonTree string_literal58_tree=null;\r\n CommonTree char_literal60_tree=null;\r\n RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,\"token 72\");\r\n RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,\"token 89\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:4: 'throws' id ( ',' id )*\r\n {\r\n string_literal58=(Token)match(input,89,FOLLOW_89_in_throwsSpec1083); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_89.add(string_literal58);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_throwsSpec1085);\r\n id59=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id59.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:16: ( ',' id )*\r\n loop26:\r\n do {\r\n int alt26=2;\r\n int LA26_0 = input.LA(1);\r\n\r\n if ( (LA26_0==72) ) {\r\n alt26=1;\r\n }\r\n\r\n\r\n switch (alt26) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:18: ',' id\r\n \t {\r\n \t char_literal60=(Token)match(input,72,FOLLOW_72_in_throwsSpec1089); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_72.add(char_literal60);\r\n\r\n\r\n \t pushFollow(FOLLOW_id_in_throwsSpec1091);\r\n \t id61=id();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_id.add(id61.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop26;\r\n }\r\n } while (true);\r\n\r\n\r\n // AST REWRITE\r\n // elements: id, 89\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 180:28: -> ^( 'throws' ( id )+ )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:31: ^( 'throws' ( id )+ )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_89.nextNode()\r\n , root_1);\r\n\r\n if ( !(stream_id.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_id.hasNext() ) {\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n }\r\n stream_id.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public final void voidMethodDeclaratorRest() throws RecognitionException {\n int voidMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(352, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; }\n // Java.g:353:5: ( formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:353:9: formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(353,9);\n pushFollow(FOLLOW_formalParameters_in_voidMethodDeclaratorRest1421);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(353,26);\n // Java.g:353:26: ( 'throws' qualifiedNameList )?\n int alt50=2;\n try { dbg.enterSubRule(50);\n try { dbg.enterDecision(50);\n\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==50) ) {\n alt50=1;\n }\n } finally {dbg.exitDecision(50);}\n\n switch (alt50) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:353:27: 'throws' qualifiedNameList\n {\n dbg.location(353,27);\n match(input,50,FOLLOW_50_in_voidMethodDeclaratorRest1424); if (state.failed) return ;\n dbg.location(353,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidMethodDeclaratorRest1426);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(50);}\n\n dbg.location(354,9);\n // Java.g:354:9: ( methodBody | ';' )\n int alt51=2;\n try { dbg.enterSubRule(51);\n try { dbg.enterDecision(51);\n\n int LA51_0 = input.LA(1);\n\n if ( (LA51_0==44) ) {\n alt51=1;\n }\n else if ( (LA51_0==26) ) {\n alt51=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 51, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(51);}\n\n switch (alt51) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:354:13: methodBody\n {\n dbg.location(354,13);\n pushFollow(FOLLOW_methodBody_in_voidMethodDeclaratorRest1442);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:355:13: ';'\n {\n dbg.location(355,13);\n match(input,26,FOLLOW_26_in_voidMethodDeclaratorRest1456); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(51);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 36, voidMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(357, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private void voidInterfaceMethodDeclaratorRest(MethodType x)\r\n {\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "public final void interfaceMethodDeclaratorRest() throws RecognitionException {\n int interfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(359, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 37) ) { return ; }\n // Java.g:360:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:360:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(360,9);\n pushFollow(FOLLOW_formalParameters_in_interfaceMethodDeclaratorRest1489);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(360,26);\n // Java.g:360:26: ( '[' ']' )*\n try { dbg.enterSubRule(52);\n\n loop52:\n do {\n int alt52=2;\n try { dbg.enterDecision(52);\n\n int LA52_0 = input.LA(1);\n\n if ( (LA52_0==48) ) {\n alt52=1;\n }\n\n\n } finally {dbg.exitDecision(52);}\n\n switch (alt52) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:360:27: '[' ']'\n \t {\n \t dbg.location(360,27);\n \t match(input,48,FOLLOW_48_in_interfaceMethodDeclaratorRest1492); if (state.failed) return ;\n \t dbg.location(360,31);\n \t match(input,49,FOLLOW_49_in_interfaceMethodDeclaratorRest1494); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop52;\n }\n } while (true);\n } finally {dbg.exitSubRule(52);}\n\n dbg.location(360,37);\n // Java.g:360:37: ( 'throws' qualifiedNameList )?\n int alt53=2;\n try { dbg.enterSubRule(53);\n try { dbg.enterDecision(53);\n\n int LA53_0 = input.LA(1);\n\n if ( (LA53_0==50) ) {\n alt53=1;\n }\n } finally {dbg.exitDecision(53);}\n\n switch (alt53) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:360:38: 'throws' qualifiedNameList\n {\n dbg.location(360,38);\n match(input,50,FOLLOW_50_in_interfaceMethodDeclaratorRest1499); if (state.failed) return ;\n dbg.location(360,47);\n pushFollow(FOLLOW_qualifiedNameList_in_interfaceMethodDeclaratorRest1501);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(53);}\n\n dbg.location(360,67);\n match(input,26,FOLLOW_26_in_interfaceMethodDeclaratorRest1505); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 37, interfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(361, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "Rule Throws() {\n // Push 1 ThrowsNode onto the value stack\n return Sequence(\n \"throws \",\n \"( \",\n actions.pushInterrupt(),\n ZeroOrMore(Field()),\n \") \",\n actions.pushThrowsNode());\n }", "private void catchClause(String label, Scope scope, Vector queue)\r\n {\r\n matchKeyword(Keyword.CATCHSY);\r\n matchKeyword(Keyword.LPARSY);\r\n\r\n Parameter parameter = formalParameter();\r\n\r\n Operation root = new Operation();\r\n root.code = \"DUP \\\" \" + parameter.type.ident.string.substring(parameter.type.ident.string.lastIndexOf('.') + 1) + \" \\\" INSTANCEOF\\n IF\\n\";\r\n queue.add(root);\r\n\r\n matchKeyword(Keyword.RPARSY);\r\n\r\n VariableType a = new VariableType(parameter.type, 0);\r\n a.name = parameter.name;\r\n\r\n Vector v = new Vector();\r\n v.add(\"\" + Operation.newLabel());\r\n block(null, a, scope, v, Scope.CATCH, null, queue);\r\n\r\n root = new Operation();\r\n root.code = \"DUP \" + label + \" BRANCH\\nENDIF\\n\";\r\n queue.add(root);\r\n }", "boolean supportsParamsInAnonymousBlocks();", "public final void catchClause() throws RecognitionException {\n int catchClause_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"catchClause\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(645, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 92) ) { return ; }\n // Java.g:646:5: ( 'catch' '(' formalParameter ')' block )\n dbg.enterAlt(1);\n\n // Java.g:646:9: 'catch' '(' formalParameter ')' block\n {\n dbg.location(646,9);\n match(input,88,FOLLOW_88_in_catchClause3685); if (state.failed) return ;\n dbg.location(646,17);\n match(input,66,FOLLOW_66_in_catchClause3687); if (state.failed) return ;\n dbg.location(646,21);\n pushFollow(FOLLOW_formalParameter_in_catchClause3689);\n formalParameter();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(646,37);\n match(input,67,FOLLOW_67_in_catchClause3691); if (state.failed) return ;\n dbg.location(646,41);\n pushFollow(FOLLOW_block_in_catchClause3693);\n block();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 92, catchClause_StartIndex); }\n }\n dbg.location(647, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"catchClause\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "public static void main(String[] args){\n\t\tThrowsKeyword obj = new ThrowsKeyword();\n\t\tobj.sum();\n\t\tSystem.out.println(\"ABC\");\n\t}", "@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}", "public void a(World paramaqu, BlockPosition paramdt, Block parambec, BlockType paramatr)\r\n/* 99: */ {\r\n/* 100:125 */ if (!paramaqu.isClient) {\r\n/* 101:126 */ paramaqu.s(paramdt);\r\n/* 102: */ }\r\n/* 103: */ }", "void compileParameterList() {\n tagBracketPrinter(PAR_LIST_TAG, OPEN_TAG_BRACKET);\n try {\n compileParameterListHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(PAR_LIST_TAG, CLOSE_TAG_BRACKET);\n }", "private void blockStatement(Scope scope, Vector queue)\r\n {\r\n Modifier modify = new Modifier();\r\n\r\n modify.access = 0;\r\n modify.classes &= Keyword.FINALSY.value | Keyword.STRICTFPSY.value;\r\n modify.fields &= Keyword.FINALSY.value | Keyword.TRANSIENTSY.value | Keyword.VOLATILESY.value;\r\n modify.methods &= Keyword.FINALSY.value | Keyword.SYNCHRONIZEDSY.value | Keyword.NATIVESY.value | Keyword.STRICTFPSY.value;\r\n modify.constants &= Keyword.FINALSY.value;\r\n\r\n Token t;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n queue.add(op);\r\n resetComment();\r\n }\r\n\r\n if (isLocalVarDecl(false))\r\n {\r\n localVariableDeclaration(modify, scope, queue);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n else\r\n {\r\n peekReset();\r\n \r\n t = nextToken;\r\n\r\n while(t.kind == Keyword.PUBLICSY || t.kind == Keyword.PROTECTEDSY ||\r\n t.kind == Keyword.PRIVATESY || t.kind == Keyword.ABSTRACTSY ||\r\n t.kind == Keyword.STATICSY || t.kind == Keyword.FINALSY ||\r\n t.kind == Keyword.STRICTFPSY)\r\n t = peek();\r\n \r\n if (t.kind == Keyword.CLASSSY || t.kind == Keyword.INTERFACESY)\r\n classOrInterfaceDeclaration(modify, scope, \"\");\r\n else\r\n statement(modify, scope, Scope.SEQUENCE, null, queue, true);\r\n }\r\n }", "private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }", "protected void checkThrows(DetailAST aAST, String aException)\n {\n final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);\n if (objBlock != null) {\n DetailAST child = (DetailAST) objBlock.getFirstChild();\n while (child != null) {\n if (child.getType() == TokenTypes.METHOD_DEF) {\n if (!Utils.hasThrows(child, aException)) {\n final DetailAST nameAST =\n child.findFirstToken(TokenTypes.IDENT);\n final String name = nameAST.getText();\n log(nameAST.getLineNo(), nameAST.getColumnNo(),\n \"missingthrows.bean\",\n new Object[] {name, aException});\n }\n }\n child = (DetailAST) child.getNextSibling();\n }\n }\n }", "protected void setFormalParameters(List params) {\n this._formalParameters = params;\n }", "private static boolean default_formal_parameter_recover_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover_0\")) return false;\n boolean r;\n r = consumeToken(b, RPAREN);\n if (!r) r = consumeToken(b, COMMA);\n if (!r) r = consumeToken(b, RBRACKET);\n if (!r) r = consumeToken(b, RBRACE);\n return r;\n }", "public Snippet visit(ThrowStatement n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"throw \"+\"new\"+\" RuntimeException(\"+f4.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public Latent(String internalName,\n TypeDescription declaringType,\n TypeDescription returnType,\n List<? extends TypeDescription> parameterTypes,\n int modifiers,\n List<? extends TypeDescription> exceptionTypes) {\n this.internalName = internalName;\n this.declaringType = declaringType;\n this.returnType = returnType;\n this.parameterTypes = parameterTypes;\n this.modifiers = modifiers;\n this.exceptionTypes = exceptionTypes;\n }", "public void a(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4)\r\n/* 569: */ {\r\n/* 570:573 */ e();\r\n/* 571:574 */ this.q = paramInt4;\r\n/* 572:575 */ paramString = d(paramString);\r\n/* 573: */ \r\n/* 574:577 */ a(paramString, paramInt1, paramInt2, paramInt3, false);\r\n/* 575: */ }", "void mo28890b(int i) throws zzlm;", "@NotNull\n String getSyntax();", "private boolean skipMethodParameters() {\r\n \t\tint ch = readCharBackward(); \r\n \t\tif (ch != ')')\r\n \t\t\treturn false;\r\n \t\tint pCount = 1;\r\n \t\twhile (pCount > 0) {\r\n \t\t\tch = readCharBackward();\r\n \t\t\tif (ch == -1)\r\n \t\t\t\treturn false;\r\n \t\t\t\r\n \t\t\tif (ch == '\"' || ch == '\\'') {\r\n \t\t\t\tskipQuotedChars((char)ch);\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\tpCount++;\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tif (ch == '(') {\r\n \t\t\t\tpCount--;\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "protected void parseExceptions(MethodDeclaration argMethodDeclaration,\r\n\t\t\tIClassCodeGenConfig argDaoConfig, MethodConfig argMethodConfig,\r\n\t\t\tMap<String, String> argCommentsMap, String argDoClassName) {\r\n\r\n\t\t// add exception configuration into the method\r\n\t\t// configuration.\r\n\t\tList<NameExpr> throwsExc = argMethodDeclaration.getThrows();\r\n\t\tif (throwsExc != null) {\r\n\t\t\tfor (NameExpr throwExpr : argMethodDeclaration.getThrows()) {\r\n\t\t\t\tThrowExceptionConfig exceptionConifg = new ThrowExceptionConfig();\r\n\t\t\t\tString exceptionName = throwExpr.getName();\r\n\t\t\t\texceptionConifg.setClassName(getClassNameFromImports(\r\n\t\t\t\t\t\targDaoConfig, exceptionName));\r\n\r\n\t\t\t\t// set exception configuration's\r\n\t\t\t\t// comment.\r\n\t\t\t\tCommentConfig exceptinComment = new CommentConfig();\r\n\t\t\t\texceptinComment.setValue(argCommentsMap.get(exceptionName));\r\n\r\n\t\t\t\texceptionConifg.setConfigObject(CommentConfig.MAIN_TAG,\r\n\t\t\t\t\t\texceptinComment);\r\n\t\t\t\targMethodConfig.setConfigObject(ThrowExceptionConfig.MAIN_TAG,\r\n\t\t\t\t\t\texceptionConifg);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}", "public void setCatchClauseList(List<CatchClause> list) {\n setChild(list, 1);\n }", "public abstract List<? extends Pair<Type.Clazz,String>> exceptions();", "public void mo1944a() throws cf {\r\n }", "public void a(cvk paramcvk)\r\n/* 76: */ {\r\n/* 77: 95 */ c();\r\n/* 78: */ }", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "public SyntaxException(String errorMessage) {\n\t\tsuper(errorMessage);\n\t}", "public void addExceptionStyle();", "public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, List<BlockPosition> paramList)\r\n/* 26: */ {\r\n/* 27: 44 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, false, true, paramList);\r\n/* 28: */ }", "public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "public int getParameter3() {\n/* 59 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "public FunctionDeclaration(String name, int nameStart, int nameEnd,\n\t int start, int end) {\n\tsuper(name, nameStart, nameEnd, start, end);\n }", "@Override\n public String visit(ThrowStmt n, Object arg) {\n return null;\n }", "public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}", "public void setParameters (String[] exps) throws Exception;", "public SyntaxException() {\n\t\tsuper();\n\t}", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "public void doMethod(String callerName) throws LexemeException {\n\t\tlogMessage(\"<method>-->([<formals>]) [throws ID] <block>\");\n\t\tfunctionStack.push(\"<method>\");\n\t\tconsumeToken();\n\t\tif (ifPeekIsType()) {\n\t\t\tdoFormals(\"<method>\");\n\t\t}\n\t\tifPeekThenConsume(\"R_PAREN_\");\n\t\tif (ifPeek(\"THROWS_\")) {\n\t\t\tconsumeToken();\n\t\t\tifPeekThenConsume(\"ID_\");\n\t\t}\n\t\tif (ifPeek(\"L_CURLY_\")) {\n\t\t\tdoBlock(\"<method>\");\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "public interface RoutineException {}", "public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }", "public final void throwsSpec() throws RecognitionException {\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:2: ( ^( 'throws' ( ID )+ ) )\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:4: ^( 'throws' ( ID )+ )\n\t\t\t{\n\t\t\tmatch(input,THROWS,FOLLOW_THROWS_in_throwsSpec423); if (state.failed) return;\n\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return;\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:15: ( ID )+\n\t\t\tint cnt26=0;\n\t\t\tloop26:\n\t\t\twhile (true) {\n\t\t\t\tint alt26=2;\n\t\t\t\tint LA26_0 = input.LA(1);\n\t\t\t\tif ( (LA26_0==ID) ) {\n\t\t\t\t\talt26=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt26) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:15: ID\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,ID,FOLLOW_ID_in_throwsSpec425); if (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt26 >= 1 ) break loop26;\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(26, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt26++;\n\t\t\t}\n\n\t\t\tmatch(input, Token.UP, null); if (state.failed) return;\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public void syntax_error(Symbol current_token){}", "public void limpiarListaParametro() throws Exception;", "public int a(String paramString, float paramFloat1, float paramFloat2, int paramInt)\r\n/* 234: */ {\r\n/* 235:243 */ return a(paramString, paramFloat1, paramFloat2, paramInt, true);\r\n/* 236: */ }", "public void a(Item paramalq, CreativeTabs paramakf, List paramList)\r\n/* 22: */ {\r\n/* 23:27 */ paramList.add(new ItemStack(paramalq, 1, 0));\r\n/* 24:28 */ paramList.add(new ItemStack(paramalq, 1, 1));\r\n/* 25: */ }", "@Override\n\tpublic void notationDecl(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\n\t}", "void mo28889a(int i, String str) throws zzlm;", "@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}", "static boolean optionalPositionalParameterTypes(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"optionalPositionalParameterTypes\")) return false;\n if (!nextTokenIs(b, LBRACKET)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, LBRACKET);\n r = r && normalParameterTypes(b, l + 1);\n r = r && optionalPositionalParameterTypes_2(b, l + 1);\n r = r && consumeToken(b, RBRACKET);\n exit_section_(b, m, null, r);\n return r;\n }", "public Snippet visit(FormalParameterList n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null,false);\n\t Snippet f0 = n.finalFormalParameter.accept(this, argu);\n\t fieldsCode = \"\";\n\t Snippet f1 = n.nodeListOptional.accept(this, argu);\n\t \n\t\t\t\n\t\t\t\t_ret.returnTemp = f0.returnTemp+fieldsCode;\t\n\t\t\t\tfieldsCode = \"\";\n\t\t\t\n\t return _ret;\n\t }", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 76: */ {\r\n/* 77: 99 */ return null;\r\n/* 78: */ }", "public interface CustomConstruct extends AgnosticStatement, QueryCondition {\n}", "public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, boolean paramBoolean1, boolean paramBoolean2, List<BlockPosition> paramList)\r\n/* 31: */ {\r\n/* 32: 48 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, paramBoolean1, paramBoolean2);\r\n/* 33: 49 */ this.j.addAll(paramList);\r\n/* 34: */ }", "public void c(ahd paramahd) {}", "void method22()\n throws IOException\n {\n }", "ParameterList getParameters();", "private void voidMethodDeclaratorRest(Modifier modify, MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n if ((modify.cur & Keyword.NATIVESY.value) == 0)\r\n {\r\n if ( (x.modify & Keyword.ABSTRACTSY.value) == 0)\r\n error(\"missing modifier abstract\");\r\n\r\n if ( (modify.cur & modify.access) == 0)\r\n modify.add(Keyword.PUBLICSY.value);\r\n }\r\n\r\n x.scope = new Scope(scope, Scope.automatic, \"\");\r\n insertThis(object, x);\r\n lookAhead();\r\n }\r\n else\r\n {\r\n if ((x.modify & Keyword.ABSTRACTSY.value) == 0)\r\n {\r\n if ((x.modify & new Modifier().constructors) == 0)\r\n x.modify |= Keyword.PUBLICSY.value ;\r\n }\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n }\r\n\r\n scope.declInsertOverload(x);\r\n }", "@Override\r\n\tpublic boolean getCurlyBracesDenoteCodeBlocks(int languageIndex) {\r\n\t\treturn true;\r\n\t}", "public ahr(aqu paramaqu)\r\n/* 20: */ {\r\n/* 21: 34 */ super(paramaqu);\r\n/* 22: 35 */ a(0.25F, 0.25F);\r\n/* 23: */ }", "private void interfaceMethodDeclaratorRest(Modifier modify, Type t, Token ident, ClassType object)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.name = ident;\r\n x.type = t;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n x.parameter = formalParameters();\r\n x.type.dim += bracketsOpt();\r\n object.scope.declInsertOverload(x);\r\n\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n insertThis(object, x);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "void method21()\n throws IOException\n {\n }", "public ULocale(String a, String b, String c) {\n/* 125 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void mo1964g() throws cf {\r\n }", "@Override\n\tpublic Void visit(Formal formal) {\n\t\tprintIndent(\"formal\");\n\t\tindent++;\n\t\tformal.name.accept(this);\n\t\tformal.type.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void disableBracket(BracketsDTO bracket) throws DALException {\n\t\t\r\n\t}", "@Override\n public String visit(CatchClause n, Object arg) {\n return null;\n }", "public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "public static void method1()throws Throwable{\n\t\t/*\n\t\t * throwing a new throwable the keyword\n\t\t * is \"throw\"\n\t\t */\n\t\tthrow new Throwable();\n\t}", "public final EObject ruleCatch() throws RecognitionException {\n EObject current = null;\n int ruleCatch_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n EObject lv_formalParameter_2_0 = null;\n\n EObject lv_block_4_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 80) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3597:28: ( (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3598:1: (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3598:1: (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3599:2: otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) )\n {\n otherlv_0=(Token)match(input,KEYWORD_60,FOLLOW_KEYWORD_60_in_ruleCatch7179); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getCatchAccess().getCatchKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleCatch7191); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getCatchAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3608:1: ( (lv_formalParameter_2_0= ruleFormalParameter ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3609:1: (lv_formalParameter_2_0= ruleFormalParameter )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3609:1: (lv_formalParameter_2_0= ruleFormalParameter )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3610:3: lv_formalParameter_2_0= ruleFormalParameter\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getCatchAccess().getFormalParameterFormalParameterParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleFormalParameter_in_ruleCatch7211);\n lv_formalParameter_2_0=ruleFormalParameter();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCatchRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"formalParameter\",\n \t\tlv_formalParameter_2_0, \n \t\t\"FormalParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleCatch7224); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_3, grammarAccess.getCatchAccess().getRightParenthesisKeyword_3());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3631:1: ( (lv_block_4_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3632:1: (lv_block_4_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3632:1: (lv_block_4_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3633:3: lv_block_4_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getCatchAccess().getBlockBlockParserRuleCall_4_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleCatch7244);\n lv_block_4_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCatchRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"block\",\n \t\tlv_block_4_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 80, ruleCatch_StartIndex); }\n }\n return current;\n }", "Syntax getSyntax();", "protected void sequence_ParameterList(ISerializationContext context, ParameterList semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.PARAMETER_LIST__CODE_BLOCK) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.PARAMETER_LIST__CODE_BLOCK));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getParameterListAccess().getCodeBlockCodeBlockParserRuleCall_2_0(), semanticObject.getCodeBlock());\n\t\tfeeder.finish();\n\t}", "public void compile(InterFile f, SymbolTable s) throws CompileException {\n\t\t// TODO, handle super(...) or this(...) (Issue #16)\n\t\t// name is <init>, returns void\n\t\tInterFunction func = new InterFunction(f.getName(), \"<init>\", Types.VOID);\n\t\tfunc.isInstance = true;\n\n\t\t// symbol table for parameters\n\t\tSymbolTable newTable = new SymbolTable(s, SymbolTable.parameter);\n\n\t\t// add the parameters\n\t\tfor (ParamNode p : this.params) {\n\t\t\tfunc.paramTypes.add(p.type);\n\t\t\tfunc.paramNames.add(p.id.name);\n\t\t\tif (p.isVarargs) {\n\t\t\t\tif (func.lastArgVarargs) { // can only have one argument varargs, and as to be last\n\t\t\t\t\tthrow new CompileException(\n\t\t\t\t\t\t\t\"the variable arguments can only be used on the last parameter.\",\n\t\t\t\t\t\t\tfileName, line);\n\t\t\t\t}\n\t\t\t\tfunc.lastArgVarargs = true;\n\t\t\t} else {\n\t\t\t\tif (func.lastArgVarargs)\n\t\t\t\t\t// make sure that a previous argument was not ...\n\t\t\t\t\tthrow new CompileException(\"the variable arguments can onlybe on the last paramter.\",\n\t\t\t\t\t\tfileName, line);\n\t\t\t}\n\t\t\tnewTable.putEntry(p.id.name, p.type, fileName, line);\n\t\t}\n\t\t\n\t\t// throws the throws list\n\t\tif (this.throwsList != null) {\n\t\t\tfor (NameNode n : this.throwsList) {\n\t\t\t\tfunc.throwsList.add(n.primaryName);\n\t\t\t}\n\t\t}\n\t\t// add in the implicit super() call\n\t\t// TODO func.statements.add(new );\n\t\t\n\t\t// compile the block\n\t\tfor (BlockStatementNode b : this.code) {\n\t\t\tb.compile(newTable, func);\n\t\t}\n\n\t\t// done with newTable\n\t\tnewTable.endScope(func);\n\t\t\n\t\t// add the function to the intermediate file.\n\t\tf.addFunction(func);\t\t\n\t}", "public abstract V a(String str) throws gh;", "public boolean func_102008_b(int par1, ItemStack par2ItemStack, int par3)\n/* */ {\n/* 125 */ return false;\n/* */ }", "public interface IFormalParameter {\r\n\t/*\r\n\t * Fills in the given actual parameters in the formal parameters and declare\r\n\t * them in the given context\r\n\t */\r\n\tpublic void fillIn(Context context, Iterator<IReferable> _actualParams);\r\n\r\n}", "public void visit(BinThrowStatement x){\n }", "public interface Compound extends Clause {}", "public static CatchBlock catch_(Class clazz, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private void a(World paramaqu, BlockPosition paramdt, int paramInt)\r\n/* 128: */ {\r\n/* 129:126 */ setBlock(paramaqu, paramdt, BlockList.vine, paramInt);\r\n/* 130:127 */ int i = 4;\r\n/* 131: */ \r\n/* 132:129 */ paramdt = paramdt.down();\r\n/* 133:130 */ while ((paramaqu.getBlock(paramdt).getType().getMaterial() == Material.air) && (i > 0))\r\n/* 134: */ {\r\n/* 135:131 */ setBlock(paramaqu, paramdt, BlockList.vine, paramInt);\r\n/* 136:132 */ paramdt = paramdt.down();\r\n/* 137:133 */ i--;\r\n/* 138: */ }\r\n/* 139: */ }", "public COMCLayout(IDynamicGraph<V, E> pIGraph, TimeFrame tf, String[] parameters) {\n super(pIGraph, tf, parameters);\n }", "protected abstract JsonValue statementParameters();", "public static void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "public void checkParameters() {\n }", "public int getParameter2() {\n/* 53 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "static boolean default_formal_parameter_recover(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NOT_);\n r = !default_formal_parameter_recover_0(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "@Test\n\tpublic void testBasicNamingBad() {\n\t\t// \"Bad\" == \"Should throw an exception\"\n\t\tassertNamingException(\"int foo(int a) { return b; }\");\n\t\tassertNamingException(\"int foo(int a) { { int b = 42; } return b; }\");\n\t\tassertNamingException(\"int foo(int a) { { int b = b; int c = 42; } return a; }\");\n\t\tassertNamingException(\"int foo(int a) { int a = 42; return a; }\");\n\t}", "@Test\n void testSemanticGrammarErrors() {\n assertThrows(IllegalArgumentException.class, () -> A_G1.withProduction(A_PROD2));\n }", "public ctq(File paramFile, String paramString, oa paramoa, ckh paramckh)\r\n/* 22: */ {\r\n/* 23: 33 */ super(paramoa);\r\n/* 24: 34 */ this.i = paramFile;\r\n/* 25: 35 */ this.j = paramString;\r\n/* 26: 36 */ this.k = paramckh;\r\n/* 27: */ }" ]
[ "0.5582835", "0.5518597", "0.53196144", "0.5308051", "0.52623224", "0.52158636", "0.52029866", "0.5109213", "0.5022285", "0.50017995", "0.4991166", "0.4977902", "0.4819611", "0.4809581", "0.4746177", "0.47194052", "0.46785572", "0.4657945", "0.46429813", "0.46164808", "0.45317876", "0.4522645", "0.45156935", "0.4499628", "0.44786492", "0.4464708", "0.44489112", "0.44267237", "0.44159803", "0.44064444", "0.44035223", "0.44013903", "0.43892813", "0.4387822", "0.43837652", "0.43827307", "0.43776345", "0.4372899", "0.43709272", "0.43708226", "0.43663615", "0.43471208", "0.43463385", "0.4341362", "0.43247908", "0.43169624", "0.4316171", "0.43151987", "0.43102652", "0.43074316", "0.43062204", "0.4303847", "0.4302577", "0.42904958", "0.42813903", "0.42732576", "0.42701843", "0.42666915", "0.42632142", "0.4258392", "0.42571077", "0.42352998", "0.42352384", "0.42198977", "0.42135006", "0.420631", "0.42062208", "0.42020777", "0.42004567", "0.4197298", "0.41919547", "0.41915873", "0.4190924", "0.4189362", "0.41846073", "0.4175895", "0.41751054", "0.41694546", "0.41631135", "0.41557282", "0.4155708", "0.41482714", "0.4145783", "0.4144195", "0.4134097", "0.41305867", "0.41289064", "0.41270095", "0.41264004", "0.41249883", "0.4114732", "0.41143242", "0.4112019", "0.4106417", "0.4105477", "0.4104602", "0.41000125", "0.409996", "0.40999386", "0.40997517" ]
0.414764
82
formalParameters [ "throws" qualidentList ] ( ';' | block )
private void voidMethodDeclaratorRest(Modifier modify, MethodType x, ClassType object) { Scope scope = object.scope; x.parameter = formalParameters(); if (nextSymbol == Keyword.THROWSSY) { lookAhead(); x.throwing = qualidentList(); } else x.throwing = new String[0]; if (nextSymbol == Keyword.SEMICOLONSY) { if ((modify.cur & Keyword.NATIVESY.value) == 0) { if ( (x.modify & Keyword.ABSTRACTSY.value) == 0) error("missing modifier abstract"); if ( (modify.cur & modify.access) == 0) modify.add(Keyword.PUBLICSY.value); } x.scope = new Scope(scope, Scope.automatic, ""); insertThis(object, x); lookAhead(); } else { if ((x.modify & Keyword.ABSTRACTSY.value) == 0) { if ((x.modify & new Modifier().constructors) == 0) x.modify |= Keyword.PUBLICSY.value ; } Vector label = new Vector(); label.add(Operation.newLabel() + ""); x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation); } scope.declInsertOverload(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void constructorDeclaratorRest() throws RecognitionException {\n int constructorDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(372, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; }\n // Java.g:373:5: ( formalParameters ( 'throws' qualifiedNameList )? constructorBody )\n dbg.enterAlt(1);\n\n // Java.g:373:9: formalParameters ( 'throws' qualifiedNameList )? constructorBody\n {\n dbg.location(373,9);\n pushFollow(FOLLOW_formalParameters_in_constructorDeclaratorRest1603);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(373,26);\n // Java.g:373:26: ( 'throws' qualifiedNameList )?\n int alt56=2;\n try { dbg.enterSubRule(56);\n try { dbg.enterDecision(56);\n\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==50) ) {\n alt56=1;\n }\n } finally {dbg.exitDecision(56);}\n\n switch (alt56) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:373:27: 'throws' qualifiedNameList\n {\n dbg.location(373,27);\n match(input,50,FOLLOW_50_in_constructorDeclaratorRest1606); if (state.failed) return ;\n dbg.location(373,36);\n pushFollow(FOLLOW_qualifiedNameList_in_constructorDeclaratorRest1608);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(56);}\n\n dbg.location(373,56);\n pushFollow(FOLLOW_constructorBody_in_constructorDeclaratorRest1612);\n constructorBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 40, constructorDeclaratorRest_StartIndex); }\n }\n dbg.location(374, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {\n int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(368, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; }\n // Java.g:369:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:369:9: formalParameters ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(369,9);\n pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1571);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(369,26);\n // Java.g:369:26: ( 'throws' qualifiedNameList )?\n int alt55=2;\n try { dbg.enterSubRule(55);\n try { dbg.enterDecision(55);\n\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==50) ) {\n alt55=1;\n }\n } finally {dbg.exitDecision(55);}\n\n switch (alt55) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:369:27: 'throws' qualifiedNameList\n {\n dbg.location(369,27);\n match(input,50,FOLLOW_50_in_voidInterfaceMethodDeclaratorRest1574); if (state.failed) return ;\n dbg.location(369,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1576);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(55);}\n\n dbg.location(369,56);\n match(input,26,FOLLOW_26_in_voidInterfaceMethodDeclaratorRest1580); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 39, voidInterfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(370, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final ANTLRv3Parser.throwsSpec_return throwsSpec() throws RecognitionException {\r\n ANTLRv3Parser.throwsSpec_return retval = new ANTLRv3Parser.throwsSpec_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal58=null;\r\n Token char_literal60=null;\r\n ANTLRv3Parser.id_return id59 =null;\r\n\r\n ANTLRv3Parser.id_return id61 =null;\r\n\r\n\r\n CommonTree string_literal58_tree=null;\r\n CommonTree char_literal60_tree=null;\r\n RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,\"token 72\");\r\n RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,\"token 89\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:4: 'throws' id ( ',' id )*\r\n {\r\n string_literal58=(Token)match(input,89,FOLLOW_89_in_throwsSpec1083); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_89.add(string_literal58);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_throwsSpec1085);\r\n id59=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id59.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:16: ( ',' id )*\r\n loop26:\r\n do {\r\n int alt26=2;\r\n int LA26_0 = input.LA(1);\r\n\r\n if ( (LA26_0==72) ) {\r\n alt26=1;\r\n }\r\n\r\n\r\n switch (alt26) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:18: ',' id\r\n \t {\r\n \t char_literal60=(Token)match(input,72,FOLLOW_72_in_throwsSpec1089); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_72.add(char_literal60);\r\n\r\n\r\n \t pushFollow(FOLLOW_id_in_throwsSpec1091);\r\n \t id61=id();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_id.add(id61.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop26;\r\n }\r\n } while (true);\r\n\r\n\r\n // AST REWRITE\r\n // elements: id, 89\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 180:28: -> ^( 'throws' ( id )+ )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:31: ^( 'throws' ( id )+ )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_89.nextNode()\r\n , root_1);\r\n\r\n if ( !(stream_id.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_id.hasNext() ) {\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n }\r\n stream_id.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public final void voidMethodDeclaratorRest() throws RecognitionException {\n int voidMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(352, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; }\n // Java.g:353:5: ( formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:353:9: formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(353,9);\n pushFollow(FOLLOW_formalParameters_in_voidMethodDeclaratorRest1421);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(353,26);\n // Java.g:353:26: ( 'throws' qualifiedNameList )?\n int alt50=2;\n try { dbg.enterSubRule(50);\n try { dbg.enterDecision(50);\n\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==50) ) {\n alt50=1;\n }\n } finally {dbg.exitDecision(50);}\n\n switch (alt50) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:353:27: 'throws' qualifiedNameList\n {\n dbg.location(353,27);\n match(input,50,FOLLOW_50_in_voidMethodDeclaratorRest1424); if (state.failed) return ;\n dbg.location(353,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidMethodDeclaratorRest1426);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(50);}\n\n dbg.location(354,9);\n // Java.g:354:9: ( methodBody | ';' )\n int alt51=2;\n try { dbg.enterSubRule(51);\n try { dbg.enterDecision(51);\n\n int LA51_0 = input.LA(1);\n\n if ( (LA51_0==44) ) {\n alt51=1;\n }\n else if ( (LA51_0==26) ) {\n alt51=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 51, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(51);}\n\n switch (alt51) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:354:13: methodBody\n {\n dbg.location(354,13);\n pushFollow(FOLLOW_methodBody_in_voidMethodDeclaratorRest1442);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:355:13: ';'\n {\n dbg.location(355,13);\n match(input,26,FOLLOW_26_in_voidMethodDeclaratorRest1456); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(51);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 36, voidMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(357, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private void voidInterfaceMethodDeclaratorRest(MethodType x)\r\n {\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "Rule Throws() {\n // Push 1 ThrowsNode onto the value stack\n return Sequence(\n \"throws \",\n \"( \",\n actions.pushInterrupt(),\n ZeroOrMore(Field()),\n \") \",\n actions.pushThrowsNode());\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "public static void main(String[] args){\n\t\tThrowsKeyword obj = new ThrowsKeyword();\n\t\tobj.sum();\n\t\tSystem.out.println(\"ABC\");\n\t}", "private void catchClause(String label, Scope scope, Vector queue)\r\n {\r\n matchKeyword(Keyword.CATCHSY);\r\n matchKeyword(Keyword.LPARSY);\r\n\r\n Parameter parameter = formalParameter();\r\n\r\n Operation root = new Operation();\r\n root.code = \"DUP \\\" \" + parameter.type.ident.string.substring(parameter.type.ident.string.lastIndexOf('.') + 1) + \" \\\" INSTANCEOF\\n IF\\n\";\r\n queue.add(root);\r\n\r\n matchKeyword(Keyword.RPARSY);\r\n\r\n VariableType a = new VariableType(parameter.type, 0);\r\n a.name = parameter.name;\r\n\r\n Vector v = new Vector();\r\n v.add(\"\" + Operation.newLabel());\r\n block(null, a, scope, v, Scope.CATCH, null, queue);\r\n\r\n root = new Operation();\r\n root.code = \"DUP \" + label + \" BRANCH\\nENDIF\\n\";\r\n queue.add(root);\r\n }", "public void mo1944a() throws cf {\r\n }", "public final void catchClause() throws RecognitionException {\n int catchClause_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"catchClause\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(645, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 92) ) { return ; }\n // Java.g:646:5: ( 'catch' '(' formalParameter ')' block )\n dbg.enterAlt(1);\n\n // Java.g:646:9: 'catch' '(' formalParameter ')' block\n {\n dbg.location(646,9);\n match(input,88,FOLLOW_88_in_catchClause3685); if (state.failed) return ;\n dbg.location(646,17);\n match(input,66,FOLLOW_66_in_catchClause3687); if (state.failed) return ;\n dbg.location(646,21);\n pushFollow(FOLLOW_formalParameter_in_catchClause3689);\n formalParameter();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(646,37);\n match(input,67,FOLLOW_67_in_catchClause3691); if (state.failed) return ;\n dbg.location(646,41);\n pushFollow(FOLLOW_block_in_catchClause3693);\n block();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 92, catchClause_StartIndex); }\n }\n dbg.location(647, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"catchClause\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "void mo28890b(int i) throws zzlm;", "protected void checkThrows(DetailAST aAST, String aException)\n {\n final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);\n if (objBlock != null) {\n DetailAST child = (DetailAST) objBlock.getFirstChild();\n while (child != null) {\n if (child.getType() == TokenTypes.METHOD_DEF) {\n if (!Utils.hasThrows(child, aException)) {\n final DetailAST nameAST =\n child.findFirstToken(TokenTypes.IDENT);\n final String name = nameAST.getText();\n log(nameAST.getLineNo(), nameAST.getColumnNo(),\n \"missingthrows.bean\",\n new Object[] {name, aException});\n }\n }\n child = (DetailAST) child.getNextSibling();\n }\n }\n }", "public Snippet visit(ThrowStatement n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"throw \"+\"new\"+\" RuntimeException(\"+f4.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public final void methodDeclaratorRest() throws RecognitionException {\n int methodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"methodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(344, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return ; }\n // Java.g:345:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:345:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(345,9);\n pushFollow(FOLLOW_formalParameters_in_methodDeclaratorRest1338);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(345,26);\n // Java.g:345:26: ( '[' ']' )*\n try { dbg.enterSubRule(47);\n\n loop47:\n do {\n int alt47=2;\n try { dbg.enterDecision(47);\n\n int LA47_0 = input.LA(1);\n\n if ( (LA47_0==48) ) {\n alt47=1;\n }\n\n\n } finally {dbg.exitDecision(47);}\n\n switch (alt47) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:345:27: '[' ']'\n \t {\n \t dbg.location(345,27);\n \t match(input,48,FOLLOW_48_in_methodDeclaratorRest1341); if (state.failed) return ;\n \t dbg.location(345,31);\n \t match(input,49,FOLLOW_49_in_methodDeclaratorRest1343); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop47;\n }\n } while (true);\n } finally {dbg.exitSubRule(47);}\n\n dbg.location(346,9);\n // Java.g:346:9: ( 'throws' qualifiedNameList )?\n int alt48=2;\n try { dbg.enterSubRule(48);\n try { dbg.enterDecision(48);\n\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==50) ) {\n alt48=1;\n }\n } finally {dbg.exitDecision(48);}\n\n switch (alt48) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:346:10: 'throws' qualifiedNameList\n {\n dbg.location(346,10);\n match(input,50,FOLLOW_50_in_methodDeclaratorRest1356); if (state.failed) return ;\n dbg.location(346,19);\n pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaratorRest1358);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(48);}\n\n dbg.location(347,9);\n // Java.g:347:9: ( methodBody | ';' )\n int alt49=2;\n try { dbg.enterSubRule(49);\n try { dbg.enterDecision(49);\n\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==44) ) {\n alt49=1;\n }\n else if ( (LA49_0==26) ) {\n alt49=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 49, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(49);}\n\n switch (alt49) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:347:13: methodBody\n {\n dbg.location(347,13);\n pushFollow(FOLLOW_methodBody_in_methodDeclaratorRest1374);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:348:13: ';'\n {\n dbg.location(348,13);\n match(input,26,FOLLOW_26_in_methodDeclaratorRest1388); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(49);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 35, methodDeclaratorRest_StartIndex); }\n }\n dbg.location(350, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"methodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n public String visit(ThrowStmt n, Object arg) {\n return null;\n }", "public interface RoutineException {}", "public void visit(BinThrowStatement x){\n }", "public int h(Block parambec)\r\n/* 29: */ {\r\n/* 30: 44 */ return F();\r\n/* 31: */ }", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 76: */ {\r\n/* 77: 99 */ return null;\r\n/* 78: */ }", "public final void interfaceMethodDeclaratorRest() throws RecognitionException {\n int interfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(359, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 37) ) { return ; }\n // Java.g:360:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:360:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(360,9);\n pushFollow(FOLLOW_formalParameters_in_interfaceMethodDeclaratorRest1489);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(360,26);\n // Java.g:360:26: ( '[' ']' )*\n try { dbg.enterSubRule(52);\n\n loop52:\n do {\n int alt52=2;\n try { dbg.enterDecision(52);\n\n int LA52_0 = input.LA(1);\n\n if ( (LA52_0==48) ) {\n alt52=1;\n }\n\n\n } finally {dbg.exitDecision(52);}\n\n switch (alt52) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:360:27: '[' ']'\n \t {\n \t dbg.location(360,27);\n \t match(input,48,FOLLOW_48_in_interfaceMethodDeclaratorRest1492); if (state.failed) return ;\n \t dbg.location(360,31);\n \t match(input,49,FOLLOW_49_in_interfaceMethodDeclaratorRest1494); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop52;\n }\n } while (true);\n } finally {dbg.exitSubRule(52);}\n\n dbg.location(360,37);\n // Java.g:360:37: ( 'throws' qualifiedNameList )?\n int alt53=2;\n try { dbg.enterSubRule(53);\n try { dbg.enterDecision(53);\n\n int LA53_0 = input.LA(1);\n\n if ( (LA53_0==50) ) {\n alt53=1;\n }\n } finally {dbg.exitDecision(53);}\n\n switch (alt53) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:360:38: 'throws' qualifiedNameList\n {\n dbg.location(360,38);\n match(input,50,FOLLOW_50_in_interfaceMethodDeclaratorRest1499); if (state.failed) return ;\n dbg.location(360,47);\n pushFollow(FOLLOW_qualifiedNameList_in_interfaceMethodDeclaratorRest1501);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(53);}\n\n dbg.location(360,67);\n match(input,26,FOLLOW_26_in_interfaceMethodDeclaratorRest1505); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 37, interfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(361, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void visit(ThrowStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n }", "public void mo1964g() throws cf {\r\n }", "public int getParameter3() {\n/* 59 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void mo28889a(int i, String str) throws zzlm;", "public ULocale(String a, String b, String c) {\n/* 125 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void doMethod(String callerName) throws LexemeException {\n\t\tlogMessage(\"<method>-->([<formals>]) [throws ID] <block>\");\n\t\tfunctionStack.push(\"<method>\");\n\t\tconsumeToken();\n\t\tif (ifPeekIsType()) {\n\t\t\tdoFormals(\"<method>\");\n\t\t}\n\t\tifPeekThenConsume(\"R_PAREN_\");\n\t\tif (ifPeek(\"THROWS_\")) {\n\t\t\tconsumeToken();\n\t\t\tifPeekThenConsume(\"ID_\");\n\t\t}\n\t\tif (ifPeek(\"L_CURLY_\")) {\n\t\t\tdoBlock(\"<method>\");\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "public void a(World paramaqu, BlockPosition paramdt, Block parambec, BlockType paramatr)\r\n/* 99: */ {\r\n/* 100:125 */ if (!paramaqu.isClient) {\r\n/* 101:126 */ paramaqu.s(paramdt);\r\n/* 102: */ }\r\n/* 103: */ }", "public final void throwsSpec() throws RecognitionException {\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:2: ( ^( 'throws' ( ID )+ ) )\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:4: ^( 'throws' ( ID )+ )\n\t\t\t{\n\t\t\tmatch(input,THROWS,FOLLOW_THROWS_in_throwsSpec423); if (state.failed) return;\n\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return;\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:15: ( ID )+\n\t\t\tint cnt26=0;\n\t\t\tloop26:\n\t\t\twhile (true) {\n\t\t\t\tint alt26=2;\n\t\t\t\tint LA26_0 = input.LA(1);\n\t\t\t\tif ( (LA26_0==ID) ) {\n\t\t\t\t\talt26=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt26) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:274:15: ID\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,ID,FOLLOW_ID_in_throwsSpec425); if (state.failed) return;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt26 >= 1 ) break loop26;\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return;}\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(26, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt26++;\n\t\t\t}\n\n\t\t\tmatch(input, Token.UP, null); if (state.failed) return;\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public void limpiarListaParametro() throws Exception;", "public static void method1()throws Throwable{\n\t\t/*\n\t\t * throwing a new throwable the keyword\n\t\t * is \"throw\"\n\t\t */\n\t\tthrow new Throwable();\n\t}", "public ULocale(String a, String b) {\n/* 103 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setCatchClauseList(List<CatchClause> list) {\n setChild(list, 1);\n }", "protected void setFormalParameters(List params) {\n this._formalParameters = params;\n }", "private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }", "public int getParameter2() {\n/* 53 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Latent(String internalName,\n TypeDescription declaringType,\n TypeDescription returnType,\n List<? extends TypeDescription> parameterTypes,\n int modifiers,\n List<? extends TypeDescription> exceptionTypes) {\n this.internalName = internalName;\n this.declaringType = declaringType;\n this.returnType = returnType;\n this.parameterTypes = parameterTypes;\n this.modifiers = modifiers;\n this.exceptionTypes = exceptionTypes;\n }", "public static CatchBlock catch_(Class clazz, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public void mo1963f() throws cf {\r\n }", "void m5771e() throws C0841b;", "public final void mT__47() throws RecognitionException {\n try {\n int _type = T__47;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalUniMapperGenerator.g:26:7: ( 'throws' )\n // InternalUniMapperGenerator.g:26:9: 'throws'\n {\n match(\"throws\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public int getParameter1() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void blockStatement(Scope scope, Vector queue)\r\n {\r\n Modifier modify = new Modifier();\r\n\r\n modify.access = 0;\r\n modify.classes &= Keyword.FINALSY.value | Keyword.STRICTFPSY.value;\r\n modify.fields &= Keyword.FINALSY.value | Keyword.TRANSIENTSY.value | Keyword.VOLATILESY.value;\r\n modify.methods &= Keyword.FINALSY.value | Keyword.SYNCHRONIZEDSY.value | Keyword.NATIVESY.value | Keyword.STRICTFPSY.value;\r\n modify.constants &= Keyword.FINALSY.value;\r\n\r\n Token t;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n queue.add(op);\r\n resetComment();\r\n }\r\n\r\n if (isLocalVarDecl(false))\r\n {\r\n localVariableDeclaration(modify, scope, queue);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n else\r\n {\r\n peekReset();\r\n \r\n t = nextToken;\r\n\r\n while(t.kind == Keyword.PUBLICSY || t.kind == Keyword.PROTECTEDSY ||\r\n t.kind == Keyword.PRIVATESY || t.kind == Keyword.ABSTRACTSY ||\r\n t.kind == Keyword.STATICSY || t.kind == Keyword.FINALSY ||\r\n t.kind == Keyword.STRICTFPSY)\r\n t = peek();\r\n \r\n if (t.kind == Keyword.CLASSSY || t.kind == Keyword.INTERFACESY)\r\n classOrInterfaceDeclaration(modify, scope, \"\");\r\n else\r\n statement(modify, scope, Scope.SEQUENCE, null, queue, true);\r\n }\r\n }", "public abstract V a(String str) throws gh;", "@Override\n public String visit(CatchClause n, Object arg) {\n return null;\n }", "public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "void mo57276a(Exception exc);", "void method22()\n throws IOException\n {\n }", "public void testingTryCatch() {\r\n\t\tSystem.err.println(\"Class NewFeatures, method testingTryCatch called!\");\r\n\t\ttry (FileInputStream stream = new FileInputStream(\"hey\")) {\r\n\t\t\tSystem.out.println(\"Try/block accessed!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tThread.currentThread().getStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"Class NewFeatures, method testingTryCatch done!\");\r\n\t}", "public void a(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4)\r\n/* 569: */ {\r\n/* 570:573 */ e();\r\n/* 571:574 */ this.q = paramInt4;\r\n/* 572:575 */ paramString = d(paramString);\r\n/* 573: */ \r\n/* 574:577 */ a(paramString, paramInt1, paramInt2, paramInt3, false);\r\n/* 575: */ }", "@Override\n\tpublic void VisitThrowNode(BunThrowNode Node) {\n\n\t}", "int getThrowsRemaining();", "void method21()\n throws IOException\n {\n }", "void L3() throws Exception{\n\t\tSystem.out.println(\"1\");\n\t\tthrow e;\n\t}", "public void mo1976s() throws cf {\r\n }", "public abstract void scopeCorrectness() throws CodeException;", "public final EObject ruleCatch() throws RecognitionException {\n EObject current = null;\n int ruleCatch_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n EObject lv_formalParameter_2_0 = null;\n\n EObject lv_block_4_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 80) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3597:28: ( (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3598:1: (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3598:1: (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3599:2: otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) )\n {\n otherlv_0=(Token)match(input,KEYWORD_60,FOLLOW_KEYWORD_60_in_ruleCatch7179); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getCatchAccess().getCatchKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleCatch7191); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getCatchAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3608:1: ( (lv_formalParameter_2_0= ruleFormalParameter ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3609:1: (lv_formalParameter_2_0= ruleFormalParameter )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3609:1: (lv_formalParameter_2_0= ruleFormalParameter )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3610:3: lv_formalParameter_2_0= ruleFormalParameter\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getCatchAccess().getFormalParameterFormalParameterParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleFormalParameter_in_ruleCatch7211);\n lv_formalParameter_2_0=ruleFormalParameter();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCatchRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"formalParameter\",\n \t\tlv_formalParameter_2_0, \n \t\t\"FormalParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleCatch7224); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_3, grammarAccess.getCatchAccess().getRightParenthesisKeyword_3());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3631:1: ( (lv_block_4_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3632:1: (lv_block_4_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3632:1: (lv_block_4_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3633:3: lv_block_4_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getCatchAccess().getBlockBlockParserRuleCall_4_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleCatch7244);\n lv_block_4_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCatchRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"block\",\n \t\tlv_block_4_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 80, ruleCatch_StartIndex); }\n }\n return current;\n }", "public void test(String s) throws Exception {\n }", "private void handleBlocksTryCatchFinally(DetailAST aAstReturn) {\n\n\t\tif (aAstReturn != null) {\n\n\t\t\tif (aAstReturn.getType() == TokenTypes.LITERAL_RETURN) {\n\n\t\t\t\tlog(aAstReturn.getLineNo());\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tthrow new Test ();\r\n\t\t\r\n\t}", "boolean supportsParamsInAnonymousBlocks();", "void mo1031a(Throwable th);", "public void addExceptionStyle();", "public void mo1966i() throws cf {\r\n }", "public void a(cvk paramcvk)\r\n/* 76: */ {\r\n/* 77: 95 */ c();\r\n/* 78: */ }", "void mo40619a(int i, Object obj) throws zzgc;", "void m5770d() throws C0841b;", "void begin() throws OutputException;", "@AfterThrowing(pointcut=\"args(name)\", throwing=\"ex\")\n\tpublic void allMethodStringArg(String name,Exception ex){\n\t\tSystem.out.println(\"A method with String arguments has called =\"+name);\n\t\tSystem.out.println(\"Exception was =\"+ex);\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n int int0 = (-11);\n fBProcedureCall0.addParam(1203, \"mutSn)_E\");\n // Undeclared exception!\n try { \n fBProcedureCall0.addParam((-11), \"mutSn)_E\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -11\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public void mo1960c() throws cf {\r\n }", "public static void main(String[] args) throws Exception {\r\n\r\n\t\tthrow new Exception(\"anand\");\r\n\t\t\r\n\t}", "public abstract List<? extends Pair<Type.Clazz,String>> exceptions();", "public static void main(String[] args) {\n\t\t\n\t\ttry {\n\t\t\tthrow new CustomException(\"Custom Exception\");\n\t\t} catch (CustomException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(\"Catch Block\"); \n\t\t\t \n System.out.println(e.getMessage()); \n\t\t}\n\t}", "@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}", "void m5769c() throws C0841b;", "public void testVerifyOrderDoesntMatter(){\n _throws _tt = new _throws( );\n _tt.add( RuntimeException.class );\n _tt.add( IOException.class );\n\n _throws _ot = _throws.of( IOException.class, RuntimeException.class );\n assertEquals( _tt, _ot );\n }", "void exceptionCaught(Throwable cause) throws Exception;", "void exceptionCaught(Throwable cause) throws Exception;", "static boolean default_formal_parameter_recover(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NOT_);\n r = !default_formal_parameter_recover_0(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "private static void m1() {\n throw new RuntimeException(); // OK, it's a runtime exception (\"throws\" in the declaration not needed)\n }", "public void m9741j() throws cf {\r\n }", "GenotypeTest(int no, int no_copies)\n/* */ throws Exception\n/* */ {}", "List<Type> getThrows();", "public static void scannerError(String fmt, Object... varArgs) throws Exception\r\n\t{\r\n\t\tString diagnosticTxt = String.format(fmt, varArgs);\r\n\t\tthrow new ScannerException((Scanner.iSourceLineNr + 1), diagnosticTxt);\r\n\t}", "public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }", "@Test\n\tpublic void testBasicNamingBad() {\n\t\t// \"Bad\" == \"Should throw an exception\"\n\t\tassertNamingException(\"int foo(int a) { return b; }\");\n\t\tassertNamingException(\"int foo(int a) { { int b = 42; } return b; }\");\n\t\tassertNamingException(\"int foo(int a) { { int b = b; int c = 42; } return a; }\");\n\t\tassertNamingException(\"int foo(int a) { int a = 42; return a; }\");\n\t}", "public int a(IBlockAccess paramard, BlockPosition paramdt, int paramInt)\r\n/* 34: */ {\r\n/* 35: 49 */ return art.a(paramard, paramdt);\r\n/* 36: */ }", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n Form form0 = new Form(\"z=OF5Ty4t\");\n StringBuilder stringBuilder0 = new StringBuilder((CharSequence) \"cript\");\n // Undeclared exception!\n try { \n form0.param(\"z=OF5Ty4t\", stringBuilder0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void rethrowException2(String exceptionName) throws FirstException, SecondException {//rethrow FirstException, SecondException\n\t\t\ttry {\n\t\t\t\t\tif (exceptionName.equals(\"First\")) {\n\t\t\t\t\t\t\tthrow new FirstException();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new SecondException();\n\t\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t\t//This analysis is disabled if the catch parameter is assigned to another value in the catch block.\n\t\t\t\t\t//e = new FirstException();//If you add this line, Compile Error: Unhandled exception type Exception\n\t\t\t\t\tthrow e;\n\t\t\t}\n\t}", "private static boolean default_formal_parameter_recover_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover_0\")) return false;\n boolean r;\n r = consumeToken(b, RPAREN);\n if (!r) r = consumeToken(b, COMMA);\n if (!r) r = consumeToken(b, RBRACKET);\n if (!r) r = consumeToken(b, RBRACE);\n return r;\n }", "public abstract void mo33865a(Throwable th, Throwable th2);", "@Override\n\tpublic void error(String message, Object... params) {\n\n\t}", "void mo1341v(String str, String str2, Throwable th);", "public void b(int paramInt1, int paramInt2) {}", "public void b(int paramInt1, int paramInt2) {}", "protected void missingParams() {\r\n throw new IllegalStateException(\r\n \"Function is missing parameters: \" + getName());\r\n }" ]
[ "0.6022047", "0.5889035", "0.58654875", "0.5741068", "0.56518847", "0.552263", "0.5518971", "0.5516577", "0.55143106", "0.54530853", "0.53635925", "0.529346", "0.5281323", "0.5250102", "0.52481943", "0.52456445", "0.5231472", "0.52019167", "0.5168371", "0.5161505", "0.5160669", "0.51601446", "0.51559734", "0.51321614", "0.5113829", "0.50804824", "0.4994623", "0.4967768", "0.496285", "0.4961694", "0.4925003", "0.49224222", "0.49161598", "0.49133104", "0.49123445", "0.4885272", "0.48843443", "0.48601305", "0.48526296", "0.4834727", "0.48283467", "0.48271", "0.4808557", "0.4798456", "0.47860527", "0.47756487", "0.4755567", "0.47552574", "0.47540945", "0.47453818", "0.47406507", "0.47366405", "0.47228152", "0.47186565", "0.47184652", "0.47149137", "0.4713644", "0.47112715", "0.46951228", "0.46929047", "0.46910992", "0.4683625", "0.4682686", "0.4677585", "0.46759814", "0.4675479", "0.46691376", "0.46600124", "0.46594003", "0.46539506", "0.46524608", "0.46514195", "0.4649888", "0.4642426", "0.4640796", "0.46397325", "0.4619414", "0.46183506", "0.46164042", "0.46119195", "0.46117273", "0.46060485", "0.46060485", "0.4605357", "0.45991784", "0.45963636", "0.4596078", "0.45960453", "0.45883176", "0.45866632", "0.45761105", "0.45683727", "0.4566795", "0.45643756", "0.4562514", "0.4561812", "0.45592996", "0.45522553", "0.45519555", "0.45519555", "0.45502293" ]
0.0
-1
formalParameters [ "throws" qualidentList ] block
private void constructorDeclaratorRest(MethodType x, ClassType object) { Scope scope = object.scope; x.parameter = formalParameters(); if (nextSymbol == Keyword.THROWSSY) { lookAhead(); x.throwing = qualidentList(); } else x.throwing = new String[0]; Vector label = new Vector(); label.add(Operation.newLabel() + ""); x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation); scope.declInsertOverload(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo1944a() throws cf {\r\n }", "public void mo1964g() throws cf {\r\n }", "public void mo1963f() throws cf {\r\n }", "public interface RoutineException {}", "public final void constructorDeclaratorRest() throws RecognitionException {\n int constructorDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(372, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; }\n // Java.g:373:5: ( formalParameters ( 'throws' qualifiedNameList )? constructorBody )\n dbg.enterAlt(1);\n\n // Java.g:373:9: formalParameters ( 'throws' qualifiedNameList )? constructorBody\n {\n dbg.location(373,9);\n pushFollow(FOLLOW_formalParameters_in_constructorDeclaratorRest1603);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(373,26);\n // Java.g:373:26: ( 'throws' qualifiedNameList )?\n int alt56=2;\n try { dbg.enterSubRule(56);\n try { dbg.enterDecision(56);\n\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==50) ) {\n alt56=1;\n }\n } finally {dbg.exitDecision(56);}\n\n switch (alt56) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:373:27: 'throws' qualifiedNameList\n {\n dbg.location(373,27);\n match(input,50,FOLLOW_50_in_constructorDeclaratorRest1606); if (state.failed) return ;\n dbg.location(373,36);\n pushFollow(FOLLOW_qualifiedNameList_in_constructorDeclaratorRest1608);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(56);}\n\n dbg.location(373,56);\n pushFollow(FOLLOW_constructorBody_in_constructorDeclaratorRest1612);\n constructorBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 40, constructorDeclaratorRest_StartIndex); }\n }\n dbg.location(374, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void mo1974q() throws cf {\r\n }", "public void mo1976s() throws cf {\r\n }", "public void mo1966i() throws cf {\r\n }", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 76: */ {\r\n/* 77: 99 */ return null;\r\n/* 78: */ }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "public void mo1960c() throws cf {\r\n }", "public void m9741j() throws cf {\r\n }", "void mo28890b(int i) throws zzlm;", "public void limpiarListaParametro() throws Exception;", "public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {\n int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(368, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; }\n // Java.g:369:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:369:9: formalParameters ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(369,9);\n pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1571);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(369,26);\n // Java.g:369:26: ( 'throws' qualifiedNameList )?\n int alt55=2;\n try { dbg.enterSubRule(55);\n try { dbg.enterDecision(55);\n\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==50) ) {\n alt55=1;\n }\n } finally {dbg.exitDecision(55);}\n\n switch (alt55) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:369:27: 'throws' qualifiedNameList\n {\n dbg.location(369,27);\n match(input,50,FOLLOW_50_in_voidInterfaceMethodDeclaratorRest1574); if (state.failed) return ;\n dbg.location(369,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1576);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(55);}\n\n dbg.location(369,56);\n match(input,26,FOLLOW_26_in_voidInterfaceMethodDeclaratorRest1580); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 39, voidInterfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(370, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void mo1962e() throws cf {\r\n }", "public final ANTLRv3Parser.throwsSpec_return throwsSpec() throws RecognitionException {\r\n ANTLRv3Parser.throwsSpec_return retval = new ANTLRv3Parser.throwsSpec_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal58=null;\r\n Token char_literal60=null;\r\n ANTLRv3Parser.id_return id59 =null;\r\n\r\n ANTLRv3Parser.id_return id61 =null;\r\n\r\n\r\n CommonTree string_literal58_tree=null;\r\n CommonTree char_literal60_tree=null;\r\n RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,\"token 72\");\r\n RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,\"token 89\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:4: 'throws' id ( ',' id )*\r\n {\r\n string_literal58=(Token)match(input,89,FOLLOW_89_in_throwsSpec1083); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_89.add(string_literal58);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_throwsSpec1085);\r\n id59=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id59.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:16: ( ',' id )*\r\n loop26:\r\n do {\r\n int alt26=2;\r\n int LA26_0 = input.LA(1);\r\n\r\n if ( (LA26_0==72) ) {\r\n alt26=1;\r\n }\r\n\r\n\r\n switch (alt26) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:18: ',' id\r\n \t {\r\n \t char_literal60=(Token)match(input,72,FOLLOW_72_in_throwsSpec1089); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_72.add(char_literal60);\r\n\r\n\r\n \t pushFollow(FOLLOW_id_in_throwsSpec1091);\r\n \t id61=id();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_id.add(id61.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop26;\r\n }\r\n } while (true);\r\n\r\n\r\n // AST REWRITE\r\n // elements: id, 89\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 180:28: -> ^( 'throws' ( id )+ )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:31: ^( 'throws' ( id )+ )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_89.nextNode()\r\n , root_1);\r\n\r\n if ( !(stream_id.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_id.hasNext() ) {\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n }\r\n stream_id.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "@Override\n public String visit(ThrowStmt n, Object arg) {\n return null;\n }", "void mo57276a(Exception exc);", "public void mo1972o() throws cf {\r\n }", "GenotypeTest(int no, int no_copies)\n/* */ throws Exception\n/* */ {}", "void m5771e() throws C0841b;", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "public void mo1970m() throws cf {\r\n }", "void m5770d() throws C0841b;", "private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }", "public void inquiryError() {\n\t\t\n\t}", "private void voidInterfaceMethodDeclaratorRest(MethodType x)\r\n {\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "public static void main(String[] args){\n\t\tThrowsKeyword obj = new ThrowsKeyword();\n\t\tobj.sum();\n\t\tSystem.out.println(\"ABC\");\n\t}", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item1 = classWriter0.newLong((byte) (-99));\n Item item2 = new Item(189, item1);\n Item item3 = classWriter1.key3;\n Item item4 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(73, 10, classWriter1, item4);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public final void voidMethodDeclaratorRest() throws RecognitionException {\n int voidMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(352, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; }\n // Java.g:353:5: ( formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:353:9: formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(353,9);\n pushFollow(FOLLOW_formalParameters_in_voidMethodDeclaratorRest1421);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(353,26);\n // Java.g:353:26: ( 'throws' qualifiedNameList )?\n int alt50=2;\n try { dbg.enterSubRule(50);\n try { dbg.enterDecision(50);\n\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==50) ) {\n alt50=1;\n }\n } finally {dbg.exitDecision(50);}\n\n switch (alt50) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:353:27: 'throws' qualifiedNameList\n {\n dbg.location(353,27);\n match(input,50,FOLLOW_50_in_voidMethodDeclaratorRest1424); if (state.failed) return ;\n dbg.location(353,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidMethodDeclaratorRest1426);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(50);}\n\n dbg.location(354,9);\n // Java.g:354:9: ( methodBody | ';' )\n int alt51=2;\n try { dbg.enterSubRule(51);\n try { dbg.enterDecision(51);\n\n int LA51_0 = input.LA(1);\n\n if ( (LA51_0==44) ) {\n alt51=1;\n }\n else if ( (LA51_0==26) ) {\n alt51=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 51, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(51);}\n\n switch (alt51) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:354:13: methodBody\n {\n dbg.location(354,13);\n pushFollow(FOLLOW_methodBody_in_voidMethodDeclaratorRest1442);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:355:13: ';'\n {\n dbg.location(355,13);\n match(input,26,FOLLOW_26_in_voidMethodDeclaratorRest1456); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(51);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 36, voidMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(357, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private void throwsError() throws OBException {\n }", "public ULocale(String a, String b, String c) {\n/* 125 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void mo1031a(Throwable th);", "public static void main(String[] args) throws Exception {\r\n\r\n\t\tthrow new Exception(\"anand\");\r\n\t\t\r\n\t}", "public int getParameter3() {\n/* 59 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Snippet visit(ThrowStatement n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"throw \"+\"new\"+\" RuntimeException(\"+f4.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public abstract void scopeCorrectness() throws CodeException;", "public final void accept(Throwable th) {\n CrashlyticsLogUtils.m83485a(th);\n String d = C6969H.m41409d(\"G4A91D01BAB39A427C207834BFEE4CADA6C91\");\n Log.e(d, \"获取回答的创作声明信息失败: \" + th.getMessage());\n }", "private void catchClause(String label, Scope scope, Vector queue)\r\n {\r\n matchKeyword(Keyword.CATCHSY);\r\n matchKeyword(Keyword.LPARSY);\r\n\r\n Parameter parameter = formalParameter();\r\n\r\n Operation root = new Operation();\r\n root.code = \"DUP \\\" \" + parameter.type.ident.string.substring(parameter.type.ident.string.lastIndexOf('.') + 1) + \" \\\" INSTANCEOF\\n IF\\n\";\r\n queue.add(root);\r\n\r\n matchKeyword(Keyword.RPARSY);\r\n\r\n VariableType a = new VariableType(parameter.type, 0);\r\n a.name = parameter.name;\r\n\r\n Vector v = new Vector();\r\n v.add(\"\" + Operation.newLabel());\r\n block(null, a, scope, v, Scope.CATCH, null, queue);\r\n\r\n root = new Operation();\r\n root.code = \"DUP \" + label + \" BRANCH\\nENDIF\\n\";\r\n queue.add(root);\r\n }", "protected void checkThrows(DetailAST aAST, String aException)\n {\n final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);\n if (objBlock != null) {\n DetailAST child = (DetailAST) objBlock.getFirstChild();\n while (child != null) {\n if (child.getType() == TokenTypes.METHOD_DEF) {\n if (!Utils.hasThrows(child, aException)) {\n final DetailAST nameAST =\n child.findFirstToken(TokenTypes.IDENT);\n final String name = nameAST.getText();\n log(nameAST.getLineNo(), nameAST.getColumnNo(),\n \"missingthrows.bean\",\n new Object[] {name, aException});\n }\n }\n child = (DetailAST) child.getNextSibling();\n }\n }\n }", "int getThrowsRemaining();", "void m5769c() throws C0841b;", "public final void accept(Throwable th) {\n CrashlyticsLogUtils.m83485a(th);\n String d = C6969H.m41409d(\"G4A91D01BAB39A427C207834BFEE4CADA6C91\");\n Log.e(d, \"获取问题的创作声明信息失败: \" + th.getMessage());\n }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "private void checkParameters(List actualParameters)\n throws AbnormalTerminationException {\n if (actualParameters.size() != this._formalParameters.size()) {\n throw new AbnormalTerminationException(\"Ongeldig aantal parameters in \" + this.getName() + \"!\");\n }\n }", "public ULocale(String a, String b) {\n/* 103 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "void mo28889a(int i, String str) throws zzlm;", "public int getParameter2() {\n/* 53 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n Type type3 = Type.DOUBLE_TYPE;\n Item item0 = new Item((-532));\n int int0 = 180;\n // Undeclared exception!\n try { \n frame0.execute(180, 4, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public void mo5385r() {\n throw null;\n }", "public void testingTryCatch() {\r\n\t\tSystem.err.println(\"Class NewFeatures, method testingTryCatch called!\");\r\n\t\ttry (FileInputStream stream = new FileInputStream(\"hey\")) {\r\n\t\t\tSystem.out.println(\"Try/block accessed!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tThread.currentThread().getStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"Class NewFeatures, method testingTryCatch done!\");\r\n\t}", "@AfterThrowing(pointcut=\"args(name)\", throwing=\"ex\")\n\tpublic void allMethodStringArg(String name,Exception ex){\n\t\tSystem.out.println(\"A method with String arguments has called =\"+name);\n\t\tSystem.out.println(\"Exception was =\"+ex);\n\t}", "@Override\n public String visit(CatchClause n, Object arg) {\n return null;\n }", "public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tthrow new Test ();\r\n\t\t\r\n\t}", "public abstract void mo33865a(Throwable th, Throwable th2);", "public void checkParameters() {\n }", "public Item a(Block parambec, Random paramRandom, int paramInt)\r\n/* 46: */ {\r\n/* 47:62 */ return ItemList.ap;\r\n/* 48: */ }", "Rule Throws() {\n // Push 1 ThrowsNode onto the value stack\n return Sequence(\n \"throws \",\n \"( \",\n actions.pushInterrupt(),\n ZeroOrMore(Field()),\n \") \",\n actions.pushThrowsNode());\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n int int0 = (-11);\n fBProcedureCall0.addParam(1203, \"mutSn)_E\");\n // Undeclared exception!\n try { \n fBProcedureCall0.addParam((-11), \"mutSn)_E\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -11\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public ParameterNotFoundException()\n\t{\n\t\tsuper();\n\t}", "public void visit(BinThrowStatement x){\n }", "@Test\n public void tr4()\n {\n Graph graph = new Graph(2);\n assertThrows(IllegalArgumentException.class, () -> graph.reachable(null, null));\n }", "void oR() {\n if (this.aqt == null) {\n throw new IllegalStateException(\"Callback must be set before execute\");\n }\n this.aqt.ob();\n bh.V(\"Attempting to load resource from disk\");\n if ((ce.oJ().oK() == ce.a.aqi || ce.oJ().oK() == ce.a.aqj) && this.aoc.equals(ce.oJ().getContainerId())) {\n this.aqt.a(bg.a.apM);\n return;\n }\n try {\n var1_1 = new FileInputStream(this.oS());\n }\n catch (FileNotFoundException var1_2) {\n bh.S(\"Failed to find the resource in the disk\");\n this.aqt.a(bg.a.apM);\n return;\n }\n var2_7 = new ByteArrayOutputStream();\n cr.b(var1_1, (OutputStream)var2_7);\n var2_7 = ol.a.l(var2_7.toByteArray());\n this.d((ol.a)var2_7);\n this.aqt.l((ol.a)var2_7);\n try {\n var1_1.close();\n }\n catch (IOException var1_3) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\n ** GOTO lbl52\n catch (IOException var2_8) {\n this.aqt.a(bg.a.apN);\n bh.W(\"Failed to read the resource from disk\");\n {\n catch (Throwable var2_10) {\n try {\n var1_1.close();\n }\n catch (IOException var1_6) {\n bh.W(\"Error closing stream for reading resource from disk\");\n throw var2_10;\n }\n throw var2_10;\n }\n }\n try {\n var1_1.close();\n }\n catch (IOException var1_4) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\n ** GOTO lbl52\n catch (IllegalArgumentException var2_9) {\n this.aqt.a(bg.a.apN);\n bh.W(\"Failed to read the resource from disk. The resource is inconsistent\");\n try {\n var1_1.close();\n }\n catch (IOException var1_5) {\n bh.W(\"Error closing stream for reading resource from disk\");\n }\nlbl52: // 6 sources:\n bh.V(\"The Disk resource was successfully read.\");\n return;\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\ttry {\n\t\t\tthrow new CustomException(\"Custom Exception\");\n\t\t} catch (CustomException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(\"Catch Block\"); \n\t\t\t \n System.out.println(e.getMessage()); \n\t\t}\n\t}", "@Override\n\tpublic void implementionEight(String[] args) throws Exception {\n\n\t}", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n ClassWriter classWriter0 = new ClassWriter(173);\n Item item0 = classWriter0.newLong(16777221);\n Item item1 = new Item(4487, item0);\n Item item2 = classWriter0.key3;\n // Undeclared exception!\n try { \n frame0.execute(50, 3, classWriter0, item2);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "public void visit(ThrowStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n }", "public abstract List<? extends Pair<Type.Clazz,String>> exceptions();", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n classWriter0.firstField = fieldWriter0;\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n fieldWriter0.getSize();\n fieldWriter0.visitAnnotation(\"Exceptions\", false);\n classWriter1.newFloat((-2110.0F));\n item0.hashCode = 231;\n // Undeclared exception!\n try { \n frame0.execute(182, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public int getParameter1() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public MissingArgumentException() {\n super(\"No Arguments Provided.\");\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n fBProcedureCall0.getInputParam(548);\n // Undeclared exception!\n try { \n fBProcedureCall0.getInputParam((-2052));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2053\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "void begin() throws OutputException;", "public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }", "void L3() throws Exception{\n\t\tSystem.out.println(\"1\");\n\t\tthrow e;\n\t}", "@Test(timeout = 4000)\n public void test43() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n fBProcedureCall0.getInputParam(2600);\n // Undeclared exception!\n try { \n fBProcedureCall0.getInputParam((-2096));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -2097\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public void a(World paramaqu, BlockPosition paramdt, Block parambec, BlockType paramatr)\r\n/* 99: */ {\r\n/* 100:125 */ if (!paramaqu.isClient) {\r\n/* 101:126 */ paramaqu.s(paramdt);\r\n/* 102: */ }\r\n/* 103: */ }", "@Test(timeout = 4000)\n public void test132() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n int int0 = 184;\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"k58&{\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"org.apache.commons.io.filefilter.NameFileFilter\";\n stringArray0[5] = \"k58&{\";\n ClassWriter classWriter1 = new ClassWriter(184);\n Item item0 = classWriter0.key2;\n Item item1 = new Item((-2319));\n // Undeclared exception!\n try { \n frame0.execute(1, 184, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n // Undeclared exception!\n try { \n fBProcedureCall0.getInputParam(0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n int int0 = (-519);\n String string0 = \"kutSn)_E\";\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n fBProcedureCall0.getOutputParam((-2051));\n // Undeclared exception!\n try { \n fBProcedureCall0.addParam((-519), \"kutSn)_E\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -519\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public void smell() {\n\t\t\n\t}", "protected void missingParams() {\r\n throw new IllegalStateException(\r\n \"Function is missing parameters: \" + getName());\r\n }", "public static void main(String[] args) {\n\n IllegalArgumentException illegalArgumentException = new IllegalArgumentException(\"illegal status run time\");\n System.out.println(Throwables.getStackTraceAsString(illegalArgumentException));\n }", "public abstract void mo13750a(Throwable th, PrintWriter printWriter);", "@Test(timeout = 4000)\n public void test091() throws Throwable {\n Form form0 = new Form(\"z=OF5Ty4t\");\n StringBuilder stringBuilder0 = new StringBuilder((CharSequence) \"cript\");\n // Undeclared exception!\n try { \n form0.param(\"z=OF5Ty4t\", stringBuilder0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public final void methodDeclaratorRest() throws RecognitionException {\n int methodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"methodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(344, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return ; }\n // Java.g:345:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:345:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(345,9);\n pushFollow(FOLLOW_formalParameters_in_methodDeclaratorRest1338);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(345,26);\n // Java.g:345:26: ( '[' ']' )*\n try { dbg.enterSubRule(47);\n\n loop47:\n do {\n int alt47=2;\n try { dbg.enterDecision(47);\n\n int LA47_0 = input.LA(1);\n\n if ( (LA47_0==48) ) {\n alt47=1;\n }\n\n\n } finally {dbg.exitDecision(47);}\n\n switch (alt47) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:345:27: '[' ']'\n \t {\n \t dbg.location(345,27);\n \t match(input,48,FOLLOW_48_in_methodDeclaratorRest1341); if (state.failed) return ;\n \t dbg.location(345,31);\n \t match(input,49,FOLLOW_49_in_methodDeclaratorRest1343); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop47;\n }\n } while (true);\n } finally {dbg.exitSubRule(47);}\n\n dbg.location(346,9);\n // Java.g:346:9: ( 'throws' qualifiedNameList )?\n int alt48=2;\n try { dbg.enterSubRule(48);\n try { dbg.enterDecision(48);\n\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==50) ) {\n alt48=1;\n }\n } finally {dbg.exitDecision(48);}\n\n switch (alt48) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:346:10: 'throws' qualifiedNameList\n {\n dbg.location(346,10);\n match(input,50,FOLLOW_50_in_methodDeclaratorRest1356); if (state.failed) return ;\n dbg.location(346,19);\n pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaratorRest1358);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(48);}\n\n dbg.location(347,9);\n // Java.g:347:9: ( methodBody | ';' )\n int alt49=2;\n try { dbg.enterSubRule(49);\n try { dbg.enterDecision(49);\n\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==44) ) {\n alt49=1;\n }\n else if ( (LA49_0==26) ) {\n alt49=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 49, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(49);}\n\n switch (alt49) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:347:13: methodBody\n {\n dbg.location(347,13);\n pushFollow(FOLLOW_methodBody_in_methodDeclaratorRest1374);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:348:13: ';'\n {\n dbg.location(348,13);\n match(input,26,FOLLOW_26_in_methodDeclaratorRest1388); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(49);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 35, methodDeclaratorRest_StartIndex); }\n }\n dbg.location(350, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"methodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n String string0 = \"kutSn)_E\";\n int int0 = (-519);\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n // Undeclared exception!\n try { \n fBProcedureCall0.addParam((-519), \"val\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -519\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tmyExceptionTest(90);\n\t\t\t//myExceptionTest(190);\n\t\t\tSystem.out.println(\"after exeption\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\tSystem.out.println(\"I will be executed always\");\n\t\t}\n\t\n\n\t}", "public void a(Item paramalq, CreativeTabs paramakf, List paramList)\r\n/* 22: */ {\r\n/* 23:27 */ paramList.add(new ItemStack(paramalq, 1, 0));\r\n/* 24:28 */ paramList.add(new ItemStack(paramalq, 1, 1));\r\n/* 25: */ }", "public abstract V a(String str) throws gh;", "void mo40619a(int i, Object obj) throws zzgc;", "@Test(timeout = 4000)\n public void test167() throws Throwable {\n Form form0 = new Form(\"Lc7/B.MJD\");\n // Undeclared exception!\n try { \n form0.blockquote();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.constraintSpec((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "public static void main(String[] args) throws InvalidAgeExcetion {\n\t\tThrowDemo oo=new ThrowDemo();\n\t\too.accept();\n\t}", "void apply() throws Exception;", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n // Undeclared exception!\n try { \n fBProcedureCall0.addParam((-163118866), \"PwU}Ru&{'yR\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -163118866\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n String string0 = \"xuL|;?{*vuht\";\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n FBProcedureParam fBProcedureParam0 = fBProcedureCall0.addParam(11, \"xuL|;?{*vuht\");\n fBProcedureParam0.setType(11);\n fBProcedureParam0.setIndex((-1971));\n fBProcedureParam0.setType(372);\n fBProcedureCall0.getSQL(true);\n fBProcedureParam0.setValue(\"xuL|;?{*vuht\");\n fBProcedureParam0.setIndex(372);\n fBProcedureParam0.setType(3317);\n FBProcedureParam fBProcedureParam1 = new FBProcedureParam();\n FBProcedureParam fBProcedureParam2 = fBProcedureCall0.getInputParam(372);\n fBProcedureCall0.addInputParam(fBProcedureParam1);\n Object object0 = new Object();\n fBProcedureParam1.setType(2152);\n fBProcedureParam1.setType((-50558270));\n fBProcedureParam2.setType(3935);\n fBProcedureParam2.setIndex(2152);\n int int0 = 4;\n int int1 = (-38719865);\n // Undeclared exception!\n try { \n fBProcedureCall0.registerOutParam((-38719865), (-1094));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -38719866\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n // Undeclared exception!\n try { \n SQLUtil.constraintSpec((DBConstraint) null, nameSpec0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }" ]
[ "0.59776527", "0.5817696", "0.56087744", "0.55717355", "0.550463", "0.5455715", "0.5450077", "0.54421854", "0.5347757", "0.5346857", "0.53236604", "0.5304839", "0.528192", "0.5281427", "0.5273408", "0.52686864", "0.524245", "0.5241067", "0.5233728", "0.5223661", "0.52206886", "0.52099055", "0.5188437", "0.51853347", "0.5168692", "0.5162749", "0.516266", "0.5132945", "0.51168376", "0.5087925", "0.5084793", "0.5078435", "0.5034899", "0.5023893", "0.50209975", "0.50194323", "0.5016954", "0.5013856", "0.50068855", "0.50047594", "0.49960613", "0.49801162", "0.49682444", "0.49514866", "0.49504274", "0.49441117", "0.49255785", "0.49251616", "0.492274", "0.49172652", "0.49121025", "0.49106908", "0.49094725", "0.4908389", "0.4892587", "0.4869863", "0.48643783", "0.48611337", "0.48599735", "0.48596844", "0.48579732", "0.48536754", "0.48481384", "0.4848044", "0.4845239", "0.4839272", "0.48374394", "0.4835113", "0.483051", "0.48276287", "0.48168153", "0.48159844", "0.4815878", "0.4805063", "0.4798143", "0.47962153", "0.4790547", "0.4789099", "0.47887588", "0.47874433", "0.4782795", "0.47801647", "0.47776186", "0.47768295", "0.4773507", "0.47690067", "0.47689062", "0.47620344", "0.4758917", "0.47547722", "0.47546136", "0.47511798", "0.47476763", "0.47461244", "0.47458506", "0.47445452", "0.47438663", "0.4738136", "0.4737179", "0.47352052" ]
0.5021055
34
"interface" ident [ "extends" typeList ] interfaceBody
private void interfaceDeclaration(Modifier modify, Scope scope, String basename) { HashSet dummy = unresolved; ClassType x = new ClassType(); x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value; unresolved = x.unresolved; if (comment != null && comment.length() > 0) { x.comment = comment + '\n'; resetComment(); } if (!scopeStack.contains(scope)) scopeStack.add(scope); matchKeyword(Keyword.INTERFACESY); x.name = nextToken; //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0) // modify.access &= ~Keyword.PUBLICSY.value; modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1)); matchKeyword(Keyword.IDENTSY); declMember(scope, x); if (nextSymbol == Keyword.EXTENDSSY) { lookAhead(); x.implement = typeList(); } else x.implement = new ClassType[0]; x.extend = new ClassType("Object");//!!!!!!!!!!!!!!!!!!! x.scope = new Scope(scope, Scope.heap, x.name.string); if ((modify.cur & modify.constructors) == 0) modify.cur |= Keyword.PUBLICSY.value & modify.access; interfaceBody(modify, x); unresolved = dummy; writeList(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IInventoryObject extends IID\n{\n}", "public interface SimpleFlow extends Serializable {\n\n public Pipe getPipe();\n\n public @interface IrSimpleFlow {\n\n String name();\n\n }\n\n}", "public interface IHead extends IDetail {\n}", "public interface a extends IInterface {\n}", "@Override\n\tpublic void inAInterfaceBody(AInterfaceBody node) {\n // Determine the start and end line numbers.\n int begin = findInterfaceBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AInterfaceDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AInterfaceDeclaration parent = (AInterfaceDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "InstrumentedType withInterfaces(TypeList.Generic interfaceTypes);", "public interface Igual extends ComplexInstruction\n{\n}", "public interface Head extends ObjectBasedExpression {\n}", "public interface DerivedType extends EObject {\r\n}", "public interface AttributeTypeAttack extends EObject\n{\n}", "public interface a {\n }", "public interface InoObject extends JMElement {\r\n\t/** Sets the objects document name. May be null,\r\n * because a document is typically not required.\r\n\t */\r\n public void setInoDocname(String pDocname);\r\n\r\n /** Sets the objects ino:id. May be null,\r\n * because an ino:id is no longer required\r\n * nowadays.\r\n */\r\n public void setInoId(String pId);\r\n\r\n /** Returns the objects document name. May be null,\r\n * because a document is typically not required.\r\n */\r\n public String getInoDocname();\r\n\r\n /** Returns the objects ino:id. May be null,\r\n * because an ino:id is no longer required\r\n * nowadays.\r\n */\r\n public String getInoId();\r\n}", "public interface i {\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "interface I {}", "public interface IGraphElement extends IDotElement {\r\n}", "public interface EventDefinition extends EObject {\r\n}", "public interface In extends Clause {}", "Interface_decl getInterface();", "public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}", "public interface IECComponent extends Identifier {\r\n}", "interface NewInterface extends Interface1,Interface2,Interface3{\n\n\tpublic void getD();\n\n}", "interface ID extends Serializable {\n\n }", "public interface SString extends SInlinedSQLType\n{\n}", "public interface IfcFaceOuterBound extends IfcFaceBound {\n}", "public interface eit {\n}", "public interface AdditionalOperations extends Statements {\n}", "public interface Actor extends NamedElement {\r\n}", "public interface IRange extends EObject\n{\n}", "public interface CurrentMaintenanceOperationIterator_I extends CurrentMaintenanceOperationIterator_IOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "TypeInfo[] interfaces();", "interface InterfaceChild extends InterfaceParent {\n default String introduce() {\n return \"InterfaceChild\";\n }\n}", "private void interfaceBodyDeclaration(Modifier modify, ClassType object)\r\n {\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n Modifier m = new Modifier(modify);\r\n m.cur = 0;\r\n\r\n for(int x; (x = modifier()) != 0; m.add(x));\r\n\r\n if ((m.cur & m.constructors) == 0)\r\n m.cur |= modify.cur & modify.constructors;\r\n\r\n if ((m.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n interfaceMemberDecl(m, object);\r\n }", "public interface INotificationData extends IServerMessageData {\n}", "public interface hello extends helloOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \n{\n}", "interface InterfaceA1 { // 1、接口。\n public String INFO = \"Hello world!\";\n\n public void print();\n}", "public interface IInstanceVariable extends INameNode {\n}", "interface I6 extends I5, I4 {\n}", "public interface MavrickEntity extends Serializable,MaverickVO {\n\n}", "public interface Program extends AstItem {\n}", "public interface ContainerColorDefinition extends EObject\n{\n}", "public interface IOverride extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}", "public interface PhrasingContent extends ContentInterface {\r\n\r\n}", "public interface IfcStyleModel extends IfcRepresentation {\n}", "public interface IfcAnnotationSurfaceOccurrence extends IfcAnnotationOccurrence {\n}", "public final void normalInterfaceDeclaration() throws RecognitionException {\n int normalInterfaceDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"normalInterfaceDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(270, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return ; }\n // Java.g:271:5: ( 'interface' Identifier ( typeParameters )? ( 'extends' typeList )? interfaceBody )\n dbg.enterAlt(1);\n\n // Java.g:271:9: 'interface' Identifier ( typeParameters )? ( 'extends' typeList )? interfaceBody\n {\n dbg.location(271,9);\n match(input,46,FOLLOW_46_in_normalInterfaceDeclaration789); if (state.failed) return ;\n dbg.location(271,21);\n match(input,Identifier,FOLLOW_Identifier_in_normalInterfaceDeclaration791); if (state.failed) return ;\n dbg.location(271,32);\n // Java.g:271:32: ( typeParameters )?\n int alt33=2;\n try { dbg.enterSubRule(33);\n try { dbg.enterDecision(33);\n\n int LA33_0 = input.LA(1);\n\n if ( (LA33_0==40) ) {\n alt33=1;\n }\n } finally {dbg.exitDecision(33);}\n\n switch (alt33) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: typeParameters\n {\n dbg.location(271,32);\n pushFollow(FOLLOW_typeParameters_in_normalInterfaceDeclaration793);\n typeParameters();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(33);}\n\n dbg.location(271,48);\n // Java.g:271:48: ( 'extends' typeList )?\n int alt34=2;\n try { dbg.enterSubRule(34);\n try { dbg.enterDecision(34);\n\n int LA34_0 = input.LA(1);\n\n if ( (LA34_0==38) ) {\n alt34=1;\n }\n } finally {dbg.exitDecision(34);}\n\n switch (alt34) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:271:49: 'extends' typeList\n {\n dbg.location(271,49);\n match(input,38,FOLLOW_38_in_normalInterfaceDeclaration797); if (state.failed) return ;\n dbg.location(271,59);\n pushFollow(FOLLOW_typeList_in_normalInterfaceDeclaration799);\n typeList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(34);}\n\n dbg.location(271,70);\n pushFollow(FOLLOW_interfaceBody_in_normalInterfaceDeclaration803);\n interfaceBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 20, normalInterfaceDeclaration_StartIndex); }\n }\n dbg.location(272, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"normalInterfaceDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public static String interfaceDecl()\n {\n read_if_needed_();\n \n return _interface_decl;\n }", "public interface AbstractC2502fH1 extends IInterface {\n}", "public interface DataType extends CodeItem {\n}", "public interface SystemType3 extends HVACSystem{\n //Marker Interface\n}", "public interface IAnswer extends IComment{\r\n\t\r\n\t\r\n}", "public final EObject ruleEInterfaceDefinition() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n Token this_BEGIN_2=null;\n Token this_END_4=null;\n EObject lv_interface_3_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalRMParser.g:5265:2: ( ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_interface_3_0= ruleEInterfaceDefinitionBody ) ) this_END_4= RULE_END ) )\n // InternalRMParser.g:5266:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_interface_3_0= ruleEInterfaceDefinitionBody ) ) this_END_4= RULE_END )\n {\n // InternalRMParser.g:5266:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_interface_3_0= ruleEInterfaceDefinitionBody ) ) this_END_4= RULE_END )\n // InternalRMParser.g:5267:3: ( (lv_name_0_0= RULE_ID ) ) otherlv_1= Colon this_BEGIN_2= RULE_BEGIN ( (lv_interface_3_0= ruleEInterfaceDefinitionBody ) ) this_END_4= RULE_END\n {\n // InternalRMParser.g:5267:3: ( (lv_name_0_0= RULE_ID ) )\n // InternalRMParser.g:5268:4: (lv_name_0_0= RULE_ID )\n {\n // InternalRMParser.g:5268:4: (lv_name_0_0= RULE_ID )\n // InternalRMParser.g:5269:5: lv_name_0_0= RULE_ID\n {\n lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_11); \n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getEInterfaceDefinitionAccess().getNameIDTerminalRuleCall_0_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getEInterfaceDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.ID\");\n \t\t\t\t\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,Colon,FOLLOW_6); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getEInterfaceDefinitionAccess().getColonKeyword_1());\n \t\t\n this_BEGIN_2=(Token)match(input,RULE_BEGIN,FOLLOW_58); \n\n \t\t\tnewLeafNode(this_BEGIN_2, grammarAccess.getEInterfaceDefinitionAccess().getBEGINTerminalRuleCall_2());\n \t\t\n // InternalRMParser.g:5293:3: ( (lv_interface_3_0= ruleEInterfaceDefinitionBody ) )\n // InternalRMParser.g:5294:4: (lv_interface_3_0= ruleEInterfaceDefinitionBody )\n {\n // InternalRMParser.g:5294:4: (lv_interface_3_0= ruleEInterfaceDefinitionBody )\n // InternalRMParser.g:5295:5: lv_interface_3_0= ruleEInterfaceDefinitionBody\n {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getEInterfaceDefinitionAccess().getInterfaceEInterfaceDefinitionBodyParserRuleCall_3_0());\n \t\t\t\t\n pushFollow(FOLLOW_8);\n lv_interface_3_0=ruleEInterfaceDefinitionBody();\n\n state._fsp--;\n\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getEInterfaceDefinitionRule());\n \t\t\t\t\t}\n \t\t\t\t\tset(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"interface\",\n \t\t\t\t\t\tlv_interface_3_0,\n \t\t\t\t\t\t\"org.sodalite.dsl.RM.EInterfaceDefinitionBody\");\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n\n }\n\n\n }\n\n this_END_4=(Token)match(input,RULE_END,FOLLOW_2); \n\n \t\t\tnewLeafNode(this_END_4, grammarAccess.getEInterfaceDefinitionAccess().getENDTerminalRuleCall_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final EObject ruleInterfaceScope() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token lv_name_2_0=null;\r\n Token otherlv_3=null;\r\n EObject lv_declarations_4_1 = null;\r\n\r\n EObject lv_declarations_4_2 = null;\r\n\r\n EObject lv_declarations_4_3 = null;\r\n\r\n EObject lv_declarations_4_4 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:563:28: ( ( () otherlv_1= 'interface' ( (lv_name_2_0= RULE_ID ) )? otherlv_3= ':' ( ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) ) )* ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:564:1: ( () otherlv_1= 'interface' ( (lv_name_2_0= RULE_ID ) )? otherlv_3= ':' ( ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) ) )* )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:564:1: ( () otherlv_1= 'interface' ( (lv_name_2_0= RULE_ID ) )? otherlv_3= ':' ( ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) ) )* )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:564:2: () otherlv_1= 'interface' ( (lv_name_2_0= RULE_ID ) )? otherlv_3= ':' ( ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) ) )*\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:564:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:565:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getInterfaceScopeAccess().getInterfaceScopeAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,18,FOLLOW_18_in_ruleInterfaceScope1264); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getInterfaceScopeAccess().getInterfaceKeyword_1());\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:574:1: ( (lv_name_2_0= RULE_ID ) )?\r\n int alt8=2;\r\n int LA8_0 = input.LA(1);\r\n\r\n if ( (LA8_0==RULE_ID) ) {\r\n alt8=1;\r\n }\r\n switch (alt8) {\r\n case 1 :\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:575:1: (lv_name_2_0= RULE_ID )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:575:1: (lv_name_2_0= RULE_ID )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:576:3: lv_name_2_0= RULE_ID\r\n {\r\n lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleInterfaceScope1281); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t\t\tnewLeafNode(lv_name_2_0, grammarAccess.getInterfaceScopeAccess().getNameIDTerminalRuleCall_2_0()); \r\n \t\t\r\n }\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElement(grammarAccess.getInterfaceScopeRule());\r\n \t }\r\n \t\tsetWithLastConsumed(\r\n \t\t\tcurrent, \r\n \t\t\t\"name\",\r\n \t\tlv_name_2_0, \r\n \t\t\"ID\");\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n otherlv_3=(Token)match(input,19,FOLLOW_19_in_ruleInterfaceScope1299); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_3, grammarAccess.getInterfaceScopeAccess().getColonKeyword_3());\r\n \r\n }\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:596:1: ( ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) ) )*\r\n loop10:\r\n do {\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0==21||LA10_0==23||(LA10_0>=30 && LA10_0<=31)||(LA10_0>=55 && LA10_0<=57)) ) {\r\n alt10=1;\r\n }\r\n\r\n\r\n switch (alt10) {\r\n \tcase 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:597:1: ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:597:1: ( (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint ) )\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:598:1: (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint )\r\n \t {\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:598:1: (lv_declarations_4_1= ruleEventDefinition | lv_declarations_4_2= ruleVariableDefinition | lv_declarations_4_3= ruleEntrypoint | lv_declarations_4_4= ruleExitpoint )\r\n \t int alt9=4;\r\n \t switch ( input.LA(1) ) {\r\n \t case 21:\r\n \t case 55:\r\n \t case 56:\r\n \t case 57:\r\n \t {\r\n \t alt9=1;\r\n \t }\r\n \t break;\r\n \t case 23:\r\n \t {\r\n \t alt9=2;\r\n \t }\r\n \t break;\r\n \t case 30:\r\n \t {\r\n \t alt9=3;\r\n \t }\r\n \t break;\r\n \t case 31:\r\n \t {\r\n \t alt9=4;\r\n \t }\r\n \t break;\r\n \t default:\r\n \t if (state.backtracking>0) {state.failed=true; return current;}\r\n \t NoViableAltException nvae =\r\n \t new NoViableAltException(\"\", 9, 0, input);\r\n\r\n \t throw nvae;\r\n \t }\r\n\r\n \t switch (alt9) {\r\n \t case 1 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:599:3: lv_declarations_4_1= ruleEventDefinition\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getInterfaceScopeAccess().getDeclarationsEventDefinitionParserRuleCall_4_0_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleEventDefinition_in_ruleInterfaceScope1322);\r\n \t lv_declarations_4_1=ruleEventDefinition();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getInterfaceScopeRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"declarations\",\r\n \t \t\tlv_declarations_4_1, \r\n \t \t\t\"EventDefinition\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 2 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:614:8: lv_declarations_4_2= ruleVariableDefinition\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getInterfaceScopeAccess().getDeclarationsVariableDefinitionParserRuleCall_4_0_1()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleVariableDefinition_in_ruleInterfaceScope1341);\r\n \t lv_declarations_4_2=ruleVariableDefinition();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getInterfaceScopeRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"declarations\",\r\n \t \t\tlv_declarations_4_2, \r\n \t \t\t\"VariableDefinition\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 3 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:629:8: lv_declarations_4_3= ruleEntrypoint\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getInterfaceScopeAccess().getDeclarationsEntrypointParserRuleCall_4_0_2()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleEntrypoint_in_ruleInterfaceScope1360);\r\n \t lv_declarations_4_3=ruleEntrypoint();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getInterfaceScopeRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"declarations\",\r\n \t \t\tlv_declarations_4_3, \r\n \t \t\t\"Entrypoint\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n \t case 4 :\r\n \t // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:644:8: lv_declarations_4_4= ruleExitpoint\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getInterfaceScopeAccess().getDeclarationsExitpointParserRuleCall_4_0_3()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleExitpoint_in_ruleInterfaceScope1379);\r\n \t lv_declarations_4_4=ruleExitpoint();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getInterfaceScopeRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"declarations\",\r\n \t \t\tlv_declarations_4_4, \r\n \t \t\t\"Exitpoint\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n \t break;\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop10;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "InterfaceDefinition createInterfaceDefinition();", "public interface IContinueStatement extends ITerminalStatement\n{\n}", "public interface Identifiable {\n\t\n\t/**\n * Gets the value of the id property.\n * \n * @return\n * possible object is\n * {@link String }\n * \n */\n public String getId();\n\n /**\n * Sets the value of the id property. The value must starts with \"[A-Za-z]\".\n * \n * @param value\n * allowed object is\n * {@link String }\n * \n */\n public void setId(String value);\n\n}", "interface CodeList149 {\n}", "public interface bzt extends cdm {\n}", "public interface Phoneextensions extends GeneratedPhoneextensions {\n \n \n}", "public void addInterface(String interf) {\n m_classBuilder.addInterface(interf);\n }", "public interface BookMetadata extends DocumentMetadata {\n}", "protected void sequence_InterfaceType(ISerializationContext context, InterfaceType semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "String getInterfaces();", "Interface getInterface();", "Interface getInterface();", "public interface Text extends TextualElement {\r\n\r\n}", "public abstract interface INetworkMessage extends Serializable\r\n{\r\n public String getMessageId();\r\n}", "public interface RuntimeItem extends HasNameAndID, HasComment, HasTags, HasParameterValues, HasConstraints, HasDescription, HasStatus {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tString copyright = \"Copyright (C) 2012 Bertrand Florat\";\n\n}", "public interface MDataType extends MClassifier\r\n{\r\n}", "public interface EGImmediate extends EGNonRecurring {\r\n}", "public interface ClientRequestInfo extends ClientRequestInfoOperations, org.omg.PortableInterceptor.RequestInfo, org.omg.CORBA.portable.IDLEntity \n{\n}", "public interface InterfaceB extends SuperInterface{\n\n int getB();\n}", "public void testInterface() throws Exception {\n \n MethodDefBuilder b = new MethodDefBuilder(\"zaz\");\n b.returnType = stringType();\n b.params = asList(paramDef(\"x\", toGlobalNameType(\"java.lang.Integer\")));\n Declaration zaz = declaration(\n Modifiers.newBuilder().setIsAbstract(true).build(), \n b.build());\n \n DeclaredTypeBuilder b1 = new DeclaredTypeBuilder(\"foo.SpecialList\", true);\n b1.modifs = Modifiers.newBuilder().setIsPrivate(true).build();\n b1.impls = asList(toGlobalName(\"java.util.List\"));\n b1.classBody = asList(zaz);\n DeclaredType specialList = b1.build();\n\n JDeclaredType fooType = new JribbleAstBuilder().process(specialList).types.get(0);\n assertEquals(fooType, \"testInterface\");\n Assert.assertTrue(fooType.getMethods().get(1).isAbstract());\n }", "public interface RegisteredBooking extends Booking, Updatable.Unupdated {\r\n}", "public interface IMainModel extends IBaseModel {\n}", "org.omg.CORBA.Object _get_interface_def();", "public interface ISystem extends INonFlowObject {\n\n}", "public interface Content {\n}", "public interface Actions extends EObject\n{\n}", "@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"This is an implemented interface\");\n\t}", "public interface zzo\n extends IInterface\n{\n\n public abstract void zze(AdRequestParcel adrequestparcel);\n}", "public interface SpectralFile_ScansLvlGt1Partial_FileContents_Root_IF {\n\n}", "public interface interfaceA extends LocationListener, SensorEventListener {\n}", "public final void mT__85() throws RecognitionException {\n try {\n int _type = T__85;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:85:7: ( 'interface' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:85:9: 'interface'\n {\n match(\"interface\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "interface InterfaceA {\n\tint a = 5;\n\tvoid show();\n\tint display();\n}", "public interface MIInventoryInterface {\n\n /**\n * @return The inventory contents.\n */\n ItemStack[] getInventoryContents();\n\n /**\n * @return The armor contents.\n */\n ItemStack[] getArmorContents();\n}", "public interface AnotherName {\n\n\tString eatThings( Object food );\n\n}", "public interface RightHand extends Hand, EquipSlot<RightHandEquip> {\n\n}", "public interface IIdentityInstVisitor extends IInstVisitor {\n public void visit(JIdentityStmt s);\n}", "public interface Ave {\n\n public void voar();\n\n}", "public interface IPlainRequest extends Serializable\r\n{\r\n\t/**\r\n\t * Returns the id of the request\r\n\t * \r\n\t * @return the id of the request\r\n\t */\r\n\tLong getId();\r\n\r\n\t/**\r\n\t * Returns the status of the request\r\n\t * \r\n\t * @return the status of the request\r\n\t */\r\n\tRequestStatus getStatus();\r\n\r\n\t/**\r\n\t * Returns information about the sender of the request\r\n\t * \r\n\t * @return information about the sender of the request\r\n\t */\r\n\tINotificationTraveller getSender();\r\n}", "public interface C1279b extends C1278a {\n}", "@AssignableSubInterfaces(get={})\n\n@ImplementationClass(get=Brain.class)\n public interface IBrain\n extends ICentralNervousSystem{\n\n}", "public interface UrlFragment extends EObject\n{\n}", "public interface Item {\n}", "interface In2 {\n String f();\n String g();\n class Nested {\n static void testIn(In2 i) {\n System.out.println(i.f() + i.g());\n }\n }\n}", "public interface Compound extends Clause {}", "public interface C4999x extends C4929d, C4995v1 {\n}", "public interface INest {\n\t// function: use to describe the action of nesting animals\n\tvoid nest();\n}", "public interface Identifiable extends Serializable {\n\n\t/**\n\t * Returns the id.\n\t * \n\t * @return id\n\t */\n\tpublic Long getId();\n\n\t/**\n\t * Sets the id.\n\t * \n\t * @param id\n\t * the id to set.\n\t */\n\tpublic void setId(Long id);\n}" ]
[ "0.6823568", "0.6755996", "0.6638447", "0.6621569", "0.6531366", "0.6342286", "0.632408", "0.62977946", "0.6254782", "0.62399477", "0.62284577", "0.6197219", "0.61939406", "0.61918813", "0.6146035", "0.6145063", "0.61429983", "0.6115285", "0.61090475", "0.61057144", "0.6102145", "0.607292", "0.60284865", "0.60258746", "0.60160184", "0.59813356", "0.5972153", "0.5965952", "0.59654164", "0.59643906", "0.59626263", "0.5957858", "0.595438", "0.59527045", "0.59519225", "0.59474105", "0.59275913", "0.5920579", "0.5914571", "0.5912174", "0.5909696", "0.5901856", "0.59004295", "0.58910686", "0.5888716", "0.58710504", "0.58590555", "0.58533627", "0.58471906", "0.5833385", "0.5829802", "0.58296865", "0.58124566", "0.57977694", "0.5794259", "0.5793453", "0.578725", "0.5785887", "0.578494", "0.5784737", "0.5768916", "0.576601", "0.57446396", "0.5731324", "0.5731324", "0.57296556", "0.5729408", "0.57260305", "0.5720535", "0.5714094", "0.57116324", "0.57105803", "0.56992865", "0.56989306", "0.5696629", "0.56938136", "0.56917644", "0.5681716", "0.5673258", "0.5671619", "0.5666931", "0.5661875", "0.5653597", "0.5652866", "0.56488025", "0.5637652", "0.5637422", "0.5637076", "0.5635287", "0.5630853", "0.5627844", "0.56265116", "0.56261295", "0.5624927", "0.56246537", "0.5621163", "0.5620537", "0.56197745", "0.5618641", "0.56169116" ]
0.6559343
4
';' | [ modifiers ] interfaceMemberDecl
private void interfaceBodyDeclaration(Modifier modify, ClassType object) { if (nextSymbol == Keyword.SEMICOLONSY) { lookAhead(); return; } Modifier m = new Modifier(modify); m.cur = 0; for(int x; (x = modifier()) != 0; m.add(x)); if ((m.cur & m.constructors) == 0) m.cur |= modify.cur & modify.constructors; if ((m.cur & Keyword.NATIVESY.value) != 0) Errors.warning(nextToken.source, nextToken.line, nextToken.col, "native detected!", false); interfaceMemberDecl(m, object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void interfaceMemberDecl(Modifier modify, ClassType object)\r\n {\r\n if (comment != null && comment.length() > 0)\r\n {\r\n Operation op = new Operation();\r\n op.code = comment + '\\n';\r\n op.operator = Keyword.COMMENTSY;\r\n object.statics.add(op);\r\n resetComment();\r\n }\r\n\r\n if (nextSymbol == Keyword.VOIDSY)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.VOIDSY;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n\r\n lookAhead();\r\n if (nextSymbol == Keyword.INVERTSY)\r\n { // allow prefix ~ for destructor method\r\n lookAhead();\r\n nextToken.string = '~' + nextToken.string;\r\n }\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n voidInterfaceMethodDeclaratorRest(x);\r\n insertThis(object, x);\r\n object.scope.declInsertOverload(x);\r\n }\r\n else if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n modify.check(modify.classes | modify.access);\r\n Modifier m = new Modifier(modify);\r\n m.cur = modify.cur | Keyword.STATICSY.value;\r\n classDeclaration(m, object.scope, \"\");\r\n }\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n {\r\n modify.check(modify.interfaces | modify.access);\r\n interfaceDeclaration(modify, object.scope, \"\");\r\n }\r\n else\r\n interfaceMethodOrFieldDeclaration(modify, object);\r\n }", "public final void interfaceBodyDeclaration() throws RecognitionException {\n int interfaceBodyDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceBodyDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(322, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 31) ) { return ; }\n // Java.g:323:5: ( modifiers interfaceMemberDecl | ';' )\n int alt44=2;\n try { dbg.enterDecision(44);\n\n int LA44_0 = input.LA(1);\n\n if ( ((LA44_0>=Identifier && LA44_0<=ENUM)||LA44_0==28||(LA44_0>=31 && LA44_0<=37)||LA44_0==40||(LA44_0>=46 && LA44_0<=47)||(LA44_0>=52 && LA44_0<=63)||LA44_0==73) ) {\n alt44=1;\n }\n else if ( (LA44_0==26) ) {\n alt44=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 44, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(44);}\n\n switch (alt44) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:323:9: modifiers interfaceMemberDecl\n {\n dbg.location(323,9);\n pushFollow(FOLLOW_modifiers_in_interfaceBodyDeclaration1178);\n modifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(323,19);\n pushFollow(FOLLOW_interfaceMemberDecl_in_interfaceBodyDeclaration1180);\n interfaceMemberDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:324:9: ';'\n {\n dbg.location(324,9);\n match(input,26,FOLLOW_26_in_interfaceBodyDeclaration1190); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 31, interfaceBodyDeclaration_StartIndex); }\n }\n dbg.location(325, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceBodyDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public interface Impl extends Element.Impl {\n static final long serialVersionUID =2037286733482347462L;\n /** Get the modifier flags for this element.\n * Constrained by {@link MemberElement#getModifiersMask}.\n * @return disjunction of constants from {@link Modifier}\n */\n public int getModifiers();\n\n /** Set the modifier flags for this element.\n * @param mod disjunction of constants from {@link Modifier}\n * @throws SourceException if impossible (e.g. if <code>mod & ~ memberElt.getModifiersMask() != 0</code>)\n */\n public void setModifiers(int mod) throws SourceException;\n\n /** Get the name of this member.\n * @return the name\n */\n public Identifier getName();\n\n /** Set the name of this member.\n * @param name the name\n * @throws SourceException if impossible\n */\n public void setName(Identifier name) throws SourceException;\n }", "public void visit(InterfaceMemberDeclaration n) {\n n.f0.accept(this);\n }", "public interface DmxCorrelationVariable extends DNavigableMember\n{\n}", "public static String interfaceDecl()\n {\n read_if_needed_();\n \n return _interface_decl;\n }", "public final void interfaceMemberDecl() throws RecognitionException {\n int interfaceMemberDecl_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMemberDecl\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(327, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 32) ) { return ; }\n // Java.g:328:5: ( interfaceMethodOrFieldDecl | interfaceGenericMethodDecl | 'void' Identifier voidInterfaceMethodDeclaratorRest | interfaceDeclaration | classDeclaration )\n int alt45=5;\n try { dbg.enterDecision(45);\n\n switch ( input.LA(1) ) {\n case Identifier:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n {\n alt45=1;\n }\n break;\n case 40:\n {\n alt45=2;\n }\n break;\n case 47:\n {\n alt45=3;\n }\n break;\n case 46:\n case 73:\n {\n alt45=4;\n }\n break;\n case ENUM:\n case 37:\n {\n alt45=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 45, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(45);}\n\n switch (alt45) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:328:9: interfaceMethodOrFieldDecl\n {\n dbg.location(328,9);\n pushFollow(FOLLOW_interfaceMethodOrFieldDecl_in_interfaceMemberDecl1209);\n interfaceMethodOrFieldDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:329:9: interfaceGenericMethodDecl\n {\n dbg.location(329,9);\n pushFollow(FOLLOW_interfaceGenericMethodDecl_in_interfaceMemberDecl1219);\n interfaceGenericMethodDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:330:9: 'void' Identifier voidInterfaceMethodDeclaratorRest\n {\n dbg.location(330,9);\n match(input,47,FOLLOW_47_in_interfaceMemberDecl1229); if (state.failed) return ;\n dbg.location(330,16);\n match(input,Identifier,FOLLOW_Identifier_in_interfaceMemberDecl1231); if (state.failed) return ;\n dbg.location(330,27);\n pushFollow(FOLLOW_voidInterfaceMethodDeclaratorRest_in_interfaceMemberDecl1233);\n voidInterfaceMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:331:9: interfaceDeclaration\n {\n dbg.location(331,9);\n pushFollow(FOLLOW_interfaceDeclaration_in_interfaceMemberDecl1243);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:332:9: classDeclaration\n {\n dbg.location(332,9);\n pushFollow(FOLLOW_classDeclaration_in_interfaceMemberDecl1253);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 32, interfaceMemberDecl_StartIndex); }\n }\n dbg.location(333, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMemberDecl\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public interface C46409a {\n}", "public interface ClassDeclaring extends SymDeclaring {\n public ModsAttrs getMods();\n}", "public interface C13719g {\n}", "public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}", "interface I4 {\n public default void m1() { // <- Modifier 'public' is redundant for interface methods\n System.out.println(\"I4.m1()\");\n } // public is redundant\n\n /**\n * it is public, but NOT abstract (error: Illegal combination of modifiers: 'abstract' and 'default')\n */\n default void m2() {\n System.out.println(\"I4.m2()\");\n }\n}", "public interface i {\n}", "interface C2578d {\n}", "public interface C21597a {\n }", "public interface C0938b {\n }", "public interface C0385a {\n }", "public interface C1372b {\n}", "interface InterfaceA1 { // 1、接口。\n public String INFO = \"Hello world!\";\n\n public void print();\n}", "public List<Declaration> implicitMembers();", "public interface C0425p {\n}", "private void interfaceDeclaration(Modifier modify, Scope scope, String basename)\r\n {\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value;\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n matchKeyword(Keyword.INTERFACESY);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modify.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n x.extend = new ClassType(\"Object\");//!!!!!!!!!!!!!!!!!!!\r\n x.scope = new Scope(scope, Scope.heap, x.name.string);\r\n\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value & modify.access;\r\n\r\n interfaceBody(modify, x);\r\n\r\n unresolved = dummy;\r\n writeList(x);\r\n }", "public interface C0939c {\n }", "public interface C0136c {\n }", "public interface C22383h {\n}", "public interface C11910c {\n}", "public interface C0389gj extends C0388gi {\n}", "public List<Declaration> getIntroducedMembers();", "public interface a {\n }", "public interface JApiHasAccessModifier {\n\t/**\n\t * Returns the access modifier.\n\t *\n\t * @return the access modifier\n\t */\n\tJApiModifier<AccessModifier> getAccessModifier();\n}", "public interface C22379d {\n}", "interface I {}", "public interface C9222a {\n }", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "public interface PrivacyHeader extends Header\n{\n\n /**\n * Name of PrivacyHeader\n */\n public final static String NAME = \"Privacy\";\n\n\n /**\n * Set Privacy header value\n * @param privacy -- privacy type to set.\n */\n public void setPrivacy(String privacy) throws ParseException;\n\n /**\n * Get Privacy header value\n * @return privacy token name\n */\n public String getPrivacy();\n\n\n}", "public interface C19588a {\n }", "public interface C0333a {\n }", "Interface_decl getInterface();", "public interface MCDecoration {\n}", "public interface SentenceMember {\n}", "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C8843g {\n}", "public interface C24717ak {\n}", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface IMember {\n\n\n /**\n * Returns the title for this member.\n *\n * @return the title for this member.\n */\n String getTitle();\n\n /**\n * Sets the title for this member.\n *\n * @param title the title for this member.\n */\n void setTitle(String title);\n\n /**\n * Returns the initials for this member.\n *\n * @return the initials for this member.\n */\n String getInitials();\n\n /**\n * Sets the initials for this member.\n *\n * @param initials the initials for this member.\n */\n void setInitials(String initials);\n\n /**\n * Returns the firstName for this member.\n *\n * @return the firstName for this member.\n */\n String getFirstName();\n\n /**\n * Sets the firstName for this member.\n *\n * @param firstName the firstName for this member.\n */\n void setFirstName(String firstName);\n\n /**\n * Returns the surname for this member.\n *\n * @return the surname for this member.\n */\n String getSurname();\n\n /**\n * Sets the surname for this member.\n *\n * @param surname the surname for this member.\n */\n void setSurname(String surname);\n\n /**\n * Returns the idNumber for this member.\n *\n * @return the idNumber for this member.\n */\n String getIdNumber();\n\n /**\n * Sets the idNumber for this member.\n *\n * @param idNumber the idNumber for this member.\n */\n void setIdNumber(String idNumber);\n\n /**\n * Returns the {@link GenderStatus genderStatus} for this member.\n *\n * @return the {@link GenderStatus genderStatus} for this member.\n */\n GenderStatus getGenderStatus();\n\n /**\n * Sets the {@link GenderStatus genderStatus} for this member.\n *\n * @param genderStatus the {@link GenderStatus genderStatus} for this member.\n */\n void setGenderStatus(GenderStatus genderStatus);\n\n /**\n * Returns the date of birth for this member.\n *\n * @return the date of birth for this member.\n */\n LocalDate getDateOfBirth();\n\n /**\n * Sets the date of birth for this member.\n *\n * @param dateOfBirth the date of birth for this patient.\n */\n void setDateOfBirth(LocalDate dateOfBirth);\n\n /**\n * Returns the mugShot for this member.\n *\n * @return the mugShot for this member.\n */\n ILogo getMugShot();\n\n /**\n * Sets the mugShot for this member.\n *\n * @param mugShot for this member.\n */\n void setMugShot(ILogo mugShot);\n\n /**\n * Gets the {@link ISystemUser user} of the member.\n *\n * @return { {@link ISystemUser user} of the member.\n */\n ISystemUser getSystemUser();\n\n /**\n * Sets the {@link ISystemUser user} of the member.\n *\n * @param user of the area user was created member.\n */\n void setSystemUser(ISystemUser user);\n}", "interface InterfaceA {\n\tint a = 5;\n\tvoid show();\n\tint display();\n}", "public interface C3183a {\n}", "public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}", "public interface AbstractC2502fH1 extends IInterface {\n}", "public interface C32115a {\n}", "public void addMember(IMember member);", "public interface ClassAccessorElementTypes\n{\n\tIElementType RESERVED_MK_RO_ACCESSORS = new ClassAccessorSubElementType(\"MK_RO_ACCESSORS\");\n\tIElementType RESERVED_MK_WO_ACCESSORS = new ClassAccessorSubElementType(\"MK_WO_ACCESSORS\");\n\tIElementType RESERVED_MK_ACCESSORS = new ClassAccessorSubElementType(\"MK_ACCESSORS\");\n\tIElementType RESERVED_FOLLOW_BEST_PRACTICE = new ClassAccessorSubElementType(\"FOLLOW_BEST_PRACTICE\")\n\t{\n\t\t@NotNull\n\t\t@Override\n\t\tpublic ASTNode createLeafNode(CharSequence leafText)\n\t\t{\n\t\t\treturn new PerlClassAccessorFollowBestPracticeImpl(this, leafText);\n\t\t}\n\t};\n\n\tIElementType CLASS_ACCESSOR_DECLARATION = new ClassAccessorDeclarationStubElementType(\"CLASS_ACCESSOR_DECLARATION\");\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public interface C8482e {\n}", "public interface UIMember extends UIUser {\r\n\t\r\n\t/**\r\n\t * @return\r\n\t * \t\tThe user-name of the member\r\n\t */\r\n\tpublic String getUsername();\r\n\r\n\t/**\r\n\t * @return\r\n\t * \t\tThe last name of the member\r\n\t */\r\n\tpublic String getLastName();\r\n\t\r\n\t/**\r\n\t * @return\r\n\t * \t\tThe first name of the member\r\n\t */\r\n\tpublic String getFirstName();\r\n\r\n\t/**\r\n\t * \r\n\t * @return\r\n\t * \t\tThe e-mail address of the member\r\n\t */\r\n\tpublic String getEmail();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return\r\n\t * \t\tThe number of messages posted by the member\r\n\t */\r\n\tpublic int getPostsNumber();\r\n\t\r\n\tpublic boolean askChangePassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return\r\n\t * \t\tA string representation of the member\r\n\t */\r\n\tpublic String toString();\r\n\r\n}", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface C34503a {\n void bMl();\n }", "public interface PathNodeMember extends PathNode {\n}", "public interface i {\n int a();\n\n boolean b();\n\n void c();\n}", "@Override\n public String visit(AnnotationMemberDeclaration n, Object arg) {\n return null;\n }", "public interface Member2 extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.util.List getListValue();\n java.util.List xgetListValue();\n void setListValue(java.util.List list);\n /** @deprecated */\n java.util.List listValue();\n /** @deprecated */\n java.util.List xlistValue();\n /** @deprecated */\n void set(java.util.List list);\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member2.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anona0e6type\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is a union type. Instances are of one of the following types:\n * org.apache.xmlbeans.XmlAnyURI\n * org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member\n */\n public interface Item extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.lang.Object getObjectValue();\n void setObjectValue(java.lang.Object val);\n /** @deprecated */\n java.lang.Object objectValue();\n /** @deprecated */\n void objectSet(java.lang.Object val);\n org.apache.xmlbeans.SchemaType instanceType();\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Item.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon16cetype\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is an atomic type that is a restriction of org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n */\n public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon0c73type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum TARGET_NAMESPACE = Enum.forString(\"##targetNamespace\");\n static final Enum LOCAL = Enum.forString(\"##local\");\n \n static final int INT_TARGET_NAMESPACE = Enum.INT_TARGET_NAMESPACE;\n static final int INT_LOCAL = Enum.INT_LOCAL;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_TARGET_NAMESPACE\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_TARGET_NAMESPACE = 1;\n static final int INT_LOCAL = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##targetNamespace\", INT_TARGET_NAMESPACE),\n new Enum(\"##local\", INT_LOCAL),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }", "interface InterfaceExample7 {\n\tint numOne = 10;\n}", "public interface C38422j {\n /* renamed from: nm */\n void mo6247nm(int i);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "public interface C22486a {\n void bGQ();\n\n void cMy();\n }", "public interface Igual extends ComplexInstruction\n{\n}", "public interface Declarations {\n\n /**\n * Tests whether one type, method, or field declaration hides another.\n *\n * @param sub the first member\n * @param sup the second member\n * @return <tt>true</tt> if and only if the first member hides\n *\t\tthe second\n */\n boolean hides(MemberDeclaration sub, MemberDeclaration sup);\n\n /**\n * Tests whether one method overrides another. When a\n * non-abstract method overrides an abstract one, the\n * former is also said to <i>implement</i> the latter.\n *\n * @param sub the first method\n * @param sup the second method\n * @return <tt>true</tt> if and only if the first method overrides\n *\t\tthe second\n */\n boolean overrides(MethodDeclaration sub, MethodDeclaration sup);\n}", "public interface C14016a {\n void abU(String str);\n\n void cHM();\n\n void cHO();\n\n /* renamed from: mh */\n void mo26249mh(boolean z);\n }", "public interface BiGULReplace extends BiGULStatement\n{\n}", "public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}", "public interface C3803p {\n void mo4312a(C3922o c3922o);\n}", "public interface IContinueStatement extends ITerminalStatement\n{\n}", "public interface C1279b extends C1278a {\n}", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C31889b {\n }", "public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anonfac7type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum ANY = Enum.forString(\"##any\");\n static final Enum OTHER = Enum.forString(\"##other\");\n \n static final int INT_ANY = Enum.INT_ANY;\n static final int INT_OTHER = Enum.INT_OTHER;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_ANY\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_ANY = 1;\n static final int INT_OTHER = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##any\", INT_ANY),\n new Enum(\"##other\", INT_OTHER),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }", "public interface C43157d extends C1677a {\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C4999x extends C4929d, C4995v1 {\n}", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface PropertyAccess extends FeatureCall\n{\n}", "public interface FieldManager extends FieldConsumer, FieldSupplier\r\n{\r\n}", "public interface C0020b {\n void a(String str);\n }", "public interface C1061nc extends IInterface {\n /* renamed from: a */\n String mo2800a();\n\n /* renamed from: a */\n String mo2801a(String str);\n\n /* renamed from: a */\n void mo2802a(String str, boolean z);\n\n /* renamed from: a */\n boolean mo2803a(boolean z);\n}", "public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon0c73type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum TARGET_NAMESPACE = Enum.forString(\"##targetNamespace\");\n static final Enum LOCAL = Enum.forString(\"##local\");\n \n static final int INT_TARGET_NAMESPACE = Enum.INT_TARGET_NAMESPACE;\n static final int INT_LOCAL = Enum.INT_LOCAL;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_TARGET_NAMESPACE\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_TARGET_NAMESPACE = 1;\n static final int INT_LOCAL = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##targetNamespace\", INT_TARGET_NAMESPACE),\n new Enum(\"##local\", INT_LOCAL),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface InitializerDef extends CodeDef, MemberDef\n{\n InitializerInstance asInstance();\n}", "public interface C0764b {\n}", "public interface AdditionalOperations extends Statements {\n}", "public interface SimpleFlow extends Serializable {\n\n public Pipe getPipe();\n\n public @interface IrSimpleFlow {\n\n String name();\n\n }\n\n}", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "public interface C0984b extends C0983a {\n}", "interface Test4{\r\n\tpublic void m1();\r\n}", "interface Accessible {\n // All interface variables are public static final\n int SOME_CONSTANT = 100;\n // all interface methods are automatically public\n public void methodA();\n void methodB();\n boolean methodC();\n}", "interface InterfaceChild extends InterfaceParent {\n default String introduce() {\n return \"InterfaceChild\";\n }\n}", "public interface Compound extends Clause {}" ]
[ "0.7100405", "0.69286126", "0.6441975", "0.642301", "0.62751365", "0.6169609", "0.6142762", "0.6138974", "0.6067786", "0.60591555", "0.6049081", "0.6034443", "0.6027791", "0.601127", "0.6006412", "0.60026073", "0.59838605", "0.59091794", "0.5906611", "0.58963907", "0.5889478", "0.58846587", "0.5858459", "0.5847714", "0.58293724", "0.58281183", "0.58148366", "0.5799958", "0.5784836", "0.5783663", "0.5782668", "0.577753", "0.57733035", "0.5747883", "0.57396233", "0.57354546", "0.573027", "0.57153", "0.571324", "0.5698148", "0.5691656", "0.5686625", "0.56763905", "0.5671197", "0.5658706", "0.565606", "0.5655814", "0.5654862", "0.56540394", "0.5652766", "0.56456786", "0.5640573", "0.56346035", "0.5632157", "0.56285226", "0.5611923", "0.56062824", "0.56029826", "0.5591811", "0.558327", "0.55783945", "0.5574316", "0.55740297", "0.55726546", "0.5570584", "0.5566992", "0.55667704", "0.55633795", "0.55598325", "0.55541074", "0.55496854", "0.55460596", "0.5543167", "0.553189", "0.5531585", "0.5527321", "0.5518167", "0.5516572", "0.55079263", "0.550628", "0.5505205", "0.5504582", "0.5503976", "0.55026704", "0.5501136", "0.54955995", "0.54947764", "0.549365", "0.5491961", "0.54794616", "0.54745924", "0.54618335", "0.5459384", "0.5455334", "0.54542774", "0.54516023", "0.5448309", "0.5448115", "0.5440356", "0.5437717" ]
0.6504393
2
"void" voidInterfaceMethodDeclaratorRest | classDeclaration | interfaceDeclaration | interfaceMethodOrFieldDeclaration
private void interfaceMemberDecl(Modifier modify, ClassType object) { if (comment != null && comment.length() > 0) { Operation op = new Operation(); op.code = comment + '\n'; op.operator = Keyword.COMMENTSY; object.statics.add(op); resetComment(); } if (nextSymbol == Keyword.VOIDSY) { modify.check(modify.methods | modify.access); MethodType x = new MethodType(modify.cur); x.type = new Type(); x.type.type = Keyword.VOIDSY; x.scope = new Scope(object.scope, Scope.automatic, ""); lookAhead(); if (nextSymbol == Keyword.INVERTSY) { // allow prefix ~ for destructor method lookAhead(); nextToken.string = '~' + nextToken.string; } x.name = nextToken; matchKeyword(Keyword.IDENTSY); voidInterfaceMethodDeclaratorRest(x); insertThis(object, x); object.scope.declInsertOverload(x); } else if (nextSymbol == Keyword.CLASSSY) { modify.check(modify.classes | modify.access); Modifier m = new Modifier(modify); m.cur = modify.cur | Keyword.STATICSY.value; classDeclaration(m, object.scope, ""); } else if (nextSymbol == Keyword.INTERFACESY) { modify.check(modify.interfaces | modify.access); interfaceDeclaration(modify, object.scope, ""); } else interfaceMethodOrFieldDeclaration(modify, object); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void voidInterfaceMethodDeclaratorRest(MethodType x)\r\n {\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "@Override\n public void visit(MethodDeclaration decl, Void arg){\n super.visit(decl, arg);\n handleDecl(decl);\n }", "void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.equals(\";\") || theToken.equals(\"[\"))\r\n\t\t\t\tvarDec();\r\n\r\n\t\t\t// if int ID ( param ) compoundStatment\r\n\t\t\telse if (theToken.equals(\"(\"))\r\n\t\t\t\tfunDec();\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn;\r\n\t}", "private void interfaceMethodDeclaratorRest(Modifier modify, Type t, Token ident, ClassType object)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = new MethodType(modify.cur);\r\n\r\n x.name = ident;\r\n x.type = t;\r\n x.scope = new Scope(object.scope, Scope.automatic, \"\");\r\n x.parameter = formalParameters();\r\n x.type.dim += bracketsOpt();\r\n object.scope.declInsertOverload(x);\r\n\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n insertThis(object, x);\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "private void interfaceBodyDeclaration(Modifier modify, ClassType object)\r\n {\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n Modifier m = new Modifier(modify);\r\n m.cur = 0;\r\n\r\n for(int x; (x = modifier()) != 0; m.add(x));\r\n\r\n if ((m.cur & m.constructors) == 0)\r\n m.cur |= modify.cur & modify.constructors;\r\n\r\n if ((m.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n interfaceMemberDecl(m, object);\r\n }", "public interface IGosuStatementList extends IGosuStatement, PsiCodeBlock\n{\n}", "public final void interfaceMemberDecl() throws RecognitionException {\n int interfaceMemberDecl_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMemberDecl\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(327, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 32) ) { return ; }\n // Java.g:328:5: ( interfaceMethodOrFieldDecl | interfaceGenericMethodDecl | 'void' Identifier voidInterfaceMethodDeclaratorRest | interfaceDeclaration | classDeclaration )\n int alt45=5;\n try { dbg.enterDecision(45);\n\n switch ( input.LA(1) ) {\n case Identifier:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n {\n alt45=1;\n }\n break;\n case 40:\n {\n alt45=2;\n }\n break;\n case 47:\n {\n alt45=3;\n }\n break;\n case 46:\n case 73:\n {\n alt45=4;\n }\n break;\n case ENUM:\n case 37:\n {\n alt45=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 45, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(45);}\n\n switch (alt45) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:328:9: interfaceMethodOrFieldDecl\n {\n dbg.location(328,9);\n pushFollow(FOLLOW_interfaceMethodOrFieldDecl_in_interfaceMemberDecl1209);\n interfaceMethodOrFieldDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:329:9: interfaceGenericMethodDecl\n {\n dbg.location(329,9);\n pushFollow(FOLLOW_interfaceGenericMethodDecl_in_interfaceMemberDecl1219);\n interfaceGenericMethodDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:330:9: 'void' Identifier voidInterfaceMethodDeclaratorRest\n {\n dbg.location(330,9);\n match(input,47,FOLLOW_47_in_interfaceMemberDecl1229); if (state.failed) return ;\n dbg.location(330,16);\n match(input,Identifier,FOLLOW_Identifier_in_interfaceMemberDecl1231); if (state.failed) return ;\n dbg.location(330,27);\n pushFollow(FOLLOW_voidInterfaceMethodDeclaratorRest_in_interfaceMemberDecl1233);\n voidInterfaceMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:331:9: interfaceDeclaration\n {\n dbg.location(331,9);\n pushFollow(FOLLOW_interfaceDeclaration_in_interfaceMemberDecl1243);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:332:9: classDeclaration\n {\n dbg.location(332,9);\n pushFollow(FOLLOW_classDeclaration_in_interfaceMemberDecl1253);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 32, interfaceMemberDecl_StartIndex); }\n }\n dbg.location(333, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMemberDecl\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public interface Declarations {\n\n /**\n * Tests whether one type, method, or field declaration hides another.\n *\n * @param sub the first member\n * @param sup the second member\n * @return <tt>true</tt> if and only if the first member hides\n *\t\tthe second\n */\n boolean hides(MemberDeclaration sub, MemberDeclaration sup);\n\n /**\n * Tests whether one method overrides another. When a\n * non-abstract method overrides an abstract one, the\n * former is also said to <i>implement</i> the latter.\n *\n * @param sub the first method\n * @param sup the second method\n * @return <tt>true</tt> if and only if the first method overrides\n *\t\tthe second\n */\n boolean overrides(MethodDeclaration sub, MethodDeclaration sup);\n}", "public final void interfaceMethodOrFieldDecl() throws RecognitionException {\n int interfaceMethodOrFieldDecl_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMethodOrFieldDecl\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(335, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 33) ) { return ; }\n // Java.g:336:5: ( type Identifier interfaceMethodOrFieldRest )\n dbg.enterAlt(1);\n\n // Java.g:336:9: type Identifier interfaceMethodOrFieldRest\n {\n dbg.location(336,9);\n pushFollow(FOLLOW_type_in_interfaceMethodOrFieldDecl1276);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(336,14);\n match(input,Identifier,FOLLOW_Identifier_in_interfaceMethodOrFieldDecl1278); if (state.failed) return ;\n dbg.location(336,25);\n pushFollow(FOLLOW_interfaceMethodOrFieldRest_in_interfaceMethodOrFieldDecl1280);\n interfaceMethodOrFieldRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 33, interfaceMethodOrFieldDecl_StartIndex); }\n }\n dbg.location(337, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMethodOrFieldDecl\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void visit(InterfaceDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public interface IContinueStatement extends ITerminalStatement\n{\n}", "@Override\n public void visit(ClassOrInterfaceDeclaration n, Object arg) {\n \tif(n.getJavaDoc()!=null){\n \t\tclassInfo.add(n.getName());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tcomment = comment.replaceAll(\"(?s)\\\\*(.*)\",\"\");\n\t \tclassInfo.add(comment.trim()); \n \t}\n \t}", "public interface class_25 {\r\n\r\n // $FF: renamed from: b (int, int) boolean\r\n boolean method_103(int var1, int var2);\r\n\r\n // $FF: renamed from: c (int, int) gI\r\n class_1069 method_104(int var1, int var2);\r\n\r\n // $FF: renamed from: d (int, int) gI\r\n class_1069 method_105(int var1, int var2);\r\n\r\n // $FF: renamed from: b (gG, int, int) void\r\n void method_106(class_25 var1, int var2, int var3);\r\n\r\n // $FF: renamed from: b (boolean, vu) boolean\r\n boolean method_107(boolean var1, class_81 var2);\r\n\r\n // $FF: renamed from: a () boolean\r\n boolean method_108();\r\n\r\n // $FF: renamed from: b () boolean\r\n boolean method_109();\r\n\r\n // $FF: renamed from: c () java.lang.String\r\n String method_110();\r\n\r\n // $FF: renamed from: b (as, int, int, int) java.util.List\r\n List method_111(class_922 var1, int var2, int var3, int var4);\r\n\r\n // $FF: renamed from: b (ahb, java.lang.String, int, int, int) dd\r\n class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);\r\n\r\n // $FF: renamed from: d () int\r\n int method_113();\r\n\r\n // $FF: renamed from: f (int, int) void\r\n void method_114(int var1, int var2);\r\n\r\n // $FF: renamed from: e () void\r\n void method_115();\r\n}", "public interface i {\n int a();\n\n boolean b();\n\n void c();\n}", "private static boolean methodDeclaration_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"methodDeclaration_4_0\")) return false;\n boolean r;\n r = consumeToken(b, SEMICOLON);\n if (!r) r = functionBodyOrNative(b, l + 1);\n if (!r) r = redirection(b, l + 1);\n return r;\n }", "public void visit(ClassOrInterfaceDeclaration arg0, Object arg1) {\n\t \tclassName = arg0.getName();\n\t \tisInterface = arg0.toString().indexOf(\"interface\")!=-1;\n\t \tisAbstract = arg0.toString().indexOf(\"abstract\")!=-1;\n\t \tmyClasses.add(className);\n\t \tfor(Iterator<?> it = arg0.getImplements().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ..|> \" + it.next() + \"\\n\";\n\t \tfor(Iterator<?> it = arg0.getExtends().iterator(); it.hasNext();)\n\t \t\tinheritance += className + \" ---|> \" +it.next() + \"\\n\";\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "public final void memberDecl() throws RecognitionException {\n int memberDecl_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"memberDecl\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(292, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 25) ) { return ; }\n // Java.g:293:5: ( genericMethodOrConstructorDecl | memberDeclaration | 'void' Identifier voidMethodDeclaratorRest | Identifier constructorDeclaratorRest | interfaceDeclaration | classDeclaration )\n int alt40=6;\n try { dbg.enterDecision(40);\n\n switch ( input.LA(1) ) {\n case 40:\n {\n alt40=1;\n }\n break;\n case Identifier:\n {\n int LA40_2 = input.LA(2);\n\n if ( (LA40_2==66) ) {\n alt40=4;\n }\n else if ( (LA40_2==Identifier||LA40_2==29||LA40_2==40||LA40_2==48) ) {\n alt40=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 40, 2, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n break;\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n {\n alt40=2;\n }\n break;\n case 47:\n {\n alt40=3;\n }\n break;\n case 46:\n case 73:\n {\n alt40=5;\n }\n break;\n case ENUM:\n case 37:\n {\n alt40=6;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 40, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(40);}\n\n switch (alt40) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:293:9: genericMethodOrConstructorDecl\n {\n dbg.location(293,9);\n pushFollow(FOLLOW_genericMethodOrConstructorDecl_in_memberDecl956);\n genericMethodOrConstructorDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:294:9: memberDeclaration\n {\n dbg.location(294,9);\n pushFollow(FOLLOW_memberDeclaration_in_memberDecl966);\n memberDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:295:9: 'void' Identifier voidMethodDeclaratorRest\n {\n dbg.location(295,9);\n match(input,47,FOLLOW_47_in_memberDecl976); if (state.failed) return ;\n dbg.location(295,16);\n match(input,Identifier,FOLLOW_Identifier_in_memberDecl978); if (state.failed) return ;\n dbg.location(295,27);\n pushFollow(FOLLOW_voidMethodDeclaratorRest_in_memberDecl980);\n voidMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:296:9: Identifier constructorDeclaratorRest\n {\n dbg.location(296,9);\n match(input,Identifier,FOLLOW_Identifier_in_memberDecl990); if (state.failed) return ;\n dbg.location(296,20);\n pushFollow(FOLLOW_constructorDeclaratorRest_in_memberDecl992);\n constructorDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:297:9: interfaceDeclaration\n {\n dbg.location(297,9);\n pushFollow(FOLLOW_interfaceDeclaration_in_memberDecl1002);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 6 :\n dbg.enterAlt(6);\n\n // Java.g:298:9: classDeclaration\n {\n dbg.location(298,9);\n pushFollow(FOLLOW_classDeclaration_in_memberDecl1012);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 25, memberDecl_StartIndex); }\n }\n dbg.location(299, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"memberDecl\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n public void visit(MethodDeclaration n, Object arg) {\n \tArrayList<String> method = new ArrayList<String>();\n \tif(n.getJavaDoc()!=null){\n\t \tmethod.add(n.getName());\n\t \tString comment = n.getJavaDoc().getContent();\n\t \tcomment = comment.replaceAll(\"\\\\* @param (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @return (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* @throws (.*)\",\"\");\n\t \tcomment = comment.replaceAll(\"\\\\* \",\"\");\n\t \tmethod.add(comment.trim()); \n\t \tmethods.add(method);\n \t}\n \t}", "public final ValidateStateTransitionsParser.voidMethodDeclaration_return voidMethodDeclaration() throws RecognitionException {\r\n ValidateStateTransitionsParser.voidMethodDeclaration_return retval = new ValidateStateTransitionsParser.voidMethodDeclaration_return();\r\n retval.start = input.LT(1);\r\n\r\n int voidMethodDeclaration_StartIndex = input.index();\r\n\r\n CommonTree IDENT3=null;\r\n ValidateStateTransitionsParser_JavaTreeParser.block_return block4 =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 293) ) { return retval; }\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:229:5: ( ^( VOID_METHOD_DECL modifierList ( genericTypeParameterList )? IDENT formalParameterList ( throwsClause )? ( block )? ) )\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:230:9: ^( VOID_METHOD_DECL modifierList ( genericTypeParameterList )? IDENT formalParameterList ( throwsClause )? ( block )? )\r\n {\r\n match(input,VOID_METHOD_DECL,FOLLOW_VOID_METHOD_DECL_in_voidMethodDeclaration533); if (state.failed) return retval;\r\n\r\n match(input, Token.DOWN, null); if (state.failed) return retval;\r\n pushFollow(FOLLOW_modifierList_in_voidMethodDeclaration551);\r\n modifierList();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:233:17: ( genericTypeParameterList )?\r\n int alt12=2;\r\n int LA12_0 = input.LA(1);\r\n\r\n if ( (LA12_0==GENERIC_TYPE_PARAM_LIST) ) {\r\n alt12=1;\r\n }\r\n switch (alt12) {\r\n case 1 :\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:233:17: genericTypeParameterList\r\n {\r\n pushFollow(FOLLOW_genericTypeParameterList_in_voidMethodDeclaration569);\r\n genericTypeParameterList();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n IDENT3=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_voidMethodDeclaration588); if (state.failed) return retval;\r\n\r\n pushFollow(FOLLOW_formalParameterList_in_voidMethodDeclaration606);\r\n formalParameterList();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:236:17: ( throwsClause )?\r\n int alt13=2;\r\n int LA13_0 = input.LA(1);\r\n\r\n if ( (LA13_0==THROWS_CLAUSE) ) {\r\n alt13=1;\r\n }\r\n switch (alt13) {\r\n case 1 :\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:236:17: throwsClause\r\n {\r\n pushFollow(FOLLOW_throwsClause_in_voidMethodDeclaration624);\r\n throwsClause();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:237:17: ( block )?\r\n int alt14=2;\r\n int LA14_0 = input.LA(1);\r\n\r\n if ( (LA14_0==BLOCK_SCOPE) ) {\r\n alt14=1;\r\n }\r\n switch (alt14) {\r\n case 1 :\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:237:17: block\r\n {\r\n pushFollow(FOLLOW_block_in_voidMethodDeclaration643);\r\n block4=block();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n functionDetected((IDENT3!=null?IDENT3.getText():null), (CommonTree)(block4!=null?((CommonTree)block4.start):null));\r\n }\r\n\r\n match(input, Token.UP, null); if (state.failed) return retval;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 293, voidMethodDeclaration_StartIndex); }\r\n\r\n }\r\n return retval;\r\n }", "interface MyFirstVoidFunctionalInterface {\n\n public void methodOne();\n\n}", "interface A {\n void a();\n}", "public void testCreateEmptyInterfaceMethod() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setBody(\";\\n\");\n assertSourceEquals(\"source code incorrect\", \"public void foo();\\n\", method.getContents());\n }", "public void visit(MethodDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n n.f4.accept(this);\n }", "public final void classOrInterfaceDeclaration() throws RecognitionException {\n int classOrInterfaceDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classOrInterfaceDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(198, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return ; }\n // Java.g:199:5: ( classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration ) )\n dbg.enterAlt(1);\n\n // Java.g:199:9: classOrInterfaceModifiers ( classDeclaration | interfaceDeclaration )\n {\n dbg.location(199,9);\n pushFollow(FOLLOW_classOrInterfaceModifiers_in_classOrInterfaceDeclaration224);\n classOrInterfaceModifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(199,35);\n // Java.g:199:35: ( classDeclaration | interfaceDeclaration )\n int alt12=2;\n try { dbg.enterSubRule(12);\n try { dbg.enterDecision(12);\n\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0==ENUM||LA12_0==37) ) {\n alt12=1;\n }\n else if ( (LA12_0==46||LA12_0==73) ) {\n alt12=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 12, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(12);}\n\n switch (alt12) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:199:36: classDeclaration\n {\n dbg.location(199,36);\n pushFollow(FOLLOW_classDeclaration_in_classOrInterfaceDeclaration227);\n classDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:199:55: interfaceDeclaration\n {\n dbg.location(199,55);\n pushFollow(FOLLOW_interfaceDeclaration_in_classOrInterfaceDeclaration231);\n interfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(12);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 5, classOrInterfaceDeclaration_StartIndex); }\n }\n dbg.location(200, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classOrInterfaceDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public interface a {\n void a();\n }", "public interface a {\n void a();\n }", "interface I4 {\n public default void m1() { // <- Modifier 'public' is redundant for interface methods\n System.out.println(\"I4.m1()\");\n } // public is redundant\n\n /**\n * it is public, but NOT abstract (error: Illegal combination of modifiers: 'abstract' and 'default')\n */\n default void m2() {\n System.out.println(\"I4.m2()\");\n }\n}", "public final void interfaceBodyDeclaration() throws RecognitionException {\n int interfaceBodyDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceBodyDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(322, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 31) ) { return ; }\n // Java.g:323:5: ( modifiers interfaceMemberDecl | ';' )\n int alt44=2;\n try { dbg.enterDecision(44);\n\n int LA44_0 = input.LA(1);\n\n if ( ((LA44_0>=Identifier && LA44_0<=ENUM)||LA44_0==28||(LA44_0>=31 && LA44_0<=37)||LA44_0==40||(LA44_0>=46 && LA44_0<=47)||(LA44_0>=52 && LA44_0<=63)||LA44_0==73) ) {\n alt44=1;\n }\n else if ( (LA44_0==26) ) {\n alt44=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 44, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(44);}\n\n switch (alt44) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:323:9: modifiers interfaceMemberDecl\n {\n dbg.location(323,9);\n pushFollow(FOLLOW_modifiers_in_interfaceBodyDeclaration1178);\n modifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(323,19);\n pushFollow(FOLLOW_interfaceMemberDecl_in_interfaceBodyDeclaration1180);\n interfaceMemberDecl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:324:9: ';'\n {\n dbg.location(324,9);\n match(input,26,FOLLOW_26_in_interfaceBodyDeclaration1190); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 31, interfaceBodyDeclaration_StartIndex); }\n }\n dbg.location(325, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceBodyDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public interface\nReturnStmt extends Stmt\n{\n\n/** ReturnStmt (##3)\n * Build return statement that terminates the execution of\n * current subprogram under construction.\n * @param pReturnValue return value of function subprogram.\n * If the subprogram has no return value, it is null.\n * @return the subtree of the built statement\n * with statement body operator opReturn.\n **/\n// Constructor (##3)\n// ReturnStmt( Exp pReturnValue );\n\n/** getReturnValue Get the return value expression of return statement.\n * setReturnValue Set the return value expression of this statement.\n * \"this\" should be a return statement build by buildReturnStmt.\n**/\nExp\ngetReturnValue();\npublic void\nsetReturnValue(Exp pReturnValue);\n\n\n}", "public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}", "public void visit(MethodDeclarationLookahead n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic boolean visit(MethodDeclaration node) {\r\n\t\tIMethodBinding imb = node.resolveBinding();\r\n\t\tIJavaElement ije = imb.getJavaElement();\r\n\t\tif (ije instanceof IMethod) {\r\n\t\t\tIMethod im = (IMethod) ije;\r\n\t\t\tList<SingleVariableDeclaration> para_list = node.parameters();\r\n\t\t\tIRGeneratorHelper.HandleMethodDeclaration(java_project, graph_manager, node.getBody(), ele_factory,\r\n\t\t\t\t\tstmt_factory, imb, im, it, para_list, super_class_element, type_declare_resource, type_declare);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier {\n\n /**\n * The package name of the declaring type.\n */\n default String getPackageName() {\n return declaringType().getPackageName();\n }\n\n /**\n * The class(es) wrapping the declaring type.\n */\n default String getClassName() {\n return declaringType().getClassName();\n }\n\n /**\n * The qualified name of the method composed by the qualfied name of the declaring type\n * followed by a dot and the name of the method.\n */\n default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }\n\n /**\n * The signature of the method.\n */\n default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }\n\n /**\n * The qualified signature of the method. It is composed by the qualified name of the declaring type\n * followed by the signature of the method.\n */\n default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }\n\n /**\n * The type in which the method is declared.\n */\n ResolvedReferenceTypeDeclaration declaringType();\n\n /**\n * Number of params.\n */\n int getNumberOfParams();\n\n /**\n * Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.\n */\n ResolvedParameterDeclaration getParam(int i);\n\n /**\n * Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method\n * has no parameters.\n * The last parameter can be variadic and sometimes it needs to be handled in a special way.\n */\n default ResolvedParameterDeclaration getLastParam() {\n if (getNumberOfParams() == 0) {\n throw new UnsupportedOperationException(\"This method has no typeParametersValues, therefore it has no a last parameter\");\n }\n return getParam(getNumberOfParams() - 1);\n }\n\n /**\n * Has the method or construcor a variadic parameter?\n * Note that when a method has a variadic parameter it should have an array type.\n */\n default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }\n\n @Override\n default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name) {\n for (ResolvedTypeParameterDeclaration tp : this.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(tp);\n }\n }\n return declaringType().findTypeParameter(name);\n }\n\n /**\n * Number of exceptions listed in the throws clause.\n */\n int getNumberOfSpecifiedExceptions();\n\n /**\n * Type of the corresponding entry in the throws clause.\n *\n * @throws IllegalArgumentException if the index is negative or it is equal or greater than the value returned by\n * getNumberOfSpecifiedExceptions\n * @throws UnsupportedOperationException for those types of methods of constructor that do not declare exceptions\n */\n ResolvedType getSpecifiedException(int index);\n\n default List<ResolvedType> getSpecifiedExceptions() {\n if (getNumberOfSpecifiedExceptions() == 0) {\n return Collections.emptyList();\n } else {\n List<ResolvedType> exceptions = new LinkedList<>();\n for (int i = 0; i < getNumberOfSpecifiedExceptions(); i++) {\n exceptions.add(getSpecifiedException(i));\n }\n return exceptions;\n }\n }\n}", "@Override\n\tpublic Void visit(IsVoid isvoid) {\n\t\tprintIndent(\"isvoid\");\n\t\tindent++;\n\t\tisvoid.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public interface AnonymousClass0It {\n void A29(C04080Iy v, AbstractC27431Py v2);\n\n boolean A2R();\n\n boolean AAH();\n\n boolean AB6();\n}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParameters_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "@Override\n public boolean visit (MethodDeclaration methodDeclaration) {\n /* get the reversed order of statements from the body */\n Block body = (Block) ASTNode.copySubtree(methodDeclaration.getAST(), getReverse(methodDeclaration.getBody()));\n\n /* set new body, name and return type */\n SimpleName name = methodDeclaration.getAST().newSimpleName(\"rev_\" + methodDeclaration.getName().getFullyQualifiedName());\n rewriter.set(methodDeclaration, MethodDeclaration.BODY_PROPERTY, body, null);\n rewriter.set(methodDeclaration, MethodDeclaration.NAME_PROPERTY, name, null);\n rewriter.set(methodDeclaration, MethodDeclaration.RETURN_TYPE2_PROPERTY, methodDeclaration.getAST().newPrimitiveType(PrimitiveType.VOID), null);\n\n return true;\n }", "@FunctionalInterface\ninterface Foo {\n //TODO try to comment the next line\n void method(String string);\n\n //TODO try to create another abstract method\n// void method2(String string);\n //TODO try to create a default method\n default void method3(String string)\n {\n System.out.println(string);\n }\n //TODO create another functional interface and try to extend this one\n\n //TODO create an empty interface and extend this one\n}", "interface DefaultMethod extends SingleMethod {\r\n\tdefault public void myMethod() {\r\n\t\tSystem.out.println(\"from Java 1.8 version can have method with a body\");\r\n}\r\n}", "@Override\n\tpublic void inAInterfaceBody(AInterfaceBody node) {\n // Determine the start and end line numbers.\n int begin = findInterfaceBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AInterfaceDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AInterfaceDeclaration parent = (AInterfaceDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "public final void interfaceDeclaration() throws RecognitionException {\n int interfaceDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(265, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return ; }\n // Java.g:266:5: ( normalInterfaceDeclaration | annotationTypeDeclaration )\n int alt32=2;\n try { dbg.enterDecision(32);\n\n int LA32_0 = input.LA(1);\n\n if ( (LA32_0==46) ) {\n alt32=1;\n }\n else if ( (LA32_0==73) ) {\n alt32=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 32, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(32);}\n\n switch (alt32) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:266:9: normalInterfaceDeclaration\n {\n dbg.location(266,9);\n pushFollow(FOLLOW_normalInterfaceDeclaration_in_interfaceDeclaration756);\n normalInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:267:9: annotationTypeDeclaration\n {\n dbg.location(267,9);\n pushFollow(FOLLOW_annotationTypeDeclaration_in_interfaceDeclaration766);\n annotationTypeDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 19, interfaceDeclaration_StartIndex); }\n }\n dbg.location(268, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void visit(NestedInterfaceDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "private void classOrInterfaceDeclaration(Modifier modifier, Scope scope, String basename)\r\n {\r\n for(int x; (x = classModifier()) != 0; modifier.add(x));\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n classDeclaration(modifier, scope, basename);\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n interfaceDeclaration(modifier, scope, basename);\r\n else\r\n {\r\n error(\"Keyword \" + Keyword.CLASSSY.string + \" or \" + Keyword.INTERFACESY.string + \" expected, not \" + nextToken.string);\r\n lookAhead();\r\n }\r\n }", "public final void interfaceMethodOrFieldRest() throws RecognitionException {\n int interfaceMethodOrFieldRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMethodOrFieldRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(339, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 34) ) { return ; }\n // Java.g:340:5: ( constantDeclaratorsRest ';' | interfaceMethodDeclaratorRest )\n int alt46=2;\n try { dbg.enterDecision(46);\n\n int LA46_0 = input.LA(1);\n\n if ( (LA46_0==48||LA46_0==51) ) {\n alt46=1;\n }\n else if ( (LA46_0==66) ) {\n alt46=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 46, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(46);}\n\n switch (alt46) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:340:9: constantDeclaratorsRest ';'\n {\n dbg.location(340,9);\n pushFollow(FOLLOW_constantDeclaratorsRest_in_interfaceMethodOrFieldRest1303);\n constantDeclaratorsRest();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(340,33);\n match(input,26,FOLLOW_26_in_interfaceMethodOrFieldRest1305); if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:341:9: interfaceMethodDeclaratorRest\n {\n dbg.location(341,9);\n pushFollow(FOLLOW_interfaceMethodDeclaratorRest_in_interfaceMethodOrFieldRest1315);\n interfaceMethodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 34, interfaceMethodOrFieldRest_StartIndex); }\n }\n dbg.location(342, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMethodOrFieldRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n public boolean visit(MethodDeclaration node) {\n methods.add(node);\n return super.visit(node);\n }", "@Override\r\n\tpublic void visit(FunctionDeclaration functionDeclaration) {\n\r\n\t}", "public interface BiGULReplace extends BiGULStatement\n{\n}", "public final JavaliParser.methodHeading_return methodHeading() throws RecognitionException {\n\t\tJavaliParser.methodHeading_return retval = new JavaliParser.methodHeading_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken methSig=null;\n\t\tToken Identifier22=null;\n\t\tToken char_literal23=null;\n\t\tToken char_literal25=null;\n\t\tToken Identifier26=null;\n\t\tToken char_literal27=null;\n\t\tToken char_literal29=null;\n\t\tParserRuleReturnScope type21 =null;\n\t\tParserRuleReturnScope formalParamList24 =null;\n\t\tParserRuleReturnScope formalParamList28 =null;\n\n\t\tObject methSig_tree=null;\n\t\tObject Identifier22_tree=null;\n\t\tObject char_literal23_tree=null;\n\t\tObject char_literal25_tree=null;\n\t\tObject Identifier26_tree=null;\n\t\tObject char_literal27_tree=null;\n\t\tObject char_literal29_tree=null;\n\t\tRewriteRuleTokenStream stream_69=new RewriteRuleTokenStream(adaptor,\"token 69\");\n\t\tRewriteRuleTokenStream stream_70=new RewriteRuleTokenStream(adaptor,\"token 70\");\n\t\tRewriteRuleTokenStream stream_99=new RewriteRuleTokenStream(adaptor,\"token 99\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleSubtreeStream stream_formalParamList=new RewriteRuleSubtreeStream(adaptor,\"rule formalParamList\");\n\t\tRewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,\"rule type\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:287:4: ( type Identifier '(' ( formalParamList )? ')' -> type Identifier ( formalParamList )? |methSig= 'void' Identifier '(' ( formalParamList )? ')' -> Identifier[$methSig, \\\"void\\\"] Identifier ( formalParamList )? )\n\t\t\tint alt10=2;\n\t\t\tint LA10_0 = input.LA(1);\n\t\t\tif ( (LA10_0==Identifier||LA10_0==86||LA10_0==90||LA10_0==92) ) {\n\t\t\t\talt10=1;\n\t\t\t}\n\t\t\telse if ( (LA10_0==99) ) {\n\t\t\t\talt10=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 10, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt10) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:287:6: type Identifier '(' ( formalParamList )? ')'\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_type_in_methodHeading491);\n\t\t\t\t\ttype21=type();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_type.add(type21.getTree());\n\t\t\t\t\tIdentifier22=(Token)match(input,Identifier,FOLLOW_Identifier_in_methodHeading493); \n\t\t\t\t\tstream_Identifier.add(Identifier22);\n\n\t\t\t\t\tchar_literal23=(Token)match(input,69,FOLLOW_69_in_methodHeading495); \n\t\t\t\t\tstream_69.add(char_literal23);\n\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:287:26: ( formalParamList )?\n\t\t\t\t\tint alt8=2;\n\t\t\t\t\tint LA8_0 = input.LA(1);\n\t\t\t\t\tif ( (LA8_0==Identifier||LA8_0==86||LA8_0==90||LA8_0==92) ) {\n\t\t\t\t\t\talt8=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt8) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:287:26: formalParamList\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpushFollow(FOLLOW_formalParamList_in_methodHeading497);\n\t\t\t\t\t\t\tformalParamList24=formalParamList();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_formalParamList.add(formalParamList24.getTree());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tchar_literal25=(Token)match(input,70,FOLLOW_70_in_methodHeading500); \n\t\t\t\t\tstream_70.add(char_literal25);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: formalParamList, Identifier, type\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 288:7: -> type Identifier ( formalParamList )?\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_type.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_Identifier.nextNode());\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:288:26: ( formalParamList )?\n\t\t\t\t\t\tif ( stream_formalParamList.hasNext() ) {\n\t\t\t\t\t\t\tadaptor.addChild(root_0, stream_formalParamList.nextTree());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstream_formalParamList.reset();\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:289:6: methSig= 'void' Identifier '(' ( formalParamList )? ')'\n\t\t\t\t\t{\n\t\t\t\t\tmethSig=(Token)match(input,99,FOLLOW_99_in_methodHeading524); \n\t\t\t\t\tstream_99.add(methSig);\n\n\t\t\t\t\tIdentifier26=(Token)match(input,Identifier,FOLLOW_Identifier_in_methodHeading526); \n\t\t\t\t\tstream_Identifier.add(Identifier26);\n\n\t\t\t\t\tchar_literal27=(Token)match(input,69,FOLLOW_69_in_methodHeading528); \n\t\t\t\t\tstream_69.add(char_literal27);\n\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:289:36: ( formalParamList )?\n\t\t\t\t\tint alt9=2;\n\t\t\t\t\tint LA9_0 = input.LA(1);\n\t\t\t\t\tif ( (LA9_0==Identifier||LA9_0==86||LA9_0==90||LA9_0==92) ) {\n\t\t\t\t\t\talt9=1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt9) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:289:36: formalParamList\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpushFollow(FOLLOW_formalParamList_in_methodHeading530);\n\t\t\t\t\t\t\tformalParamList28=formalParamList();\n\t\t\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\t\t\tstream_formalParamList.add(formalParamList28.getTree());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tchar_literal29=(Token)match(input,70,FOLLOW_70_in_methodHeading533); \n\t\t\t\t\tstream_70.add(char_literal29);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier, formalParamList, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 290:7: -> Identifier[$methSig, \\\"void\\\"] Identifier ( formalParamList )?\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, methSig, \"void\"));\n\t\t\t\t\t\tadaptor.addChild(root_0, stream_Identifier.nextNode());\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:290:50: ( formalParamList )?\n\t\t\t\t\t\tif ( stream_formalParamList.hasNext() ) {\n\t\t\t\t\t\t\tadaptor.addChild(root_0, stream_formalParamList.nextTree());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstream_formalParamList.reset();\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public void andThisIsAMethodName(){}", "public void visit(MethodDecl n) \n\t{\n\t\tClassSymbolTable cst = (ClassSymbolTable) currentScope;\n\t\n\t\tString returnType = getTypeStr(n.t);\n\t\tString name = n.i.toString();\n\t\tString[] paramNames = new String[n.fl.size()+1];\n\t\tString[] paramTypes = new String[n.fl.size()+1];\n\t\t\n\t\t//Add \"this\" parameter of the class type to the first arg\n\t\tparamNames[0] = \"this\";\n\t\tparamTypes[0] = cst.getName();\n\t\t\n\t\tn.t.accept(this);\n\t\tn.i.accept(this);\n \n\t\t//Check for redef in method arguments\n\t\tHashSet<String> methodArgs = new HashSet<String>();\n\t\n\t\tfor ( int i = 0; i < n.fl.size(); i++ ) \n\t\t{\n\t\t\tif(!methodArgs.add(n.fl.elementAt(i).i.toString()))\n\t\t\t{\n\t\t\t\tredefError(n.fl.elementAt(i).i.toString(), n.fl.elementAt(i).i.lineNum, n.fl.elementAt(i).i.charNum);\n\t\t\t}\n\t\t\tparamNames[n.fl.size()-i] = n.fl.elementAt(i).i.toString();\n\t\t\tparamTypes[n.fl.size()-i] = getTypeStr(n.fl.elementAt(i).t);\n\t\t\tn.fl.elementAt(i).accept(this);\n\t\t}\n\t\t\n\t\tcst.addMethod(name, paramNames, paramTypes, returnType);\n\t\tcurrentScope = cst.enterScope(name);\n\t\t\n\t\tfor ( int i = 0; i < n.vl.size(); i++ ) \n\t\t{\n\t\t\tn.vl.elementAt(i).accept(this);\n\t\t}\n\t\t\n\t\tfor ( int i = 0; i < n.sl.size(); i++ ) \n\t\t{\n\t\t\tn.sl.elementAt(i).accept(this);\n\t\t}\n \n\t\tn.e.accept(this);\n\t\t\n\t\tcurrentScope = currentScope.exitScope();\n\t}", "public interface f {\n void a();\n}", "public final void memberDeclaration() throws RecognitionException {\n int memberDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"memberDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(301, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 26) ) { return ; }\n // Java.g:302:5: ( type ( methodDeclaration | fieldDeclaration ) )\n dbg.enterAlt(1);\n\n // Java.g:302:9: type ( methodDeclaration | fieldDeclaration )\n {\n dbg.location(302,9);\n pushFollow(FOLLOW_type_in_memberDeclaration1035);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(302,14);\n // Java.g:302:14: ( methodDeclaration | fieldDeclaration )\n int alt41=2;\n try { dbg.enterSubRule(41);\n try { dbg.enterDecision(41);\n\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==Identifier) ) {\n int LA41_1 = input.LA(2);\n\n if ( (LA41_1==66) ) {\n alt41=1;\n }\n else if ( (LA41_1==26||LA41_1==41||LA41_1==48||LA41_1==51) ) {\n alt41=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(41);}\n\n switch (alt41) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:302:15: methodDeclaration\n {\n dbg.location(302,15);\n pushFollow(FOLLOW_methodDeclaration_in_memberDeclaration1038);\n methodDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:302:35: fieldDeclaration\n {\n dbg.location(302,35);\n pushFollow(FOLLOW_fieldDeclaration_in_memberDeclaration1042);\n fieldDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(41);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 26, memberDeclaration_StartIndex); }\n }\n dbg.location(303, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"memberDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void testTrashInInterfaceDef() throws ParseException {\n SourceFile s = _parseString(\"fdsa public static interface A {\\n\"+\n \"}\");\n assertEquals(\"Number of interfaces\",1,s.getInterfaces().length);\n assertEquals(\"the class name is A\", \"A\", s.getInterfaces()[0].getName().getText());\n assertEquals(\"the class has 2 modifiers\", 2, s.getInterfaces()[0].getMav().getModifiers().length);\n }", "public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "public interface AstWhileStatement extends AstStatement {\r\n\tpublic AstKeyword get_while();\r\n\r\n\tpublic AstPunctuator get_lparanth();\r\n\r\n\tpublic AstExpression get_condition();\r\n\r\n\tpublic AstPunctuator get_rparanth();\r\n\r\n\tpublic AstStatement get_body();\r\n}", "public interface Continue extends ContinueStatement\n{\n}", "public interface C1061nc extends IInterface {\n /* renamed from: a */\n String mo2800a();\n\n /* renamed from: a */\n String mo2801a(String str);\n\n /* renamed from: a */\n void mo2802a(String str, boolean z);\n\n /* renamed from: a */\n boolean mo2803a(boolean z);\n}", "public interface A {\n void f();\n}", "public void visit(MethodDeclarator n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n }", "public void amethod() {\n\t}", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "public void visit(InterfaceMemberDeclaration n) {\n n.f0.accept(this);\n }", "private void memberDecl(Modifier modify, ClassType object, Vector queue)\r\n {\r\n Type dummy = returns;\r\n\r\n if (identAndLPar())\r\n {\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value ;\r\n\r\n modify.check(modify.constructors | modify.methods);\r\n MethodType x = member = new MethodType(modify.cur | Keyword.CONSTRUCTORSY.value);\r\n\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.NONESY;\r\n x.type.ident = object.name;\r\n x.type.version = object.version;\r\n returns = x.type;\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n \r\n if (x.name.string.compareTo(object.name.string) != 0)\r\n error(\"missing type of method\");\r\n \r\n constructorDeclaratorRest(x, object);\r\n member = null;\r\n }\r\n else if (nextSymbol == Keyword.VOIDSY)\r\n {\r\n modify.check(modify.methods | modify.access);\r\n MethodType x = member = new MethodType(modify.cur);\r\n\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n\r\n x.type = new Type();\r\n x.type.type = Keyword.VOIDSY;\r\n returns = x.type;\r\n lookAhead();\r\n if (nextSymbol == Keyword.INVERTSY)\r\n { // allow prefix ~ for destructor method\r\n lookAhead();\r\n nextToken.string = '~' + nextToken.string;\r\n }\r\n x.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n voidMethodDeclaratorRest(modify, x, object);\r\n member = null;\r\n }\r\n else if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n modify.check(modify.classes | modify.access);\r\n classDeclaration(modify, object.scope, \"\");\r\n }\r\n else if (nextSymbol == Keyword.INTERFACESY)\r\n {\r\n modify.check(modify.interfaces | modify.access);\r\n interfaceDeclaration(modify, object.scope, \"\");\r\n }\r\n else\r\n methodOrFieldDeclaration(modify, object, queue);\r\n\r\n returns = dummy;\r\n }", "public IResult<LE> getLabeledEndResult(MethodDeclaration d);", "public interface SimpleInterface {\n void f();\n}", "public void method_1()\n {\n System.out.println(\"Interface method.\");\n }", "public void masterDeclaration();", "public interface EmptyInterface {}", "public interface C0840a {\n /* renamed from: a */\n Object mo12923a(String str, Continuation<? super Unit> continuation);\n}", "public LE getEndResults(MethodDeclaration decl);", "public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {\n int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(368, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; }\n // Java.g:369:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:369:9: formalParameters ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(369,9);\n pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1571);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(369,26);\n // Java.g:369:26: ( 'throws' qualifiedNameList )?\n int alt55=2;\n try { dbg.enterSubRule(55);\n try { dbg.enterDecision(55);\n\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==50) ) {\n alt55=1;\n }\n } finally {dbg.exitDecision(55);}\n\n switch (alt55) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:369:27: 'throws' qualifiedNameList\n {\n dbg.location(369,27);\n match(input,50,FOLLOW_50_in_voidInterfaceMethodDeclaratorRest1574); if (state.failed) return ;\n dbg.location(369,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1576);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(55);}\n\n dbg.location(369,56);\n match(input,26,FOLLOW_26_in_voidInterfaceMethodDeclaratorRest1580); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 39, voidInterfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(370, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private static boolean methodDeclaration_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"methodDeclaration_1_0\")) return false;\n boolean r;\n r = consumeToken(b, EXTERNAL);\n if (!r) r = consumeToken(b, STATIC);\n if (!r) r = consumeToken(b, CONST);\n return r;\n }", "public interface test {\n void test();\n}", "interface C34503a {\n void bMl();\n }", "interface U {\n public void A() ;\n public void B() ;\n public void C() ;\n}", "public interface Handler extends Action, Syntax {\n\n}", "public interface C28392h {\n /* renamed from: a */\n void mo72111a();\n\n /* renamed from: a */\n void mo72112a(float f);\n\n /* renamed from: b */\n void mo72113b();\n\n /* renamed from: c */\n void mo72114c();\n\n /* renamed from: d */\n boolean mo72115d();\n\n void dismiss();\n}", "public static boolean methodDeclaration(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"methodDeclaration\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, METHOD_DECLARATION, \"<method declaration>\");\n r = methodDeclaration_0(b, l + 1);\n r = r && methodDeclaration_1(b, l + 1);\n r = r && methodDeclarationPrivate(b, l + 1);\n p = r; // pin = 3\n r = r && report_error_(b, methodDeclaration_3(b, l + 1));\n r = p && methodDeclaration_4(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParametersPackage_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "public interface Interface {\n void doSomething();\n void somethingElse(String arg);\n}", "private B() {\n void var2_-1;\n void var1_-1;\n }", "interface ccf {\n void a();\n}", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface AdditionalOperations extends Statements {\n}", "public interface d {\n void a();\n}", "interface j {\n void a(int i);\n}", "public boolean isVoid()\r\n/* 146: */ {\r\n/* 147:177 */ return false;\r\n/* 148: */ }", "public interface C0069a {\n void a();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "void method();", "void method();", "public interface AnonymousClass0Y6 {\n void A3h();\n\n void A41();\n}", "@Override\n public Void visit(IVariableDeclaration stmt, Set<String> overallContext) {\n overallContext.add(stmt.getType().getName());\n return null;\n }", "public final JavaliParser.methodDecl_return methodDecl() throws RecognitionException {\n\t\tJavaliParser.methodDecl_return retval = new JavaliParser.methodDecl_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope methSig =null;\n\t\tParserRuleReturnScope methodBody20 =null;\n\n\t\tRewriteRuleSubtreeStream stream_methodBody=new RewriteRuleSubtreeStream(adaptor,\"rule methodBody\");\n\t\tRewriteRuleSubtreeStream stream_methodHeading=new RewriteRuleSubtreeStream(adaptor,\"rule methodHeading\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:282:2: (methSig= methodHeading methodBody -> ^( MethodDecl[$methSig.start, \\\"MethodDecl\\\"] methodHeading methodBody ) )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:282:4: methSig= methodHeading methodBody\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_methodHeading_in_methodDecl460);\n\t\t\tmethSig=methodHeading();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_methodHeading.add(methSig.getTree());\n\t\t\tpushFollow(FOLLOW_methodBody_in_methodDecl462);\n\t\t\tmethodBody20=methodBody();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_methodBody.add(methodBody20.getTree());\n\t\t\t// AST REWRITE\n\t\t\t// elements: methodBody, methodHeading\n\t\t\t// token labels: \n\t\t\t// rule labels: retval\n\t\t\t// token list labels: \n\t\t\t// rule list labels: \n\t\t\t// wildcard labels: \n\t\t\tretval.tree = root_0;\n\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t// 283:3: -> ^( MethodDecl[$methSig.start, \\\"MethodDecl\\\"] methodHeading methodBody )\n\t\t\t{\n\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:283:6: ^( MethodDecl[$methSig.start, \\\"MethodDecl\\\"] methodHeading methodBody )\n\t\t\t\t{\n\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(MethodDecl, (methSig!=null?(methSig.start):null), \"MethodDecl\"), root_1);\n\t\t\t\tadaptor.addChild(root_1, stream_methodHeading.nextTree());\n\t\t\t\tadaptor.addChild(root_1, stream_methodBody.nextTree());\n\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tretval.tree = root_0;\n\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "@Override\n\tpublic void inAMethodDeclaration(AMethodDeclaration node) {\n // Get the method header and toString() it.\n String desc = node.getMethodHeader().toString();\n\n // Get the LBrace line number.\n PMethodBody body = node.getMethodBody();\n if (body instanceof ABlockMethodBody) {\n ABlockMethodBody abody = (ABlockMethodBody) body;\n PBlock block = abody.getBlock();\n if (block instanceof ABlock) {\n ABlock ablock = (ABlock) block;\n int line = ablock.getLBrace().getLine();\n MethodDefinition md = new MethodDefinition(\n desc, getMethodDescShort(desc), line);\n methodLines.add(md);\n }\n // else it's not a real method block.\n }\n // else it's not a real method definition.\n }", "@Override\n\tpublic String visitClassDeclaration(ClassDeclarationContext ctx){\n\t\ttable.enterScope();\t\t\n\t\tvisit(ctx.getChild(4)); //visit methodList. \n\t\ttable.exitScope();\n\t\treturn null;\n\t}", "public interface AnonymousClass0RF {\n}", "public void method(){}", "@Override // com.tapjoy.internal.gt\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final void a(android.app.Activity r6) {\n /*\n // Method dump skipped, instructions count: 106\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tapjoy.internal.fp.a(android.app.Activity):void\");\n }", "public interface AnonymousClass7l {\n void A48();\n\n void A4R(boolean z);\n}" ]
[ "0.6292477", "0.6255203", "0.604128", "0.60360175", "0.6018279", "0.5997857", "0.59426165", "0.5882851", "0.58643514", "0.5849005", "0.5842872", "0.58292204", "0.5764565", "0.56892055", "0.56879693", "0.56365913", "0.5629413", "0.56078064", "0.5586258", "0.55662674", "0.55464756", "0.5534731", "0.5478886", "0.5476898", "0.5459924", "0.5459924", "0.5431711", "0.5430175", "0.54277766", "0.5425403", "0.5421144", "0.5415984", "0.5413651", "0.540868", "0.54086566", "0.5397423", "0.5364298", "0.53632194", "0.53531224", "0.5352084", "0.535101", "0.5344667", "0.53257835", "0.53217274", "0.53043485", "0.5294076", "0.5289378", "0.5274394", "0.52732384", "0.5259255", "0.5257572", "0.5237359", "0.5221221", "0.52146703", "0.5211513", "0.52067965", "0.5206609", "0.5204885", "0.52004135", "0.51985335", "0.51976895", "0.5182402", "0.51779014", "0.51759064", "0.5165651", "0.5161794", "0.51445544", "0.51364636", "0.5135004", "0.51306903", "0.5119236", "0.5119105", "0.51128966", "0.51075494", "0.5101056", "0.5097779", "0.509405", "0.50914186", "0.50826526", "0.50800365", "0.50755304", "0.5066405", "0.50649506", "0.50647724", "0.50576437", "0.5056882", "0.50559634", "0.5054909", "0.50547755", "0.5049434", "0.5049434", "0.50478965", "0.5047083", "0.5037865", "0.50318676", "0.50312155", "0.50302464", "0.50300694", "0.5027142", "0.5017817" ]
0.64322364
0
formalParameters bracketsOpt [ "throws" qualidentList ] ';'
private void interfaceMethodDeclaratorRest(Modifier modify, Type t, Token ident, ClassType object) { modify.check(modify.methods | modify.access); MethodType x = new MethodType(modify.cur); x.name = ident; x.type = t; x.scope = new Scope(object.scope, Scope.automatic, ""); x.parameter = formalParameters(); x.type.dim += bracketsOpt(); object.scope.declInsertOverload(x); if (nextSymbol == Keyword.THROWSSY) { lookAhead(); x.throwing = qualidentList(); } else x.throwing = new String[0]; insertThis(object, x); matchKeyword(Keyword.SEMICOLONSY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void constructorDeclaratorRest() throws RecognitionException {\n int constructorDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(372, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; }\n // Java.g:373:5: ( formalParameters ( 'throws' qualifiedNameList )? constructorBody )\n dbg.enterAlt(1);\n\n // Java.g:373:9: formalParameters ( 'throws' qualifiedNameList )? constructorBody\n {\n dbg.location(373,9);\n pushFollow(FOLLOW_formalParameters_in_constructorDeclaratorRest1603);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(373,26);\n // Java.g:373:26: ( 'throws' qualifiedNameList )?\n int alt56=2;\n try { dbg.enterSubRule(56);\n try { dbg.enterDecision(56);\n\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==50) ) {\n alt56=1;\n }\n } finally {dbg.exitDecision(56);}\n\n switch (alt56) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:373:27: 'throws' qualifiedNameList\n {\n dbg.location(373,27);\n match(input,50,FOLLOW_50_in_constructorDeclaratorRest1606); if (state.failed) return ;\n dbg.location(373,36);\n pushFollow(FOLLOW_qualifiedNameList_in_constructorDeclaratorRest1608);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(56);}\n\n dbg.location(373,56);\n pushFollow(FOLLOW_constructorBody_in_constructorDeclaratorRest1612);\n constructorBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 40, constructorDeclaratorRest_StartIndex); }\n }\n dbg.location(374, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {\n int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(368, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; }\n // Java.g:369:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:369:9: formalParameters ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(369,9);\n pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1571);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(369,26);\n // Java.g:369:26: ( 'throws' qualifiedNameList )?\n int alt55=2;\n try { dbg.enterSubRule(55);\n try { dbg.enterDecision(55);\n\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==50) ) {\n alt55=1;\n }\n } finally {dbg.exitDecision(55);}\n\n switch (alt55) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:369:27: 'throws' qualifiedNameList\n {\n dbg.location(369,27);\n match(input,50,FOLLOW_50_in_voidInterfaceMethodDeclaratorRest1574); if (state.failed) return ;\n dbg.location(369,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1576);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(55);}\n\n dbg.location(369,56);\n match(input,26,FOLLOW_26_in_voidInterfaceMethodDeclaratorRest1580); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 39, voidInterfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(370, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private void voidInterfaceMethodDeclaratorRest(MethodType x)\r\n {\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }", "public final void methodDeclaratorRest() throws RecognitionException {\n int methodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"methodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(344, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return ; }\n // Java.g:345:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:345:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(345,9);\n pushFollow(FOLLOW_formalParameters_in_methodDeclaratorRest1338);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(345,26);\n // Java.g:345:26: ( '[' ']' )*\n try { dbg.enterSubRule(47);\n\n loop47:\n do {\n int alt47=2;\n try { dbg.enterDecision(47);\n\n int LA47_0 = input.LA(1);\n\n if ( (LA47_0==48) ) {\n alt47=1;\n }\n\n\n } finally {dbg.exitDecision(47);}\n\n switch (alt47) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:345:27: '[' ']'\n \t {\n \t dbg.location(345,27);\n \t match(input,48,FOLLOW_48_in_methodDeclaratorRest1341); if (state.failed) return ;\n \t dbg.location(345,31);\n \t match(input,49,FOLLOW_49_in_methodDeclaratorRest1343); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop47;\n }\n } while (true);\n } finally {dbg.exitSubRule(47);}\n\n dbg.location(346,9);\n // Java.g:346:9: ( 'throws' qualifiedNameList )?\n int alt48=2;\n try { dbg.enterSubRule(48);\n try { dbg.enterDecision(48);\n\n int LA48_0 = input.LA(1);\n\n if ( (LA48_0==50) ) {\n alt48=1;\n }\n } finally {dbg.exitDecision(48);}\n\n switch (alt48) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:346:10: 'throws' qualifiedNameList\n {\n dbg.location(346,10);\n match(input,50,FOLLOW_50_in_methodDeclaratorRest1356); if (state.failed) return ;\n dbg.location(346,19);\n pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaratorRest1358);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(48);}\n\n dbg.location(347,9);\n // Java.g:347:9: ( methodBody | ';' )\n int alt49=2;\n try { dbg.enterSubRule(49);\n try { dbg.enterDecision(49);\n\n int LA49_0 = input.LA(1);\n\n if ( (LA49_0==44) ) {\n alt49=1;\n }\n else if ( (LA49_0==26) ) {\n alt49=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 49, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(49);}\n\n switch (alt49) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:347:13: methodBody\n {\n dbg.location(347,13);\n pushFollow(FOLLOW_methodBody_in_methodDeclaratorRest1374);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:348:13: ';'\n {\n dbg.location(348,13);\n match(input,26,FOLLOW_26_in_methodDeclaratorRest1388); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(49);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 35, methodDeclaratorRest_StartIndex); }\n }\n dbg.location(350, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"methodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void voidMethodDeclaratorRest() throws RecognitionException {\n int voidMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(352, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; }\n // Java.g:353:5: ( formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:353:9: formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(353,9);\n pushFollow(FOLLOW_formalParameters_in_voidMethodDeclaratorRest1421);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(353,26);\n // Java.g:353:26: ( 'throws' qualifiedNameList )?\n int alt50=2;\n try { dbg.enterSubRule(50);\n try { dbg.enterDecision(50);\n\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==50) ) {\n alt50=1;\n }\n } finally {dbg.exitDecision(50);}\n\n switch (alt50) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:353:27: 'throws' qualifiedNameList\n {\n dbg.location(353,27);\n match(input,50,FOLLOW_50_in_voidMethodDeclaratorRest1424); if (state.failed) return ;\n dbg.location(353,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidMethodDeclaratorRest1426);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(50);}\n\n dbg.location(354,9);\n // Java.g:354:9: ( methodBody | ';' )\n int alt51=2;\n try { dbg.enterSubRule(51);\n try { dbg.enterDecision(51);\n\n int LA51_0 = input.LA(1);\n\n if ( (LA51_0==44) ) {\n alt51=1;\n }\n else if ( (LA51_0==26) ) {\n alt51=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 51, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(51);}\n\n switch (alt51) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:354:13: methodBody\n {\n dbg.location(354,13);\n pushFollow(FOLLOW_methodBody_in_voidMethodDeclaratorRest1442);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:355:13: ';'\n {\n dbg.location(355,13);\n match(input,26,FOLLOW_26_in_voidMethodDeclaratorRest1456); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(51);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 36, voidMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(357, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void interfaceMethodDeclaratorRest() throws RecognitionException {\n int interfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"interfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(359, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 37) ) { return ; }\n // Java.g:360:5: ( formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:360:9: formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(360,9);\n pushFollow(FOLLOW_formalParameters_in_interfaceMethodDeclaratorRest1489);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(360,26);\n // Java.g:360:26: ( '[' ']' )*\n try { dbg.enterSubRule(52);\n\n loop52:\n do {\n int alt52=2;\n try { dbg.enterDecision(52);\n\n int LA52_0 = input.LA(1);\n\n if ( (LA52_0==48) ) {\n alt52=1;\n }\n\n\n } finally {dbg.exitDecision(52);}\n\n switch (alt52) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:360:27: '[' ']'\n \t {\n \t dbg.location(360,27);\n \t match(input,48,FOLLOW_48_in_interfaceMethodDeclaratorRest1492); if (state.failed) return ;\n \t dbg.location(360,31);\n \t match(input,49,FOLLOW_49_in_interfaceMethodDeclaratorRest1494); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop52;\n }\n } while (true);\n } finally {dbg.exitSubRule(52);}\n\n dbg.location(360,37);\n // Java.g:360:37: ( 'throws' qualifiedNameList )?\n int alt53=2;\n try { dbg.enterSubRule(53);\n try { dbg.enterDecision(53);\n\n int LA53_0 = input.LA(1);\n\n if ( (LA53_0==50) ) {\n alt53=1;\n }\n } finally {dbg.exitDecision(53);}\n\n switch (alt53) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:360:38: 'throws' qualifiedNameList\n {\n dbg.location(360,38);\n match(input,50,FOLLOW_50_in_interfaceMethodDeclaratorRest1499); if (state.failed) return ;\n dbg.location(360,47);\n pushFollow(FOLLOW_qualifiedNameList_in_interfaceMethodDeclaratorRest1501);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(53);}\n\n dbg.location(360,67);\n match(input,26,FOLLOW_26_in_interfaceMethodDeclaratorRest1505); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 37, interfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(361, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"interfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final ANTLRv3Parser.throwsSpec_return throwsSpec() throws RecognitionException {\r\n ANTLRv3Parser.throwsSpec_return retval = new ANTLRv3Parser.throwsSpec_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal58=null;\r\n Token char_literal60=null;\r\n ANTLRv3Parser.id_return id59 =null;\r\n\r\n ANTLRv3Parser.id_return id61 =null;\r\n\r\n\r\n CommonTree string_literal58_tree=null;\r\n CommonTree char_literal60_tree=null;\r\n RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,\"token 72\");\r\n RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,\"token 89\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:4: 'throws' id ( ',' id )*\r\n {\r\n string_literal58=(Token)match(input,89,FOLLOW_89_in_throwsSpec1083); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_89.add(string_literal58);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_throwsSpec1085);\r\n id59=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id59.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:16: ( ',' id )*\r\n loop26:\r\n do {\r\n int alt26=2;\r\n int LA26_0 = input.LA(1);\r\n\r\n if ( (LA26_0==72) ) {\r\n alt26=1;\r\n }\r\n\r\n\r\n switch (alt26) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:18: ',' id\r\n \t {\r\n \t char_literal60=(Token)match(input,72,FOLLOW_72_in_throwsSpec1089); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_72.add(char_literal60);\r\n\r\n\r\n \t pushFollow(FOLLOW_id_in_throwsSpec1091);\r\n \t id61=id();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_id.add(id61.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop26;\r\n }\r\n } while (true);\r\n\r\n\r\n // AST REWRITE\r\n // elements: id, 89\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 180:28: -> ^( 'throws' ( id )+ )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:31: ^( 'throws' ( id )+ )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_89.nextNode()\r\n , root_1);\r\n\r\n if ( !(stream_id.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_id.hasNext() ) {\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n }\r\n stream_id.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "public void setParameters (String[] exps) throws Exception;", "Rule Throws() {\n // Push 1 ThrowsNode onto the value stack\n return Sequence(\n \"throws \",\n \"( \",\n actions.pushInterrupt(),\n ZeroOrMore(Field()),\n \") \",\n actions.pushThrowsNode());\n }", "public static void main(String[] args){\n\t\tThrowsKeyword obj = new ThrowsKeyword();\n\t\tobj.sum();\n\t\tSystem.out.println(\"ABC\");\n\t}", "public void limpiarListaParametro() throws Exception;", "private static void throwExceptionForRequire() {\n LOG.debug(\"Field 'require' must not be empty\");\n throw new ParametersException(\"Field 'require' must not be empty\");\n }", "protected void setFormalParameters(List params) {\n this._formalParameters = params;\n }", "public void a(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4)\r\n/* 569: */ {\r\n/* 570:573 */ e();\r\n/* 571:574 */ this.q = paramInt4;\r\n/* 572:575 */ paramString = d(paramString);\r\n/* 573: */ \r\n/* 574:577 */ a(paramString, paramInt1, paramInt2, paramInt3, false);\r\n/* 575: */ }", "void compileParameterList() {\n tagBracketPrinter(PAR_LIST_TAG, OPEN_TAG_BRACKET);\n try {\n compileParameterListHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(PAR_LIST_TAG, CLOSE_TAG_BRACKET);\n }", "ParameterList getParameters();", "private void catchClause(String label, Scope scope, Vector queue)\r\n {\r\n matchKeyword(Keyword.CATCHSY);\r\n matchKeyword(Keyword.LPARSY);\r\n\r\n Parameter parameter = formalParameter();\r\n\r\n Operation root = new Operation();\r\n root.code = \"DUP \\\" \" + parameter.type.ident.string.substring(parameter.type.ident.string.lastIndexOf('.') + 1) + \" \\\" INSTANCEOF\\n IF\\n\";\r\n queue.add(root);\r\n\r\n matchKeyword(Keyword.RPARSY);\r\n\r\n VariableType a = new VariableType(parameter.type, 0);\r\n a.name = parameter.name;\r\n\r\n Vector v = new Vector();\r\n v.add(\"\" + Operation.newLabel());\r\n block(null, a, scope, v, Scope.CATCH, null, queue);\r\n\r\n root = new Operation();\r\n root.code = \"DUP \" + label + \" BRANCH\\nENDIF\\n\";\r\n queue.add(root);\r\n }", "@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}", "public void mo1944a() throws cf {\r\n }", "public ahr(aqu paramaqu)\r\n/* 20: */ {\r\n/* 21: 34 */ super(paramaqu);\r\n/* 22: 35 */ a(0.25F, 0.25F);\r\n/* 23: */ }", "private static String formalParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(getTypeName(pts[i])).append(\" p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }", "public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }", "private boolean skipMethodParameters() {\r\n \t\tint ch = readCharBackward(); \r\n \t\tif (ch != ')')\r\n \t\t\treturn false;\r\n \t\tint pCount = 1;\r\n \t\twhile (pCount > 0) {\r\n \t\t\tch = readCharBackward();\r\n \t\t\tif (ch == -1)\r\n \t\t\t\treturn false;\r\n \t\t\t\r\n \t\t\tif (ch == '\"' || ch == '\\'') {\r\n \t\t\t\tskipQuotedChars((char)ch);\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tif (ch == ')') {\r\n \t\t\t\tpCount++;\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t\tif (ch == '(') {\r\n \t\t\t\tpCount--;\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "public abstract List<? extends Pair<Type.Clazz,String>> exceptions();", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "public interface IFormalParameter {\r\n\t/*\r\n\t * Fills in the given actual parameters in the formal parameters and declare\r\n\t * them in the given context\r\n\t */\r\n\tpublic void fillIn(Context context, Iterator<IReferable> _actualParams);\r\n\r\n}", "public int getParameter3() {\n/* 59 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}", "void mo28890b(int i) throws zzlm;", "public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, List<BlockPosition> paramList)\r\n/* 26: */ {\r\n/* 27: 44 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, false, true, paramList);\r\n/* 28: */ }", "@AfterThrowing(pointcut=\"args(name)\", throwing=\"ex\")\n\tpublic void allMethodStringArg(String name,Exception ex){\n\t\tSystem.out.println(\"A method with String arguments has called =\"+name);\n\t\tSystem.out.println(\"Exception was =\"+ex);\n\t}", "void mo28889a(int i, String str) throws zzlm;", "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}", "@Override\n\tpublic void notationDecl(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\n\t}", "protected void parseExceptions(MethodDeclaration argMethodDeclaration,\r\n\t\t\tIClassCodeGenConfig argDaoConfig, MethodConfig argMethodConfig,\r\n\t\t\tMap<String, String> argCommentsMap, String argDoClassName) {\r\n\r\n\t\t// add exception configuration into the method\r\n\t\t// configuration.\r\n\t\tList<NameExpr> throwsExc = argMethodDeclaration.getThrows();\r\n\t\tif (throwsExc != null) {\r\n\t\t\tfor (NameExpr throwExpr : argMethodDeclaration.getThrows()) {\r\n\t\t\t\tThrowExceptionConfig exceptionConifg = new ThrowExceptionConfig();\r\n\t\t\t\tString exceptionName = throwExpr.getName();\r\n\t\t\t\texceptionConifg.setClassName(getClassNameFromImports(\r\n\t\t\t\t\t\targDaoConfig, exceptionName));\r\n\r\n\t\t\t\t// set exception configuration's\r\n\t\t\t\t// comment.\r\n\t\t\t\tCommentConfig exceptinComment = new CommentConfig();\r\n\t\t\t\texceptinComment.setValue(argCommentsMap.get(exceptionName));\r\n\r\n\t\t\t\texceptionConifg.setConfigObject(CommentConfig.MAIN_TAG,\r\n\t\t\t\t\t\texceptinComment);\r\n\t\t\t\targMethodConfig.setConfigObject(ThrowExceptionConfig.MAIN_TAG,\r\n\t\t\t\t\t\texceptionConifg);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Snippet visit(FormalParameterList n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null,false);\n\t Snippet f0 = n.finalFormalParameter.accept(this, argu);\n\t fieldsCode = \"\";\n\t Snippet f1 = n.nodeListOptional.accept(this, argu);\n\t \n\t\t\t\n\t\t\t\t_ret.returnTemp = f0.returnTemp+fieldsCode;\t\n\t\t\t\tfieldsCode = \"\";\n\t\t\t\n\t return _ret;\n\t }", "public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }", "public void mo1964g() throws cf {\r\n }", "public ULocale(String a, String b, String c) {\n/* 125 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@NotNull\n String getSyntax();", "public interface RoutineException {}", "public FunctionDeclaration(String name, int nameStart, int nameEnd,\n\t int start, int end) {\n\tsuper(name, nameStart, nameEnd, start, end);\n }", "public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, boolean paramBoolean1, boolean paramBoolean2, List<BlockPosition> paramList)\r\n/* 31: */ {\r\n/* 32: 48 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, paramBoolean1, paramBoolean2);\r\n/* 33: 49 */ this.j.addAll(paramList);\r\n/* 34: */ }", "public void checkParameters() {\n }", "public Latent(String internalName,\n TypeDescription declaringType,\n TypeDescription returnType,\n List<? extends TypeDescription> parameterTypes,\n int modifiers,\n List<? extends TypeDescription> exceptionTypes) {\n this.internalName = internalName;\n this.declaringType = declaringType;\n this.returnType = returnType;\n this.parameterTypes = parameterTypes;\n this.modifiers = modifiers;\n this.exceptionTypes = exceptionTypes;\n }", "public int a(String paramString, float paramFloat1, float paramFloat2, int paramInt)\r\n/* 234: */ {\r\n/* 235:243 */ return a(paramString, paramFloat1, paramFloat2, paramInt, true);\r\n/* 236: */ }", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "private static boolean default_formal_parameter_recover_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"default_formal_parameter_recover_0\")) return false;\n boolean r;\n r = consumeToken(b, RPAREN);\n if (!r) r = consumeToken(b, COMMA);\n if (!r) r = consumeToken(b, RBRACKET);\n if (!r) r = consumeToken(b, RBRACE);\n return r;\n }", "public ctq(File paramFile, String paramString, oa paramoa, ckh paramckh)\r\n/* 22: */ {\r\n/* 23: 33 */ super(paramoa);\r\n/* 24: 34 */ this.i = paramFile;\r\n/* 25: 35 */ this.j = paramString;\r\n/* 26: 36 */ this.k = paramckh;\r\n/* 27: */ }", "public SyntaxException(String errorMessage) {\n\t\tsuper(errorMessage);\n\t}", "@Override public String toString(){\n return \"Logic Parameter Exception\";\n }", "public String visit(FormalParameterList n, LLVMRedux argu) throws Exception {\n String _ret=null;\n u.print(\", \");\n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n return _ret;\n }", "public AmbiguousMethodException() {\n super();\n }", "public SyntaxException() {\n\t\tsuper();\n\t}", "public interface qy extends rh {\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n int a(@NonNull ra raVar, boolean z);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(float f, int i, int i2);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(@NonNull qz qzVar, int i, int i2);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(@NonNull ra raVar, int i, int i2);\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void a(boolean z, float f, int i, int i2, int i3);\n\n boolean a();\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void b(@NonNull ra raVar, int i, int i2);\n\n @NonNull\n SpinnerStyle getSpinnerStyle();\n\n @NonNull\n View getView();\n\n @RestrictTo({Scope.LIBRARY, Scope.LIBRARY_GROUP, Scope.SUBCLASSES})\n void setPrimaryColors(@ColorInt int... iArr);\n}", "public void addExceptionStyle();", "public interface Params {\n }", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "public interface CustomConstruct extends AgnosticStatement, QueryCondition {\n}", "public RoutineAliasInfo(String methodName,\r\n int parameterCount,\r\n String[] parameterNames,\r\n DataTypeDescriptor[] parameterTypes,\r\n int[] parameterModes,\r\n int dynamicResultSets,\r\n String language,\r\n String parameterStyle,\r\n SQLAllowed sqlAllowed,\r\n boolean deterministic,\r\n boolean definersRights,\r\n boolean calledOnNullInput,\r\n DataTypeDescriptor returnType) {\r\n\r\n super(methodName);\r\n this.parameterCount = parameterCount;\r\n this.parameterNames = parameterNames;\r\n this.parameterTypes = parameterTypes;\r\n this.parameterModes = parameterModes;\r\n this.dynamicResultSets = dynamicResultSets;\r\n this.language = language;\r\n this.parameterStyle = parameterStyle;\r\n this.sqlAllowed = sqlAllowed;\r\n this.deterministic = deterministic;\r\n this.definersRights = definersRights;\r\n this.calledOnNullInput = calledOnNullInput;\r\n this.returnType = returnType;\r\n }", "private void writeExceptions(Method m) {\n Class<?>[] exceptions = m.getExceptionTypes();\n int size = exceptions.length;\n if (exceptions.length == 0)\n return;\n writer.print(\"throws \");\n for (int i = 0; i < size; i++) {\n writer.print(exceptions[i].getCanonicalName());\n if (i != size - 1)\n writer.print(\", \");\n }\n writer.print(\" \");\n }", "@Override\n\tpublic Void visit(Formal formal) {\n\t\tprintIndent(\"formal\");\n\t\tindent++;\n\t\tformal.name.accept(this);\n\t\tformal.type.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public int getParameter2() {\n/* 53 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected void a(int paramInt1, int paramInt2, boolean paramBoolean, yz paramyz) {}", "public abstract V a(String str) throws gh;", "public void a(Item paramalq, CreativeTabs paramakf, List paramList)\r\n/* 22: */ {\r\n/* 23:27 */ paramList.add(new ItemStack(paramalq, 1, 0));\r\n/* 24:28 */ paramList.add(new ItemStack(paramalq, 1, 1));\r\n/* 25: */ }", "protected void missingParams() {\r\n throw new IllegalStateException(\r\n \"Function is missing parameters: \" + getName());\r\n }", "public void InvalidFormat();", "public void a(World paramaqu, BlockPosition paramdt, Block parambec, BlockType paramatr)\r\n/* 99: */ {\r\n/* 100:125 */ if (!paramaqu.isClient) {\r\n/* 101:126 */ paramaqu.s(paramdt);\r\n/* 102: */ }\r\n/* 103: */ }", "public static void main(String[] args) {\n\t\tTryMethodParam tm1 = new TryMethodParam(10);\r\n\t\ttm1.try1(tm1);\r\n\t\tSystem.out.println(tm1.par); //10\r\n\t\ttm1.try2(tm1);\r\n\t\tSystem.out.println(tm1.par); //12345\r\n\t\tString s = \"tryyy\";\r\n\t\tStringParam.giveString(s);\r\n\t\tSystem.out.println(s);\r\n\t\tStringParam.addString(s);\r\n\t\tSystem.out.println(s);\r\n\r\n\t}", "ActionParameterTypes getFormalParameterTypes();", "public AmbiguousMethodException(String s) {\n super(s);\n }", "@Test\r\n\tpublic void testListArg() {\r\n\t\tAssert.assertEquals(\"test[(`a,`b,`c)]\", new FunctionImpl.FunctionBuilderImpl(\"test\").param(SymbolValue.froms(\"a\", \"b\", \"c\")).build().toQ());\r\n\t}", "public void testValidateArgs() {\n\t\tString[] args = new String[]{\"name\",\"bob\",\"jones\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 1 argument, should fail\n\t\targs = new String[]{\"name\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with 0 arguments, should be a problem\n\t\targs = new String[]{};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with null arguments, should be a problem\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t\tfail(\"An InvalidFunctionArguements exception should have been thrown by the constructor!\");\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tassertTrue(ifa.getMessage().contains(\"HasAttributeWithValueContains takes exactly 2 arguments.\"));\n\t\t}\n\t\t\n\t\t//test with correct arguments, first one is zero, should work\n\t\targs = new String[]{\"name\",\"bob\"};\n\t\ttry {\n\t\t\tnew HasAttributeWithValueContains(args);\n\t\t} catch (InvalidFunctionArguments ifa) {\n\t\t\tfail(\"An InvalidFunctionArguements exception should have NOT been thrown by the constructor!\");\n\t\t}\n\t}", "@Override\n\tpublic void implementionEight(String[] args) throws Exception {\n\n\t}", "protected void parametersInstantiation_EM() {\n }", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "GenotypeTest(int no, int no_copies)\n/* */ throws Exception\n/* */ {}", "public void a(cvk paramcvk)\r\n/* 76: */ {\r\n/* 77: 95 */ c();\r\n/* 78: */ }", "public void testCreateMethodWithModifiersAndExceptions() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setFlags(ClassFileConstants.AccPrivate);\n method.setExceptions(new String[] { \"java.lang.IllegalArgumentException\", \"java.io.FileNotFoundExcpetion\" });\n assertSourceEquals(\"source code incorrect\", \"private void foo() throws java.lang.IllegalArgumentException, java.io.FileNotFoundExcpetion {\\n\" + \"}\\n\", method.getContents());\n }", "public void c(ahd paramahd) {}", "public void init(int access, String[] signature, String[] exceptionNames, ConstantPool constantPool) {\n\t\tthis.access = access;\n\t\tthis.exceptionNames = exceptionNames;\n\t\tthis.signature = signature;\n\t\tif (!isUnknown() && supportsCodeItem()) {\n\t\t\tcodeItem = new CodeItem(this, constantPool);\n\t\t}\n\t\t\n\t\tannotatedParameterSetRefList = new AnnotationSetRefList(prototype.getNbParameters(), this);\n\t}", "void setExampleParameters(String strExampleParams);", "public interface NonScalable extends Parameter\n{\n}", "public String visit(FormalParameterList n, String ourclass) {\n n.f0.accept(this, ourclass);\n n.f1.accept(this, ourclass);\n return null; \n }", "protected void checkThrows(DetailAST aAST, String aException)\n {\n final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);\n if (objBlock != null) {\n DetailAST child = (DetailAST) objBlock.getFirstChild();\n while (child != null) {\n if (child.getType() == TokenTypes.METHOD_DEF) {\n if (!Utils.hasThrows(child, aException)) {\n final DetailAST nameAST =\n child.findFirstToken(TokenTypes.IDENT);\n final String name = nameAST.getText();\n log(nameAST.getLineNo(), nameAST.getColumnNo(),\n \"missingthrows.bean\",\n new Object[] {name, aException});\n }\n }\n child = (DetailAST) child.getNextSibling();\n }\n }\n }", "public interface a {\n void a(int i, List<String> list, boolean z, long j, String str, String str2, String str3);\n }", "public static void main(String[] ignore)\r\n/* 129: */ {\r\n/* 130:124 */ Mark.say(\r\n/* 131:125 */ new Object[] { conditionName(\"Tragedy_of_Macbeth's\") });\r\n/* 132: */ }", "static String eatParameterSignature (String s, int pos[]) {\r\n int first = pos[0];\r\n if (s.charAt(first)=='V') {\r\n pos[0]++;\r\n int n = eatNumber (s, pos);\r\n pos[0]++; // eat ';'\r\n return \"V\"+n+\";\";\r\n }\r\n int n = eatNumber (s, pos);\r\n if (n==0) return null;\r\n int last = first;\r\n for (int i=0; i<n; i++) {\r\n last = s.indexOf (';', last) + 1;\r\n }\r\n pos[0] = last;\r\n return s.substring (first, last);\r\n }", "static boolean optionalPositionalParameterTypes(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"optionalPositionalParameterTypes\")) return false;\n if (!nextTokenIs(b, LBRACKET)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, LBRACKET);\n r = r && normalParameterTypes(b, l + 1);\n r = r && optionalPositionalParameterTypes_2(b, l + 1);\n r = r && consumeToken(b, RBRACKET);\n exit_section_(b, m, null, r);\n return r;\n }", "public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }", "@Test\n public void test21() throws Throwable {\n // Undeclared exception!\n try { \n UnivariateRealSolverUtils.bracket((UnivariateRealFunction) null, 0.0, (-739.1424394318773), 0.0, 1267);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // function is null\n //\n assertThrownBy(\"org.apache.commons.math.MathRuntimeException\", e);\n }\n }", "public int getParameter1() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public AnimationParameters() {\n/* 279 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private FunctionParametersValidator() {}", "public interface IToken\n{\n /**\n * METHOD: Place the token at the given position within the aquarium\n *\n * @param coords the new position (x,y,z) of the token as an array of three Doubles. The element values must be 0.0 &lt value &lt 10.0.\n */\n public void position(Double ...coords) throws ArgumentOutOfBoundsException;\n \n /**\n * METHOD: Place the token at the given orientation within the aquarium\n *\n * @param coords the new orientation (x,y,z) of the token as an array of three Doubles\n */\n public void orientation(Double ...coords);\n}", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "public ParameterNotFoundException( String s )\n\t{\n\t\tsuper( s );\n\t}", "@Override\n public String visit(ThrowStmt n, Object arg) {\n return null;\n }", "private void a(java.lang.String r11, java.lang.String r12, boolean r13, boolean r14, com.google.ae r15) {\n /*\n r10 = this;\n r9 = 48;\n r8 = 2;\n r6 = F;\n if (r11 != 0) goto L_0x0017;\n L_0x0007:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0015 }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x0015 }\n r2 = J;\t Catch:{ ao -> 0x0015 }\n r3 = 47;\n r2 = r2[r3];\t Catch:{ ao -> 0x0015 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0015 }\n throw r0;\t Catch:{ ao -> 0x0015 }\n L_0x0015:\n r0 = move-exception;\n throw r0;\n L_0x0017:\n r0 = r11.length();\t Catch:{ ao -> 0x002d }\n r1 = 250; // 0xfa float:3.5E-43 double:1.235E-321;\n if (r0 <= r1) goto L_0x002f;\n L_0x001f:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x002d }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x002d }\n r2 = J;\t Catch:{ ao -> 0x002d }\n r3 = 41;\n r2 = r2[r3];\t Catch:{ ao -> 0x002d }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x002d }\n throw r0;\t Catch:{ ao -> 0x002d }\n L_0x002d:\n r0 = move-exception;\n throw r0;\n L_0x002f:\n r7 = new java.lang.StringBuilder;\n r7.<init>();\n r10.a(r11, r7);\t Catch:{ ao -> 0x004f }\n r0 = r7.toString();\t Catch:{ ao -> 0x004f }\n r0 = b(r0);\t Catch:{ ao -> 0x004f }\n if (r0 != 0) goto L_0x0051;\n L_0x0041:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x004f }\n r1 = com.google.dk.NOT_A_NUMBER;\t Catch:{ ao -> 0x004f }\n r2 = J;\t Catch:{ ao -> 0x004f }\n r3 = 48;\n r2 = r2[r3];\t Catch:{ ao -> 0x004f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x004f }\n throw r0;\t Catch:{ ao -> 0x004f }\n L_0x004f:\n r0 = move-exception;\n throw r0;\n L_0x0051:\n if (r14 == 0) goto L_0x006f;\n L_0x0053:\n r0 = r7.toString();\t Catch:{ ao -> 0x006d }\n r0 = r10.a(r0, r12);\t Catch:{ ao -> 0x006d }\n if (r0 != 0) goto L_0x006f;\n L_0x005d:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x006b }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x006b }\n r2 = J;\t Catch:{ ao -> 0x006b }\n r3 = 46;\n r2 = r2[r3];\t Catch:{ ao -> 0x006b }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x006b }\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006b:\n r0 = move-exception;\n throw r0;\n L_0x006d:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x006b }\n L_0x006f:\n if (r13 == 0) goto L_0x0074;\n L_0x0071:\n r15.b(r11);\t Catch:{ ao -> 0x00d3 }\n L_0x0074:\n r0 = r10.b(r7);\n r1 = r0.length();\t Catch:{ ao -> 0x00d5 }\n if (r1 <= 0) goto L_0x0081;\n L_0x007e:\n r15.a(r0);\t Catch:{ ao -> 0x00d5 }\n L_0x0081:\n r2 = r10.e(r12);\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r1 = r7.toString();\t Catch:{ ao -> 0x00d7 }\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\t Catch:{ ao -> 0x00d7 }\n L_0x0095:\n if (r0 == 0) goto L_0x0182;\n L_0x0097:\n r1 = r10.b(r0);\n r4 = r1.equals(r12);\n if (r4 != 0) goto L_0x017f;\n L_0x00a1:\n r0 = r10.a(r0, r1);\n L_0x00a5:\n if (r6 == 0) goto L_0x00bd;\n L_0x00a7:\n a(r7);\t Catch:{ ao -> 0x0121 }\n r3.append(r7);\t Catch:{ ao -> 0x0121 }\n if (r12 == 0) goto L_0x00b8;\n L_0x00af:\n r1 = r0.L();\n r15.a(r1);\t Catch:{ ao -> 0x0123 }\n if (r6 == 0) goto L_0x00bd;\n L_0x00b8:\n if (r13 == 0) goto L_0x00bd;\n L_0x00ba:\n r15.l();\t Catch:{ ao -> 0x0125 }\n L_0x00bd:\n r1 = r3.length();\t Catch:{ ao -> 0x00d1 }\n if (r1 >= r8) goto L_0x0127;\n L_0x00c3:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x00d1 }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x00d1 }\n r2 = J;\t Catch:{ ao -> 0x00d1 }\n r3 = 44;\n r2 = r2[r3];\t Catch:{ ao -> 0x00d1 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x00d1 }\n throw r0;\t Catch:{ ao -> 0x00d1 }\n L_0x00d1:\n r0 = move-exception;\n throw r0;\n L_0x00d3:\n r0 = move-exception;\n throw r0;\n L_0x00d5:\n r0 = move-exception;\n throw r0;\n L_0x00d7:\n r0 = move-exception;\n r1 = g;\n r4 = r7.toString();\n r1 = r1.matcher(r4);\n r4 = r0.a();\t Catch:{ ao -> 0x0111 }\n r5 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x0111 }\n if (r4 != r5) goto L_0x0113;\n L_0x00ea:\n r4 = r1.lookingAt();\t Catch:{ ao -> 0x0111 }\n if (r4 == 0) goto L_0x0113;\n L_0x00f0:\n r0 = r1.end();\n r1 = r7.substring(r0);\n r0 = r10;\n r4 = r13;\n r5 = r15;\n r0 = r0.a(r1, r2, r3, r4, r5);\n if (r0 != 0) goto L_0x0095;\n L_0x0101:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x010f }\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\t Catch:{ ao -> 0x010f }\n r2 = J;\t Catch:{ ao -> 0x010f }\n r3 = 43;\n r2 = r2[r3];\t Catch:{ ao -> 0x010f }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x010f }\n throw r0;\t Catch:{ ao -> 0x010f }\n L_0x010f:\n r0 = move-exception;\n throw r0;\n L_0x0111:\n r0 = move-exception;\n throw r0;\n L_0x0113:\n r1 = new com.google.ao;\n r2 = r0.a();\n r0 = r0.getMessage();\n r1.<init>(r2, r0);\n throw r1;\n L_0x0121:\n r0 = move-exception;\n throw r0;\n L_0x0123:\n r0 = move-exception;\n throw r0;\t Catch:{ ao -> 0x0125 }\n L_0x0125:\n r0 = move-exception;\n throw r0;\n L_0x0127:\n if (r0 == 0) goto L_0x013a;\n L_0x0129:\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r10.a(r3, r0, r1);\t Catch:{ ao -> 0x0150 }\n if (r13 == 0) goto L_0x013a;\n L_0x0133:\n r0 = r1.toString();\t Catch:{ ao -> 0x0150 }\n r15.c(r0);\t Catch:{ ao -> 0x0150 }\n L_0x013a:\n r0 = r3.length();\n if (r0 >= r8) goto L_0x0152;\n L_0x0140:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x014e }\n r1 = com.google.dk.TOO_SHORT_NSN;\t Catch:{ ao -> 0x014e }\n r2 = J;\t Catch:{ ao -> 0x014e }\n r3 = 42;\n r2 = r2[r3];\t Catch:{ ao -> 0x014e }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x014e }\n throw r0;\t Catch:{ ao -> 0x014e }\n L_0x014e:\n r0 = move-exception;\n throw r0;\n L_0x0150:\n r0 = move-exception;\n throw r0;\n L_0x0152:\n r1 = 16;\n if (r0 <= r1) goto L_0x0166;\n L_0x0156:\n r0 = new com.google.ao;\t Catch:{ ao -> 0x0164 }\n r1 = com.google.dk.TOO_LONG;\t Catch:{ ao -> 0x0164 }\n r2 = J;\t Catch:{ ao -> 0x0164 }\n r3 = 45;\n r2 = r2[r3];\t Catch:{ ao -> 0x0164 }\n r0.<init>(r1, r2);\t Catch:{ ao -> 0x0164 }\n throw r0;\t Catch:{ ao -> 0x0164 }\n L_0x0164:\n r0 = move-exception;\n throw r0;\n L_0x0166:\n r0 = 0;\n r0 = r3.charAt(r0);\t Catch:{ ao -> 0x017d }\n if (r0 != r9) goto L_0x0171;\n L_0x016d:\n r0 = 1;\n r15.a(r0);\t Catch:{ ao -> 0x017d }\n L_0x0171:\n r0 = r3.toString();\n r0 = java.lang.Long.parseLong(r0);\n r15.a(r0);\n return;\n L_0x017d:\n r0 = move-exception;\n throw r0;\n L_0x017f:\n r0 = r2;\n goto L_0x00a5;\n L_0x0182:\n r0 = r2;\n goto L_0x00a7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.lang.String, boolean, boolean, com.google.ae):void\");\n }" ]
[ "0.56731623", "0.5657288", "0.55284274", "0.5419108", "0.539637", "0.5359709", "0.5132225", "0.51083505", "0.5012298", "0.49388194", "0.4934133", "0.492999", "0.49245542", "0.49208656", "0.48668775", "0.4834796", "0.48188698", "0.48131976", "0.47991717", "0.47882873", "0.4776642", "0.4775011", "0.47533718", "0.47404987", "0.47284156", "0.47134522", "0.46992135", "0.4694512", "0.46812317", "0.46763086", "0.46753395", "0.4658244", "0.4654771", "0.46521336", "0.46485323", "0.46431035", "0.4637658", "0.46324494", "0.46299312", "0.46045235", "0.45968473", "0.4577649", "0.45769694", "0.45676818", "0.456477", "0.45638376", "0.45591322", "0.45525935", "0.455206", "0.45453778", "0.45384467", "0.45366153", "0.45324612", "0.45315295", "0.45272186", "0.45260775", "0.45217457", "0.45208555", "0.45202976", "0.4519209", "0.45096585", "0.45095536", "0.45043775", "0.4496968", "0.44935662", "0.4491044", "0.44885466", "0.447463", "0.44684795", "0.44618464", "0.44562948", "0.44412374", "0.44408193", "0.4440194", "0.4439229", "0.4433779", "0.44333506", "0.44311386", "0.44306332", "0.44221544", "0.442158", "0.44207463", "0.4415427", "0.44116125", "0.44106063", "0.44100893", "0.44100565", "0.4409646", "0.44096395", "0.44040537", "0.4400752", "0.43966818", "0.4395048", "0.4393321", "0.43930256", "0.43903217", "0.4390241", "0.43854684", "0.4385276", "0.43840566", "0.4383158" ]
0.0
-1
[ "throws" qualidentList ] ';'
private void voidInterfaceMethodDeclaratorRest(MethodType x) { x.parameter = formalParameters(); if (nextSymbol == Keyword.THROWSSY) { lookAhead(); x.throwing = qualidentList(); } else x.throwing = new String[0]; matchKeyword(Keyword.SEMICOLONSY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo1944a() throws cf {\r\n }", "Rule Throws() {\n // Push 1 ThrowsNode onto the value stack\n return Sequence(\n \"throws \",\n \"( \",\n actions.pushInterrupt(),\n ZeroOrMore(Field()),\n \") \",\n actions.pushThrowsNode());\n }", "public void mo1964g() throws cf {\r\n }", "void m5771e() throws C0841b;", "public final ANTLRv3Parser.throwsSpec_return throwsSpec() throws RecognitionException {\r\n ANTLRv3Parser.throwsSpec_return retval = new ANTLRv3Parser.throwsSpec_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token string_literal58=null;\r\n Token char_literal60=null;\r\n ANTLRv3Parser.id_return id59 =null;\r\n\r\n ANTLRv3Parser.id_return id61 =null;\r\n\r\n\r\n CommonTree string_literal58_tree=null;\r\n CommonTree char_literal60_tree=null;\r\n RewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,\"token 72\");\r\n RewriteRuleTokenStream stream_89=new RewriteRuleTokenStream(adaptor,\"token 89\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:2: ( 'throws' id ( ',' id )* -> ^( 'throws' ( id )+ ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:4: 'throws' id ( ',' id )*\r\n {\r\n string_literal58=(Token)match(input,89,FOLLOW_89_in_throwsSpec1083); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_89.add(string_literal58);\r\n\r\n\r\n pushFollow(FOLLOW_id_in_throwsSpec1085);\r\n id59=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id59.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:16: ( ',' id )*\r\n loop26:\r\n do {\r\n int alt26=2;\r\n int LA26_0 = input.LA(1);\r\n\r\n if ( (LA26_0==72) ) {\r\n alt26=1;\r\n }\r\n\r\n\r\n switch (alt26) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:18: ',' id\r\n \t {\r\n \t char_literal60=(Token)match(input,72,FOLLOW_72_in_throwsSpec1089); if (state.failed) return retval; \r\n \t if ( state.backtracking==0 ) stream_72.add(char_literal60);\r\n\r\n\r\n \t pushFollow(FOLLOW_id_in_throwsSpec1091);\r\n \t id61=id();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_id.add(id61.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop26;\r\n }\r\n } while (true);\r\n\r\n\r\n // AST REWRITE\r\n // elements: id, 89\r\n // token labels: \r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 180:28: -> ^( 'throws' ( id )+ )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:180:31: ^( 'throws' ( id )+ )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_89.nextNode()\r\n , root_1);\r\n\r\n if ( !(stream_id.hasNext()) ) {\r\n throw new RewriteEarlyExitException();\r\n }\r\n while ( stream_id.hasNext() ) {\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n }\r\n stream_id.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public abstract List<? extends Pair<Type.Clazz,String>> exceptions();", "void m5770d() throws C0841b;", "public void m9741j() throws cf {\r\n }", "void m5769c() throws C0841b;", "public void mo1976s() throws cf {\r\n }", "public void mo1963f() throws cf {\r\n }", "public void mo1966i() throws cf {\r\n }", "@Override\n public String visit(ThrowStmt n, Object arg) {\n return null;\n }", "public void mo1962e() throws cf {\r\n }", "private void writeExceptions(Method m) {\n Class<?>[] exceptions = m.getExceptionTypes();\n int size = exceptions.length;\n if (exceptions.length == 0)\n return;\n writer.print(\"throws \");\n for (int i = 0; i < size; i++) {\n writer.print(exceptions[i].getCanonicalName());\n if (i != size - 1)\n writer.print(\", \");\n }\n writer.print(\" \");\n }", "public void mo1974q() throws cf {\r\n }", "public void mo1960c() throws cf {\r\n }", "public void visit(BinThrowStatement x){\n }", "public void mo1972o() throws cf {\r\n }", "List<Type> getThrows();", "public final void constructorDeclaratorRest() throws RecognitionException {\n int constructorDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(372, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; }\n // Java.g:373:5: ( formalParameters ( 'throws' qualifiedNameList )? constructorBody )\n dbg.enterAlt(1);\n\n // Java.g:373:9: formalParameters ( 'throws' qualifiedNameList )? constructorBody\n {\n dbg.location(373,9);\n pushFollow(FOLLOW_formalParameters_in_constructorDeclaratorRest1603);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(373,26);\n // Java.g:373:26: ( 'throws' qualifiedNameList )?\n int alt56=2;\n try { dbg.enterSubRule(56);\n try { dbg.enterDecision(56);\n\n int LA56_0 = input.LA(1);\n\n if ( (LA56_0==50) ) {\n alt56=1;\n }\n } finally {dbg.exitDecision(56);}\n\n switch (alt56) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:373:27: 'throws' qualifiedNameList\n {\n dbg.location(373,27);\n match(input,50,FOLLOW_50_in_constructorDeclaratorRest1606); if (state.failed) return ;\n dbg.location(373,36);\n pushFollow(FOLLOW_qualifiedNameList_in_constructorDeclaratorRest1608);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(56);}\n\n dbg.location(373,56);\n pushFollow(FOLLOW_constructorBody_in_constructorDeclaratorRest1612);\n constructorBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 40, constructorDeclaratorRest_StartIndex); }\n }\n dbg.location(374, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"constructorDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "void m5768b() throws C0841b;", "public static void main(String[] args){\n\t\tThrowsKeyword obj = new ThrowsKeyword();\n\t\tobj.sum();\n\t\tSystem.out.println(\"ABC\");\n\t}", "void mo28890b(int i) throws zzlm;", "public interface C0846i extends C0831g {\n /* renamed from: a */\n C0832f m5767a() throws C0841b, WDException;\n\n /* renamed from: b */\n void m5768b() throws C0841b;\n\n /* renamed from: c */\n void m5769c() throws C0841b;\n\n /* renamed from: d */\n void m5770d() throws C0841b;\n\n /* renamed from: e */\n void m5771e() throws C0841b;\n}", "void mo57276a(Exception exc);", "public final void mT__47() throws RecognitionException {\n try {\n int _type = T__47;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalUniMapperGenerator.g:26:7: ( 'throws' )\n // InternalUniMapperGenerator.g:26:9: 'throws'\n {\n match(\"throws\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public Snippet visit(ThrowStatement n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"throw \"+\"new\"+\" RuntimeException(\"+f4.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public void mo1970m() throws cf {\r\n }", "public void mo5385r() {\n throw null;\n }", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "public SyntaxException() {\n\t\tsuper();\n\t}", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n String[] stringArray0 = new String[27];\n // Undeclared exception!\n try { \n SQLUtil.substituteMarkers(stringArray0[8], stringArray0[8], stringArray0[8]);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "protected void checkThrows(DetailAST aAST, String aException)\n {\n final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);\n if (objBlock != null) {\n DetailAST child = (DetailAST) objBlock.getFirstChild();\n while (child != null) {\n if (child.getType() == TokenTypes.METHOD_DEF) {\n if (!Utils.hasThrows(child, aException)) {\n final DetailAST nameAST =\n child.findFirstToken(TokenTypes.IDENT);\n final String name = nameAST.getText();\n log(nameAST.getLineNo(), nameAST.getColumnNo(),\n \"missingthrows.bean\",\n new Object[] {name, aException});\n }\n }\n child = (DetailAST) child.getNextSibling();\n }\n }\n }", "@Override\n\tpublic void VisitThrowNode(BunThrowNode Node) {\n\n\t}", "@Override\n public String visit(CatchClause n, Object arg) {\n return null;\n }", "public final void voidInterfaceMethodDeclaratorRest() throws RecognitionException {\n int voidInterfaceMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(368, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; }\n // Java.g:369:5: ( formalParameters ( 'throws' qualifiedNameList )? ';' )\n dbg.enterAlt(1);\n\n // Java.g:369:9: formalParameters ( 'throws' qualifiedNameList )? ';'\n {\n dbg.location(369,9);\n pushFollow(FOLLOW_formalParameters_in_voidInterfaceMethodDeclaratorRest1571);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(369,26);\n // Java.g:369:26: ( 'throws' qualifiedNameList )?\n int alt55=2;\n try { dbg.enterSubRule(55);\n try { dbg.enterDecision(55);\n\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==50) ) {\n alt55=1;\n }\n } finally {dbg.exitDecision(55);}\n\n switch (alt55) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:369:27: 'throws' qualifiedNameList\n {\n dbg.location(369,27);\n match(input,50,FOLLOW_50_in_voidInterfaceMethodDeclaratorRest1574); if (state.failed) return ;\n dbg.location(369,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidInterfaceMethodDeclaratorRest1576);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(55);}\n\n dbg.location(369,56);\n match(input,26,FOLLOW_26_in_voidInterfaceMethodDeclaratorRest1580); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 39, voidInterfaceMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(370, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidInterfaceMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1790259326));\n classWriter0.newInteger((-2013884533));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"LocalVariableTable\";\n stringArray0[1] = \"LocalVariableTable\";\n stringArray0[2] = \"cM6G}.\";\n stringArray0[3] = \"H\";\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2013884533), \"H\", \"cM6G}.\", \"cM6G}.\", stringArray0, false, false);\n methodWriter0.visitAnnotationDefault();\n // Undeclared exception!\n try { \n methodWriter0.visitLineNumber(1, (Label) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "public interface RoutineException {}", "public void addExceptionStyle();", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n StringReader stringReader0 = new StringReader(\"catch\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 106, 0);\n javaCharStream0.maxNextCharInd = (-3000);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StringReader\", e);\n }\n }", "public void m23078a(String str, Exception exception) {\n }", "void mo28889a(int i, String str) throws zzlm;", "public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tthrow new Test ();\r\n\t\t\r\n\t}", "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "public ByteVector getCodeItemTryCatch() {\n\t\treturn codeItem.getCodeItemTryCatch();\n\t}", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = null;\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n Type type3 = Type.DOUBLE_TYPE;\n Item item0 = new Item((-532));\n int int0 = 180;\n // Undeclared exception!\n try { \n frame0.execute(180, 4, (ClassWriter) null, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public static void main(String[] args) {\n try {\r\n\tthrow new Exc1();\r\n\t\r\n }catch(Exc0 e) {\r\n\t System.out.println(\"e0\");\r\n }\r\n\t}", "public void setCatchClauseList(List<CatchClause> list) {\n setChild(list, 1);\n }", "List<CSSParseException> getExceptions();", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "int getThrowsRemaining();", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n ClassWriter classWriter2 = new ClassWriter(0);\n ClassWriter classWriter3 = new ClassWriter(1);\n Item item0 = classWriter1.newLong(1);\n Item item1 = new Item(1, item0);\n // Undeclared exception!\n try { \n frame0.execute(194, 1, classWriter0, item1);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test167() throws Throwable {\n Form form0 = new Form(\"Lc7/B.MJD\");\n // Undeclared exception!\n try { \n form0.blockquote();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test122() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n classWriter0.firstField = fieldWriter0;\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n fieldWriter0.getSize();\n fieldWriter0.visitAnnotation(\"Exceptions\", false);\n classWriter1.newFloat((-2110.0F));\n item0.hashCode = 231;\n // Undeclared exception!\n try { \n frame0.execute(182, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public static void main(String[] args) throws Exception {\r\n\r\n\t\tthrow new Exception(\"anand\");\r\n\t\t\r\n\t}", "void mo1031a(Throwable th);", "public static void main(String[] args) {\n\t\t\ttry {\r\n\t\t\t\tRuntiomException t = newRuntiom Eceprin,\r\n\t\t\t\t\t\tNullpertherExcetpion)();\r\n\t\t\tthrow e;\t\r\n\t\t}catch( NullPoiterporinter Eception e){\r\n\t\t\tSystem.out.println( \"Á¤¸®\");\r\n\t\t\t}\r\n\r\n}", "@Test(timeout = 4000)\n public void test014() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.substituteMarkers((String) null, (String) null, (Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "private List<String> getExceptionSynopsis(Throwable e) {\n Stack<Throwable> exceptions = new Stack<>();\n while (e != null && !exceptions.contains(e)) {\n // noinspection ThrowableResultOfMethodCallIgnored\n exceptions.push(e);\n e = e.getCause();\n }\n\n List<String> synopsis = new ArrayList<>();\n StringBuilder buffer = new StringBuilder();\n\n boolean foundTrace = false;\n while (!foundTrace && !exceptions.isEmpty()) {\n e = exceptions.pop();\n StackTraceElement[] elements = e.getStackTrace();\n for (StackTraceElement element : elements) {\n if (element.getClassName().startsWith(\"datawave.ingest\")) {\n foundTrace = true;\n }\n if (foundTrace) {\n buffer.append(e.getClass().getName());\n buffer.append('@');\n buffer.append(element.getClassName());\n buffer.append('.').append(element.getMethodName());\n buffer.append('(').append(element.getLineNumber()).append(')');\n synopsis.add(buffer.toString());\n buffer.setLength(0);\n break;\n }\n }\n }\n\n // NOTE: By definition, this method is only called by datawave.ingest.EventMapper, and only\n // available to be called by this class the condition on line 542 will always be satisfied\n // and so 'foundTrace' will always be set to true. So, this code can eventually be removed.\n if (!foundTrace) {\n assert e != null;\n buffer.append(e.getClass().getName());\n synopsis.add(buffer.toString());\n }\n\n return synopsis;\n }", "void L3() throws Exception{\n\t\tSystem.out.println(\"1\");\n\t\tthrow e;\n\t}", "public final void voidMethodDeclaratorRest() throws RecognitionException {\n int voidMethodDeclaratorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(352, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; }\n // Java.g:353:5: ( formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' ) )\n dbg.enterAlt(1);\n\n // Java.g:353:9: formalParameters ( 'throws' qualifiedNameList )? ( methodBody | ';' )\n {\n dbg.location(353,9);\n pushFollow(FOLLOW_formalParameters_in_voidMethodDeclaratorRest1421);\n formalParameters();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(353,26);\n // Java.g:353:26: ( 'throws' qualifiedNameList )?\n int alt50=2;\n try { dbg.enterSubRule(50);\n try { dbg.enterDecision(50);\n\n int LA50_0 = input.LA(1);\n\n if ( (LA50_0==50) ) {\n alt50=1;\n }\n } finally {dbg.exitDecision(50);}\n\n switch (alt50) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:353:27: 'throws' qualifiedNameList\n {\n dbg.location(353,27);\n match(input,50,FOLLOW_50_in_voidMethodDeclaratorRest1424); if (state.failed) return ;\n dbg.location(353,36);\n pushFollow(FOLLOW_qualifiedNameList_in_voidMethodDeclaratorRest1426);\n qualifiedNameList();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(50);}\n\n dbg.location(354,9);\n // Java.g:354:9: ( methodBody | ';' )\n int alt51=2;\n try { dbg.enterSubRule(51);\n try { dbg.enterDecision(51);\n\n int LA51_0 = input.LA(1);\n\n if ( (LA51_0==44) ) {\n alt51=1;\n }\n else if ( (LA51_0==26) ) {\n alt51=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 51, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(51);}\n\n switch (alt51) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:354:13: methodBody\n {\n dbg.location(354,13);\n pushFollow(FOLLOW_methodBody_in_voidMethodDeclaratorRest1442);\n methodBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:355:13: ';'\n {\n dbg.location(355,13);\n match(input,26,FOLLOW_26_in_voidMethodDeclaratorRest1456); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(51);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 36, voidMethodDeclaratorRest_StartIndex); }\n }\n dbg.location(357, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"voidMethodDeclaratorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n StringReader stringReader0 = new StringReader(\"}y5+{SPClS&QvLb0Qm\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.jjFillToken();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public DoubleDeclarationInScopeException() {\n\t\tsuper(defaultMessage);\n\t}", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n ClassWriter classWriter0 = new ClassWriter(173);\n Item item0 = classWriter0.newLong(16777221);\n Item item1 = new Item(4487, item0);\n Item item2 = classWriter0.key3;\n // Undeclared exception!\n try { \n frame0.execute(50, 3, classWriter0, item2);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n Frame frame0 = new Frame();\n int int0 = 2196;\n ClassWriter classWriter0 = new ClassWriter(2196);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter0.visitSource(\"&l{u&egzGn.@\", \"&l{u&egzGn.@\");\n int int1 = (-821);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\";\n stringArray0[1] = \"w{X;JM;Dl')dQG\";\n classWriter0.visit(1899, 496, \"5j#\", \"&l{u&egzGn.@\", \"\", stringArray0);\n ClassWriter classWriter2 = new ClassWriter(1);\n Item item0 = classWriter0.newClassItem(\"&l{u&egzGn.@\");\n Item item1 = classWriter1.newLong(1);\n Item item2 = new Item(158, item1);\n classWriter0.toByteArray();\n int int2 = 194;\n ClassWriter classWriter3 = new ClassWriter(194);\n // Undeclared exception!\n try { \n frame0.execute(64, 158, classWriter3, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test132() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(1048575);\n int int0 = 184;\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"k58&{\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"org.apache.commons.io.filefilter.NameFileFilter\";\n stringArray0[5] = \"k58&{\";\n ClassWriter classWriter1 = new ClassWriter(184);\n Item item0 = classWriter0.key2;\n Item item1 = new Item((-2319));\n // Undeclared exception!\n try { \n frame0.execute(1, 184, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(3131);\n classWriter0.visitField(182, \"IK\", \"IK\", \"IK\", \"The FileFilter must not be null\");\n ClassWriter classWriter1 = new ClassWriter(1);\n Item item0 = classWriter0.key2;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n Item item1 = classWriter0.newLong((byte) (-99));\n Item item2 = new Item(189, item1);\n Item item3 = classWriter1.key3;\n Item item4 = new Item();\n // Undeclared exception!\n try { \n frame0.execute(73, 10, classWriter1, item4);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test\n\tpublic void test04() throws Throwable {\n\t}", "private void markErrors(final ConcreteSyntax cSyntax)\n \t\t\tthrows CoreException {\n \t\tfor(Import aImport : cSyntax.getImports()) {\n \t\t\tConcreteSyntax importedCS = aImport.getConcreteSyntax();\n \t\t\tif (importedCS != null) {\n \t\t\t\tMarkerHelper.unmark(importedCS.eResource());\n \t\t\t\tMarkerHelper.mark(aImport.eResource());\n \t\t\t}\n \t\t}\n \t}", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(0);\n ClassWriter classWriter1 = new ClassWriter(2);\n ClassWriter classWriter2 = new ClassWriter(1);\n Type type0 = Type.SHORT_TYPE;\n String string0 = \"6aRv\";\n Item item0 = classWriter0.newClassItem(\"6aRv\");\n // Undeclared exception!\n try { \n frame0.execute(190, 5, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test274() throws Throwable {\n Form form0 = new Form(\"rqx^8<h<Qjl$<>8\");\n // Undeclared exception!\n try { \n form0.cite();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The array of suffixes must not be null\", \"O8\", \"wheel.asm.MethodWriter\", (Object) null);\n ByteVector byteVector0 = classWriter0.pool;\n byteVector0.putByteArray((byte[]) null, 50, (-3862));\n // Undeclared exception!\n try { \n fieldWriter0.visitAnnotation(\"D&G}fBu\", true);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test089() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n String string0 = \"dVw2Z7M){e/Y(#j\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n boolean boolean0 = false;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n MethodWriter methodWriter1 = methodWriter0.next;\n int int0 = 191;\n Label label0 = new Label();\n String string1 = \"+13DRn!N]ZO-7]\\\"&YI\";\n methodWriter0.visitTryCatchBlock((Label) null, label0, label0, \"+13DRn!N]ZO-7]\\\"&YI\");\n // Undeclared exception!\n try { \n methodWriter0.visitMaxs(191, 267386880);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "public interface Thrower {\n\n String throwing();\n}", "@Test(timeout = 4000)\n public void test177() throws Throwable {\n Form form0 = new Form(\"\\r\");\n // Undeclared exception!\n try { \n form0.acronym((Object) \"'lODTuTKeKOuTp4L\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public SyntaxMatchingException() {\n super();\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n ClassWriter classWriter0 = new ClassWriter((-1312));\n String[] stringArray0 = new String[8];\n stringArray0[0] = \"value \";\n stringArray0[1] = \"\";\n stringArray0[2] = \"{uh\";\n stringArray0[3] = \"i&b}d$\";\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.thisName = null;\n stringArray0[4] = \"\";\n stringArray0[5] = \"Ac\";\n classWriter0.newClassItem(\"value \");\n Item item0 = classWriter0.newLong(0L);\n classWriter0.newFieldItem(\"\", \"\\\"}422X3^Z.n4y5<z!\", \"\");\n classWriter0.toByteArray();\n // Undeclared exception!\n try { \n frame0.execute(76, 0, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "void mo1341v(String str, String str2, Throwable th);", "public void testVerifyOrderDoesntMatter(){\n _throws _tt = new _throws( );\n _tt.add( RuntimeException.class );\n _tt.add( IOException.class );\n\n _throws _ot = _throws.of( IOException.class, RuntimeException.class );\n assertEquals( _tt, _ot );\n }", "Throwable cause();", "public abstract void mo33865a(Throwable th, Throwable th2);", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n Label label0 = new Label();\n label0.getFirst();\n ClassWriter classWriter0 = new ClassWriter(3002);\n Item item0 = classWriter0.newFieldItem(\"zOfq\", \"zv)])\\\"nPel4&5\", \"\");\n ClassWriter classWriter1 = new ClassWriter(1);\n ClassWriter classWriter2 = new ClassWriter((-201));\n int int0 = Frame.INTEGER;\n classWriter1.newInteger(172);\n Frame frame0 = new Frame();\n // Undeclared exception!\n try { \n frame0.execute(12, (-1108), classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n Frame frame0 = new Frame();\n Type[] typeArray0 = new Type[9];\n Type type0 = Type.getReturnType(\"Zu.y \");\n typeArray0[0] = type0;\n Type type1 = Type.DOUBLE_TYPE;\n typeArray0[1] = type1;\n Type type2 = Type.DOUBLE_TYPE;\n typeArray0[2] = type2;\n Type type3 = Type.INT_TYPE;\n typeArray0[3] = type3;\n Type type4 = Type.VOID_TYPE;\n typeArray0[4] = type4;\n Type type5 = Type.BOOLEAN_TYPE;\n typeArray0[5] = type5;\n Type type6 = Type.FLOAT_TYPE;\n // Undeclared exception!\n try { \n frame0.execute(5, 3, (ClassWriter) null, (Item) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "private void throwsError() throws OBException {\n }", "void mo1343w(String str, String str2, Throwable th);", "@Test(timeout = 4000)\n public void test310() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"Attributes must be given in name, value pairs.\");\n // Undeclared exception!\n try { \n xmlEntityRef0.acronym();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@jsweet.lang.Name(\"catch\")\r\n native public <U> Promise<U> Catch();", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(82);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"8oFH#X_'UA\");\n int int0 = 174;\n Item item0 = classWriter0.newMethodItem(\"AnnotationDefault\", \"5\", \"AnnotationDefault\", false);\n // Undeclared exception!\n try { \n frame0.execute(174, 1199, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n Frame frame0 = new Frame();\n ClassWriter classWriter0 = new ClassWriter(159);\n ClassWriter classWriter1 = new ClassWriter(2);\n classWriter1.newFieldItem(\"y])rS3DhfdTg\", \"y])rS3DhfdTg\", \"\");\n Item item0 = classWriter0.newLong(1);\n classWriter0.newLong(2);\n Item item1 = classWriter0.key2;\n // Undeclared exception!\n try { \n frame0.execute(159, 1, classWriter1, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "@Test(timeout = 4000)\n public void test376() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"RL:I(Gq;>k@NkN[\");\n // Undeclared exception!\n try { \n xmlEntityRef0.legend();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "protected void\ttryToFix() { Command.insertList(crAndBrace); }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.join((String) null, \"\", (String[]) null, (String) null, \"\", (String[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, true);\n methodWriter0.visitMultiANewArrayInsn(\"dVw2Z7M){e/Y(#j\", (-615));\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, true, true);\n Label label0 = new Label();\n int int0 = 268435455;\n // Undeclared exception!\n try { \n methodWriter1.visitFieldInsn(268435455, \"\", \"Exceptions\", \"KY0B/+MuB[P.E(8)u)\");\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"e}\");\n Frame frame0 = new Frame();\n int[] intArray0 = new int[5];\n frame0.inputStack = intArray0;\n ClassWriter classWriter0 = new ClassWriter(0);\n int[] intArray1 = new int[1];\n intArray1[0] = 2;\n frame0.inputLocals = intArray1;\n Item item0 = classWriter0.key3;\n // Undeclared exception!\n try { \n frame0.execute(41, 41, classWriter0, item0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.asm.Frame\", e);\n }\n }", "public static CatchBlock catch_(Class clazz, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Test(timeout = 4000)\n public void test241() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n // Undeclared exception!\n try { \n xmlEntityRef0.q();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "private static void m1() {\n throw new RuntimeException(); // OK, it's a runtime exception (\"throws\" in the declaration not needed)\n }", "void mo1332e(String str, String str2, Throwable th);" ]
[ "0.6348713", "0.6192659", "0.6090675", "0.5994965", "0.5969116", "0.5965288", "0.5943733", "0.59254694", "0.58441037", "0.5802001", "0.57715344", "0.57104", "0.5679942", "0.56751424", "0.56115705", "0.5593998", "0.55728877", "0.5562642", "0.5550828", "0.55396634", "0.5499715", "0.54921204", "0.548941", "0.54893225", "0.548219", "0.5432711", "0.5404748", "0.5377109", "0.53481466", "0.53351367", "0.5293373", "0.5292448", "0.52675444", "0.5262215", "0.5249801", "0.5245038", "0.5215991", "0.52100664", "0.52017623", "0.519923", "0.5184816", "0.5170657", "0.51591206", "0.51473755", "0.5146162", "0.51461226", "0.51424754", "0.5138973", "0.5128048", "0.512517", "0.5111752", "0.5109052", "0.5108266", "0.5096005", "0.50907975", "0.5089666", "0.50875425", "0.5084743", "0.5079059", "0.5077083", "0.5057756", "0.50549734", "0.5028388", "0.5026399", "0.5024206", "0.50229555", "0.50171506", "0.50165963", "0.50040466", "0.49984622", "0.49973175", "0.49803963", "0.49726924", "0.49692702", "0.49642226", "0.49613175", "0.49596503", "0.49583375", "0.4946702", "0.4938428", "0.4937679", "0.49359274", "0.49319273", "0.4928926", "0.49282202", "0.49213436", "0.49181387", "0.49159688", "0.49145174", "0.4913479", "0.49096185", "0.490854", "0.49078497", "0.49075902", "0.49053362", "0.49011427", "0.48997477", "0.48908752", "0.48894587", "0.48873237" ]
0.5527715
20
insert leading parameter this in parameter list
private void insertThis(ClassType object, MethodType x) { if ((x.modify & Keyword.STATICSY.value) == 0) { Parameter p = new Parameter(); p.name = new Token(); p.name.string = "§this"; p.type = new Type(); p.type.version = object.version; p.type.ident.string = object.name.string; p.type.type = Keyword.NONESY; Parameter [] q = new Parameter[x.parameter.length + 1]; q[0] = p; for(int i = 1; i < q.length; i++) q[i] = x.parameter[i - 1]; x.parameter = q; } if (x.throwing.length > 0) { Parameter p = new Parameter(); p.name = new Token(); p.name.string = "§exception"; p.name.kind = Keyword.IDENTSY; p.type = new Type(); p.type.type = Keyword.VOIDSY; Parameter[] q = new Parameter[x.parameter.length + 1]; for (int i = 0; i < x.parameter.length; i++) q[i] = x.parameter[i]; q[q.length - 1] = p; x.parameter = q; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addParameter(ParmInfoEntry p){\n\t}", "public void addParam(JParameter x) {\n params = Lists.add(params, x);\n }", "public void addToParameterNameValuePairs(entity.LoadParameter element);", "public void addParameter(ParameterExtendedImpl param) {\n \tParameterExtendedImpl paramExt = parameters.getParameter(param.getIndex());\n \tif(paramExt != null)\n \t\tparamExt = new ParameterExtendedImpl(param);\n \t\n \tparamExt = parameters.getParameter(param.getIndex(), param.getDirection());\n \tif(paramExt != null){\n \t\tparamExt = new ParameterExtendedImpl(param);\n \t\treturn;\n \t}\n \t\n \taddToParameters(param);\n }", "@Override\n\tpublic void insertParam(int... params) {\n\t\tthis.x = params[0];\n\t\tthis.y = params[1];\n\t\tthis.l1 = params[2];\n\t\tthis.l2 = params[3];\n\t\tthis.color = new Color(params[4],params[5],params[6]);\n\t}", "public void addParameter(ConstraintParameter param) {\n\t\tif (m_parameters == null) {\n\t\t\tm_parameters = new ArrayList<ConstraintParameter>();\n\t\t\tm_parameterString = \"\";\n\t\t}\n\t\t\n\t\t// add this parameter info to the end of the list\n\t\tm_parameters.add(param);\n\t\tm_parameterString += \" :\" + param.toString();\n\t}", "public LnwRestrictionFunction addParam( Object param ) {\n\t\tvalues.add( LnwSqlParameter.adaptData(param) );\n\t\treturn this;\n\t}", "private void addParameter(String p_str)\n {\n if (p_str == null || p_str.length() > 0)\n {\n incrementIndent();\n addIndent();\n openStartTag(ACQ_PARM);\n closeTag(false);\n addString(p_str);\n openEndTag(ACQ_PARM);\n closeTag();\n decrementIndent();\n }\n }", "private void addParameter(int param) {\r\n command_parameters.addInt(param);\r\n }", "public void addParam(Property p) {\r\n params.addElement(p);\r\n }", "@Override\n public void addParamList(ParamList paramList) {\n this.paramList = paramList;\n }", "public void setAdjustableParams(ParameterList paramList);", "QuerySql addParamer(Object... paramers);", "@Override\r\n public void addAdditionalParams(WeiboParameters des, WeiboParameters src) {\n\r\n }", "@Override\n\tpublic void visit(JdbcParameter arg0) {\n\n\t}", "protected void addParam(ParamRanking pr){\r\n\t\tranking.add(pr);\r\n\t\tCollections.sort(ranking);\r\n\t}", "void addParam(OpCode opcode, String param) {\n\t\t// We need to add 'param' to pool of constants and add a reference to it\n\t\tint idx = parseParam(opcode, param);\n\t\tcode.add(idx);\n\t}", "@Override\r\n\tpublic void addParamInfo(ParamInfo info) {\n\t\tpm.insert(info);\r\n\t\t\r\n\t}", "protected final void addParameter(final ParameterDef parameter) {\n parameters.add(parameter);\n }", "@Override\n\tpublic void visit(JdbcParameter arg0) {\n\t\t\n\t}", "Report addParameter(String parameter, Object value);", "private void initParameters() {\n Annotation[][] paramsAnnotations = method.getParameterAnnotations();\n for (int i = 0; i < paramsAnnotations.length; i++) {\n if (paramsAnnotations[i].length == 0) {\n contentBuilder.addUnnamedParam(i);\n } else {\n for (Annotation annotation : paramsAnnotations[i]) {\n Class<?> annotationType = annotation.annotationType();\n if (annotationType.equals(PathParam.class)\n && pathBuilder != null) {\n PathParam param = (PathParam) annotation;\n pathBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(QueryParam.class)) {\n QueryParam param = (QueryParam) annotation;\n queryBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(HeaderParam.class)) {\n HeaderParam param = (HeaderParam) annotation;\n headerBuilder.addParam(param.value(), i);\n } else if (annotationType.equals(NamedParam.class)) {\n NamedParam param = (NamedParam) annotation;\n contentBuilder.addNamedParam(param.value(), i);\n } else {\n contentBuilder.addUnnamedParam(i);\n }\n }\n }\n }\n }", "@Override\n public boolean insertparam(String name) {\n return false;\n }", "public abstract void addParameter(String key, Object value);", "public DoubleParameter addParameter(DoubleParameter p)\n {\n params.add(p);\n return p;\n }", "public void addParam(Object obj) {\n\t\tparams.add(obj);\n\t}", "public void setParameter( List<Parameter> parameter )\n {\n _parameter = parameter;\n }", "@Override\r\n public Memory expParam(ListExpNode lexp, HeadersNode ent) {\r\n return null;\r\n }", "public com.isat.catalist.oms.order.OOSOrderLineItemParamType addNewParameters()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.isat.catalist.oms.order.OOSOrderLineItemParamType target = null;\n target = (com.isat.catalist.oms.order.OOSOrderLineItemParamType)get_store().add_element_user(PARAMETERS$16);\n return target;\n }\n }", "public void param_decl(ArrayList<ParamDecl> pd) {\n if (lexer.token != Symbol.FLOAT && lexer.token != Symbol.INT) {\n error.signal(\"Wrong or missing variable type at parameters declaration\");\n }\n\n String type = lexer.getStringValue();\n \n lexer.nextToken();\n\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Wrong or missing identifier at parameters declaration\");\n }\n\n Ident id = new Ident(lexer.getStringValue());\n lexer.nextToken();\n\n pd.add(new ParamDecl(type, id));\n }", "public void startPosition(String... felder);", "public void addSiteParams(Iterator it) {\n\t\tAbstractParameter tempParam;\n\t\twhile (it.hasNext()) {\n\t\t\ttempParam = (AbstractParameter) it.next();\n\t\t\tif (!parameterList.containsParameter(tempParam)) { // if this does\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// already\n\t\t\t\tparameterList.addParameter(tempParam);\n\t\t\t\t/*\n\t\t\t\t * if(tempParam instanceof StringParameter) { // if it\n\t\t\t\t * Stringparamter, set its initial values StringParameter\n\t\t\t\t * strConstraint = (StringParameter)tempParam;\n\t\t\t\t * tempParam.setValue(strConstraint.getAllowedStrings().get(0));\n\t\t\t\t * }\n\t\t\t\t */\n\t\t\t}\n\t\t\tif (!site.containsParameter(tempParam))\n\t\t\t\tsite.addParameter(tempParam);\n\t\t}\n\n\t\tremove(parameterEditor);\n\t\tparameterEditor = new ParameterListEditor(parameterList);\n\t\tparameterEditor.setTitle(SITE_PARAMS);\n\t\tthis.add(parameterEditor, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,\n\t\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(\n\t\t\t\t\t\t0, 0, 0, 0), 0, 0));\n\t}", "@Override\n\tpublic void visit(JdbcNamedParameter arg0) {\n\t\t\n\t}", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public void addIndependentParameter(ParameterAPI parameter)\n throws ParameterException;", "public MethodBuilder parameter(String parameter) {\n\t\tparameters.add(parameter);\n\t\treturn this;\n\t}", "@Override\n\tpublic void put_paras(String para, String value) {\n\t\t\n\t}", "public String paramString() {\n\t\tString tail = super.paramString();\n\t\ttail = tail.substring(tail.indexOf(')') + 1);\n\t\treturn \"points=\" + points + \", lineWidth=\" + getLineWidth() + tail;\n\t}", "private void modifyArguments(boolean firstMove) {\n\t\tthis.firstMove = firstMove;\n\t}", "public com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder addParamsBuilder() {\n return getParamsFieldBuilder().addBuilder(\n com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.getDefaultInstance());\n }", "protected void paramDuplicate(){\n List<StatementParse> parameters = this.node.getChildren().get(0).getChildren();\n for (StatementParse x: parameters){\n int count = 0;\n for (StatementParse y: parameters){\n if (x.getName().equals(y.getName())){\n count++;\n }\n }\n if (count > 1) throw new DuplicateParam();\n }\n }", "public static void paramPush(String val) {\n\t\tparamPush(val, PARAM_IDX);\n\t}", "void addTypedParameter(Parameter typedParameter);", "protected void sequence_ParameterDecl(ISerializationContext context, ParameterDecl semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public synchronized final void addPreprocessingParam(Object poParam) {\n addParam(poParam, PREPROCESSING);\n }", "public void insertToken(Token tok) {\r\n\t}", "private String addExtra() {\n\t\t// One Parameter: ExtraName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|extra:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "public JParameterRecord() {\n super(JParameter.PARAMETER);\n }", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "public void addParameter(String key, String value) {\n parameters.add(new ParameterEntry<String, String>(key, value));\n }", "public void bindParameter(Object o, int index){\n parameters.add(new Parameter(o, index));\n }", "public void setParameterNameValuePairs(entity.LoadParameter[] value);", "public void setIndependentParameters(ParameterList list);", "void passParameter(Register r, ProgramLocation m, int p) {\n Object v = getRegister(r);\n if (TRACE_INTRA) out.println(\"Passing \"+r+\" to \"+m+\" param \"+p+\": \"+v);\n if (v instanceof Set) {\n for (Iterator i = ((Set)v).iterator(); i.hasNext(); ) {\n Node n = (Node)i.next();\n n.recordPassedParameter(m, p);\n passedAsParameter.add(n);\n }\n } else {\n Node n = (Node)v;\n if(n == null) {\n System.err.println(\"Register \" + r + \"\\n\" + this.bb.fullDump());\n }\n n.recordPassedParameter(m, p);\n passedAsParameter.add(n);\n }\n }", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "public com.isat.catalist.oms.order.OOSOrderLineItemParamType insertNewParameters(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.isat.catalist.oms.order.OOSOrderLineItemParamType target = null;\n target = (com.isat.catalist.oms.order.OOSOrderLineItemParamType)get_store().insert_element_user(PARAMETERS$16, i);\n return target;\n }\n }", "public void param_decl_tail(ArrayList<ParamDecl> pd) {\n if (lexer.token == Symbol.COMMA) {\n lexer.nextToken();\n\n param_decl(pd);\n param_decl_tail(pd);\n }\n }", "public void addKeyParameter() {\n\t Parameter param = RestFactoryImpl.eINSTANCE.createParameter();\n\t param.setParameterName(PARAMETER_KEY);\n\t param.setParameterValue(PIXABAY_API_KEY);\n\t\tparam.setName(\"Key\");\n\t\tthis.listOfParameters.add(param);\t\n\t\tthis.keyParameter = param;\n\t}", "public void a(cvl paramcvl)\r\n/* 84: */ {\r\n/* 85: 97 */ this.d.add(paramcvl);\r\n/* 86: */ \r\n/* 87: 99 */ paramcvl.a(this);\r\n/* 88: */ }", "Statement setParameter(int index, Object param);", "private final void addParam(Object oParam, final int piModule)\n\t{\n\t\tswitch(piModule)\n\t\t{\n\t\t\tcase PREPROCESSING:\n\t\t\t\tthis.oPreprocessingParams.add(oParam);\n\t\t\t\tbreak;\n\n\t\t\tcase FEATURE_EXTRACTION:\n\t\t\t\tthis.oFeatureExtraction.add(oParam);\n\t\t\t\tbreak;\n\n\t\t\tcase CLASSIFICATION:\n\t\t\t\tthis.oClassification.add(oParam);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tMARF.debug(\"ModuleParams.addParam() - Unknown module type: \" + piModule);\n\t\t}\n\t}", "private void addMoreRepletParameters() throws Exception\n {\n addTermbaseParameter();\n addLanguageParameter();\n addRepletParameters(theParameters);\n }", "public JVar addParameter(JType type, String name) {\n if(intf!=null)\n intfMethod.param(type,name);\n return implMethod.param(type,name);\n }", "public void addSiteParamsClone(Iterator it) {\n\t\tAbstractParameter tempParam;\n\t\twhile (it.hasNext()) {\n\t\t\ttempParam = (AbstractParameter) it.next();\n\t\t\tif (!parameterList.containsParameter(tempParam)) { // if this does\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not exist\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// already\n\t\t\t\tAbstractParameter cloneParam = (AbstractParameter) tempParam.clone();\n\t\t\t\t/*\n\t\t\t\t * if(tempParam instanceof StringParameter) { StringParameter\n\t\t\t\t * strConstraint = (StringParameter)tempParam;\n\t\t\t\t * cloneParam.setValue\n\t\t\t\t * (strConstraint.getAllowedStrings().get(0)); }\n\t\t\t\t */\n\t\t\t\tparameterList.addParameter(cloneParam);\n\t\t\t\tsite.addParameter(cloneParam);\n\t\t\t}\n\t\t}\n\t\tthis.remove(parameterEditor);\n\t\tparameterEditor = new ParameterListEditor(parameterList);\n\t\tparameterEditor.setTitle(SITE_PARAMS);\n\t\tthis.add(parameterEditor, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,\n\t\t\t\tGridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(\n\t\t\t\t\t\t4, 4, 4, 4), 0, 0));\n\n\t}", "@Override\n public void addParam(String param, Object value) {\n request.addProperty(param, value);\n }", "@Override\n public StringBuilder appendAttributes(StringBuilder buf) {\n super.appendAttributes(buf);\n appendAttribute(buf, \"param\", param);\n return buf;\n }", "public final void addPreprocessingParam(Object oParam)\n\t{\n\t\taddParam(oParam, PREPROCESSING);\n\t}", "public void initParams(List<String> list) {\n if ((list.size() & 1) != 0) {\n throw new IllegalArgumentException(\"list size must be a multiple of 2\");\n }\n for (int i = 0; i < list.size(); ) {\n addParam(list.get(i++), list.get(i++));\n }\n }", "public int getParameterOffset();", "void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}", "MultilineParameters() {\n this(0);\n }", "public CFun add(CParam... param) throws CDuplicateException;", "@Override\n public void setBeforeFirst(Wrapper beforeFirst)\n {\n\n }", "ParameterList getParameters();", "public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}", "public void addParameterAnnotationItem(int parameterIndex, AnnotationItem annotationItem) {\n\t\tannotatedParameterSetRefList.addAnnotationItem(parameterIndex, annotationItem);\n\t}", "private void addDefaultParameterInfo(MethodConfig argMethodConfig,\r\n\t\t\tString argParameterName, String argParameterClass) {\r\n\t\tParameterConfig param = new ParameterConfig();\r\n\t\tparam.setClassName(argParameterClass);\r\n\t\tparam.setName(argParameterName);\r\n\t\targMethodConfig.setConfigObject(param);\r\n\r\n\t\tCommentConfig paramComment = new CommentConfig();\r\n\t\tparamComment.setValue(\"Auto generated by Codegen.\");\r\n\t\tparam.setConfigObject(paramComment);\r\n\t}", "@Override\n\tprotected void setParameterValues() {\n\t}", "public ListIterator<Parameter<?>> getAdjustableParamsIterator();", "public void addParameter(Document doc, Namespace ns, String parameterName,\n String parameterDataType) {\n\n // get parameter element\n Element parameterElement = (Element) doc.getRootElement()\n .getChild(\"parameter\", ns).clone();\n\n // set parameter attributes \"name\" and \"class\"\n parameterElement.setAttribute(\"name\", parameterName);\n parameterElement.setAttribute(\"class\", parameterDataType);\n\n // add element to document\n @SuppressWarnings(\"unchecked\")\n List<Element> children = doc.getRootElement().getChildren();\n\n int index = 0;\n\n for (Element element : children) {\n String thisChildName = element.getName();\n\n // get element over \"title\"-element\n if (thisChildName == \"title\") {\n index = doc.getRootElement().indexOf(element) - 1;\n\n }\n\n }\n\n doc.getRootElement().addContent(index, parameterElement);\n\n parameterCounter++;\n\n }", "public int addNewParameter()\r\n {\r\n Parameter c = new Parameter();\r\n m_alParameters.add(c);\r\n\r\n fireTableRowsInserted(m_alParameters.size() - 1, m_alParameters.size() - 1);\r\n\r\n return m_alParameters.size() - 1;\r\n }", "public AddParameterAction(Signature parentSignature) {\r\n this.parentSignature = parentSignature;\r\n this.editingDomain = TransactionUtil.getEditingDomain(parentSignature);\r\n }", "Statement setParameters(Object... params);", "@Before(\"pointCut()\")\n\tpublic void before(JoinPoint joinPoint) {\n\t\tLOG.warn(\"控制器切面参数 param:{}\",\n\t\t\t\tToStringBuilder.reflectionToString(joinPoint));\n\t\tObject[] arr = joinPoint.getArgs();\n\t\tif (arr.length > 0) {\n\t\t\tLOG.warn(\"method param:{}\",\n\t\t\t\t\tToStringBuilder.reflectionToString(joinPoint.getArgs()[0]));\n\t\t}\n\t}", "private final void addParams(Vector oParams, final int piModule)\n\t{\n\t\tswitch(piModule)\n\t\t{\n\t\t\tcase PREPROCESSING:\n\t\t\t\tthis.oPreprocessingParams.addAll(oParams);\n\t\t\t\tbreak;\n\n\t\t\tcase FEATURE_EXTRACTION:\n\t\t\t\tthis.oFeatureExtraction.addAll(oParams);\n\t\t\t\tbreak;\n\n\t\t\tcase CLASSIFICATION:\n\t\t\t\tthis.oClassification.addAll(oParams);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tMARF.debug(\"ModuleParams.addParam() - Unknown module type: \" + piModule);\n\t\t}\n\t}", "public void addParam(String name, String value) {\r\n if (params == null) {\r\n params = new ArrayList();\r\n }\r\n Param param = new Param(name, value);\r\n params.add(param);\r\n }", "public void rebuildParameterList(ArrayList<Parameter> alNewParameters,\r\n IPropertyMetadata amMetadata, BaseWithParam aCurrent)\r\n {\r\n m_alParameters = new ArrayList<Parameter>(alNewParameters);\r\n m_aCurrent = aCurrent;\r\n\r\n m_mMetadata.clear();\r\n for (PropertyMetadata pm : amMetadata.getProperties())\r\n {\r\n m_mMetadata.put(pm.getName(), pm);\r\n }\r\n\r\n // Now for each parameter that is not yet in the real list we'll add one\r\n // with an empty value.\r\n for (PropertyMetadata pm : m_mMetadata.values())\r\n {\r\n boolean bFound = false;\r\n\r\n for (Parameter p : m_alParameters)\r\n {\r\n if (p.getName().equalsIgnoreCase(pm.getName()))\r\n {\r\n bFound = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!bFound)\r\n {\r\n // Not yet present, add it\r\n Parameter pNew = new Parameter();\r\n pNew.setName(pm.getName());\r\n m_alParameters.add(pNew);\r\n }\r\n }\r\n\r\n fireTableDataChanged();\r\n }", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "protected void setFormalParameters(List params) {\n this._formalParameters = params;\n }", "public void setParameters(ArrayList<ParameterEntry<String, String>> params) {\n parameters = params;\n }", "public void addParam(String key, Object value) {\n getParams().put(key, value);\n }", "protected void addMetadataFieldsFromParameters() {\n for (Map.Entry<String, String> e: parameters.entrySet()) {\n if (e.getKey().startsWith(\"meta-\")) {\n String fieldName = e.getKey().substring(5);\n String fieldValue = e.getValue();\n currentDoc.addTextualMetadataField(fieldName, fieldValue, getDocWriter().metadataFieldType(false));\n }\n }\n }", "public void addParameter(ParameterDefinition parameterDefinition) {\r\n if (parameterDefinition == null) {\r\n return;\r\n }\r\n parameterDefinitions.add(parameterDefinition);\r\n shortNamesMap.put(parameterDefinition.getShortName(), parameterDefinition);\r\n longNamesMap.put(parameterDefinition.getLongName(), parameterDefinition);\r\n }", "@Override\n\tpublic void addAtBeginning(String data) {\n\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "protected void addInputParameterWithoutChecks(Parameter parameter) {\n\t\tparameters.add(parameter);\n\t\tupdateStructureHash();\n\t}", "public Builder addParameter(String paramName, List<String> description) {\n if (parameters.containsKey(paramName) && description.isEmpty()) {\n //Do nothing, since there is already some description of this parameter,\n // and we are rewriting it with empty list\n return this;\n }\n this.parameters.put(paramName, List.copyOf(description));\n return this;\n }", "@Override\n public void addChild(IntASTNode child) {\n if (child == null) {\n return;\n } else if (child instanceof IntASTIdentifier) {\n // adding a method parameter\n child.setParent(this);\n if (super.children.isEmpty() ||\n !super.children.get(super.children.size()-1).getText().equals(\"...\")) {\n super.children.add(child);\n } else {\n super.children.add(super.children.size()-1, child);\n }\n } else if (child instanceof IntASTOperator && child.getText().equals(\"...\")) {\n // adding an ellipsis (for variable arguments)\n // ensure one does not already exist\n if (super.children.isEmpty() || !super.children.get(super.children.size()-1).getText().equals(\"...\")) {\n child.setParent(this);\n super.children.add(child);\n } else {\n throw new IllegalArgumentException(\"Cannot have more than one ellipsis in a set of method parameters\");\n }\n } else {\n throw new IllegalArgumentException(\"intermediate.IntASTMethodParameters does not support children of type \\\"\"\n + child.getClass().getName() + \"\\\"\");\n }\n }", "private void addParams(List<Scope.Type> types, List<String> names) {\n\t for (int i = types.size() - 1; i >= 0; --i) {\n\t st.addArgument(types.get(i), names.get(i));\n\t }\n\t }", "public AdditionalParameterRule(final String startSequence, final IToken token, final boolean ruleForContentAssist) {\n\t\tsuper(startSequence, null, token);\n\t\tthis.startSequence = startSequence;\n\t}" ]
[ "0.6714579", "0.6358333", "0.61905134", "0.61623913", "0.6119906", "0.60475785", "0.59595466", "0.5793748", "0.5761136", "0.57383794", "0.5737107", "0.57151383", "0.5711862", "0.56905144", "0.56868523", "0.56864184", "0.56808937", "0.56801444", "0.5656486", "0.56478184", "0.5643353", "0.56222093", "0.56176746", "0.5573712", "0.5567461", "0.5543747", "0.5511415", "0.5485389", "0.5436775", "0.5379489", "0.536966", "0.53675973", "0.53509855", "0.5319166", "0.53114384", "0.531134", "0.5306797", "0.5305413", "0.5297536", "0.5291989", "0.5283323", "0.52758646", "0.5273028", "0.5255331", "0.52527326", "0.5244213", "0.5242408", "0.52391505", "0.5237057", "0.5214699", "0.5202938", "0.51943326", "0.518438", "0.51837105", "0.5182558", "0.5182238", "0.5169856", "0.51689726", "0.5168941", "0.5167827", "0.5167707", "0.51674604", "0.5146361", "0.5141548", "0.51395506", "0.5137033", "0.51352906", "0.5131144", "0.5128", "0.5124007", "0.5118952", "0.5118748", "0.51132566", "0.5089664", "0.50881094", "0.5083687", "0.50825995", "0.5077638", "0.50695896", "0.505986", "0.5055041", "0.5047377", "0.5047105", "0.5046693", "0.5045879", "0.5041508", "0.5041416", "0.5037731", "0.5035015", "0.50348854", "0.5026944", "0.50266176", "0.5025445", "0.5016222", "0.5013879", "0.5013366", "0.5011154", "0.5004235", "0.49978954", "0.49929935" ]
0.6021013
6
localVariableDeclaration ';' | classOrInterfaceDeclaration | statement
private void blockStatement(Scope scope, Vector queue) { Modifier modify = new Modifier(); modify.access = 0; modify.classes &= Keyword.FINALSY.value | Keyword.STRICTFPSY.value; modify.fields &= Keyword.FINALSY.value | Keyword.TRANSIENTSY.value | Keyword.VOLATILESY.value; modify.methods &= Keyword.FINALSY.value | Keyword.SYNCHRONIZEDSY.value | Keyword.NATIVESY.value | Keyword.STRICTFPSY.value; modify.constants &= Keyword.FINALSY.value; Token t; if (comment != null && comment.length() > 0) { Operation op = new Operation(); op.code = comment + '\n'; op.operator = Keyword.COMMENTSY; queue.add(op); resetComment(); } if (isLocalVarDecl(false)) { localVariableDeclaration(modify, scope, queue); matchKeyword(Keyword.SEMICOLONSY); } else { peekReset(); t = nextToken; while(t.kind == Keyword.PUBLICSY || t.kind == Keyword.PROTECTEDSY || t.kind == Keyword.PRIVATESY || t.kind == Keyword.ABSTRACTSY || t.kind == Keyword.STATICSY || t.kind == Keyword.FINALSY || t.kind == Keyword.STRICTFPSY) t = peek(); if (t.kind == Keyword.CLASSSY || t.kind == Keyword.INTERFACESY) classOrInterfaceDeclaration(modify, scope, ""); else statement(modify, scope, Scope.SEQUENCE, null, queue, true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void localVariableDeclarationStatement() throws RecognitionException {\n int localVariableDeclarationStatement_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"localVariableDeclarationStatement\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(606, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 87) ) { return ; }\n // Java.g:607:5: ( localVariableDeclaration ';' )\n dbg.enterAlt(1);\n\n // Java.g:607:10: localVariableDeclaration ';'\n {\n dbg.location(607,10);\n pushFollow(FOLLOW_localVariableDeclaration_in_localVariableDeclarationStatement3275);\n localVariableDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(607,35);\n match(input,26,FOLLOW_26_in_localVariableDeclarationStatement3277); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 87, localVariableDeclarationStatement_StartIndex); }\n }\n dbg.location(608, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"localVariableDeclarationStatement\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final EObject ruleLocalVariableDeclarationStatement() throws RecognitionException {\n EObject current = null;\n int ruleLocalVariableDeclarationStatement_StartIndex = input.index();\n Token otherlv_1=null;\n EObject lv_localVariableDeclaration_0_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2202:28: ( ( ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13 ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:1: ( ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:1: ( ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:2: ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:2: ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2204:1: (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2204:1: (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2205:3: lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationStatementAccess().getLocalVariableDeclarationLocalVariableDeclarationParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleLocalVariableDeclaration_in_ruleLocalVariableDeclarationStatement4323);\n lv_localVariableDeclaration_0_0=ruleLocalVariableDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"localVariableDeclaration\",\n \t\tlv_localVariableDeclaration_0_0, \n \t\t\"LocalVariableDeclaration\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,KEYWORD_13,FOLLOW_KEYWORD_13_in_ruleLocalVariableDeclarationStatement4336); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getLocalVariableDeclarationStatementAccess().getSemicolonKeyword_1());\n \n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 42, ruleLocalVariableDeclarationStatement_StartIndex); }\n }\n return current;\n }", "public void visit(LocalVariableDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n }", "public final EObject ruleBlockStatement() throws RecognitionException {\n EObject current = null;\n int ruleBlockStatement_StartIndex = input.index();\n EObject this_LocalVariableDeclarationStatement_0 = null;\n\n EObject this_Statement_1 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 38) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1993:28: ( (this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement | this_Statement_1= ruleStatement ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1994:1: (this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement | this_Statement_1= ruleStatement )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1994:1: (this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement | this_Statement_1= ruleStatement )\n int alt46=2;\n alt46 = dfa46.predict(input);\n switch (alt46) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1995:2: this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getBlockStatementAccess().getLocalVariableDeclarationStatementParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleLocalVariableDeclarationStatement_in_ruleBlockStatement3809);\n this_LocalVariableDeclarationStatement_0=ruleLocalVariableDeclarationStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_LocalVariableDeclarationStatement_0;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2008:2: this_Statement_1= ruleStatement\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getBlockStatementAccess().getStatementParserRuleCall_1()); \n \n }\n pushFollow(FOLLOW_ruleStatement_in_ruleBlockStatement3839);\n this_Statement_1=ruleStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_Statement_1;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 38, ruleBlockStatement_StartIndex); }\n }\n return current;\n }", "public final void localVariableDeclaration() throws RecognitionException {\n int localVariableDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"localVariableDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(610, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 88) ) { return ; }\n // Java.g:611:5: ( variableModifiers type variableDeclarators )\n dbg.enterAlt(1);\n\n // Java.g:611:9: variableModifiers type variableDeclarators\n {\n dbg.location(611,9);\n pushFollow(FOLLOW_variableModifiers_in_localVariableDeclaration3296);\n variableModifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(611,27);\n pushFollow(FOLLOW_type_in_localVariableDeclaration3298);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(611,32);\n pushFollow(FOLLOW_variableDeclarators_in_localVariableDeclaration3300);\n variableDeclarators();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 88, localVariableDeclaration_StartIndex); }\n }\n dbg.location(612, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"localVariableDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n public Void visit(IVariableDeclaration stmt, Set<String> overallContext) {\n overallContext.add(stmt.getType().getName());\n return null;\n }", "private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.FINALSY)\r\n {\r\n modify.add(nextSymbol.value);\r\n lookAhead();\r\n }\r\n\r\n modify.check(modify.fields | modify.access);\r\n Type t = type();\r\n\r\n variableDeclarators(modify, t, scope, queue);\r\n }", "public boolean visit(\n \t\tTypeDeclaration localTypeDeclaration,\n \t\tBlockScope scope) {\n \t\treturn false;\n \t}", "private void declareLocals() {\r\n\t\t// declare locals\r\n\t\tfor(Local local: method.retrieveActiveBody().getLocals()) {\r\n\t\t\tString cType = null;\r\n\t\t\t// null types need special treatment, we don't output them\r\n\t\t\t// we also won't generate statements that use a nullType\r\n\t\t\t// as a target.\r\n\t\t\tif(local.getType() instanceof NullType) {\r\n\t\t\t\tcType = \"java_lang_Object*\";\r\n\t\t\t} else {\r\n\t\t\t\tcType = CTypes.toCType(local.getType());\r\n\t\t\t}\r\n\t\t\twriter.wl(cType + \" \" + local.getName() + \" = 0;\");\r\n\t\t}\r\n\t\twriter.wl(\"java_lang_Object* _exception = 0;\");\r\n\t}", "public StatementType getStatementType()\n\t{\n\t\treturn StatementType.VARIABLE_DECLARATION_STATEMENT;\n\t}", "public final void synpred151_Java_fragment() throws RecognitionException {\n // Java.g:601:9: ( localVariableDeclarationStatement )\n dbg.enterAlt(1);\n\n // Java.g:601:9: localVariableDeclarationStatement\n {\n dbg.location(601,9);\n pushFollow(FOLLOW_localVariableDeclarationStatement_in_synpred151_Java3231);\n localVariableDeclarationStatement();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "public LocalDecl createLocalDecl(Position pos, Flags flags, Name name, Expr init) {\n if (init.type().isVoid()) {\n System.err.println(\"ERROR: ForLoopOptimizer.createLocalDecl: creating void local assignment for \" +init+ \" at \" +pos);\n }\n return createLocalDecl(pos, flags, name, init.type(), init);\n }", "VariableDeclaration createVariableDeclaration();", "private ASTVariableDeclaratorId getDeclaration(ASTLocalVariableDeclaration node) {\n ASTType type = node.getTypeNode();\n if (type != null) {\n if (MAP_CLASSES.keySet().contains(type.getTypeImage())) {\n return node.getFirstDescendantOfType(ASTVariableDeclaratorId.class);\n }\n }\n return null;\n }", "public LocalRec LocalRec(RecVar recvar, LocalType body)\n\t{\n\t\t//return new LocalRec(self, recvar, body);\n\t\treturn new LocalRec(recvar, body);\n\t}", "@Override\n public String visit(LocalClassDeclarationStmt n, Object arg) {\n return null;\n }", "public final EObject ruleLocalVariableDeclaration() throws RecognitionException {\n EObject current = null;\n int ruleLocalVariableDeclaration_StartIndex = input.index();\n Token otherlv_1=null;\n EObject lv_vardecl_0_0 = null;\n\n EObject lv_expression_2_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2246:28: ( ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:1: ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:1: ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:2: ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )?\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:2: ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2248:1: (lv_vardecl_0_0= ruleTypedVarDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2248:1: (lv_vardecl_0_0= ruleTypedVarDeclaration )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2249:3: lv_vardecl_0_0= ruleTypedVarDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationAccess().getVardeclTypedVarDeclarationParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleTypedVarDeclaration_in_ruleLocalVariableDeclaration4426);\n lv_vardecl_0_0=ruleTypedVarDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"vardecl\",\n \t\tlv_vardecl_0_0, \n \t\t\"TypedVarDeclaration\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2265:2: (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )?\n int alt48=2;\n alt48 = dfa48.predict(input);\n switch (alt48) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2266:2: otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) )\n {\n otherlv_1=(Token)match(input,KEYWORD_15,FOLLOW_KEYWORD_15_in_ruleLocalVariableDeclaration4440); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getLocalVariableDeclarationAccess().getEqualsSignKeyword_1_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2270:1: ( (lv_expression_2_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2271:1: (lv_expression_2_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2271:1: (lv_expression_2_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2272:3: lv_expression_2_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationAccess().getExpressionExpressionParserRuleCall_1_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleLocalVariableDeclaration4460);\n lv_expression_2_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"expression\",\n \t\tlv_expression_2_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 44, ruleLocalVariableDeclaration_StartIndex); }\n }\n return current;\n }", "private boolean isLocalDeclaration() {\n return currentFile;\n }", "public final EObject entryRuleLocalVariableDeclarationStatement() throws RecognitionException {\n EObject current = null;\n int entryRuleLocalVariableDeclarationStatement_StartIndex = input.index();\n EObject iv_ruleLocalVariableDeclarationStatement = null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 41) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2191:2: (iv_ruleLocalVariableDeclarationStatement= ruleLocalVariableDeclarationStatement EOF )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2192:2: iv_ruleLocalVariableDeclarationStatement= ruleLocalVariableDeclarationStatement EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getLocalVariableDeclarationStatementRule()); \n }\n pushFollow(FOLLOW_ruleLocalVariableDeclarationStatement_in_entryRuleLocalVariableDeclarationStatement4267);\n iv_ruleLocalVariableDeclarationStatement=ruleLocalVariableDeclarationStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleLocalVariableDeclarationStatement; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleLocalVariableDeclarationStatement4277); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 41, entryRuleLocalVariableDeclarationStatement_StartIndex); }\n }\n return current;\n }", "VariableDeclarationWithInitCS getResultVariable();", "public final void blockStatement() throws RecognitionException {\n int blockStatement_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"blockStatement\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(600, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 86) ) { return ; }\n // Java.g:601:5: ( localVariableDeclarationStatement | classOrInterfaceDeclaration | statement )\n int alt106=3;\n try { dbg.enterDecision(106);\n\n try {\n isCyclicDecision = true;\n alt106 = dfa106.predict(input);\n }\n catch (NoViableAltException nvae) {\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(106);}\n\n switch (alt106) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:601:9: localVariableDeclarationStatement\n {\n dbg.location(601,9);\n pushFollow(FOLLOW_localVariableDeclarationStatement_in_blockStatement3231);\n localVariableDeclarationStatement();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:602:9: classOrInterfaceDeclaration\n {\n dbg.location(602,9);\n pushFollow(FOLLOW_classOrInterfaceDeclaration_in_blockStatement3241);\n classOrInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:603:9: statement\n {\n dbg.location(603,9);\n pushFollow(FOLLOW_statement_in_blockStatement3251);\n statement();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 86, blockStatement_StartIndex); }\n }\n dbg.location(604, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"blockStatement\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n\tpublic Void visit(LetVar letvar) {\n\t\tprintIndent(\"local\");\n\t\tindent++;\n\t\tletvar.id.accept(this);\n\t\tletvar.type.accept(this);\n\t\tif (letvar.expr != null)\n\t\t\tletvar.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "public final void synpred186_Java_fragment() throws RecognitionException {\n // Java.g:678:9: ( localVariableDeclaration )\n dbg.enterAlt(1);\n\n // Java.g:678:9: localVariableDeclaration\n {\n dbg.location(678,9);\n pushFollow(FOLLOW_localVariableDeclaration_in_synpred186_Java3899);\n localVariableDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "public T caseVariableDeclaration(VariableDeclaration object)\r\n {\r\n return null;\r\n }", "public void testLocalType() throws JavaModelException {\n\t\tASTNode node = buildAST(\n\t\t\t\"public class X {\\n\" +\n\t\t\t\" void foo() {\\n\" +\n\t\t\t\" /*start*/class Y {\\n\" +\n\t\t\t\" }/*end*/\\n\" +\n\t\t\t\" }\\n\" +\n\t\t\t\"}\"\n\t\t);\n\t\tIBinding binding = ((TypeDeclarationStatement) node).resolveBinding();\n\t\tassertNotNull(\"No binding\", binding);\n\t\tIJavaElement element = binding.getJavaElement();\n\t\tassertElementEquals(\n\t\t\t\"Unexpected Java element\",\n\t\t\t\"Y [in foo() [in X [in [Working copy] X.java [in <default> [in <project root> [in P]]]]]]\",\n\t\t\telement\n\t\t);\n\t\tassertTrue(\"Element should exist\", element.exists());\n\t}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "public List<Declaration> localMembers() throws LookupException;", "public void visit(VariableDeclarator n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParameters_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "private boolean isVariableDeclaration(boolean aGlobal) throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\t\n\t\tif(aGlobal)\n\t\t{\n\t\t\ttheSymbolTable.UpdateScopeForGlobal();\n\t\t}\n\t\t\n\t\tif(isTypeMark())\n\t\t{\n\t\t\ttheSymbolTable.CURR_SYMBOL.setType(theCurrentToken.TokenType);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t\t{\n\t\t\t\ttheSymbolTable.AddToScopeKey(theCurrentToken.TokenValue);\n\t\t\t\ttheSymbolTable.CURR_SYMBOL.setLineNumber(theCurrentToken.TokenLineNumber);\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif(theNextToken.TokenType == TokenType.LEFT_BRACKET)\n\t\t\t\t\t{\n\t\t\t\t\t\tupdateToken();\n\t\t\t\t\t\tif(isBoundStatement())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString aDeclaration = \n\t\t\t\t\t\t\t\t\ttheTranslator.VariableDeclarationBuilder(theSymbolTable.ReturnScopeKeyForTranslation(),\n\t\t\t\t\t\t\t\t\t\t\ttheSymbolTable.CURR_SYMBOL);\n\t\t\t\t\t\t\ttheSymbolTable.PutSymbolInTable();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(aGlobal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttheTranslator.theGlobalDeclarationQueue.add(aDeclaration);\n\t\t\t\t\t\t\t\ttheSymbolTable.ReturnScopeForGlobal();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttheTranslator.theCurrentBody.add(aDeclaration);\n\t\t\t\t\t\t\t\ttheSymbolTable.RemoveFromScopeKey();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tString aDeclaration = \n\t\t\t\t\t\t\t\ttheTranslator.VariableDeclarationBuilder(theSymbolTable.ReturnScopeKeyForTranslation(), \n\t\t\t\t\t\t\t\t\t\ttheSymbolTable.CURR_SYMBOL);\n\t\t\t\t\t\ttheSymbolTable.PutSymbolInTable();\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(aGlobal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheTranslator.theGlobalDeclarationQueue.add(aDeclaration);\n\t\t\t\t\t\t\ttheSymbolTable.ReturnScopeForGlobal();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheTranslator.theCurrentBody.add(aDeclaration);\n\t\t\t\t\t\t\ttheSymbolTable.RemoveFromScopeKey();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\ttheLogger.LogScanError(theCurrentToken);\n\t\t\t\t\tupdateToken();\n\t\t\t\t\twhile(theNextToken != null && theNextToken.TokenType != TokenType.SEMICOLON)\n\t\t\t\t\t\tupdateToken();\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Invalid type provided.\n\t\telse if (theCurrentToken.TokenType == TokenType.IDENTITY && theNextToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\ttheLogger.LogParseError(theCurrentToken);\n\t\t\twhile(theNextToken.TokenType != TokenType.SEMICOLON)\n\t\t\t\tupdateToken();\n\t\t\tisValid = true;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "VarDecl createVarDecl();", "public T caseVariableDeclarationCS(VariableDeclarationCS object) {\r\n return null;\r\n }", "@Override\r\n protected void handleLocalVariableDeclaration(final IRNode varDecl) {\n if (!TypeUtil.isJSureFinal(varDecl)) { // TODO: Really replace with isEffectivelyFinal()\r\n /* LOCAL VARIABLE: 'varDecl' is already the declaration of the variable,\r\n * so we don't have to bind it.\r\n */\r\n addEffect(Effect.write(varDecl, new LocalTarget(varDecl), getEvidence()));\r\n }\r\n doAcceptForChildren(varDecl);\r\n }", "public hk a(String s, a a1)\n {\n class c {}\n\n c c1 = new c(null);\n /* block-local class not found */\n class b {}\n\n b.a(new b(s, a1, c1));\n return c1;\n }", "public LocalDecl createLocalDecl(Position pos, Flags flags, Name name, Type type, Expr init) {\n LocalDef def = xts.localDef(pos, flags, Types.ref(type), name);\n return createLocalDecl(pos, def, init);\n }", "public Rule localDef()\n \t{\n\t\treturn sequence(\n\t\t\t\tfirstOf(\n\t\t\t\t\tsequence(typeAndOrId(), enforcedSequence(OP_ASSIGN, expr())),\n\t\t\t\t\tsequence(type(), id())),\n \t\t\t\teos());\n \t}", "private void parseStmt() throws IOException, FSException,RetException {\n\n\n switch(tok.ttype) {\n\n case LexAnn.TT_DEFINT:\n case LexAnn.TT_DEFSTRING:\n case LexAnn.TT_DEFDOUBLE:\n case LexAnn.TT_DEFOBJECT: {\n parseVarDef();\n break;\n }\n\n case LexAnn.TT_IF: {\n parseIf();\n break;\n }\n case LexAnn.TT_WHILE: {\n parseWhile();\n break;\n }\n case LexAnn.TT_RETURN: {\n parseReturn();\n break;\n }\n case LexAnn.TT_DEFFUNC: {\n parseFunctionDef();\n break;\n }\n case LexAnn.TT_EDEFFUNC: {\n parseFunctionEnd();\n break;\n }\n case LexAnn.TT_EIF:\n throw new FSException(\"unexpected endif\");\n case LexAnn.TT_EWHILE:\n throw new FSException(\"unexpected endwhile\");\n\n case LexAnn.TT_FUNC: {\n parseFunc();\n break;\n }\n case LexAnn.TT_ARRAY: {\n parseArrayAssign();\n break;\n }\n case LexAnn.TT_WORD: {\n parseAssign();\n break;\n }\n case LexAnn.TT_EOL: {\n tok.nextToken();\n break;\n }\n case LexAnn.TT_EOF: {\n // all done\n break;\n }\n default: {\n parseError(\"Expected identifier \"+tok);\n\n }\n }\n\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "public LocalDecl createLocalDecl(Position pos, Flags flags, Name name, Type type) {\n LocalDef def = xts.localDef(pos, flags, Types.ref(type), name);\n return createLocalDecl(pos, def);\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "public interface AstWhileStatement extends AstStatement {\r\n\tpublic AstKeyword get_while();\r\n\r\n\tpublic AstPunctuator get_lparanth();\r\n\r\n\tpublic AstExpression get_condition();\r\n\r\n\tpublic AstPunctuator get_rparanth();\r\n\r\n\tpublic AstStatement get_body();\r\n}", "public LocalVariable defineLocalVariable(QName name, XQType type,\n Expression declaring)\n {\n \n LocalVariable decl = newLocal(name, type, declaring);\n lastLocal.addAfter(decl);\n lastLocal = decl;\n return decl;\n }", "public Type visit(VarDecl n) {\n\t\tn.t.accept(this);\n\t\tn.i.accept(this);\n\t\treturn null;\n\t}", "void createLocalClass()\n\t{\n\t\tfinal int localVar = 10;\n\t\t\n\t\t//this is to create local class\n\t\tclass LocalClass{\n\t\t\tpublic void print(){\n\t\t\t\tSystem.out.println(\"THis is local class with Id:\");\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+nums);\n\t\t\t\tSystem.out.println(\"THis is local class with num:\"+localVar); // localVar must be final. scope is different. the value might change inside local method.\n\t\t\t}\n\t\t}\n\t\t\n\t\tLocalClass l = new LocalClass();\n\t\tl.print();\n\t}", "public LocalDebugInfo[] locals();", "public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n // System.out.println(\"BEGIN\");\n n.f1.accept(this);\n n.f2.accept(this);\n \t\n String s = (String) n.f3.accept(this);\n current_temp =s;\n n.f4.accept(this);\n //System.out.println(\"END\");\n return (R)s;\n }", "public MType visit(AssignmentStatement n, MType argu) {\n \t\n \tMType _ret=null;\n \t\n \t//左边f0这个变量如果没有在该方法或该方法所在类或其继承的所有的类中声明则报未定义错\n \tString leftname = n.f0.accept(this, argu).getName();\n \tMType left = Judge.isVarDeclared(leftname, argu);\n \tif (left == null)\n \t\tConsole.UndefinedVariable(n.f0.f0.beginLine, leftname);\n \t\n \t\tn.f2.accept(this, argu);\n \t\t\n \t\treturn _ret;\n }", "void declaration() {\n\t\tString theToken = currentToken();\r\n\r\n\t\tif (theToken.equals(\"int\") || theToken.equals(\"void\")) {\r\n\t\t\ttypeSpeci();\r\n\t\t\taccept(\"ID\");\r\n\t\t\ttheToken = currentToken();\r\n\t\t\tif (theToken.equals(\";\") || theToken.equals(\"[\"))\r\n\t\t\t\tvarDec();\r\n\r\n\t\t\t// if int ID ( param ) compoundStatment\r\n\t\t\telse if (theToken.equals(\"(\"))\r\n\t\t\t\tfunDec();\r\n\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\treturn;\r\n\t}", "public final EObject entryRuleLocalVariableDeclaration() throws RecognitionException {\n EObject current = null;\n int entryRuleLocalVariableDeclaration_StartIndex = input.index();\n EObject iv_ruleLocalVariableDeclaration = null;\n\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 43) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2235:2: (iv_ruleLocalVariableDeclaration= ruleLocalVariableDeclaration EOF )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2236:2: iv_ruleLocalVariableDeclaration= ruleLocalVariableDeclaration EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getLocalVariableDeclarationRule()); \n }\n pushFollow(FOLLOW_ruleLocalVariableDeclaration_in_entryRuleLocalVariableDeclaration4370);\n iv_ruleLocalVariableDeclaration=ruleLocalVariableDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleLocalVariableDeclaration; \n }\n match(input,EOF,FOLLOW_EOF_in_entryRuleLocalVariableDeclaration4380); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 43, entryRuleLocalVariableDeclaration_StartIndex); }\n }\n return current;\n }", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "void testLocalStaticClass() {\n // static class LocalStaticClass {\n // }\n }", "public void visit(VariableDeclaratorId n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public MType visit(VarDeclaration n, MType argu) {\n \t//如果f0对应的变量类型未被声明过,则报未定义错\n \tMType _ret = n.f0.accept(this, argu);\n \tif (_ret != null) {\n \t\tif (((MClasses) Mainclass.my_classes).getClassByName(_ret.getName()) == null)\n \t\t\tConsole.UndefinedClass(n.f1.f0.beginLine, _ret.getName());\n \t}\n \t\n\t return _ret;\n\t}", "public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }", "public T caseVariableDeclarationWithInitCS(VariableDeclarationWithInitCS object) {\r\n return null;\r\n }", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "public Object visitStmtBlock(StmtBlock stmt)\n {\n \tLevel lvl = state.pushLevel(\"backwarddataflow block\");\n \t//First, we declare the variables in the block.\n \tfor (Iterator iter = stmt.getStmts().iterator(); iter.hasNext(); )\n {\n Statement s = (Statement)iter.next();\n // completely ignore null statements, causing them to\n // be dropped in the output\n if (s == null)\n continue;\n if( s instanceof StmtVarDecl ){\n \tvarDecl((StmtVarDecl) s);\n }\n }\n\n\n \tStatement rs = null;\n \ttry{\n \t\t{\n \t List<Statement> oldStatements = newStatements;\n \t newStatements = new ArrayList<Statement>();\n \t List<Statement> blockBody = stmt.getStmts();\n \t for(int i=blockBody.size()-1; i>=0; --i){\n \t \tStatement s = blockBody.get(i);\n \t // completely ignore null statements, causing them to\n \t // be dropped in the output\n \t if (s == null)\n \t continue;\n \t try{\n \t \tdoStatement(s);\n \t }catch(RuntimeException e){\n \t \tnewStatements = oldStatements;\n \t \tthrow e;\n \t }\n \t }\n \t ArrayList<Statement> newBlockBody = new ArrayList<Statement>(newStatements.size());\n \t for(int i=newStatements.size()-1; i>=0; --i){\n \t \tnewBlockBody.add(newStatements.get(i));\n \t }\n\n \t Statement result = new StmtBlock(stmt, newBlockBody);\n \t newStatements = oldStatements;\n \t rs = result;\n \t }\n \t}finally{\n \t\tif( rs == null){\n \t\t\trs = stmt;\n \t\t}\n \t\tstate.popLevel(lvl);\n \t}\n return rs;\n }", "@Test\n\tpublic void testDeclaration(){\n\t\tVariable x = new Variable(\"x\");\n\t\tStatement decl = f.createDeclNode(x);\n\t\tassertEquals(decl.textRepresentation(), \"var x;\");\n\t\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tdecl.accept(v);\n\t\tassertEquals(\"declaration test1 fail\", v.numCount, 0);\n\t\tassertEquals(\"declaration test2 fail\", v.infixCount, 0);\n\t\tassertEquals(\"declaration test3 fail\", v.decCount, 1);\n\t\tassertEquals(\"declaration test4 fail\", v.seqCount, 0);\n\t\tassertEquals(\"declaration test5 fail\", v.assignCount, 0);\n\t\tassertEquals(\"declaration test6 fail\", v.varCount, 0);\n\t\tassertEquals(\"declaration test7 fail\", v.strCount, 0);\n\t\tassertEquals(\"declaration test8 fail\", v.prefixCount, 0);\n\n\t}", "private LocalVariables locals(){\n\t\treturn frame.getLocals();\n\t}", "private VariableDeclaration getVarDeclaration(Element statement) {\n VariableDeclaration variableDeclaration = statement.nearestAncestor(VariableDeclaration.class);\n if (variableDeclaration == null) {\n return getNearestElement(statement, VariableDeclaration.class);\n } else {\n return variableDeclaration;\n }\n }", "private void classBodyDeclaration(ClassType object, Modifier modifier, Vector queue)\r\n {\r\n Modifier x = new Modifier(modifier);\r\n x.cur = 0;\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n if (nextSymbol == Keyword.STATICSY)\r\n {\r\n x.add(modifier());\r\n queue = object.statics;\r\n }\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n Vector label = new Vector();\r\n //label.add(\"\" + Operation.newLabel());\r\n block(null, null, object.scope, label, Scope.MAIN, null, queue);\r\n }\r\n else\r\n {\r\n for(int y = modifier1(); y != 0; y = modifier())\r\n x.add(y);\r\n\r\n if ((x.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n if ((x.cur & x.constructors) == 0)\r\n x.cur |= modifier.cur & modifier.constructors;\r\n\r\n if ((x.cur & Keyword.STATICSY.value) != 0)\r\n queue = object.statics;\r\n\r\n memberDecl(x, object, queue);\r\n }\r\n }", "public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;", "public void methodIdentifier( int variableIdentifier1\n , char variableIdentifier2\n , boolean variableIdentifier3\n , ClassIdentifier3 variableIdentifier4\n )\n {\n //<block statements>\n }", "public Variable[] getLocals();", "@Override\r\n\tpublic boolean visit(VariableDeclarationFragment node) {\r\n//\t\toperator(node);\r\n\t\treturn true;\r\n\t}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParametersPackage_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "declaration getDeclaration();", "private Stmt simpleStmt() {\n if (null != lexer.token) {\n switch (lexer.token) {\n case PRINT:\n return printStmt();\n case BREAK:\n return breakStmt();\n case IDENT:\n lexer.nextToken();\n if (lexer.token == Symbol.LEFTPAR) {\n lexer.backToken();\n return funcStmt();\n } else {\n lexer.backToken();\n return exprStmt();\n }\n case RETURN:\n return returnStmt();\n default:\n break;\n }\n }\n return null;\n }", "public boolean ifPeekIsStmt() {\n\t\tif (ifPeek(\"IF_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"WHILE_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"FOR_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// **************\n\t\t// TODO\n\t\tif (ifPeek(\"ID_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// ***************\n\t\tif (ifPeek(\"RETURN_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"BREAK_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"CONT_\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public LocalDecl transformFormalToLocalDecl(X10Formal formal, Expr init) {\n return xnf.LocalDecl(formal.position(), formal.flags(), formal.type(), formal.name(), init).localDef(formal.localDef());\n }", "public void masterDeclaration();", "public LocalEnd LocalEnd()\n\t{\n\t\t//return new LocalEnd(self);\n\t\treturn new LocalEnd();\n\t}", "public final ValidateStateTransitionsParser.variableDeclarator_return variableDeclarator() throws RecognitionException {\r\n ValidateStateTransitionsParser.variableDeclarator_return retval = new ValidateStateTransitionsParser.variableDeclarator_return();\r\n retval.start = input.LT(1);\r\n\r\n int variableDeclarator_StartIndex = input.index();\r\n\r\n ValidateStateTransitionsParser_JavaTreeParser.variableDeclaratorId_return variableDeclaratorId8 =null;\r\n\r\n\r\n try {\r\n if ( state.backtracking>0 && alreadyParsedRule(input, 296) ) { return retval; }\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:288:5: ( ^( VAR_DECLARATOR variableDeclaratorId ( variableInitializer )? ) )\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:288:9: ^( VAR_DECLARATOR variableDeclaratorId ( variableInitializer )? )\r\n {\r\n match(input,VAR_DECLARATOR,FOLLOW_VAR_DECLARATOR_in_variableDeclarator867); if (state.failed) return retval;\r\n\r\n match(input, Token.DOWN, null); if (state.failed) return retval;\r\n pushFollow(FOLLOW_variableDeclaratorId_in_variableDeclarator881);\r\n variableDeclaratorId8=variableDeclaratorId();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n if ( state.backtracking==0 ) {\r\n retval.isState = (variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null).matches(getParamS(\"stateConstants\"));\r\n if (retval.isState){\r\n getLogger().fine(\"Detected state variable \"+(variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null));\r\n knownStates.put((variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null), new State((variableDeclaratorId8!=null?(input.getTokenStream().toString(input.getTreeAdaptor().getTokenStartIndex(variableDeclaratorId8.start),input.getTreeAdaptor().getTokenStopIndex(variableDeclaratorId8.start))):null)));\r\n // original declaration is deleted\r\n tokens.delete(\r\n input.getTreeAdaptor().getTokenStartIndex(((CommonTree)retval.start)),\r\n input.getTreeAdaptor().getTokenStopIndex(((CommonTree)retval.start))\r\n );\r\n }\r\n }\r\n\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:302:13: ( variableInitializer )?\r\n int alt16=2;\r\n int LA16_0 = input.LA(1);\r\n\r\n if ( (LA16_0==ARRAY_INITIALIZER||LA16_0==EXPR) ) {\r\n alt16=1;\r\n }\r\n switch (alt16) {\r\n case 1 :\r\n // E:\\\\GitHub\\\\CesTa\\\\src\\\\org\\\\cesta\\\\grammars\\\\java\\\\ValidateStateTransitionsParser.g:302:13: variableInitializer\r\n {\r\n pushFollow(FOLLOW_variableInitializer_in_variableDeclarator909);\r\n variableInitializer();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match(input, Token.UP, null); if (state.failed) return retval;\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n if ( state.backtracking>0 ) { memoize(input, 296, variableDeclarator_StartIndex); }\r\n\r\n }\r\n return retval;\r\n }", "public T caseVariableDeclarationWithInitListCS(VariableDeclarationWithInitListCS object) {\r\n return null;\r\n }", "public /*@Nullable*/ VariableTree getDeclaration() {\n return decl;\n }", "public void visit(LabeledStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n }", "public final PythonParser.stmt_return stmt() throws RecognitionException {\n PythonParser.stmt_return retval = new PythonParser.stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.simple_stmt_return simple_stmt56 = null;\n\n PythonParser.compound_stmt_return compound_stmt57 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:546:5: ( simple_stmt | compound_stmt )\n int alt26=2;\n int LA26_0 = input.LA(1);\n\n if ( (LA26_0==NAME||(LA26_0>=ASSERT && LA26_0<=BREAK)||LA26_0==CONTINUE||LA26_0==DELETE||LA26_0==EXEC||LA26_0==FROM||LA26_0==GLOBAL||LA26_0==IMPORT||(LA26_0>=LAMBDA && LA26_0<=NOT)||(LA26_0>=PASS && LA26_0<=RETURN)||LA26_0==YIELD||LA26_0==LPAREN||(LA26_0>=PLUS && LA26_0<=MINUS)||(LA26_0>=TILDE && LA26_0<=LBRACK)||LA26_0==LCURLY||(LA26_0>=BACKQUOTE && LA26_0<=STRING)) ) {\n alt26=1;\n }\n else if ( (LA26_0==CLASS||LA26_0==DEF||LA26_0==FOR||LA26_0==IF||(LA26_0>=TRY && LA26_0<=WITH)||LA26_0==AT) ) {\n alt26=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 26, 0, input);\n\n throw nvae;\n }\n switch (alt26) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:546:7: simple_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_simple_stmt_in_stmt1386);\n simple_stmt56=simple_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, simple_stmt56.getTree());\n if ( state.backtracking==0 ) {\n\n retval.stypes = (simple_stmt56!=null?simple_stmt56.stypes:null);\n \n }\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:550:7: compound_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_compound_stmt_in_stmt1402);\n compound_stmt57=compound_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, compound_stmt57.getTree());\n if ( state.backtracking==0 ) {\n\n retval.stypes = new ArrayList();\n retval.stypes.add((compound_stmt57!=null?((PythonTree)compound_stmt57.tree):null));\n \n }\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public final EObject ruleVariableDeclaration() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n EObject lv_type_0_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3266:28: ( ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:1: ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:1: ( ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:2: ( (lv_type_0_0= ruleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= ';'\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3267:2: ( (lv_type_0_0= ruleDataType ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3268:1: (lv_type_0_0= ruleDataType )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3268:1: (lv_type_0_0= ruleDataType )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3269:3: lv_type_0_0= ruleDataType\n {\n \n \t newCompositeNode(grammarAccess.getVariableDeclarationAccess().getTypeDataTypeParserRuleCall_0_0()); \n \t \n pushFollow(FOLLOW_ruleDataType_in_ruleVariableDeclaration7352);\n lv_type_0_0=ruleDataType();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_0_0, \n \t\t\"DataType\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3285:2: ( (lv_name_1_0= RULE_ID ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3286:1: (lv_name_1_0= RULE_ID )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3286:1: (lv_name_1_0= RULE_ID )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3287:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleVariableDeclaration7369); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getVariableDeclarationAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getVariableDeclarationRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,18,FOLLOW_18_in_ruleVariableDeclaration7386); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getVariableDeclarationAccess().getSemicolonKeyword_2());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "public T caseVariableDeclarationWithoutInitCS(VariableDeclarationWithoutInitCS object) {\r\n return null;\r\n }", "public Local createLocal(Position pos, LocalDecl decl) {\n return createLocal(pos, decl.localDef().asInstance());\n }", "private Stmt compoundStmt() {\n if (lexer.token == Symbol.IF) {\n return iftStmt();\n } else if (lexer.token == Symbol.WHILE) {\n return whileStmt();\n }\n return forStmt();\n }", "Statement getStmt();", "public void handleDeclaration(HtmlObjects.Declaration t)\n {\n }", "public String visit(FormalParameterList n, String ourclass) {\n n.f0.accept(this, ourclass);\n n.f1.accept(this, ourclass);\n return null; \n }", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "public final PythonParser.compound_stmt_return compound_stmt() throws RecognitionException {\n PythonParser.compound_stmt_return retval = new PythonParser.compound_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.if_stmt_return if_stmt129 = null;\n\n PythonParser.while_stmt_return while_stmt130 = null;\n\n PythonParser.for_stmt_return for_stmt131 = null;\n\n PythonParser.try_stmt_return try_stmt132 = null;\n\n PythonParser.with_stmt_return with_stmt133 = null;\n\n PythonParser.funcdef_return funcdef134 = null;\n\n PythonParser.classdef_return classdef135 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:876:5: ( if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | ( ( decorators )? DEF )=> funcdef | classdef )\n int alt63=7;\n int LA63_0 = input.LA(1);\n\n if ( (LA63_0==IF) ) {\n alt63=1;\n }\n else if ( (LA63_0==WHILE) ) {\n alt63=2;\n }\n else if ( (LA63_0==FOR) ) {\n alt63=3;\n }\n else if ( (LA63_0==TRY) ) {\n alt63=4;\n }\n else if ( (LA63_0==WITH) ) {\n alt63=5;\n }\n else if ( (LA63_0==AT) ) {\n int LA63_6 = input.LA(2);\n\n if ( (synpred6_Python()) ) {\n alt63=6;\n }\n else if ( (true) ) {\n alt63=7;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 63, 6, input);\n\n throw nvae;\n }\n }\n else if ( (LA63_0==DEF) && (synpred6_Python())) {\n alt63=6;\n }\n else if ( (LA63_0==CLASS) ) {\n alt63=7;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 63, 0, input);\n\n throw nvae;\n }\n switch (alt63) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:876:7: if_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_if_stmt_in_compound_stmt3414);\n if_stmt129=if_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, if_stmt129.getTree());\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:877:7: while_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_while_stmt_in_compound_stmt3422);\n while_stmt130=while_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, while_stmt130.getTree());\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:878:7: for_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_for_stmt_in_compound_stmt3430);\n for_stmt131=for_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, for_stmt131.getTree());\n\n }\n break;\n case 4 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:879:7: try_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_try_stmt_in_compound_stmt3438);\n try_stmt132=try_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, try_stmt132.getTree());\n\n }\n break;\n case 5 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:880:7: with_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_with_stmt_in_compound_stmt3446);\n with_stmt133=with_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, with_stmt133.getTree());\n\n }\n break;\n case 6 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:881:7: ( ( decorators )? DEF )=> funcdef\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_funcdef_in_compound_stmt3463);\n funcdef134=funcdef();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, funcdef134.getTree());\n\n }\n break;\n case 7 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:882:7: classdef\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_classdef_in_compound_stmt3471);\n classdef135=classdef();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, classdef135.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public T caseVariableDeclarationWithoutInitListCS(VariableDeclarationWithoutInitListCS object) {\r\n return null;\r\n }", "@Override\n public String visit(VariableDeclarationExpr n, Object arg) {\n return null;\n }", "public T caseLocal(Local object) {\r\n\t\treturn null;\r\n\t}", "private ParseTree parseStatement() {\n return parseSourceElement();\n }", "@Override\n public String visit(VariableDeclarator n, Object arg) {\n return null;\n }", "public LocalDecl createLocalDecl(Position pos, LocalDef def, Expr init) {\n return xnf.LocalDecl( pos.markCompilerGenerated(), \n xnf.FlagsNode(pos, def.flags()),\n xnf.CanonicalTypeNode(pos, def.type().get()), \n xnf.Id(pos, def.name()),\n init ).localDef(def);\n }", "ResolvedReferenceTypeDeclaration declaringType();", "public R visit(StmtList n) {\n R _ret=null;\n n.f0.accept(this);\n return _ret;\n }", "public ReadStmt(Variable var)\n {\n this.var = var;\n }", "int getDeclarationSourceStart();" ]
[ "0.672178", "0.638141", "0.63175726", "0.62892234", "0.60996777", "0.60664386", "0.6008117", "0.59839016", "0.59805435", "0.5964828", "0.5962328", "0.5920267", "0.59073114", "0.58600324", "0.58498937", "0.58460176", "0.5736271", "0.56092036", "0.55943024", "0.5589317", "0.5568353", "0.5472494", "0.5468323", "0.5461864", "0.5432435", "0.5401594", "0.54011464", "0.5349514", "0.5336498", "0.53349954", "0.53317904", "0.5315165", "0.52986705", "0.5288811", "0.5283784", "0.5282758", "0.5280585", "0.5278225", "0.5265717", "0.52549154", "0.5245002", "0.5193927", "0.5178606", "0.517365", "0.51689506", "0.5152247", "0.5146616", "0.51401454", "0.5130361", "0.51239717", "0.5118526", "0.5092018", "0.50855696", "0.5072437", "0.50482583", "0.50443125", "0.5039213", "0.50272864", "0.50192183", "0.5016589", "0.50050056", "0.49956524", "0.49893582", "0.4985233", "0.4979308", "0.49522004", "0.4950402", "0.4948937", "0.4941737", "0.4923214", "0.49128023", "0.49084", "0.49065056", "0.48907626", "0.48825994", "0.4870841", "0.4859804", "0.48545787", "0.4851046", "0.48481163", "0.48470297", "0.48464853", "0.4834327", "0.48250377", "0.4814252", "0.48003072", "0.48001987", "0.4788981", "0.4782512", "0.47793636", "0.47742167", "0.47735372", "0.4763921", "0.4763202", "0.47544432", "0.47483087", "0.4746864", "0.474407", "0.4742874", "0.47383782" ]
0.48200887
84
generate administrative code at the end of a block
private Operation blockEnd(Scope scope) { Operation root = new Operation(); root.operator = Keyword.BLOCKENDSY; root.code = (String)scope.label.get(0); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void endBlock() {\n }", "public void endBlockOut () {\n addLine (getBlockEnd());\n // writer.close();\n }", "public abstract void appendBlock();", "public String generateBlock(){\n return null;\n }", "public abstract void generateNextBlock();", "public String getBlockEnd () {\n return BLOCK_END_PREFIX + objectName + BLOCK_END_SUFFIX;\n }", "final public void block() throws ParseException {\n jj_consume_token(35);\n jj_consume_token(BLOCK);\n label_3:\n while (true) {\n if (jj_2_35(4)) {\n ;\n } else {\n break label_3;\n }\n jj_consume_token(34);\n }\n if (jj_2_36(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(36);\n }", "@Override\n public void outBlockStatement(BlockStatement node)\n {\n\n }", "@ActionTrigger(action=\"KEY-NXTBLK\", function=KeyFunction.NEXT_BLOCK)\n\t\tpublic void spriden_NextBlock()\n\t\t{\n\t\t\t\n\t\t\t\tgoBlock(toStr(\"SOUNDEX\"));\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "@Override\n public void endVisit(CssIf x, Context ctx) {\n out.indentOut();\n out.printOpt(\"/* } */\");\n out.newlineOpt();\n }", "public void FinishTheGame(){\r\n if(blockList.HasNoBlocks()){\r\n gamePage.NextLevel();\r\n }\r\n }", "@Override\r\n\tpublic void blockId() {\n\t\t\r\n\t\tSystem.out.println(\"Here you have information about blockID\");\r\n\t\t\r\n\t}", "private String addEnd() {\n\t\t// NO PARAMETERS\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|End\");\n\t\treturn tag.toString();\n\t}", "@Override\n\tprotected void endOfLine() {\n\t}", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "public void outputAfterRecipe_EM() {\n }", "public void append(Block block) {\r\n\t\tfor(Entry s : block) {\r\n\t\t\tappend(s.code,s.attributes());\r\n\t\t}\r\n\t}", "protected void buildBlockBuildFunction(String block) {\n\t\toutputList.add(new OutputLine(indentLvl, \"\")); \t\n\t\toutputList.add(new OutputLine(indentLvl++, \"virtual function void build();\"));\n\t\t\n\t\t// add subcomponent build statements\n\t\tList<SpecialLine> buildList = subcompBuildList.getStatements(block);\n\t\tif (buildList != null) {\n\t\t\tIterator<SpecialLine> iter = buildList.iterator();\n\t\t\t// traverse subcomponent list\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tSpecialLine line = iter.next();\n\t\t\t\tline.setIndent(indentLvl);\n\t\t\t\toutputList.add(line);\n\t\t\t} \n\t\t}\t\t\t\t\t\n\t\toutputList.add(new OutputLine(--indentLvl, \"endfunction: build\"));\n\t}", "public void elementEnd() {\n\t\t\t\t\t\tblipsText.append(\"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public Block getEnd () {\n\t\treturn end;\n\t}", "@Override\n\tprotected void end() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" end\");\n\t}", "private static String footer() {\r\n String output = \"\";\r\n\r\n output += \"\\n\\\\end{document}\";\r\n\r\n return output;\r\n }", "public Code visitBlockNode(BlockNode node) {\n beginGen(\"Block\");\n /** Generate code to allocate space for local variables on\n * procedure entry.\n */\n Code code = new Code();\n code.genAllocStack(node.getBlockLocals().getVariableSpace());\n /* Generate the code for the body */\n code.append(node.getBody().genCode(this));\n /** Generate code for local procedures. */\n /* Static level is one greater for the procedures. */\n staticLevel++;\n node.getProcedures().accept(this);\n staticLevel--;\n endGen(\"Block\");\n return code;\n }", "TestLastBlock createTestLastBlock();", "public Snippet visit(FinishStatement n, Snippet argu) {\n\t Snippet _ret=null;\n\t tPlasmaCode+=generateTabs(blockDepth);//+\"finish \";\n\t n.nodeToken.accept(this, argu);\n\t n.block.accept(this, argu);\n\t \n\t return _ret;\n\t }", "@Override\r\n\tpublic void visit(BlockExpression blockExpression) {\n\r\n\t}", "public static String endMethod() {\n\t\treturn \"\\t\\t\\t</mth>\" + \"\\n\";\n\t}", "public void startBlockOut (String objectName) {\n \n this.objectName = objectName;\n // writer.open();\n addLine (getBlockStart());\n }", "void updateBlock(Block block) ;", "DefineBlock createDefineBlock();", "StatementBlock createStatementBlock();", "protected String codeBlockSource(Block block) {\n block.removeFirstOperation(); // aload_0\n block.removeFirstOperation(); // aload_1\n block.removeFirstOperation(); // iload_2\n block.removeFirstOperation(); // invokespecial <init>\n\n if (getTopBlock().getOperations().size() == 1 &&\n getTopBlock().getOperations().get(0) instanceof ReturnView) {\n return null;\n }\n\n return super.codeBlockSource(block);\n }", "public abstract void blockNext();", "@Override\n public void visitBlockStmt(BlockStmt stmt) {\n enterBlockStmt(stmt);\n super.visitBlockStmt(stmt);\n leaveBlockStmt(stmt);\n }", "protected String elaboraFooter() {\n String testo = A_CAPO;\n boolean nascosta = pref.isBool(FlowCost.USA_DEBUG);\n String cat;\n\n if (usaNote) {\n testo += usaNote();\n }// end of if cycle\n\n if (usaVociCorrelate) {\n testo += usaVociCorrelate();\n }// end of if cycle\n\n testo += LibWiki.setPortale(tagHeadTemplateProgetto);\n cat = tagCategoria;\n cat = nascosta ? LibWiki.setNowiki(cat) : cat;\n testo += cat;\n\n return testo;\n }", "public String buildingBlockAction() throws Exception {\n\t\t\t\t\n\t return \"success\";\n\t }", "void doAfterEndTag() {\r\n }", "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "public static void displayProgramEnd() \r\n {\n }", "@InnerAccess void visitEnd ()\n\t{\n\t\tclassWriter.visitEnd();\n\t}", "private void endGen(String node) {\n errors.decDebug();\n errors.debugMessage(\"End generation of \" + node);\n if(nodeStack.isEmpty()) {\n errors.debugPrint(\"*** End of node \" + node + \n \" has no matching start\");\n } else {\n String popped = nodeStack.pop();\n if(node != popped) {\n /** This indicates an error in the code generator - always prints */\n errors.debugPrint(\"*** End node \" + node + \n \" does not match start node \" + popped);\n }\n }\n }", "SiteWriterTemplate finishBunch() throws Exception;", "@Override\n\tprotected void buildBlockClass(String uvmBlockClassName, Boolean hasCallback) {\n\t\t// create text name and description if null\n\t\tString id = regSetProperties.getId();\n\t\tString refId = regSetProperties.getBaseName(); // ref used for block structure lookup\n\t\t\n\t\tString textName = regSetProperties.getTextName();\n\t\tif (textName == null) textName = \"Block \" + id;\n\n\t\t// generate register header \n\t\toutputList.add(new OutputLine(indentLvl, \"\"));\t\n\t\toutputList.add(new OutputLine(indentLvl, \"// \" + textName));\n\t\toutputList.add(new OutputLine(indentLvl++, \"class \" + uvmBlockClassName + \"#(type ALTPBLOCK_T = \" + altModelRootType + \", type ALTBLOCK_T = \" + altModelRootType + \") extends uvm_block_translate;\")); \n\n\t\t// create field definitions \n\t\tbuildBlockDefines(refId);\n\t\t\n\t\t// create new function\n\t\t//buildBlockNewDefine(uvmBlockClassName); \n\t\t\n\t\t// create build function \n\t\tbuildBlockBuildFunction(refId);\n\t\t\n\t\t// get_alt_block - return alternate model regset struct corresponding to this block\n\t\tString escRegSetId = escapeReservedString(regSetProperties.getId());\n\t\tSystemVerilogFunction func = new SystemVerilogFunction(\"ALTBLOCK_T\", \"get_alt_block\"); \n\t\tif (regSetProperties.isRootInstance())\n\t\t\t func.addStatement(\"return \" + escRegSetId + \";\");\n\t\telse {\n\t\t\tfunc.addStatement(\"ALTPBLOCK_T alt_parent = m_parent.get_alt_block();\");\n\t\t\tif (regSetProperties.isReplicated())\n\t\t\t func.addStatement(\"return alt_parent.\" + escRegSetId + \"[m_rep];\");\n\t\t\telse \n\t\t\t func.addStatement(\"return alt_parent.\" + escRegSetId + \";\"); \n\t\t}\n\t\toutputList.addAll(func.genOutputLines(indentLvl));\t\n\t\t\n\t\t// close out the class definition\n\t\toutputList.add(new OutputLine(indentLvl, \"\"));\t\n\t\t//outputList.add(new OutputLine(indentLvl, \"`uvm_object_utils(\" + uvmBlockClassName + \")\")); \n\t\toutputList.add(new OutputLine(--indentLvl, \"endclass : \" + uvmBlockClassName));\n\t}", "@Override\n\tpublic Void visit(Block block) {\n\t\tprintIndent(\"block\");\n\t\tindent++;\n\t\tfor (var v : block.content) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "public void visitEnd()\n\t{\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "protected void end()\n\t{\n\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "protected void end() {\n \n \n }", "public String updateProductionBlock(ProductionBlock pb);", "private ConfigurationHTMLPrinter epilogue() {\n return endTable().decrementIndent().println(\"</body\").decrementIndent().println(\"</html>\");\n }", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "void endGeneration();", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "public void PlantMe(Block block){\n \tplugin.getReplant().add(block);\r\n \t\t//run the timer to load the block\r\n \t\r\n \tif(plugin.getTreeplant_Timer().getPoolSize() < plugin.getTreeplant_Timer().getMaximumPoolSize()){\r\n \t\tplugin.getTreeplant_Timer().schedule(new Runnable() {\r\n \t\t\t\tpublic void run() {\r\n \t\t\t\t\tif(!(plugin.getReplant().isEmpty())){\r\n \t\t\t\t\t\tBlock loadedBlock = plugin.getReplant().get(0);\r\n \t\t\t\t\t\t//remove it from the list\r\n \t\t\t\t\t\tplugin.getReplant().remove(0);\r\n \t\t\t\t\t\t//protect it\r\n \t\t\t\t\t\tProtectMe(loadedBlock);\r\n \t\t\t\t\t\t//made into a sap\r\n \t\t\t\t\t\tif( (loadedBlock.getType().equals(Material.AIR)) || (loadedBlock.getType().equals(Material.FIRE)) ) //just incase it was on fire\r\n \t\t\t\t\t\t\tloadedBlock.setType(Material.SAPLING);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t/* No longer needed! Didn't realized leaves light blocking changed way back when.\r\n \t\t\t\t\t\t * for(int i=loadedBlock.getY(); i < 128; i++){\r\n \t\t\t\t\t\t\t//delete all the leaves in a line to the sky limit\r\n \t\t\t\t\t\t\tif(loadedBlock.getType()==Material.LEAVES){\r\n \t\t\t\t\t\t\t\t//it's a leaf delete it\r\n \t\t\t\t\t\t\t\tloadedBlock.setType(Material.AIR);\r\n \t\t\t\t\t\t\t\t//update on server | Not needed?\r\n \t\t\t\t\t\t\t\t//etc.getServer().setBlock(leafToDelete);\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t//go up one\r\n \t\t\t\t\t\t\tloadedBlock = loadedBlock.getFace(BlockFace.UP);\r\n \t\t\t\t\t\t}*/\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}, plugin.getdelayTime(), TimeUnit.MILLISECONDS);\r\n \t}\r\n \t}", "public int c(Block parambec)\r\n/* 119: */ {\r\n/* 120:131 */ return 0;\r\n/* 121: */ }", "private void formatBlockContent(final TermParserReader p) {\n while (p.current().kind() != Terms.EOF\n && p.current().kind() != Terms.BLOCK_END) {\n final TermToken tt = p.current();\n final Token tk = token(tt);\n switch (tt.kind()) {\n case IGNORABLE:\n processIgnorable(p, tk);\n break;\n case CONTROL:\n // Whatever token was, advance to the next token.\n // Note that actual '{', '}' and ';' tokens are printed\n // by the block and segment parsing code.\n p.advance();\n break;\n case STATEMENT_START:\n formatSegment(p);\n break;\n case GRAMMAR_IS_LOADED:\n // FIXME log?\n p.advance();\n break;\n case SYNTAX_ERROR:\n // FIXME REPORT\n p.advance();\n break;\n default:\n assert false : \"it should be never encountered here: \" + tt;\n break;\n }\n }\n }", "protected void end() {\n\r\n\t}", "public int getRenderBlockPass(){\r\n return 1;\r\n }", "protected final void emitBackEnd() {\n emitLIR();\n emitCode();\n }", "@Override\r\n protected void end() {\r\n\r\n }", "CodeBlock createCodeBlock();", "public void writeBlock(boolean last) throws IOException {\n\t\t\tif (last) {\n\t\t\t\t// always fits, because of BLOCK's size\n\t\t\t\tblocksize = (short)writePos;\n\t\t\t\t// this is the last block, so encode least\n\t\t\t\t// significant bit in the first byte (little-endian)\n\t\t\t\tblklen[0] = (byte)(blocksize << 1 & 0xFF | 1);\n\t\t\t\tblklen[1] = (byte)(blocksize >> 7);\n\t\t\t} else {\n\t\t\t\t// always fits, because of BLOCK's size\n\t\t\t\tblocksize = (short)BLOCK;\n\t\t\t\t// another block will follow, encode least\n\t\t\t\t// significant bit in the first byte (little-endian)\n\t\t\t\tblklen[0] = (byte)(blocksize << 1 & 0xFF);\n\t\t\t\tblklen[1] = (byte)(blocksize >> 7);\n\t\t\t}\n\n\t\t\tout.write(blklen);\n\n\t\t\t// write the actual block\n\t\t\tout.write(block, 0, writePos);\n\n\t\t\tif (debug) {\n\t\t\t\tif (last) {\n\t\t\t\t\tlogTd(\"write final block: \" + writePos + \" bytes\");\n\t\t\t\t} else {\n\t\t\t\t\tlogTd(\"write block: \" + writePos + \" bytes\");\n\t\t\t\t}\n\t\t\t\tlogTx(new String(block, 0, writePos, \"UTF-8\"));\n\t\t\t}\n\n\t\t\twritePos = 0;\n\t\t}", "public Tipo visitBlock(DECAFParser.BlockContext ctx){\r\n\t\tTipo res=super.visitBlock(ctx);\r\n\t\tposition=tablaSimbolos.exit();\r\n\t\tif(ctx.children.size()==0){\r\n\t\t\ttablaSimbolos.addError(\"Missing instructions inside { }\");\r\n\t\t\treturn tablaSimbolos.incorrect();\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public void generateEnd(World world, Random random, int x, int y){\n\t}", "public static void generateCode()\n {\n \n }", "public String buildingBlockAddAction() throws Exception {\n\t\t\t\t\n\t return \"success\";\n\t }", "public Rule itBlock()\n \t{\n \t\treturn sequence(BRACKET_L, zeroOrMore(stmt()), BRACKET_R);\n \t}", "public void fiNegEnd (){\n body=body(\n div(h1(\"Problem not Resolved\").withClass(\"heading1\"),\n h1(\"Please Contact Next Maintenance Level\").withClass(\"heading1\")).\n withDir(\"ltr\")).\n attr(\"onload\",\"highlight();\");\n }", "public static void closeComment() {\n Log.write(\" -->\");\n }", "protected void sequence_Block(ISerializationContext context, Block semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.BLOCK__STMTL) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.BLOCK__STMTL));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getBlockAccess().getStmtlStatementListParserRuleCall_1_0(), semanticObject.getStmtl());\r\n\t\tfeeder.finish();\r\n\t}", "private void generateEnd(World world, Random random, int i, int j) {\n\t\t\n\t}", "public void endTurn(){\n int block = character.getBlock();\n int energy = character.getEnergy();\n if( !isGameOver() ){\n effectHandler.endPlayerTurn();\n piles.handToDiscard();\n playEnemy();\n effectHandler.startPlayerTurn();\n effectHandler.applyBlockEffect(new Block(-block,character));\n effectHandler.applyEnergyEffect(new ChangeEnergy(-energy+3));\n turn++;\n //character.fillEnergy();\n //TODO change draw cards system\n\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n }\n // System.out.println(\"haaaaaaaaaaaaaaaaaaaaaaaa\"+character.getBlock());\n }", "public abstract void setNextBlockInstant();", "public void outABlockBlocks (ABlockBlocks node)\n\t{\n\t\tString Transition = node.getBeginblock().toString();\n\t\tTransition = Transition.substring(9);\n\t\t//System.out.println(Transition);\n\t\tString Transition1 = \"none\";\n\t\tif (Transition.startsWith(\"slide\")){\n\t\t\tTransition1 = SymbolTable.Transition;\n\t\t}\n\t\telse if (Transition.startsWith(\"fade\")){\n\t\t\tTransition1 = \"fade\";\n\t\t}\n\t\telse if (Transition.startsWith(\"swipe\")){\n\t\t\tTransition1 = \"swipe\";\n\t\t}\n\t\telse if (Transition.startsWith(\"scale\")){\n\t\t\tTransition1 = \"scale\";\n\t\t}\n\t\telse if (Transition.startsWith(\"rotatescale\")){\n\t\t\tTransition1 = \"rotatescale\";\n\t\t}\n\t\t/*\t\ttry{\n\t\tString First =node.getLines().getFirst().toString();\n\t\tString Last =node.getLines().getLast().toString();\n\t\t}\n\t\tcatch(Exception a){\n\t\t\t//System.out.println(\"Slided er tomt\");\n\t\t\tindent--;\n\t\t\treturn;\n\t\t} */\n\t\tString SlideType = \"Unknown\";\n\t\tObject[] Slide = node.getLines().toArray();\n\t\tint Lines = Slide.length;\n\t\tint i = 0;\n\t\tint title = 0;\n\t\tint subtitle = 0;\n\t\tint image = 0;\n\t\tfor (i=0; i<Lines; i++){\n\t\t\tString Slide1 = Slide[i].toString();\n\t\t\tif (Slide1.startsWith(\"@setting\") || Slide1.startsWith(\"@note\")){\n\t\t\t}\n\t\t\telse if (Slide1.startsWith(\"@title\") ) {\n\t\t\t\ttitle++;\n\t\t\t}\n\t\t\telse if (Slide1.startsWith(\"@subtitle\") ) {\n\t\t\t\tsubtitle++;\n\t\t\t}\n\t\t\telse if (Slide1.startsWith(\"@image\") ) {\n\t\t\t\timage++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSlideType = \"Normal\";\n\t\t\t\tSymbolTable.SlideTableAdd(SlideType, Transition1);\n\t\t\t\tindent--;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\tif (title > 0 && subtitle == 0 && image == 0){\n\t\t\tSlideType = \"Title\";\n\t\t}\n\t\telse if (title == 0 && subtitle > 0 && image == 0){\n\t\t\tSlideType = \"Subtitle\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 1){\n\t\t\tSlideType = \"TitleImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 1){\n\t\t\tSlideType = \"TitleSubtitleImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 1){\n\t\t\tSlideType = \"SubtitleImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 2){\n\t\t\tSlideType = \"TitleDImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 2){\n\t\t\tSlideType = \"TitleSubtitleDImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 2){\n\t\t\tSlideType = \"SubtitleDImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 3){\n\t\t\tSlideType = \"TitleTImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 3){\n\t\t\tSlideType = \"TitleSubtitleTImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 3){\n\t\t\tSlideType = \"SubtitleTImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 0 && image == 4){\n\t\t\tSlideType = \"TitleQImage\";\n\t\t}\n\t\telse if (title == 1 && subtitle == 1 && image == 4){\n\t\t\tSlideType = \"TitleSubtitleQImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 1 && image == 4){\n\t\t\tSlideType = \"SubtitleQImage\";\n\t\t}\n\t\telse if (title > 0 && subtitle > 0 && image == 0){\n\t\t\tSlideType = \"XTitleXSubtitle\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 1){\n\t\t\tSlideType = \"Image\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 2){\n\t\t\tSlideType = \"DImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 3){\n\t\t\tSlideType = \"TImage\";\n\t\t}\n\t\telse if (title == 0 && subtitle == 0 && image == 4){\n\t\t\tSlideType = \"QImage\";\n\t\t}\n\t\telse if (title > 0 && subtitle > 0 && image > 0){\n\t\t\tSlideType = \"Lots\";\n\t\t}\n\n\t\tSymbolTable.SlideTableAdd(SlideType, Transition1);\n\t\tindent--;\n\n\t}", "protected void end() {\r\n \tSystem.out.println(\"Finished MoveToHeight\");\r\n \tmanipulator.moveElevator(0);\r\n }", "public ArrayList<Byte> generateBlockCode(Holder h) {\n if (h.getActions().getChildren().size() == 0) {\n return null;\n }\n Block acBlock = (Block) h.getActions().getChildren().get(0);\n\n ArrayList<Byte> cmdArr1 = new ArrayList<>();\n ArrayList<Byte> cmdArr2 = new ArrayList<>();\n\n //executing action\n char instruction = 'b';\n int address = acBlock.getCapability().getDevice().getAddress();\n char cmdChar = acBlock.getCapability().getExeCommand().charAt(0);\n char cmdChar1 = acBlock.getCapability().getExeCommand().charAt(1);\n cmdArr1.add((byte) instruction);\n cmdArr1.add((byte) address);\n cmdArr1.add((byte) cmdChar);\n cmdArr1.add((byte) cmdChar1);\n\n //prepending command length parameter\n cmdArr1.add(0, (byte) (cmdArr1.size() + 1));\n \n //checking condition or sense\n instruction = 'c';\n cmdChar = acBlock.getCapability().getExeCommand().charAt(0);\n cmdChar1 = acBlock.getCapability().getExeCommand().charAt(1);\n char compType = '!';\n\n cmdArr2.add((byte) instruction);\n cmdArr2.add((byte) address);\n cmdArr2.add((byte) compType);\n short jumpAdd = 0;\n byte[] jumpArr = shortToByteArray(jumpAdd);\n for (byte b : jumpArr) {\n cmdArr2.add(b);\n }\n short respSize = 1;\n byte[] respArr = shortToByteArray(respSize);\n cmdArr2.add(respArr[0]);\n// for(byte b:respArr){\n// cmdArr2.add(b);\n// }\n int refVal = 0;\n \n byte[] refArr = intToByteArray(refVal);\n for (int i = 0; i < respSize; i++) {\n cmdArr2.add(refArr[i]);\n }\n cmdArr2.add((byte) cmdChar);\n cmdArr2.add((byte) cmdChar1);\n //prepending command length parameter\n cmdArr2.add(0, (byte) (cmdArr2.size() + 1));\n \n cmdArr1.addAll(cmdArr2);\n \n return cmdArr1;\n }", "@Override\n protected void end() {\n\n }", "protected void afterBody(final XMLOutput output) throws JellyTagException, SAXException\n\t{\t\n\t\toutput.write(\"</div>\\n\") ;\n\t}", "public int doEndTag()throws JspException{\r\n\t\ttry{\r\n\t\t\tout.println(\"After body.\");\r\n\t\t}catch(IOException ex){\r\n\t\t\tthrow new JspException(\"IOException- \" + ex.toString());\r\n\t\t}\r\n\t\t// this saying keep going evaluate page after this:\r\n\t\treturn EVAL_PAGE;\r\n\t}", "static void writeBlock(PrintWriter w) throws Exception {\n for (int i = 0; i < 16; i++) {\n int n = 0;\n for (int j = 0; j < 8; j++) {\n n = n | (block[8 * i + j] << (7 - j));\n }\n w.printf(\"%3d\\n\", n);\n }\n }", "public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)\r\n {\r\n super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n// this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n }", "public void fiPosEnd (){\n body=body(\n div(h1(\"Problem Resolved\").withClass(\"heading1\"),\n p(),\n p(),\n h1(\"Troubleshooting Process Completed Successfully\").withClass(\"heading1\"),\n br(),\n p(img().attr(\"height\",75).\n attr(\"width\",75).\n withSrc(\"cnfV_Green.png\")).\n attr(\"align\",\"center\")\n ).withDir(\"ltr\")).attr(\"onload\",\"highlight();\");\n }", "public final void rule__AstStatementBlock__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16237:1: ( ( 'end' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16238:1: ( 'end' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16238:1: ( 'end' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:16239:1: 'end'\n {\n before(grammarAccess.getAstStatementBlockAccess().getEndKeyword_4()); \n match(input,52,FOLLOW_52_in_rule__AstStatementBlock__Group__4__Impl32744); \n after(grammarAccess.getAstStatementBlockAccess().getEndKeyword_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\r\n\tpublic void visit(InstrumentBlock instrumentBlock) {\n\t\t\r\n\t}" ]
[ "0.7231743", "0.67107016", "0.6548194", "0.6522214", "0.6425628", "0.6217614", "0.6074418", "0.60680604", "0.59706414", "0.57040924", "0.56859106", "0.564769", "0.5637197", "0.56210405", "0.5598711", "0.5595582", "0.55890787", "0.55840814", "0.5579296", "0.5577703", "0.55002683", "0.5495162", "0.54858977", "0.54449403", "0.5433443", "0.5410947", "0.53726625", "0.53704065", "0.53671616", "0.53458446", "0.53448665", "0.5314613", "0.5302663", "0.5300176", "0.5292336", "0.5291374", "0.52895737", "0.52871555", "0.5286362", "0.5284098", "0.52828", "0.5281383", "0.5273583", "0.52673703", "0.52624696", "0.5258198", "0.52560973", "0.52560973", "0.52560973", "0.52523136", "0.52486616", "0.5234638", "0.52327806", "0.5225694", "0.5225694", "0.52255493", "0.5221992", "0.52181125", "0.52170795", "0.52170795", "0.52170795", "0.52170795", "0.5212829", "0.52091205", "0.52091205", "0.52091205", "0.52091205", "0.52091205", "0.52091205", "0.52030504", "0.5195574", "0.5193284", "0.5189955", "0.5186377", "0.5181848", "0.5180534", "0.51743174", "0.5168584", "0.5162164", "0.515857", "0.51547205", "0.5149311", "0.5142072", "0.5139138", "0.5138677", "0.5137477", "0.5134244", "0.5129865", "0.5127712", "0.51268625", "0.51076293", "0.5106981", "0.51058066", "0.5104479", "0.5102249", "0.5101923", "0.5101367", "0.509451", "0.5090681", "0.508928" ]
0.6441743
4
[ FINALSY ] type variableDeclarators
private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue) { if (nextSymbol == Keyword.FINALSY) { modify.add(nextSymbol.value); lookAhead(); } modify.check(modify.fields | modify.access); Type t = type(); variableDeclarators(modify, t, scope, queue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Ref<? extends Type>> typeVariables();", "public TypeVarElements getTypeVarAccess() {\r\n\t\treturn pTypeVar;\r\n\t}", "public final Declaration var_type() throws RecognitionException {\n Declaration decl = null;\n\n\n Declaration d = null;\n\n\n try {\n // parser/flatzinc/FlatzincFullExtWalker.g:553:5: ( ^( ARRVAR (d= index_set )+ d= var_type_u ) | ^( AVAR d= var_type_u ) )\n int alt36 = 2;\n switch (input.LA(1)) {\n case ARRVAR: {\n alt36 = 1;\n }\n break;\n case AVAR: {\n alt36 = 2;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 36, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt36) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:554:5: ^( ARRVAR (d= index_set )+ d= var_type_u )\n {\n\n List<Declaration> decls = new ArrayList();\n\n\n match(input, ARRVAR, FOLLOW_ARRVAR_in_var_type1469);\n\n match(input, Token.DOWN, null);\n // parser/flatzinc/FlatzincFullExtWalker.g:557:14: (d= index_set )+\n int cnt35 = 0;\n loop35:\n do {\n int alt35 = 2;\n switch (input.LA(1)) {\n case INDEX: {\n alt35 = 1;\n }\n break;\n\n }\n\n switch (alt35) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:557:15: d= index_set\n {\n pushFollow(FOLLOW_index_set_in_var_type1474);\n d = index_set();\n\n state._fsp--;\n\n\n decls.add(d);\n\n }\n break;\n\n default:\n if (cnt35 >= 1) break loop35;\n EarlyExitException eee =\n new EarlyExitException(35, input);\n throw eee;\n }\n cnt35++;\n } while (true);\n\n\n pushFollow(FOLLOW_var_type_u_in_var_type1481);\n d = var_type_u();\n\n state._fsp--;\n\n\n match(input, Token.UP, null);\n\n\n decl = new DArray(decls, d);\n\n\n }\n break;\n case 2:\n // parser/flatzinc/FlatzincFullExtWalker.g:561:9: ^( AVAR d= var_type_u )\n {\n match(input, AVAR, FOLLOW_AVAR_in_var_type1499);\n\n match(input, Token.DOWN, null);\n pushFollow(FOLLOW_var_type_u_in_var_type1503);\n d = var_type_u();\n\n state._fsp--;\n\n\n match(input, Token.UP, null);\n\n\n decl = d;\n\n\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return decl;\n }", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "public VarTypeNative getFieldVarType();", "public TypeVarWithInitializerElements getTypeVarWithInitializerAccess() {\r\n\t\treturn pTypeVarWithInitializer;\r\n\t}", "String getVarDeclare();", "VarsDeclRule createVarsDeclRule();", "@Override\r\n\tpublic Node visitVarType(VarTypeContext ctx) {\n\t\treturn super.visitVarType(ctx);\r\n\t}", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "VariableDeclaration createVariableDeclaration();", "<C, PM> Variable<C, PM> createVariable();", "@Override String opStr() { return \"var\"; }", "List<IVariableDef> getVariables();", "private void createImplicitVariableType(XtextResource resource, IAcceptor<? super ICodeMining> acceptor) {\n\t\tcreateImplicitVarValType(resource, acceptor, XtendVariableDeclaration.class,\n\t\t\tit -> it.getType(),\n\t\t\tit -> {\n\t\t\t\tLightweightTypeReference type = getLightweightType(it.getRight());\n\t\t\t\tif (type.isAny()) {\n\t\t\t\t\ttype = getTypeForVariableDeclaration(it.getRight());\n\t\t\t\t}\n\t\t\t\treturn type.getSimpleName();\n\t\t\t},\n\t\t\tit -> it.getRight(),\n\t\t\t() -> this.grammar.getXVariableDeclarationAccess().getRightAssignment_3_1());\n\t}", "public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }", "private void declareLocals() {\r\n\t\t// declare locals\r\n\t\tfor(Local local: method.retrieveActiveBody().getLocals()) {\r\n\t\t\tString cType = null;\r\n\t\t\t// null types need special treatment, we don't output them\r\n\t\t\t// we also won't generate statements that use a nullType\r\n\t\t\t// as a target.\r\n\t\t\tif(local.getType() instanceof NullType) {\r\n\t\t\t\tcType = \"java_lang_Object*\";\r\n\t\t\t} else {\r\n\t\t\t\tcType = CTypes.toCType(local.getType());\r\n\t\t\t}\r\n\t\t\twriter.wl(cType + \" \" + local.getName() + \" = 0;\");\r\n\t\t}\r\n\t\twriter.wl(\"java_lang_Object* _exception = 0;\");\r\n\t}", "public VariableMeta getMeta();", "<C, PM> VariableExp<C, PM> createVariableExp();", "ResolvedReferenceTypeDeclaration declaringType();", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "public final Declaration var_type_u() throws RecognitionException {\n Declaration decl = null;\n\n\n CommonTree i1 = null;\n CommonTree i2 = null;\n CommonTree i = null;\n\n try {\n // parser/flatzinc/FlatzincFullExtWalker.g:568:5: ( BOOL | FLOAT | INT | ^( DD i1= INT_CONST i2= INT_CONST ) | ^( CM (i= INT_CONST )+ ) | ^( SET ^( DD i1= INT_CONST i2= INT_CONST ) ) | ^( SET ^( CM (i= INT_CONST )+ ) ) )\n int alt39 = 7;\n switch (input.LA(1)) {\n case BOOL: {\n alt39 = 1;\n }\n break;\n case FLOAT: {\n alt39 = 2;\n }\n break;\n case INT: {\n alt39 = 3;\n }\n break;\n case DD: {\n alt39 = 4;\n }\n break;\n case CM: {\n alt39 = 5;\n }\n break;\n case SET: {\n switch (input.LA(2)) {\n case DOWN: {\n switch (input.LA(3)) {\n case DD: {\n alt39 = 6;\n }\n break;\n case CM: {\n alt39 = 7;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 7, input);\n\n throw nvae;\n\n }\n\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 6, input);\n\n throw nvae;\n\n }\n\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 39, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt39) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:568:9: BOOL\n {\n match(input, BOOL, FOLLOW_BOOL_in_var_type_u1534);\n\n\n decl = DBool.me;\n\n\n }\n break;\n case 2:\n // parser/flatzinc/FlatzincFullExtWalker.g:572:9: FLOAT\n {\n match(input, FLOAT, FOLLOW_FLOAT_in_var_type_u1550);\n\n\n decl = DFloat.me;\n\n\n }\n break;\n case 3:\n // parser/flatzinc/FlatzincFullExtWalker.g:576:9: INT\n {\n match(input, INT, FOLLOW_INT_in_var_type_u1566);\n\n\n decl = DInt.me;\n\n\n }\n break;\n case 4:\n // parser/flatzinc/FlatzincFullExtWalker.g:580:9: ^( DD i1= INT_CONST i2= INT_CONST )\n {\n match(input, DD, FOLLOW_DD_in_var_type_u1583);\n\n match(input, Token.DOWN, null);\n i1 = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_var_type_u1587);\n\n i2 = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_var_type_u1591);\n\n match(input, Token.UP, null);\n\n\n decl = new DInt2(EInt.make((i1 != null ? i1.getText() : null)), EInt.make((i2 != null ? i2.getText() : null)));\n\n\n }\n break;\n case 5:\n // parser/flatzinc/FlatzincFullExtWalker.g:590:5: ^( CM (i= INT_CONST )+ )\n {\n\n ArrayList<EInt> values = new ArrayList();\n\n\n match(input, CM, FOLLOW_CM_in_var_type_u1626);\n\n match(input, Token.DOWN, null);\n // parser/flatzinc/FlatzincFullExtWalker.g:593:14: (i= INT_CONST )+\n int cnt37 = 0;\n loop37:\n do {\n int alt37 = 2;\n switch (input.LA(1)) {\n case INT_CONST: {\n alt37 = 1;\n }\n break;\n\n }\n\n switch (alt37) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:593:15: i= INT_CONST\n {\n i = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_var_type_u1631);\n\n values.add(EInt.make((i != null ? i.getText() : null)));\n\n }\n break;\n\n default:\n if (cnt37 >= 1) break loop37;\n EarlyExitException eee =\n new EarlyExitException(37, input);\n throw eee;\n }\n cnt37++;\n } while (true);\n\n\n match(input, Token.UP, null);\n\n\n decl = new DManyInt(values);\n\n\n }\n break;\n case 6:\n // parser/flatzinc/FlatzincFullExtWalker.g:597:9: ^( SET ^( DD i1= INT_CONST i2= INT_CONST ) )\n {\n match(input, SET, FOLLOW_SET_in_var_type_u1652);\n\n match(input, Token.DOWN, null);\n match(input, DD, FOLLOW_DD_in_var_type_u1655);\n\n match(input, Token.DOWN, null);\n i1 = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_var_type_u1659);\n\n i2 = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_var_type_u1663);\n\n match(input, Token.UP, null);\n\n\n match(input, Token.UP, null);\n\n\n decl = new DSet(new DInt2(EInt.make((i1 != null ? i1.getText() : null)), EInt.make((i2 != null ? i2.getText() : null))));\n\n\n }\n break;\n case 7:\n // parser/flatzinc/FlatzincFullExtWalker.g:602:5: ^( SET ^( CM (i= INT_CONST )+ ) )\n {\n\n ArrayList<EInt> values = new ArrayList();\n\n\n match(input, SET, FOLLOW_SET_in_var_type_u1693);\n\n match(input, Token.DOWN, null);\n match(input, CM, FOLLOW_CM_in_var_type_u1696);\n\n match(input, Token.DOWN, null);\n // parser/flatzinc/FlatzincFullExtWalker.g:605:19: (i= INT_CONST )+\n int cnt38 = 0;\n loop38:\n do {\n int alt38 = 2;\n switch (input.LA(1)) {\n case INT_CONST: {\n alt38 = 1;\n }\n break;\n\n }\n\n switch (alt38) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:605:20: i= INT_CONST\n {\n i = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_var_type_u1701);\n\n values.add(EInt.make((i != null ? i.getText() : null)));\n\n }\n break;\n\n default:\n if (cnt38 >= 1) break loop38;\n EarlyExitException eee =\n new EarlyExitException(38, input);\n throw eee;\n }\n cnt38++;\n } while (true);\n\n\n match(input, Token.UP, null);\n\n\n match(input, Token.UP, null);\n\n\n decl = new DSet(new DManyInt(values));\n\n\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return decl;\n }", "public DetachedVarSymbol(long flags, Name name, Type type, Symbol owner) {\n super(flags, name, type, owner);\n this.decl = null;\n }", "VariableExp createVariableExp();", "public interface IVariable<A extends AbstractDomain<?>> extends IReferenceHolder<A>, ITerm {\n\n\t@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic default Set<IVariable<?>> getVariables() {\n\t\tSet<IVariable<?>> values = new HashSet<>();\n\t\tvalues.add((IVariable<AbstractDomain<?>>) this);\n\t\treturn values;\n\t}\n\n\t/**\n\t * Lets the visitor visit the variable.\n\t * \n\t * @param IVariableVisitor\n\t * The visitor.\n\t */\n\tpublic void processWith(IVariableVisitor iVariableVisitor);\n\n\t/**\n\t * Returns whether it is a constant.\n\t * \n\t * @return Whether it is a constant.\n\t */\n\tpublic boolean isConstant();\n}", "public boolean var_type() {\n if (lexer.token != Symbol.FLOAT && lexer.token != Symbol.INT) {\n return false;\n }\n lexer.nextToken();\n return true;\n }", "private static void addGlobalVariables(Map<String, Class<?>> variables, ClassOrInterfaceDeclaration type) {\n for (String key : variables.keySet()) {\n Type fieldType = JavaParserUtils.transform(variables.get(key));\n VariableDeclaratorId id = new VariableDeclaratorId(key);\n VariableDeclarator declarator = new VariableDeclarator(id);\n FieldDeclaration field = new FieldDeclaration(Modifier.PRIVATE, fieldType, declarator);\n ASTHelper.addMember(type, field);\n }\n }", "@SuppressWarnings(\"unchecked\")\n public static LinkedList getVariableType(Expression e) {\n LinkedList ret = new LinkedList();\n if (e instanceof Identifier) {\n Symbol var = ((Identifier)e).getSymbol();\n if (var != null) {\n ret.addAll(var.getTypeSpecifiers());\n }\n } else if (e instanceof ArrayAccess) {\n ArrayAccess aa = (ArrayAccess)e;\n ret = getVariableType(aa.getArrayName());\n for (int i = 0; i < aa.getNumIndices(); ++i) {\n if (ret.getLast() instanceof PointerSpecifier) {\n ret.removeLast();\n }\n }\n } else if (e instanceof AccessExpression) {\n //Symbol var = ((AccessExpression)e).getSymbol();\n Symbol var = new AccessSymbol((AccessExpression)e);\n //if ( var != null )\n ret.addAll(var.getTypeSpecifiers());\n } else if (e instanceof UnaryExpression) {\n UnaryExpression ue = (UnaryExpression)e;\n if (ue.getOperator() == UnaryOperator.DEREFERENCE) {\n ret = getVariableType(ue.getExpression());\n if (ret.getLast() instanceof PointerSpecifier) {\n ret.removeLast();\n } else {\n ret.clear();\n }\n }\n }\n return ret;\n }", "private ELOperandToken readVarToken() {\r\n \t\tfState = STATE_VAR;\r\n \t\tint endOfToken = index;\r\n \t\tint ch;\r\n \t\tint type = ELOperandToken.EL_PROPERTY_NAME_TOKEN;\r\n \t\twhile((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isJavaIdentifierPart(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t\t\t}\r\n \t\t}\r\n \t\treleaseChar();\r\n \t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t}", "public interface GenericDeclaration extends AnnotatedElement {\n\n /**\n * Returns an array of {@code TypeVariable} objects that\n * represent the type variables declared by the generic\n * declaration represented by this {@code GenericDeclaration}\n * object, in declaration order. Returns an array of length 0 if\n * the underlying generic declaration declares no type variables.\n *\n * @return an array of {@code TypeVariable} objects that represent the type variables declared by\n * this generic declaration\n * @throws GenericSignatureFormatError if the generic signature of this generic declaration does\n * not conform to the format specified in <cite>The Java&trade; Virtual Machine\n * Specification</cite>\n */\n public TypeVariable<?>[] getTypeParameters();\n}", "@Override\n\tprotected String getVariableClassName() {\n\t\treturn \"variable\";\n\t}", "public Variable[] getLocals();", "public final String varDecl(ArrayList<String> list) throws RecognitionException {\n\t\tString out = null;\n\n\n\t\tCommonTree TYPE6=null;\n\t\tCommonTree ID7=null;\n\n\n\t\t\tout = \"\";\n\n\t\ttry {\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:131:2: ( ^( VARDECL TYPE ID ) )\n\t\t\t// C:\\\\Users\\\\Samir\\\\Documents\\\\University\\\\Y2S2\\\\COMP2010\\\\LittleNic\\\\src\\\\LittleNicCodeGen.g:131:4: ^( VARDECL TYPE ID )\n\t\t\t{\n\t\t\tmatch(input,VARDECL,FOLLOW_VARDECL_in_varDecl210); \n\t\t\tmatch(input, Token.DOWN, null); \n\t\t\tTYPE6=(CommonTree)match(input,TYPE,FOLLOW_TYPE_in_varDecl212); \n\t\t\tID7=(CommonTree)match(input,ID,FOLLOW_ID_in_varDecl214); \n\t\t\tmatch(input, Token.UP, null); \n\n\n\t\t\t\t\t\tString type = \"\";\n\t\t\t\t\t\tif ((TYPE6!=null?TYPE6.getText():null).equals(\"COUNT\")) {\n\t\t\t\t\t\t\ttype = \"int\";\n\t\t\t\t\t\t} else if ((TYPE6!=null?TYPE6.getText():null).equals(\"TRUTH\")) {\n\t\t\t\t\t\t\ttype = \"boolean\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (inMethod) {\n\t\t\t\t\t\t\tif (inDynamicScope((ID7!=null?ID7.getText():null))) { // if already defined\n\t\t\t\t\t\t\t\t// if local\n\t\t\t\t\t\t\t\tif (Scope_stack.peek().scopeMap.containsKey((ID7!=null?ID7.getText():null))) {\n\t\t\t\t\t\t\t\t\t// and not same type\n\t\t\t\t\t\t\t\t\tif (!Scope_stack.peek().scopeMap.get((ID7!=null?ID7.getText():null)).equals((TYPE6!=null?TYPE6.getText():null))) {\n\t\t\t\t\t\t\t\t\t\tlist.add(type + \" _\" + (ID7!=null?ID7.getText():null) + \";\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else { // global\n\t\t\t\t\t\t\t\t\tlist.add(type + \" local_\" + (ID7!=null?ID7.getText():null) + \";\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tlist.add(type + \" _\" + (ID7!=null?ID7.getText():null) + \";\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tout = \"static \" + type + \" _\" + (ID7!=null?ID7.getText():null) + \";\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn out;\n\t}", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "public void var_decl(VarDeclList vd, Integer lg) {\n if (lexer.token == Symbol.FLOAT || lexer.token == Symbol.INT) {\n String temp = lexer.getStringValue();\n lexer.nextToken();\n IdList list = id_list(lg);\n ArrayList<Ident> iter = list.getIdList();\n \n //entra aqui se nenhuma variavel declarada em id_list já existe\n for(Ident x: iter){\n switch(lg) {\n case 1:\n symbolTable.putInGlobal(x.getName(), new Type(temp, false));\n break;\n case 2:\n symbolTable.putInLocal(x.getName(), temp);\n break;\n }\n }\n vd.addDecl(new VarDecl(temp, list));\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Missing end of declaration at variable declaration\");\n }\n lexer.nextToken();\n }\n }", "public TypeVarWithoutInitializerElements getTypeVarWithoutInitializerAccess() {\r\n\t\treturn pTypeVarWithoutInitializer;\r\n\t}", "private void variableDeclaratorRest(VariableType x, Scope scope, Vector queue)\r\n {\r\n x.type.dim += bracketsOpt();\r\n if (nextSymbol == Keyword.ASSIGNSY)\r\n {\r\n Operation node, root = new Operation();\r\n root.operator = (x.modify & Keyword.FINALSY.value) == 0?Keyword.ASSIGNSY:Keyword.FINALASSIGNSY;\r\n\r\n node = root.left = new Operation();\r\n\r\n node.operator = Keyword.LEAFSY;\r\n node = node.left = new Operation();\r\n node = node.left = new Operation();\r\n node = node.left = new Operation();\r\n\r\n node.name = x.name;\r\n node.type = x.type;\r\n\r\n lookAhead();\r\n\r\n root.right = variableIntitializer(x.type, x.type.dim, scope, queue);\r\n\r\n queue.add(root);\r\n\r\n root = new Operation();\r\n root.operator = Keyword.CLEARSY;\r\n queue.add(root);\r\n }\r\n }", "Variables createVariables();", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "String getVariableDefinition();", "public VariType visit(VarDeclaration n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t return _ret;\n\t }", "private static TypeToken<?> typeVariable() {\n\t\tParameterizedType t = (ParameterizedType)TypeToken.of(Identity.class).getSupertype(StreamElement.class).getType();\n\t\treturn TypeToken.of(t.getActualTypeArguments()[0]);\n\t}", "public VariType visit(TypeDeclaration n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t return _ret;\n\t }", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "@Override\n\tpublic Set<Variable> getDefVariables() {\n\t\tSet<Variable> used = new HashSet<Variable>();\n\t\treturn used;\n\t}", "Variable createVariable();", "Variable createVariable();", "public interface TypeContext {\n Type getReturnType();\n\n Type getThisType();\n\n void setThisType(Type thisType);\n\n void setReturnType(Type returnType);\n\n VarRef lookupVar(String varUse);\n\n void putVar(String varName, Type type, NQJVarDecl var);\n\n //\n // CHANGE: Introduce separate field storage to enable field shadowing while\n // disallowing variable shadowing.\n //\n\n /**\n * Gets a reference to a field previous stored to the context.\n *\n * @param fieldUse The name of the field to retrieve.\n * @return A reference to the requested field.\n */\n VarRef lookupField(String fieldUse);\n\n /**\n * Stores a field into the context.\n *\n * @param fieldName The name of the field to store.\n * @param type The type of the field to store.\n * @param field The AST declaration of the field to store.\n */\n void putField(String fieldName, Type type, NQJVarDecl field);\n\n TypeContext copy();\n\n /**\n * Variable declaration and type wrapper class.\n */\n class VarRef {\n final NQJVarDecl decl;\n final Type type;\n\n public VarRef(Type type, NQJVarDecl decl) {\n this.decl = decl;\n this.type = type;\n }\n }\n}", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public final JavaliParser.varDecl_return varDecl() throws RecognitionException {\n\t\tJavaliParser.varDecl_return retval = new JavaliParser.varDecl_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken Identifier14=null;\n\t\tToken char_literal15=null;\n\t\tToken Identifier16=null;\n\t\tToken char_literal17=null;\n\t\tToken Identifier18=null;\n\t\tToken char_literal19=null;\n\t\tParserRuleReturnScope declStart =null;\n\n\t\tObject Identifier14_tree=null;\n\t\tObject char_literal15_tree=null;\n\t\tObject Identifier16_tree=null;\n\t\tObject char_literal17_tree=null;\n\t\tObject Identifier18_tree=null;\n\t\tObject char_literal19_tree=null;\n\t\tRewriteRuleTokenStream stream_77=new RewriteRuleTokenStream(adaptor,\"token 77\");\n\t\tRewriteRuleTokenStream stream_73=new RewriteRuleTokenStream(adaptor,\"token 73\");\n\t\tRewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,\"token Identifier\");\n\t\tRewriteRuleSubtreeStream stream_type=new RewriteRuleSubtreeStream(adaptor,\"rule type\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:275:2: (declStart= type Identifier ';' -> ^( VarDecl[$declStart.start, \\\"VarDecl\\\"] type Identifier ) |declStart= type Identifier ( ',' Identifier )+ ';' -> ^( VarDeclList[$declStart.start, \\\"VarDeclList\\\"] type ( Identifier )+ ) )\n\t\t\tint alt7=2;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\tint LA7_1 = input.LA(2);\n\t\t\t\tif ( (LA7_1==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_1==84) ) {\n\t\t\t\t\tint LA7_6 = input.LA(3);\n\t\t\t\t\tif ( (LA7_6==85) ) {\n\t\t\t\t\t\tint LA7_10 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_10==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 10, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 6, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 1, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\tint LA7_2 = input.LA(2);\n\t\t\t\tif ( (LA7_2==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_2==84) ) {\n\t\t\t\t\tint LA7_6 = input.LA(3);\n\t\t\t\t\tif ( (LA7_6==85) ) {\n\t\t\t\t\t\tint LA7_10 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_10==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 10, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 6, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 2, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\tint LA7_3 = input.LA(2);\n\t\t\t\tif ( (LA7_3==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_3==84) ) {\n\t\t\t\t\tint LA7_6 = input.LA(3);\n\t\t\t\t\tif ( (LA7_6==85) ) {\n\t\t\t\t\t\tint LA7_10 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_10==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 10, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 6, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 3, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Identifier:\n\t\t\t\t{\n\t\t\t\tint LA7_4 = input.LA(2);\n\t\t\t\tif ( (LA7_4==84) ) {\n\t\t\t\t\tint LA7_7 = input.LA(3);\n\t\t\t\t\tif ( (LA7_7==85) ) {\n\t\t\t\t\t\tint LA7_11 = input.LA(4);\n\t\t\t\t\t\tif ( (LA7_11==Identifier) ) {\n\t\t\t\t\t\t\tint LA7_5 = input.LA(5);\n\t\t\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\t\t\talt7=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\t\t\talt7=2;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 11, input);\n\t\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 7, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse if ( (LA7_4==Identifier) ) {\n\t\t\t\t\tint LA7_5 = input.LA(3);\n\t\t\t\t\tif ( (LA7_5==77) ) {\n\t\t\t\t\t\talt7=1;\n\t\t\t\t\t}\n\t\t\t\t\telse if ( (LA7_5==73) ) {\n\t\t\t\t\t\talt7=2;\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tfor (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {\n\t\t\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 5, input);\n\t\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tint nvaeMark = input.mark();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 7, 4, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tinput.rewind(nvaeMark);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 7, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt7) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:275:4: declStart= type Identifier ';'\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_type_in_varDecl392);\n\t\t\t\t\tdeclStart=type();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_type.add(declStart.getTree());\n\t\t\t\t\tIdentifier14=(Token)match(input,Identifier,FOLLOW_Identifier_in_varDecl394); \n\t\t\t\t\tstream_Identifier.add(Identifier14);\n\n\t\t\t\t\tchar_literal15=(Token)match(input,77,FOLLOW_77_in_varDecl396); \n\t\t\t\t\tstream_77.add(char_literal15);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: type, Identifier\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 276:3: -> ^( VarDecl[$declStart.start, \\\"VarDecl\\\"] type Identifier )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:276:6: ^( VarDecl[$declStart.start, \\\"VarDecl\\\"] type Identifier )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VarDecl, (declStart!=null?(declStart.start):null), \"VarDecl\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_type.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:277:4: declStart= type Identifier ( ',' Identifier )+ ';'\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_type_in_varDecl418);\n\t\t\t\t\tdeclStart=type();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_type.add(declStart.getTree());\n\t\t\t\t\tIdentifier16=(Token)match(input,Identifier,FOLLOW_Identifier_in_varDecl420); \n\t\t\t\t\tstream_Identifier.add(Identifier16);\n\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:277:30: ( ',' Identifier )+\n\t\t\t\t\tint cnt6=0;\n\t\t\t\t\tloop6:\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tint alt6=2;\n\t\t\t\t\t\tint LA6_0 = input.LA(1);\n\t\t\t\t\t\tif ( (LA6_0==73) ) {\n\t\t\t\t\t\t\talt6=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (alt6) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:277:32: ',' Identifier\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchar_literal17=(Token)match(input,73,FOLLOW_73_in_varDecl424); \n\t\t\t\t\t\t\tstream_73.add(char_literal17);\n\n\t\t\t\t\t\t\tIdentifier18=(Token)match(input,Identifier,FOLLOW_Identifier_in_varDecl426); \n\t\t\t\t\t\t\tstream_Identifier.add(Identifier18);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tif ( cnt6 >= 1 ) break loop6;\n\t\t\t\t\t\t\tEarlyExitException eee = new EarlyExitException(6, input);\n\t\t\t\t\t\t\tthrow eee;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcnt6++;\n\t\t\t\t\t}\n\n\t\t\t\t\tchar_literal19=(Token)match(input,77,FOLLOW_77_in_varDecl431); \n\t\t\t\t\tstream_77.add(char_literal19);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: Identifier, type\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 278:3: -> ^( VarDeclList[$declStart.start, \\\"VarDeclList\\\"] type ( Identifier )+ )\n\t\t\t\t\t{\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:278:6: ^( VarDeclList[$declStart.start, \\\"VarDeclList\\\"] type ( Identifier )+ )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_1 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VarDeclList, (declStart!=null?(declStart.start):null), \"VarDeclList\"), root_1);\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_type.nextTree());\n\t\t\t\t\t\tif ( !(stream_Identifier.hasNext()) ) {\n\t\t\t\t\t\t\tthrow new RewriteEarlyExitException();\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile ( stream_Identifier.hasNext() ) {\n\t\t\t\t\t\t\tadaptor.addChild(root_1, stream_Identifier.nextNode());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstream_Identifier.reset();\n\n\t\t\t\t\t\tadaptor.addChild(root_0, root_1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public VariableDeclarationsParser(WookieParserTD parent) {\n\t\tsuper(parent);\n\t}", "public VariableIF createVariable(VariableDecl decl);", "public interface VariableIF extends VariableSimpleIF {\r\n public java.lang.String getFullName();\r\n public java.lang.String getFullNameEscaped();\r\n public java.lang.String getShortName();\r\n public void getNameAndDimensions(java.util.Formatter result, boolean useFullName, boolean strict);\r\n\r\n public boolean isUnlimited();\r\n public boolean isUnsigned();\r\n public ucar.ma2.DataType getDataType();\r\n public int getRank();\r\n public boolean isScalar();\r\n public long getSize();\r\n public int getElementSize();\r\n public int[] getShape();\r\n\r\n public java.util.List<Dimension> getDimensions();\r\n public ucar.nc2.Dimension getDimension(int index);\r\n public int findDimensionIndex(java.lang.String dimName);\r\n\r\n public java.util.List<Attribute> getAttributes();\r\n public ucar.nc2.Attribute findAttribute(java.lang.String attName);\r\n public ucar.nc2.Attribute findAttributeIgnoreCase(java.lang.String attName);\r\n\r\n public ucar.nc2.Group getParentGroup();\r\n public ucar.nc2.Variable section(java.util.List<Range> ranges) throws ucar.ma2.InvalidRangeException;\r\n public Section getShapeAsSection();\r\n public java.util.List<Range> getRanges();\r\n\r\n public ucar.ma2.Array read(int[] origin, int[] shape) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(java.lang.String rangeSpec) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read(ucar.ma2.Section section) throws java.io.IOException, ucar.ma2.InvalidRangeException;\r\n public ucar.ma2.Array read() throws java.io.IOException;\r\n\r\n public boolean isCoordinateVariable();\r\n public boolean isMemberOfStructure();\r\n public boolean isVariableLength();\r\n public boolean isMetadata();\r\n public ucar.nc2.Structure getParentStructure();\r\n\r\n public String getDescription();\r\n public String getUnitsString();\r\n\r\n // use only if isMemberOfStructure\r\n public java.util.List<Dimension> getDimensionsAll();\r\n\r\n // use only if isScalar()\r\n public byte readScalarByte() throws java.io.IOException;\r\n public short readScalarShort() throws java.io.IOException;\r\n public int readScalarInt() throws java.io.IOException;\r\n public long readScalarLong() throws java.io.IOException;\r\n public float readScalarFloat() throws java.io.IOException;\r\n public double readScalarDouble() throws java.io.IOException;\r\n public java.lang.String readScalarString() throws java.io.IOException;\r\n\r\n // debug\r\n public java.lang.String toStringDebug();\r\n}", "String getDeclare();", "public java.lang.Short getVariableType() {\r\n return variableType;\r\n }", "@Override\n public Object visitVarSingleDeclarationAST(MiParser.VarSingleDeclarationASTContext ctx) {\n int tipo =(int) visit(ctx.typeDenoter());\n tabla.insertar(ctx.IDENT().getSymbol(),tipo,ctx);\n return null;\n }", "public FormValidationScriptVisitor(List<FormAttribute> declaredAttributes) {\n declaredAttributes.forEach(attribute -> declaredVariables.put(attribute.getVariableName(), attribute.getDataType()));\n }", "public interface IInstanceVariable extends INameNode {\n}", "public VariableDeclarationElements getVariableDeclarationAccess() {\r\n\t\treturn pVariableDeclaration;\r\n\t}", "public void varDecl(StmtVarDecl stmt)\n {\n for (int i = 0; i < stmt.getNumVars(); i++)\n {\n String nm = stmt.getName(i);\n Type vt = (Type)stmt.getType(i).accept(this);\n state.varDeclare(nm, vt);\n }\n }", "@Override\n \tpublic void logVarCreated(String name, String type) {\n \t\tSystem.out.println(\"\\tVariable created: [\" + type + \"] \" + name );\n \t}", "int getVar() {\n\n return super.var; //Line n3. refer to its immediate parents variable of var\n }", "VarDecl createVarDecl();", "public StatementType getStatementType()\n\t{\n\t\treturn StatementType.VARIABLE_DECLARATION_STATEMENT;\n\t}", "public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }", "public List<VariableID<?>> getVariables()\n\t{\n\t\tList<VariableID<?>> vars = get(VARIABLES);\n\t\tif (vars == null)\n\t\t{\n\t\t\tvars = Collections.emptyList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvars = new ArrayList<>(vars);\n\t\t}\n\t\treturn vars;\n\t}", "@Override\n\t\t\tpublic void visit(FieldDeclaration arg0, Object arg1) {\n\t\t\t\tchar type = ' ';\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) == Modifier.PUBLIC) {\n\t\t\t\t\ttype = '+';\n\t\t\t\t\tfor(Iterator<?> it = arg0.getVariables().iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tif(getTemplateValue(arg0.getType().toString()) != \"\")\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, getTemplateValue(arg0.getType().toString()), true));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfields.add(type + \" \" + it.next() + \":\" + arg0.getType());\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, arg0.getType().toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if((arg0.getModifiers() & Modifier.PRIVATE) == Modifier.PRIVATE) {\n\t\t\t\t\tfor(Iterator<?> it = arg0.getVariables().iterator(); it.hasNext(); ) {\n\t\t\t\t\t\tVariableDeclarator v = (VariableDeclarator) it.next();\n\t\t\t\t\t\tif(getTemplateValue(arg0.getType().toString()) != \"\")\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, getTemplateValue(arg0.getType().toString()), true));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tnonPublic.add(new Variable(v.toString(), arg0.getType().toString(), Modifier.PRIVATE));\n\t\t\t\t\t\t\tusingTypes.add(new Pair(className, arg0.getType().toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(type != ' ')\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "public Type visit(VarDecl n) {\n\t\tn.t.accept(this);\n\t\tn.i.accept(this);\n\t\treturn null;\n\t}", "@Override\n public int[] getRequiredTokens() {\n return new int[] {\n TokenTypes.VARIABLE_DEF,\n };\n }", "public interface Scope {\n public Object getVar(String varName);\n\n public Scope defineVar(String varName, Object value);\n\n public Scope defineConst(String varName, Object value);\n\n public Scope setVar(String varName, Object value);\n\n public Scope delVar(String varName);\n}", "@Override\r\n\tpublic void visit(FieldDeclNode fieldDeclNode) {\n\t\tfieldDeclNode.getType().accept(this);\r\n\t\t\r\n\t\t//Only visit declared variables, not the type!\r\n\t\tVarDeclListNode vars = fieldDeclNode.getDeclaredVariables();\r\n\t\tfor(VarDeclNode v : vars){\r\n\t\t\t\r\n\t\t\t//Set cur field\r\n\t\t\tVariable fieldBefore = curField;\r\n\t\t\tcurField = v.getName().getSemantics();\r\n\t\t\t\r\n\t\t\t//Accept\r\n\t\t\tv.accept(this);\r\n\t\t\t\r\n\t\t\t//Reset cur field\r\n\t\t\tcurField = fieldBefore;\r\n\t\t}\r\n\t}", "int realnVars();", "public abstract int nVars();", "public final void var_decl() throws RecognitionException {\n CommonTree IDENTIFIER6 = null;\n Declaration vt = null;\n\n List<EAnnotation> anns = null;\n\n Expression e = null;\n\n\n try {\n // parser/flatzinc/FlatzincFullExtWalker.g:715:2: ( ^( VAR IDENTIFIER vt= var_type anns= annotations (e= expr )? ) )\n // parser/flatzinc/FlatzincFullExtWalker.g:715:6: ^( VAR IDENTIFIER vt= var_type anns= annotations (e= expr )? )\n {\n match(input, VAR, FOLLOW_VAR_in_var_decl2105);\n\n match(input, Token.DOWN, null);\n IDENTIFIER6 = (CommonTree) match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_var_decl2107);\n\n pushFollow(FOLLOW_var_type_in_var_decl2111);\n vt = var_type();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_annotations_in_var_decl2115);\n anns = annotations();\n\n state._fsp--;\n\n\n // parser/flatzinc/FlatzincFullExtWalker.g:715:53: (e= expr )?\n int alt47 = 2;\n switch (input.LA(1)) {\n case EXPR:\n case FALSE:\n case IDENTIFIER:\n case INT_CONST:\n case LB:\n case STRING:\n case TRUE: {\n alt47 = 1;\n }\n break;\n }\n\n switch (alt47) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:715:53: e= expr\n {\n pushFollow(FOLLOW_expr_in_var_decl2119);\n e = expr();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n\n match(input, Token.UP, null);\n\n\n FVariable.make_variable(map, vt, (IDENTIFIER6 != null ? IDENTIFIER6.getText() : null), anns, e, mSolver, mLayout);\n\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return;\n }", "public Element compileVarDec() {\n\t\tElement ele = null;\n\t\tString type;\n\t\tString token, tokenType;\n\n\t\tElement varDecParent = document.createElement(\"varDec\");\n\n\t\t// \"var\"\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tvarDecParent.appendChild(ele);\n\n\t\t// The type of the var\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\ttype = token;\n\t\tele = createXMLnode(tokenType);\n\t\tvarDecParent.appendChild(ele);\n\n\t\t// The variable identifiers themselves until ;\n\n\t\twhile (!token.equals(\";\")) {\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tvarDecParent.appendChild(ele);\n\t\t\tif (!token.equals(\",\") && !token.equals(\";\")) {\n\t\t\t\t// Adding the variables to the symboltable\n\t\t\t\tsymTable.define(token, type, \"local\");\n\t\t\t}\n\t\t}\n\n\t\treturn varDecParent;\n\n\t}", "DynamicVariable createDynamicVariable();", "public void compileClassVarDec() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString type, kind, name;\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\n\t\tElement parentXML = document.createElement(\"classVarDec\");\n\t\tele = createXMLnode(\"keyword\");\n\t\tkind = jTokenizer.returnTokenVal();\n\n\t\t// Mapping a jack keyword to a vm keyword\n\t\tif (kind.equals(\"var\")) {\n\t\t\tkind = \"local\";\n\t\t} else if (kind.equals(\"arg\")) {\n\t\t\tkind = \"argument\";\n\t\t} else if (kind.equals(\"field\")) {\n\t\t\tkind = \"this\";\n\t\t}\n\t\tparentXML.appendChild(ele);\n\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\ttype = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(tokenType);\n\t\tparentXML.appendChild(ele);\n\n\t\tjTokenizer.advance();\n\t\twhile (!jTokenizer.returnTokenVal(tokenType).equals(\";\")) {\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\ttoken = jTokenizer.returnTokenVal(tokenType);\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tparentXML.appendChild(ele);\n\t\t\tjTokenizer.advance();\n\t\t\tif (tokenType.equals(\"identifier\")) {\n\t\t\t\t// Adding the variable to the symbol table\n\t\t\t\tsymTable.define(token, type, kind);\n\t\t\t}\n\t\t}\n\n\t\t// The ending symbol of the line (;)\n\t\tele = createXMLnode(\"symbol\");\n\t\tparentXML.appendChild(ele);\n\t\troot.appendChild(parentXML);\n\t}", "private static boolean VarDecl_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"VarDecl_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = MarklogicAnnotation(b, l + 1);\n if (!r) r = CompatibilityAnnotation(b, l + 1);\n if (!r) r = Annotation(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "int getVarsCount();", "VarAssignment createVarAssignment();", "InstrumentedType withTypeVariable(TypeVariableToken typeVariable);", "private void addInstanceVariables(ClassWriterTracker ct) {\n // variable #1, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"sm\", Type.getDescriptor(OpenJPAStateManager.class), null, null).visitEnd();\n\n // variable #2, the state manager\n ct.getCw().visitField(Opcodes.ACC_PRIVATE | Opcodes.ACC_TRANSIENT,\n \"field\", Type.getDescriptor(int.class), null, null).visitEnd();\n }", "private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }", "public ImmutableList<Variable> getVariables() {\n return ImmutableList.copyOf(members);\n }", "public final void variableDeclarators() throws RecognitionException {\n int variableDeclarators_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"variableDeclarators\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(380, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return ; }\n // Java.g:381:5: ( variableDeclarator ( ',' variableDeclarator )* )\n dbg.enterAlt(1);\n\n // Java.g:381:9: variableDeclarator ( ',' variableDeclarator )*\n {\n dbg.location(381,9);\n pushFollow(FOLLOW_variableDeclarator_in_variableDeclarators1656);\n variableDeclarator();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(381,28);\n // Java.g:381:28: ( ',' variableDeclarator )*\n try { dbg.enterSubRule(57);\n\n loop57:\n do {\n int alt57=2;\n try { dbg.enterDecision(57);\n\n int LA57_0 = input.LA(1);\n\n if ( (LA57_0==41) ) {\n alt57=1;\n }\n\n\n } finally {dbg.exitDecision(57);}\n\n switch (alt57) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:381:29: ',' variableDeclarator\n \t {\n \t dbg.location(381,29);\n \t match(input,41,FOLLOW_41_in_variableDeclarators1659); if (state.failed) return ;\n \t dbg.location(381,33);\n \t pushFollow(FOLLOW_variableDeclarator_in_variableDeclarators1661);\n \t variableDeclarator();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop57;\n }\n } while (true);\n } finally {dbg.exitSubRule(57);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 42, variableDeclarators_StartIndex); }\n }\n dbg.location(382, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"variableDeclarators\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public AssrtIntVarNameNode(int ttype, Token t)\n\t{\n\t\tsuper(t);\n\t}", "public void outAVarDecStmt(AVarDecStmt node)\n\t{\n\t List<PExp> ids = node.getId();\n\t List<PExp> values = node.getVal();\n\t PType typeNode = node.getType();\n\t if (typeNode == null) {\n\t\tfor (int i=0; i<ids.size(); i++) {\n\t\t Node idNode = ids.get(i);\n \n\t\t if (idNode instanceof AIdExp) {\n\t\t\tString id = getId(idNode);\n\t\t\tNode valueNode = values.get(i);\n\t\t\tType t = typemap.get(valueNode);\n if (t==null) {\n throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(node) + \"] Attempted to assign void value to variable.\");\n }\n if (t instanceof FunctionType) {\n throw new TypeException(\"[line \" + golite.weeder.LineNumber.getLineNumber(node) + \"] Attempted to assign function as value.\");\n }\n\t\t\t//System.out.println(id + t.toString());\n\t\tdeclInScope(id, t);\n\t\ttypemap.put(idNode,t);\n\t\t }\n \n\t\t}\n\t }\n \t\n\t}", "public interface GlobalNode extends Node{\n\n VariableName[] getVariableNames();\n\n}", "public VarDecl(List<Token> identifiers, Type varType, ScopeLevel scopeLevel)\n {\n super(null, varType);\n\n singleVarDecls = new ArrayList<>(identifiers.size());\n for (Token id : identifiers)\n singleVarDecls.add(new SingleVarDecl(id, varType, scopeLevel));\n }", "public final EObject ruleTypedVarDeclaration() throws RecognitionException {\n EObject current = null;\n int ruleTypedVarDeclaration_StartIndex = input.index();\n Token lv_name_1_0=null;\n EObject lv_type_0_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 48) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2354:28: ( ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2355:1: ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2355:1: ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2355:2: ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2355:2: ( (lv_type_0_0= ruleType ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2356:1: (lv_type_0_0= ruleType )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2356:1: (lv_type_0_0= ruleType )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2357:3: lv_type_0_0= ruleType\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getTypedVarDeclarationAccess().getTypeTypeParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleType_in_ruleTypedVarDeclaration4677);\n lv_type_0_0=ruleType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getTypedVarDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_0_0, \n \t\t\"Type\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2373:2: ( (lv_name_1_0= RULE_ID ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2374:1: (lv_name_1_0= RULE_ID )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2374:1: (lv_name_1_0= RULE_ID )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2375:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleTypedVarDeclaration4694); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getTypedVarDeclarationAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getTypedVarDeclarationRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 48, ruleTypedVarDeclaration_StartIndex); }\n }\n return current;\n }", "public StructuredQName getVariableQName();", "public MType visit(VarDeclaration n, MType argu) {\n \t//如果f0对应的变量类型未被声明过,则报未定义错\n \tMType _ret = n.f0.accept(this, argu);\n \tif (_ret != null) {\n \t\tif (((MClasses) Mainclass.my_classes).getClassByName(_ret.getName()) == null)\n \t\t\tConsole.UndefinedClass(n.f1.f0.beginLine, _ret.getName());\n \t}\n \t\n\t return _ret;\n\t}", "public static long addOffsetsToVariables(List<Binding> variables) {\n long offset = 0;\n for (int i = variables.size() - 1; i >= 0; i--) {\n Variable v = (Variable) variables.get(i);\n if (!v.isParam()) {\n v.setOffset(offset);\n offset += v.getType().getSize();\n }\n }\n return offset;\n }", "Node getVariable();", "public void visit(VariableDeclarator n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }", "public final EObject ruleVarDeclaration() throws RecognitionException {\n EObject current = null;\n int ruleVarDeclaration_StartIndex = input.index();\n EObject this_TypedVarDeclaration_0 = null;\n\n EObject this_InferredVarDeclaration_1 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 46) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2308:28: ( (this_TypedVarDeclaration_0= ruleTypedVarDeclaration | this_InferredVarDeclaration_1= ruleInferredVarDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2309:1: (this_TypedVarDeclaration_0= ruleTypedVarDeclaration | this_InferredVarDeclaration_1= ruleInferredVarDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2309:1: (this_TypedVarDeclaration_0= ruleTypedVarDeclaration | this_InferredVarDeclaration_1= ruleInferredVarDeclaration )\n int alt49=2;\n alt49 = dfa49.predict(input);\n switch (alt49) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2310:2: this_TypedVarDeclaration_0= ruleTypedVarDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getVarDeclarationAccess().getTypedVarDeclarationParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleTypedVarDeclaration_in_ruleVarDeclaration4557);\n this_TypedVarDeclaration_0=ruleTypedVarDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_TypedVarDeclaration_0;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2323:2: this_InferredVarDeclaration_1= ruleInferredVarDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getVarDeclarationAccess().getInferredVarDeclarationParserRuleCall_1()); \n \n }\n pushFollow(FOLLOW_ruleInferredVarDeclaration_in_ruleVarDeclaration4587);\n this_InferredVarDeclaration_1=ruleInferredVarDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_InferredVarDeclaration_1;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 46, ruleVarDeclaration_StartIndex); }\n }\n return current;\n }", "public Variable(boolean vInitialized, boolean vFinal, Keywords.Type Vtype) {\n\t\tisInitialized = vInitialized;\n\t\tisFinal = vFinal;\n\t\ttype = Vtype;\n\t}", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "VariableDeclarationWithInitCS getResultVariable();" ]
[ "0.6854329", "0.6484034", "0.6378472", "0.63247406", "0.6305271", "0.62879175", "0.6255005", "0.6207978", "0.60585976", "0.605845", "0.6008981", "0.59969664", "0.5996945", "0.59650904", "0.59559405", "0.5950304", "0.5917259", "0.58856744", "0.58816177", "0.5866395", "0.58483636", "0.5839786", "0.58341885", "0.5828575", "0.5821105", "0.58087623", "0.57846946", "0.57426584", "0.5734097", "0.5704338", "0.5704299", "0.5689068", "0.5677146", "0.5666127", "0.5659992", "0.5623049", "0.5622174", "0.5620182", "0.5582382", "0.55659395", "0.55539566", "0.5552839", "0.5548758", "0.5540833", "0.5540485", "0.55321956", "0.55321956", "0.5530339", "0.55253226", "0.55246866", "0.55188483", "0.55188465", "0.55167246", "0.5502364", "0.550229", "0.5491765", "0.54900837", "0.54878646", "0.54853034", "0.54623455", "0.54606724", "0.54468566", "0.5446706", "0.5439422", "0.5435555", "0.54290336", "0.5427359", "0.5417875", "0.54044735", "0.54005826", "0.5398918", "0.5395361", "0.5392897", "0.5378043", "0.5375628", "0.536954", "0.53607357", "0.5356811", "0.5349845", "0.5345026", "0.53410685", "0.53391075", "0.53291255", "0.5327918", "0.5326867", "0.5315238", "0.53131545", "0.53053135", "0.52962345", "0.5296039", "0.5291011", "0.52840894", "0.52821565", "0.52774125", "0.5263014", "0.5262733", "0.5250432", "0.52493006", "0.52468", "0.52373743" ]
0.58827466
18
localVariableDeclaration | statementExpression moreStatementExpression
private void forInit(Modifier x, Scope scope, Vector queue) { if (isLocalVarDecl(true)) localVariableDeclaration(new Modifier(x), scope, queue); else { Operation ret = moreStatementExpression(statementExpression(scope, queue), scope, queue); while(ret != null) { if (ret.left != null) queue.add(ret.left); ret = ret.right; Operation ptr = new Operation(); ptr.operator = Keyword.CLEARSY; queue.add(ptr); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visit(LocalVariableDeclaration n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n }", "public final EObject ruleLocalVariableDeclarationStatement() throws RecognitionException {\n EObject current = null;\n int ruleLocalVariableDeclarationStatement_StartIndex = input.index();\n Token otherlv_1=null;\n EObject lv_localVariableDeclaration_0_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2202:28: ( ( ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13 ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:1: ( ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13 )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:1: ( ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13 )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:2: ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) ) otherlv_1= KEYWORD_13\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2203:2: ( (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2204:1: (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2204:1: (lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2205:3: lv_localVariableDeclaration_0_0= ruleLocalVariableDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationStatementAccess().getLocalVariableDeclarationLocalVariableDeclarationParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleLocalVariableDeclaration_in_ruleLocalVariableDeclarationStatement4323);\n lv_localVariableDeclaration_0_0=ruleLocalVariableDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"localVariableDeclaration\",\n \t\tlv_localVariableDeclaration_0_0, \n \t\t\"LocalVariableDeclaration\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,KEYWORD_13,FOLLOW_KEYWORD_13_in_ruleLocalVariableDeclarationStatement4336); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getLocalVariableDeclarationStatementAccess().getSemicolonKeyword_1());\n \n }\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 42, ruleLocalVariableDeclarationStatement_StartIndex); }\n }\n return current;\n }", "@Override\n public Void visit(IVariableDeclaration stmt, Set<String> overallContext) {\n overallContext.add(stmt.getType().getName());\n return null;\n }", "public void visit(VariableDeclarator n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n // System.out.println(\"BEGIN\");\n n.f1.accept(this);\n n.f2.accept(this);\n \t\n String s = (String) n.f3.accept(this);\n current_temp =s;\n n.f4.accept(this);\n //System.out.println(\"END\");\n return (R)s;\n }", "@Override\r\n\tpublic boolean visit(VariableDeclarationFragment node) {\r\n//\t\toperator(node);\r\n\t\treturn true;\r\n\t}", "public R visit(StmtExp n) {\n R _ret=null;\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n \n use.put(statementNumber, new ArrayList<Integer>());\n def.put(statementNumber, new ArrayList<Integer>());\n n.f3.accept(this);\n end.add(statementNumber);\n// System.out.println(statementNumber);\n n.f4.accept(this);\n statementNumber++;\n return _ret;\n }", "VariableDeclaration createVariableDeclaration();", "@Override\r\n\tpublic void visit(VariableDeclaration variableDeclaration) {\n\r\n\t}", "public Snippet visit(AddLocalOpsStatement n, Snippet argu) {\n\t Snippet _ret=null;\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t _ret.returnTemp+=generateTabs(blockDepth)+\"x10.lang.perf.addLocalOps(\"+f2.returnTemp+\");\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "VariableDeclarationWithInitCS getResultVariable();", "public void visit(VariableDeclaratorId n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public final EObject ruleLocalVariableDeclaration() throws RecognitionException {\n EObject current = null;\n int ruleLocalVariableDeclaration_StartIndex = input.index();\n Token otherlv_1=null;\n EObject lv_vardecl_0_0 = null;\n\n EObject lv_expression_2_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2246:28: ( ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:1: ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:1: ( ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )? )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:2: ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) ) (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )?\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2247:2: ( (lv_vardecl_0_0= ruleTypedVarDeclaration ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2248:1: (lv_vardecl_0_0= ruleTypedVarDeclaration )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2248:1: (lv_vardecl_0_0= ruleTypedVarDeclaration )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2249:3: lv_vardecl_0_0= ruleTypedVarDeclaration\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationAccess().getVardeclTypedVarDeclarationParserRuleCall_0_0()); \n \t \n }\n pushFollow(FOLLOW_ruleTypedVarDeclaration_in_ruleLocalVariableDeclaration4426);\n lv_vardecl_0_0=ruleTypedVarDeclaration();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"vardecl\",\n \t\tlv_vardecl_0_0, \n \t\t\"TypedVarDeclaration\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2265:2: (otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) ) )?\n int alt48=2;\n alt48 = dfa48.predict(input);\n switch (alt48) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2266:2: otherlv_1= KEYWORD_15 ( (lv_expression_2_0= ruleExpression ) )\n {\n otherlv_1=(Token)match(input,KEYWORD_15,FOLLOW_KEYWORD_15_in_ruleLocalVariableDeclaration4440); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getLocalVariableDeclarationAccess().getEqualsSignKeyword_1_0());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2270:1: ( (lv_expression_2_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2271:1: (lv_expression_2_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2271:1: (lv_expression_2_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2272:3: lv_expression_2_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getLocalVariableDeclarationAccess().getExpressionExpressionParserRuleCall_1_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleLocalVariableDeclaration4460);\n lv_expression_2_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getLocalVariableDeclarationRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"expression\",\n \t\tlv_expression_2_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 44, ruleLocalVariableDeclaration_StartIndex); }\n }\n return current;\n }", "public final void localVariableDeclarationStatement() throws RecognitionException {\n int localVariableDeclarationStatement_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"localVariableDeclarationStatement\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(606, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 87) ) { return ; }\n // Java.g:607:5: ( localVariableDeclaration ';' )\n dbg.enterAlt(1);\n\n // Java.g:607:10: localVariableDeclaration ';'\n {\n dbg.location(607,10);\n pushFollow(FOLLOW_localVariableDeclaration_in_localVariableDeclarationStatement3275);\n localVariableDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(607,35);\n match(input,26,FOLLOW_26_in_localVariableDeclarationStatement3277); if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 87, localVariableDeclarationStatement_StartIndex); }\n }\n dbg.location(608, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"localVariableDeclarationStatement\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "private VariableDeclaration getVarDeclaration(Element statement) {\n VariableDeclaration variableDeclaration = statement.nearestAncestor(VariableDeclaration.class);\n if (variableDeclaration == null) {\n return getNearestElement(statement, VariableDeclaration.class);\n } else {\n return variableDeclaration;\n }\n }", "public R visit(StmtList n) {\n R _ret=null;\n coming_from_stmt_list=1;\n String s = (String) n.f0.accept(this);\n // String new1 = (String) n.f0.elementAt(0).toString();\n// System.out.println(\"check\"+new1);\n \n return _ret;\n }", "public final EObject ruleBlockStatement() throws RecognitionException {\n EObject current = null;\n int ruleBlockStatement_StartIndex = input.index();\n EObject this_LocalVariableDeclarationStatement_0 = null;\n\n EObject this_Statement_1 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 38) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1993:28: ( (this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement | this_Statement_1= ruleStatement ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1994:1: (this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement | this_Statement_1= ruleStatement )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1994:1: (this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement | this_Statement_1= ruleStatement )\n int alt46=2;\n alt46 = dfa46.predict(input);\n switch (alt46) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1995:2: this_LocalVariableDeclarationStatement_0= ruleLocalVariableDeclarationStatement\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getBlockStatementAccess().getLocalVariableDeclarationStatementParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleLocalVariableDeclarationStatement_in_ruleBlockStatement3809);\n this_LocalVariableDeclarationStatement_0=ruleLocalVariableDeclarationStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_LocalVariableDeclarationStatement_0;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2008:2: this_Statement_1= ruleStatement\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getBlockStatementAccess().getStatementParserRuleCall_1()); \n \n }\n pushFollow(FOLLOW_ruleStatement_in_ruleBlockStatement3839);\n this_Statement_1=ruleStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_Statement_1;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 38, ruleBlockStatement_StartIndex); }\n }\n return current;\n }", "private void localVariableDeclaration(Modifier modify, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.FINALSY)\r\n {\r\n modify.add(nextSymbol.value);\r\n lookAhead();\r\n }\r\n\r\n modify.check(modify.fields | modify.access);\r\n Type t = type();\r\n\r\n variableDeclarators(modify, t, scope, queue);\r\n }", "public interface TeaVariable extends TeaNamedElement {\n boolean hasInitializer();\n TeaExpression getInitializer();\n void setInitializer(TeaExpression expr) throws IncorrectOperationException;\n TeaType getType();\n// boolean isConst();\n ASTNode findNameIdentifier();\n\n TeaReferenceExpression findNameExpression();\n}", "public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }", "public Variable[] getLocals();", "private ParseTree parseStatement() {\n return parseSourceElement();\n }", "@Override\n public String visit(VariableDeclarationExpr n, Object arg) {\n return null;\n }", "VariableExp createVariableExp();", "public StatementType getStatementType()\n\t{\n\t\treturn StatementType.VARIABLE_DECLARATION_STATEMENT;\n\t}", "public String visit(VarDeclaration n, LLVMRedux argu) throws Exception {\n\n u.println(\"%\"+n.f1.accept(this, argu)+\" = alloca \"+n.f0.accept(this,argu));\n u.println(\"\");\n return null;\n }", "public LocalRec LocalRec(RecVar recvar, LocalType body)\n\t{\n\t\t//return new LocalRec(self, recvar, body);\n\t\treturn new LocalRec(recvar, body);\n\t}", "public void method(int a) {\r\n\t\tint tot = 7;\r\n\t\tSystem.out.println(\"localvariable a: \"+a);\r\n\t\tint b = a + 4;\r\n\t\tSystem.out.println(\"localvariable b: \"+b);\r\n\t\t\r\n\t}", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "@Override\n\tpublic Void visit(LetVar letvar) {\n\t\tprintIndent(\"local\");\n\t\tindent++;\n\t\tletvar.id.accept(this);\n\t\tletvar.type.accept(this);\n\t\tif (letvar.expr != null)\n\t\t\tletvar.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "@Test\n void testExample1() {\n List<Token> input = Arrays.asList(\n new Token(Token.Type.IDENTIFIER, \"LET\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \":\", -1),\n new Token(Token.Type.IDENTIFIER, \"INTEGER\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"WHILE\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"!=\", -1),\n new Token(Token.Type.INTEGER, \"10\", -1),\n new Token(Token.Type.IDENTIFIER, \"DO\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"PRINT\", -1),\n new Token(Token.Type.OPERATOR, \"(\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \")\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"+\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"END\", -1)\n );\n Ast.Source expected = new Ast.Source(Arrays.asList(\n new Ast.Statement.Declaration(\"first\", \"INTEGER\",\n Optional.of(new Ast.Expression.Literal(BigInteger.valueOf(1)))),\n new Ast.Statement.While(\n new Ast.Expression.Binary(\"!=\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(10))\n ),\n Arrays.asList(\n new Ast.Statement.Expression(\n new Ast.Expression.Function(\"PRINT\", Arrays.asList(\n new Ast.Expression.Variable(\"first\"))\n )\n ),\n new Ast.Statement.Assignment(\"first\",\n new Ast.Expression.Binary(\"+\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(1))\n )\n )\n )\n )\n ));\n test(input, expected, Parser::parseSource);\n }", "private Stmt simpleStmt() {\n if (null != lexer.token) {\n switch (lexer.token) {\n case PRINT:\n return printStmt();\n case BREAK:\n return breakStmt();\n case IDENT:\n lexer.nextToken();\n if (lexer.token == Symbol.LEFTPAR) {\n lexer.backToken();\n return funcStmt();\n } else {\n lexer.backToken();\n return exprStmt();\n }\n case RETURN:\n return returnStmt();\n default:\n break;\n }\n }\n return null;\n }", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "public R visit(StmtList n) {\n R _ret=null;\n n.f0.accept(this);\n return _ret;\n }", "public Rule localDef()\n \t{\n\t\treturn sequence(\n\t\t\t\tfirstOf(\n\t\t\t\t\tsequence(typeAndOrId(), enforcedSequence(OP_ASSIGN, expr())),\n\t\t\t\t\tsequence(type(), id())),\n \t\t\t\teos());\n \t}", "public void visit(LabeledStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n }", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "private Stmt compoundStmt() {\n if (lexer.token == Symbol.IF) {\n return iftStmt();\n } else if (lexer.token == Symbol.WHILE) {\n return whileStmt();\n }\n return forStmt();\n }", "public R visit(SimpleExp n) {\n R _ret=null;\n if(n.f0.which == 0){\n \t Integer temp = (Integer)n.f0.accept(this);\n \t //new\n \t \n \t ArrayList<Integer> newHold = use.get(statementNumber);\n// \t System.out.println(statementNumber);\n \t newHold.add(temp);\n \t use.put(statementNumber, newHold);\n \t \n \t //new\n \t if(temp >= arguments){\n\t \t ArrayList<Integer> hold = live.get(temp);\n\t \t hold.add(statementNumber);\n\t \t live.put(temp, hold);\n \t }\n }else{\n \t if(n.f0.which == 2)\n \t\t notLabel = false;\n \t n.f0.accept(this);\n \t if(n.f0.which == 2)\n \t\t notLabel = true;\n }\n return _ret;\n }", "public interface AstWhileStatement extends AstStatement {\r\n\tpublic AstKeyword get_while();\r\n\r\n\tpublic AstPunctuator get_lparanth();\r\n\r\n\tpublic AstExpression get_condition();\r\n\r\n\tpublic AstPunctuator get_rparanth();\r\n\r\n\tpublic AstStatement get_body();\r\n}", "public Arginfo visit(VarDeclaration n, Arginfo argu) {\n Arginfo _ret=null;\n \n \n \n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n \n if(!argu.methodname.equals(\"\")){\n \t globalmap.put(n.f1.f0.tokenImage,prectr++);\n }\n \n return _ret;\n }", "public LocalDecl createLocalDecl(Position pos, Flags flags, Name name, Expr init) {\n if (init.type().isVoid()) {\n System.err.println(\"ERROR: ForLoopOptimizer.createLocalDecl: creating void local assignment for \" +init+ \" at \" +pos);\n }\n return createLocalDecl(pos, flags, name, init.type(), init);\n }", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public R visit(HStoreStmt n) {\n R _ret=null;\n n.f0.accept(this);\n Integer temp1 = (Integer)n.f1.accept(this);\n //new\n \tArrayList<Integer> newHold = use.get(statementNumber);\n \tnewHold.add(temp1);\n \t\n //new\n \n \n ArrayList<Integer> hold = null;\n if(temp1 >= arguments){\n\t hold = live.get(temp1);\n\t hold.add(statementNumber);\n\t live.put(temp1, hold);\n }\n n.f2.accept(this);\n\n Integer temp2 = (Integer)n.f3.accept(this);\n //new\n \n newHold.add(temp2);\n use.put(statementNumber, newHold);\n //new\n if(temp2 >= arguments){\n hold = live.get(temp2);\n hold.add(statementNumber);\n live.put(temp2, hold);\n }\n return _ret;\n }", "public VariType visit(Statement n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t return _ret;\n\t }", "@Override\r\n public void visit(HStoreStmt n, Graph argu) {\r\n cur.addUse(Integer.parseInt(n.f1.f1.f0.tokenImage)); // Temp is used\r\n cur.addUse(Integer.parseInt(n.f3.f1.f0.tokenImage)); // Temp is used\r\n argu.addStatement(cur, true);\r\n }", "@Override\n public Expression visit(LogicalOpNode node) {\n\n Label trueLabel = new Label ();\n Label falseLabel = new Label ();\n Label endLabel = new Label ();\n\n process(node, trueLabel, falseLabel);\n\n cat.footoredo.mx.entity.Variable variable = tmpVariable(node.getType());\n\n label (trueLabel);\n assign (node.getLocation(), ref(variable), new Integer(Type.INT8, 1));\n jump (endLabel);\n\n label (falseLabel);\n assign (node.getLocation(), ref(variable), new Integer(Type.INT8, 0));\n jump (endLabel);\n\n label (endLabel);\n\n return isStatement() ? null : ref (variable);\n }", "public VariType visit(VarDeclaration n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t return _ret;\n\t }", "public void visit(StatementExpressionList n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public void visit(StatementExpression n) {\n n.f0.accept(this);\n }", "public LlvmValue visit(Formal n){\n\t\n\t\tSystem.out.format(\"formal**********\\n\");\n\t\t\n\t\tStringBuilder name = new StringBuilder();\n\t\t\n\t\tname.append(\"%\");\n\t\tname.append(n.name.s);\n\t\t\n\t\t//variable -> %name, com tipo n.type\n\t\tLlvmNamedValue variable = new LlvmNamedValue(name.toString(), (LlvmType)n.type.accept(this));\n\t\t\n\t\treturn variable;\t\t\n\t}", "private void declareLocals() {\r\n\t\t// declare locals\r\n\t\tfor(Local local: method.retrieveActiveBody().getLocals()) {\r\n\t\t\tString cType = null;\r\n\t\t\t// null types need special treatment, we don't output them\r\n\t\t\t// we also won't generate statements that use a nullType\r\n\t\t\t// as a target.\r\n\t\t\tif(local.getType() instanceof NullType) {\r\n\t\t\t\tcType = \"java_lang_Object*\";\r\n\t\t\t} else {\r\n\t\t\t\tcType = CTypes.toCType(local.getType());\r\n\t\t\t}\r\n\t\t\twriter.wl(cType + \" \" + local.getName() + \" = 0;\");\r\n\t\t}\r\n\t\twriter.wl(\"java_lang_Object* _exception = 0;\");\r\n\t}", "public ContextNodeStatement getStatement();", "@Override\n public R visit(Bind n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n n.expression.accept(this, argu);\n n.nodeToken2.accept(this, argu);\n n.var.accept(this, argu);\n n.nodeToken3.accept(this, argu);\n return _ret;\n }", "public static Node match(Parser parser) throws BuildException {\n\n Lexeme var = parser.match(LexemeType.VAR);\n Node variables = IdentifierList.match(parser);\n\n if (parser.check(LexemeType.EQUALS)) {\n Lexeme equals = parser.advance();\n return VariableDeclarationNode.createVariableDeclaration(var, variables, ExpressionList.match(parser));\n\n }\n\n return VariableDeclarationNode.createVariableDeclaration(var, variables);\n\n }", "public void visit(Statement n) {\n n.f0.accept(this);\n }", "private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "@Override\n\tpublic void visitXlocal(Xlocal p) {\n\n\t}", "public final void synpred151_Java_fragment() throws RecognitionException {\n // Java.g:601:9: ( localVariableDeclarationStatement )\n dbg.enterAlt(1);\n\n // Java.g:601:9: localVariableDeclarationStatement\n {\n dbg.location(601,9);\n pushFollow(FOLLOW_localVariableDeclarationStatement_in_synpred151_Java3231);\n localVariableDeclarationStatement();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n }", "public static void main(String[] args) {\n\nint x = 5;\nint y;\n// int z = x+y; // DOES NOT COMPILE\n // Local variables need to be initialized before use\n\n\n}", "@Override\n public String visit(VariableDeclarator n, Object arg) {\n return null;\n }", "public void visit(ExpressionStatement expressionStatement) {\n\t}", "public LocalVariable defineLocalVariable(QName name, XQType type,\n Expression declaring)\n {\n \n LocalVariable decl = newLocal(name, type, declaring);\n lastLocal.addAfter(decl);\n lastLocal = decl;\n return decl;\n }", "public final EObject ruleWhileStatement() throws RecognitionException {\n EObject current = null;\n int ruleWhileStatement_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n EObject lv_expression_2_0 = null;\n\n EObject lv_statement_4_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 62) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2899:28: ( (otherlv_0= KEYWORD_65 otherlv_1= KEYWORD_4 ( (lv_expression_2_0= ruleExpression ) ) otherlv_3= KEYWORD_5 ( (lv_statement_4_0= ruleStatement ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2900:1: (otherlv_0= KEYWORD_65 otherlv_1= KEYWORD_4 ( (lv_expression_2_0= ruleExpression ) ) otherlv_3= KEYWORD_5 ( (lv_statement_4_0= ruleStatement ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2900:1: (otherlv_0= KEYWORD_65 otherlv_1= KEYWORD_4 ( (lv_expression_2_0= ruleExpression ) ) otherlv_3= KEYWORD_5 ( (lv_statement_4_0= ruleStatement ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2901:2: otherlv_0= KEYWORD_65 otherlv_1= KEYWORD_4 ( (lv_expression_2_0= ruleExpression ) ) otherlv_3= KEYWORD_5 ( (lv_statement_4_0= ruleStatement ) )\n {\n otherlv_0=(Token)match(input,KEYWORD_65,FOLLOW_KEYWORD_65_in_ruleWhileStatement5778); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getWhileStatementAccess().getWhileKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleWhileStatement5790); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getWhileStatementAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2910:1: ( (lv_expression_2_0= ruleExpression ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2911:1: (lv_expression_2_0= ruleExpression )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2911:1: (lv_expression_2_0= ruleExpression )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2912:3: lv_expression_2_0= ruleExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getWhileStatementAccess().getExpressionExpressionParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleExpression_in_ruleWhileStatement5810);\n lv_expression_2_0=ruleExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getWhileStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"expression\",\n \t\tlv_expression_2_0, \n \t\t\"Expression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleWhileStatement5823); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_3, grammarAccess.getWhileStatementAccess().getRightParenthesisKeyword_3());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2933:1: ( (lv_statement_4_0= ruleStatement ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2934:1: (lv_statement_4_0= ruleStatement )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2934:1: (lv_statement_4_0= ruleStatement )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:2935:3: lv_statement_4_0= ruleStatement\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getWhileStatementAccess().getStatementStatementParserRuleCall_4_0()); \n \t \n }\n pushFollow(FOLLOW_ruleStatement_in_ruleWhileStatement5843);\n lv_statement_4_0=ruleStatement();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getWhileStatementRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"statement\",\n \t\tlv_statement_4_0, \n \t\t\"Statement\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 62, ruleWhileStatement_StartIndex); }\n }\n return current;\n }", "@Test\n\tpublic void testDeclaration(){\n\t\tVariable x = new Variable(\"x\");\n\t\tStatement decl = f.createDeclNode(x);\n\t\tassertEquals(decl.textRepresentation(), \"var x;\");\n\t\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tdecl.accept(v);\n\t\tassertEquals(\"declaration test1 fail\", v.numCount, 0);\n\t\tassertEquals(\"declaration test2 fail\", v.infixCount, 0);\n\t\tassertEquals(\"declaration test3 fail\", v.decCount, 1);\n\t\tassertEquals(\"declaration test4 fail\", v.seqCount, 0);\n\t\tassertEquals(\"declaration test5 fail\", v.assignCount, 0);\n\t\tassertEquals(\"declaration test6 fail\", v.varCount, 0);\n\t\tassertEquals(\"declaration test7 fail\", v.strCount, 0);\n\t\tassertEquals(\"declaration test8 fail\", v.prefixCount, 0);\n\n\t}", "Code compStmt(final Code andThen, final mil.Block breakBlock, final mil.Block contBlock) { // var = init\n return init.compTail(new TailCont() {\n Code with(final Tail t) {\n return new Bind(ve.getVar(), t, andThen);\n }\n });\n }", "private Stmt varDeclaration() {\n Token name = consume(IDENTIFIER, \"Expect variable name.\");\n Expr initializer = null;\n // Parse the initializer if an '=' is present. This branching allows initialization without declaration.\n if(match(EQUAL)) {\n initializer = expression();\n }\n\n consumeSemi(\"Expect ';' after variable declaration.\");\n return new Stmt.Var(name, initializer);\n }", "public String visit(VarDeclaration n, String ourclass) {\n String type, name;\n type = n.f0.accept(this, null);\n name = n.f1.accept(this, null);\n if(!ourclass.contains(\" \")){ //class members variables\n vcounter ++;\n integer++;\n variable x = new variable(type, name, vcounter, integer);\n ClassMembers cm = st.cmgetST(ourclass);\n if(cm.checkSameVar(x)){\n System.out.println(\"Variable already exists\");\n return null;\n }\n cm.var.add(x);\n st.cmputST(ourclass, cm);\n }\n else{ //method's variables\n integer++;\n variable x = new variable(type, name, integer);\n String[] parts = ourclass.split(\" \");\n String classname = parts[0]; \n String methodname = parts[1];\n ClassMembers cm=st.cmgetST(classname);\n Method m=cm.meth.get(methodname);\n m.localvars.add(x);\n cm.meth.put(methodname, m);\n st.cmputST(classname, cm);\n }\n return null; \n }", "public MType visit(AssignmentStatement n, MType argu) {\n \t\n \tMType _ret=null;\n \t\n \t//左边f0这个变量如果没有在该方法或该方法所在类或其继承的所有的类中声明则报未定义错\n \tString leftname = n.f0.accept(this, argu).getName();\n \tMType left = Judge.isVarDeclared(leftname, argu);\n \tif (left == null)\n \t\tConsole.UndefinedVariable(n.f0.f0.beginLine, leftname);\n \t\n \t\tn.f2.accept(this, argu);\n \t\t\n \t\treturn _ret;\n }", "public static void main(String[] args){\r\n\r\n IStmt lab2ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(2)), new PrintStmt(new VarExp(\"v\")));\r\n\r\n /*\r\n * lab2ex2\r\n * a = 2 + 3 * 5;\r\n * b = a + 1;\r\n * print(b)\r\n *\r\n * */\r\n\r\n IStmt lab2ex2 = new CompStmt(new AssignStmt(\"a\", new ArithExp('+', new ConstExp(2), new ArithExp('*', new ConstExp(3), new ConstExp(5)))), new CompStmt(new AssignStmt(\"b\", new ArithExp('+', new VarExp(\"a\"), new ConstExp(1))), new PrintStmt(new VarExp(\"b\"))));\r\n\r\n /*\r\n * lab2ex3\r\n * a = 2 - 2;\r\n * if a then v = 2 else v = 3\r\n * print(v)\r\n *\r\n * */\r\n\r\n IStmt lab2ex3 = new CompStmt(new AssignStmt(\"a\", new ArithExp('-', new ConstExp(2), new ConstExp(2))), new CompStmt(new IfStmt(new VarExp(\"a\"), new AssignStmt(\"v\", new ConstExp(2)), new AssignStmt(\"v\", new ConstExp(3))), new PrintStmt(new VarExp(\"v\"))));\r\n\r\n /*\r\n * lab3ex1\r\n * openRFile(var_f, \"test.in\");\r\n * readFile(var_f, var_c); print(var_c);\r\n * if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0)\r\n * closeRFile(var_f)\r\n *\r\n * */\r\n\r\n IStmt lab3ex1 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test1.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n /**\r\n * lab3ex2\r\n * openRFile(var_f + 2, var_c); print(var_c);\r\n * (if var_c then readFile(var_f, var_c); print(var_c)\r\n * else print(0));\r\n * closeRFile(var_f)\r\n *\r\n */\r\n\r\n IStmt lab3ex2 = new CompStmt(new OpenRFileStmt(\"var_f\", \"test.in\"),\r\n new CompStmt(\r\n new ReadFileStmt(new ArithExp('+', new VarExp(\"var_f\"), new ConstExp(2)), \"var_c\"),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"var_c\")),\r\n new CompStmt(\r\n new IfStmt(\r\n new VarExp(\"var_c\"),\r\n new CompStmt(\r\n new ReadFileStmt(new VarExp(\"var_f\"), \"var_c\"),\r\n new PrintStmt(new VarExp(\"var_c\"))\r\n ),\r\n new PrintStmt(new ConstExp(0))\r\n ),\r\n new CloseRFileStmt(new VarExp(\"var_f\"))\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /*\r\n * v = 10; new(v, 20); new(a, 22); wH(a, 30); print(a); print(rH(a)); a = 0;\r\n *\r\n * */\r\n\r\n IStmt lab4ex1 = new CompStmt(new AssignStmt(\"v\", new ConstExp(10)),\r\n new CompStmt(\r\n new NewStmt(\"v\", new ConstExp(20)),\r\n new CompStmt(\r\n new NewStmt(\"a\", new ConstExp(22)),\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"a\")),\r\n new CompStmt(\r\n new PrintStmt(new ReadHeapExp(\"a\")),\r\n new AssignStmt(\"a\", new ConstExp(0))\r\n )\r\n )\r\n )\r\n )\r\n )\r\n );\r\n\r\n\r\n /**\r\n *\r\n * Lab5ex1: 10 + (2 < 6) = 11\r\n *\r\n * */\r\n\r\n\r\n IStmt lab5ex1 = new CompStmt(new AssignStmt(\"P\", new ArithExp('+', new ConstExp(10),\r\n new BooleanExp(new ConstExp(2), new ConstExp(6), \"<\"))),\r\n new PrintStmt(new VarExp(\"P\")));\r\n\r\n\r\n /*\r\n *\r\n * Lab5ex2: (10 + 2) < 6\r\n *\r\n * **/\r\n\r\n IStmt lab5ex2 = new CompStmt(new AssignStmt(\"Q\", new BooleanExp(new ArithExp('+',\r\n new ConstExp(10), new ConstExp(2)), new ConstExp(6), \"<\")),\r\n new PrintStmt(new VarExp(\"Q\")));\r\n\r\n\r\n /*\r\n *\r\n * v = 6;\r\n * (while (v - 4) print(v); v = v - 1)\r\n * print(v)\r\n *\r\n ***/\r\n\r\n AssignStmt as = new AssignStmt(\"v\", new ConstExp(6));\r\n IStmt auxlab5ex3 = new CompStmt(new WhileStmt(new BooleanExp(new VarExp(\"v\"),\r\n new ConstExp(4), \">=\"), new CompStmt(new PrintStmt(new VarExp(\"v\")),\r\n new AssignStmt(\"v\", new ArithExp('-', new VarExp(\"v\"), new ConstExp(1))))),\r\n new PrintStmt(new VarExp(\"v\")));\r\n\r\n IStmt lab5ex3 = new CompStmt(as, auxlab5ex3);\r\n\r\n\r\n /**\r\n *\r\n * la6ex1\r\n * v = 10; new(a, 22);\r\n * fork(wH(a, 30); v = 32; print(v); print(rH(a)));\r\n * print(v); print(rH(a))\r\n *\r\n * */\r\n\r\n IStmt lab6ex1 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n );\r\n\r\n IStmt lab6ex2 = new CompStmt(\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(10)),\r\n new NewStmt(\"a\", new ConstExp(22))\r\n ),\r\n new CompStmt(\r\n new ForkStmt(\r\n new CompStmt(\r\n new WriteHeapStmt(\"a\", new ConstExp(30)),\r\n new CompStmt(\r\n new AssignStmt(\"v\", new ConstExp(32)),\r\n new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\"))\r\n )\r\n )\r\n )\r\n ),\r\n new ForkStmt(new CompStmt(\r\n new PrintStmt(new VarExp(\"v\")),\r\n new PrintStmt(new ReadHeapExp(\"a\")))\r\n )\r\n )\r\n );\r\n\r\n\r\n\r\n TextMenu menu = new TextMenu(new MyDictionary<String, Command>(new HashMap<String, Command>()));\r\n menu.addCommand(new ExitCommand(\"0\", \"Exit\"));\r\n menu.addCommand(new RunExample(\"1\", lab2ex1.toString(), getNewController(lab2ex1)));\r\n menu.addCommand(new RunExample(\"2\", lab2ex2.toString(), getNewController(lab2ex2)));\r\n menu.addCommand(new RunExample(\"3\", lab2ex3.toString(), getNewController(lab2ex3)));\r\n menu.addCommand(new RunExample(\"4\", lab3ex1.toString(), getNewController(lab3ex1)));\r\n menu.addCommand(new RunExample(\"5\", lab3ex2.toString(), getNewController(lab3ex2)));\r\n menu.addCommand(new RunExample(\"6\", lab4ex1.toString(), getNewController(lab4ex1)));\r\n menu.addCommand(new RunExample(\"7\", lab5ex1.toString(), getNewController(lab5ex1)));\r\n menu.addCommand(new RunExample(\"8\", lab5ex2.toString(), getNewController(lab5ex2)));\r\n menu.addCommand(new RunExample(\"9\", lab5ex3.toString(), getNewController(lab5ex3)));\r\n menu.addCommand(new RunExample(\"10\", lab6ex1.toString(), getNewController(lab6ex1)));\r\n menu.addCommand(new RunExample(\"11\", lab6ex2.toString(), getNewController(lab6ex2)));\r\n\r\n menu.show();\r\n }", "public LocalDebugInfo[] locals();", "public static boolean Statement(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Statement\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, STATEMENT, \"<statement>\");\n r = VariableDefinition(b, l + 1);\n if (!r) r = AssignmentStatement(b, l + 1);\n if (!r) r = FunctionInvocation(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "Lexpr createLexpr();", "public String parseVariable(String statement) {\r\n if (Asserts.isNullString(statement)) {\r\n return statement;\r\n }\r\n String[] strs = statement.split(SystemConfiguration.getInstances().getSqlSeparator());\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < strs.length; i++) {\r\n String str = strs[i];\r\n if (str.trim().length() == 0) {\r\n continue;\r\n }\r\n str = strs[i];\r\n if (str.contains(FlinkSQLConstant.FRAGMENTS)) {\r\n String[] strs2 = str.split(FlinkSQLConstant.FRAGMENTS);\r\n if (strs2.length >= 2) {\r\n if (strs2[0].length() == 0) {\r\n throw new ExpressionParserException(\"Illegal variable name.\");\r\n }\r\n String valueString = str.substring(str.indexOf(FlinkSQLConstant.FRAGMENTS) + 2);\r\n this.registerSqlFragment(strs2[0], replaceVariable(valueString));\r\n } else {\r\n throw new ExpressionParserException(\"Illegal variable definition.\");\r\n }\r\n } else {\r\n sb.append(replaceVariable(str));\r\n }\r\n }\r\n return sb.toString();\r\n }", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}", "Statement getStmt();", "public R visit(PrintStmt n) {\n R _ret=null;\n n.f0.accept(this);\n simple_exp=0;\n String s1 = (String) n.f1.accept(this);\n int temp = new_temp++;\n String s = (\"MOVE TEMP \"+temp+\" \"+s1);\n s=s+(\" \\n PRINT TEMP \"+temp);\n return (R)s;\n }", "private boolean isVariableDeclaration(boolean aGlobal) throws IOException\n\t{\n\t\t// Initialize return value to false.\n\t\tboolean isValid = false;\n\t\t\n\t\tif(aGlobal)\n\t\t{\n\t\t\ttheSymbolTable.UpdateScopeForGlobal();\n\t\t}\n\t\t\n\t\tif(isTypeMark())\n\t\t{\n\t\t\ttheSymbolTable.CURR_SYMBOL.setType(theCurrentToken.TokenType);\n\t\t\t\n\t\t\tupdateToken();\n\t\t\tif(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t\t{\n\t\t\t\ttheSymbolTable.AddToScopeKey(theCurrentToken.TokenValue);\n\t\t\t\ttheSymbolTable.CURR_SYMBOL.setLineNumber(theCurrentToken.TokenLineNumber);\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif(theNextToken.TokenType == TokenType.LEFT_BRACKET)\n\t\t\t\t\t{\n\t\t\t\t\t\tupdateToken();\n\t\t\t\t\t\tif(isBoundStatement())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString aDeclaration = \n\t\t\t\t\t\t\t\t\ttheTranslator.VariableDeclarationBuilder(theSymbolTable.ReturnScopeKeyForTranslation(),\n\t\t\t\t\t\t\t\t\t\t\ttheSymbolTable.CURR_SYMBOL);\n\t\t\t\t\t\t\ttheSymbolTable.PutSymbolInTable();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(aGlobal)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttheTranslator.theGlobalDeclarationQueue.add(aDeclaration);\n\t\t\t\t\t\t\t\ttheSymbolTable.ReturnScopeForGlobal();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttheTranslator.theCurrentBody.add(aDeclaration);\n\t\t\t\t\t\t\t\ttheSymbolTable.RemoveFromScopeKey();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tString aDeclaration = \n\t\t\t\t\t\t\t\ttheTranslator.VariableDeclarationBuilder(theSymbolTable.ReturnScopeKeyForTranslation(), \n\t\t\t\t\t\t\t\t\t\ttheSymbolTable.CURR_SYMBOL);\n\t\t\t\t\t\ttheSymbolTable.PutSymbolInTable();\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(aGlobal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheTranslator.theGlobalDeclarationQueue.add(aDeclaration);\n\t\t\t\t\t\t\ttheSymbolTable.ReturnScopeForGlobal();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttheTranslator.theCurrentBody.add(aDeclaration);\n\t\t\t\t\t\t\ttheSymbolTable.RemoveFromScopeKey();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\ttheLogger.LogScanError(theCurrentToken);\n\t\t\t\t\tupdateToken();\n\t\t\t\t\twhile(theNextToken != null && theNextToken.TokenType != TokenType.SEMICOLON)\n\t\t\t\t\t\tupdateToken();\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Invalid type provided.\n\t\telse if (theCurrentToken.TokenType == TokenType.IDENTITY && theNextToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\ttheLogger.LogParseError(theCurrentToken);\n\t\t\twhile(theNextToken.TokenType != TokenType.SEMICOLON)\n\t\t\t\tupdateToken();\n\t\t\tisValid = true;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "private LocalVariables locals(){\n\t\treturn frame.getLocals();\n\t}", "public final PythonParser.small_stmt_return small_stmt() throws RecognitionException {\n PythonParser.small_stmt_return retval = new PythonParser.small_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n PythonParser.expr_stmt_return expr_stmt61 = null;\n\n PythonParser.print_stmt_return print_stmt62 = null;\n\n PythonParser.del_stmt_return del_stmt63 = null;\n\n PythonParser.pass_stmt_return pass_stmt64 = null;\n\n PythonParser.flow_stmt_return flow_stmt65 = null;\n\n PythonParser.import_stmt_return import_stmt66 = null;\n\n PythonParser.global_stmt_return global_stmt67 = null;\n\n PythonParser.exec_stmt_return exec_stmt68 = null;\n\n PythonParser.assert_stmt_return assert_stmt69 = null;\n\n\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:568:12: ( expr_stmt | print_stmt | del_stmt | pass_stmt | flow_stmt | import_stmt | global_stmt | exec_stmt | assert_stmt )\n int alt29=9;\n alt29 = dfa29.predict(input);\n switch (alt29) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:568:14: expr_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_expr_stmt_in_small_stmt1484);\n expr_stmt61=expr_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, expr_stmt61.getTree());\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:569:14: print_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_print_stmt_in_small_stmt1499);\n print_stmt62=print_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, print_stmt62.getTree());\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:570:14: del_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_del_stmt_in_small_stmt1514);\n del_stmt63=del_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, del_stmt63.getTree());\n\n }\n break;\n case 4 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:571:14: pass_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_pass_stmt_in_small_stmt1529);\n pass_stmt64=pass_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, pass_stmt64.getTree());\n\n }\n break;\n case 5 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:572:14: flow_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_flow_stmt_in_small_stmt1544);\n flow_stmt65=flow_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, flow_stmt65.getTree());\n\n }\n break;\n case 6 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:573:14: import_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_import_stmt_in_small_stmt1559);\n import_stmt66=import_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, import_stmt66.getTree());\n\n }\n break;\n case 7 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:574:14: global_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_global_stmt_in_small_stmt1574);\n global_stmt67=global_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, global_stmt67.getTree());\n\n }\n break;\n case 8 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:575:14: exec_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_exec_stmt_in_small_stmt1589);\n exec_stmt68=exec_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, exec_stmt68.getTree());\n\n }\n break;\n case 9 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:576:14: assert_stmt\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_assert_stmt_in_small_stmt1604);\n assert_stmt69=assert_stmt();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, assert_stmt69.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "@Override\r\n public void visit(StmtExp n, Graph argu) {\r\n n.f1.accept(this, argu);\r\n\r\n // RETURN is treated as a statement\r\n cur = new Statement(null);\r\n n.f3.accept(this, argu);\r\n argu.addStatement(cur, true);\r\n argu.setRet(n.f3);\r\n }", "@Override\r\n public void visit(MoveStmt n, Graph argu) {\r\n n.f2.accept(this, argu);\r\n cur.addDef(Integer.parseInt(n.f1.f1.f0.tokenImage)); // Temp is defined\r\n argu.addStatement(cur, true);\r\n }", "TupleLiteralExp createTupleLiteralExp();", "public Snippet visit(ThisFieldAssignment n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.identifier.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f5 = n.identifier1.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = generateTabs(blockDepth)+\"this.\"+f2.returnTemp+\" = (\"+f5.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+= _ret.returnTemp;\n\t\t\treturn _ret;\n\t }", "Node getVariable();", "@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n\t\t \"var d = 7;\",\n\t\t \"}\",\n\t\t \"return b + c + a + d;\",\n\t\t \"}\",\n\n\t\t \"sup();\"\n\t\t};\n\t\t\n\t\tth.addError(1, 5, \"'a' is defined but never used.\");\n\t th.addError(2, 5, \"'b' is defined but never used.\");\n\t th.addError(3, 5, \"'c' is defined but never used.\");\n\t th.addError(9, 5, \"'d' has already been declared.\");\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true).set(\"unused\", true).set(\"undef\", true).set(\"funcscope\", true));\n\t}", "public R visit(MoveStmt n) {\n R _ret=null;\n simple_exp=0;\n // System.out.print(\"MOVE \");\n String s0 = (String)n.f0.accept(this);\n String s1 = (String)n.f1.accept(this);\n String s = new String();\n s=(\"MOVE \"+s1+\" \");\n simple_exp=0;\n String s2 = (String)n.f2.accept(this);\n s=s+(s2+\" \");\n return (R)s;\n }", "R visitFreeVariable(Formula f, String name);", "public VariType visit(FormalParameterList n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t return _ret;\n\t }", "@Override\r\n\tpublic void multLocal(ShaderVar var) {\n\t}", "public VariType visit(AssignmentStatement n, Table argu) {\n\t VariType _ret=null;\n\t n.f0.accept(this, argu);\n\t MethodTable methodtable = (MethodTable)argu;\n\t Vari vari = methodtable.getvari(n.f0.f0.tokenImage);\n\t if(vari == null) {\n\t \t ClassTable classtable = methodtable.classtable;\n\t \t vari = classtable.getvari(n.f0.f0.tokenImage);\n\t \t if(vari == null) {\n\t \t\t PrintError.errorexist = true;\n\t\t \t String emsg = \"undefined variable \\\"\"+n.f0.f0.tokenImage+\"\\\"\";\n\t \t\t PrintError.print(emsg, n.f0.f0.beginLine, n.f0.f0.beginColumn, 1);\n\t \t\t return _ret;\n\t \t }\n\t }\n\t n.f1.accept(this, argu);\n\t VariType t2 = n.f2.accept(this, argu);\n\t if(VariType.isTheSameType(methodtable.toptable, vari.vari_type, t2) == false) {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"assignstatement does not have matched types, one has type \"+vari.vari_type.type+\" , the other one has type \"+t2.type;\n\t \t PrintError.print(emsg, n.f1.beginLine, n.f1.beginColumn, 1);\n\t \t return _ret;\n\t }\n\t if(t2.type == \"Array\"){\n\t \t vari.init = true;\n\t \t if(t2.ifintegerliteral == true) {\n\t \t\t vari.alen = t2.integerliteral;\n\t \t }\n\t }\n\t n.f3.accept(this, argu);\n\t return _ret;\n\t }", "private Stmt stmt(){\n \n switch(lexer.token){\n case IDENT:\n \n if (symbolTable.get(lexer.getStringValue()) instanceof Procedure) \n return procedureCall();\n \n //can´t be a function\n else if (symbolTable.get(lexer.getStringValue()) instanceof Function)\n lexer.error(\"Function was expected \\n\");\n \n //assignstmt\n else \n return assignstmt();\n \n case BEGIN:\n return cmpstmt();\n case IF:\n return ifstmt();\n case WHILE:\n return whilestmt();\n case WRITE:\n return writestmt();\n case WRITELN:\n return writelnstmt();\n case READ:\n return readstmt();\n case RETURN:\n return returnStmt();\n default:\n lexer.error(\"missing statment\\n\");\n }\n \n return null;\n }", "public void visit(Literal literal) {}", "private void parseStmt() throws IOException, FSException,RetException {\n\n\n switch(tok.ttype) {\n\n case LexAnn.TT_DEFINT:\n case LexAnn.TT_DEFSTRING:\n case LexAnn.TT_DEFDOUBLE:\n case LexAnn.TT_DEFOBJECT: {\n parseVarDef();\n break;\n }\n\n case LexAnn.TT_IF: {\n parseIf();\n break;\n }\n case LexAnn.TT_WHILE: {\n parseWhile();\n break;\n }\n case LexAnn.TT_RETURN: {\n parseReturn();\n break;\n }\n case LexAnn.TT_DEFFUNC: {\n parseFunctionDef();\n break;\n }\n case LexAnn.TT_EDEFFUNC: {\n parseFunctionEnd();\n break;\n }\n case LexAnn.TT_EIF:\n throw new FSException(\"unexpected endif\");\n case LexAnn.TT_EWHILE:\n throw new FSException(\"unexpected endwhile\");\n\n case LexAnn.TT_FUNC: {\n parseFunc();\n break;\n }\n case LexAnn.TT_ARRAY: {\n parseArrayAssign();\n break;\n }\n case LexAnn.TT_WORD: {\n parseAssign();\n break;\n }\n case LexAnn.TT_EOL: {\n tok.nextToken();\n break;\n }\n case LexAnn.TT_EOF: {\n // all done\n break;\n }\n default: {\n parseError(\"Expected identifier \"+tok);\n\n }\n }\n\n }", "@Override\n\tpublic Expr visit(VarExpr e) {\n\t\treturn e;\n\t}", "public MType visit(Statement n, MType argu) {\n \tMType _ret=null;\n \tn.f0.accept(this, argu);\n \treturn _ret;\n\t}", "public Element compileLet() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\t\tboolean array = false;\n\t\tElement letParent = document.createElement(\"letStatement\");\n\n\t\t// let\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// identifier\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\tvarName = jTokenizer.returnTokenVal();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// Checks if the variable is an array element\n\t\tjTokenizer.advance();\n\t\ttokenType = jTokenizer.tokenType();\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\tif (token.equals(\"[\")) {\n\t\t\tarray = true;\n\t\t\t//Pushing base address\n\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t// [\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\n\t\t\t// Pushing the offset, the expression that comes after [\n\t\t\tjTokenizer.advance();\n\t\t\tletParent.appendChild(compileExpression());\n\t\t\t\n\t\t\t// ]\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\tletParent.appendChild(ele);\n\t\t\tjTokenizer.advance();\n\t\t\t\n\t\t\t//Adding the two to find the address of the element\n\t\t\twriter.writeArithmetic(\"add\");\n\t\t}\n\n\t\t// =\n\t\ttokenType = jTokenizer.tokenType();\n\t\tele = createXMLnode(tokenType);\n\t\tletParent.appendChild(ele);\n\n\t\t// compiling the expression on the right side of the equals\n\t\tjTokenizer.advance();\n\t\tletParent.appendChild(compileExpression());\n\n\t\t// ;\n\t\tjTokenizer.advance();\n\t\tele = createXMLnode(jTokenizer.tokenType());\n\t\tletParent.appendChild(ele);\n\t\t\n\t\t//If it was an array, we have to push the result of the expression to the address\n\t\t//of the specific element\n\t\tif (array) {\n\t\t\t// *(base+offset)=expression\n\t\t\twriter.writePop(\"temp\", 0);\n\n\t\t\t// base +index->that\n\t\t\twriter.writePop(\"pointer\", 1);\n\n\t\t\t// Expression -> *(base+index)\n\t\t\twriter.writePush(\"temp\", 0);\n\t\t\twriter.writePop(\"that\", 0);\n\t\t} \n\t\t//If not array, just pop it to the variable directly\n\t\telse {\n\t\t\twriter.writePop(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t}\n\n\t\treturn letParent;\n\t}", "public R visit(MoveStmt n) {\n R _ret=null;\n n.f0.accept(this);\n Integer temp = (Integer)n.f1.accept(this);\n //new\n \n ArrayList<Integer> newHold = def.get(statementNumber);\n// System.out.println(statementNumber);\n// System.out.println(temp);\n newHold.add(temp);\n def.put(statementNumber, newHold);\n \n //new\n ArrayList<Integer> hold = null;\n if(temp >= arguments){\n\t if(live.containsKey(temp)){\n\t \t hold = live.get(temp);\n\t }else{\n\t \t hold = new ArrayList<Integer>();\n\t }\n\t hold.add(-1);\n\t hold.add(statementNumber);\n\t live.put(temp, hold);\n }\n n.f2.accept(this);\n return _ret;\n }", "public ReadStmt(Variable var)\n {\n this.var = var;\n }", "public final void localVariableDeclaration() throws RecognitionException {\n int localVariableDeclaration_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"localVariableDeclaration\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(610, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 88) ) { return ; }\n // Java.g:611:5: ( variableModifiers type variableDeclarators )\n dbg.enterAlt(1);\n\n // Java.g:611:9: variableModifiers type variableDeclarators\n {\n dbg.location(611,9);\n pushFollow(FOLLOW_variableModifiers_in_localVariableDeclaration3296);\n variableModifiers();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(611,27);\n pushFollow(FOLLOW_type_in_localVariableDeclaration3298);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(611,32);\n pushFollow(FOLLOW_variableDeclarators_in_localVariableDeclaration3300);\n variableDeclarators();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 88, localVariableDeclaration_StartIndex); }\n }\n dbg.location(612, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"localVariableDeclaration\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public static String localVariable(String localVariableName, int occurrences) {\n\t\treturn \"\\t\\t\\t\\t<lvar name=\\\"\" + localVariableName +\"\\\" count=\\\"\" + occurrences +\"\\\"/>\" + \"\\n\";\n\t}" ]
[ "0.6412602", "0.6179717", "0.6003966", "0.59375614", "0.588699", "0.58497304", "0.58376664", "0.58011067", "0.5758302", "0.57551175", "0.5754447", "0.55781686", "0.5514493", "0.5511671", "0.5508053", "0.55015236", "0.549228", "0.5474876", "0.5463197", "0.5440684", "0.5425552", "0.542369", "0.5422205", "0.5413846", "0.54049826", "0.5404042", "0.5384871", "0.5374044", "0.5329873", "0.5329131", "0.53178495", "0.52778226", "0.5256327", "0.5255724", "0.5247735", "0.5226675", "0.5221663", "0.5213887", "0.5213247", "0.5204052", "0.51665074", "0.5161863", "0.5146105", "0.51368773", "0.51309633", "0.5130676", "0.51273394", "0.5108119", "0.5099974", "0.5098558", "0.5093688", "0.5089361", "0.5089138", "0.5086834", "0.5086152", "0.5085052", "0.5077482", "0.5068009", "0.5065203", "0.5062072", "0.5058002", "0.5044945", "0.5044137", "0.5039275", "0.50317883", "0.5031136", "0.5028643", "0.5027037", "0.5017343", "0.50116915", "0.5008407", "0.49942064", "0.4984187", "0.4973043", "0.49725056", "0.49685338", "0.49628958", "0.49621236", "0.49584073", "0.4955189", "0.49522263", "0.4950586", "0.49498367", "0.4937646", "0.4932263", "0.49246696", "0.49024487", "0.49008188", "0.4891087", "0.48901442", "0.48900065", "0.48854506", "0.48812526", "0.48804948", "0.4873414", "0.4864834", "0.4861476", "0.48574957", "0.48559585", "0.4853455", "0.48508644" ]
0.0
-1
"catch" '(' formalParameter ')' block
private void catchClause(String label, Scope scope, Vector queue) { matchKeyword(Keyword.CATCHSY); matchKeyword(Keyword.LPARSY); Parameter parameter = formalParameter(); Operation root = new Operation(); root.code = "DUP \" " + parameter.type.ident.string.substring(parameter.type.ident.string.lastIndexOf('.') + 1) + " \" INSTANCEOF\n IF\n"; queue.add(root); matchKeyword(Keyword.RPARSY); VariableType a = new VariableType(parameter.type, 0); a.name = parameter.name; Vector v = new Vector(); v.add("" + Operation.newLabel()); block(null, a, scope, v, Scope.CATCH, null, queue); root = new Operation(); root.code = "DUP " + label + " BRANCH\nENDIF\n"; queue.add(root); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1) { throw Extensions.todo(); }", "public static CatchBlock catch_(ParameterExpression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "public static CatchBlock catch_(Class clazz, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static CatchBlock catch_(Class clazz, Expression expression) { throw Extensions.todo(); }", "private void doCatch() throws NotConnectedException, NotSuspendedException, NoResponseException\n\t{\n\t\twaitTilHalted();\n\n String typeToCatch = null;\n\n\t\t/* currentXXX may NOT be invalid! */\n\t\tif (!hasMoreTokens())\n\t\t{\n\t\t\terr(\"Catch requires an exception name.\");\n\t\t\treturn;\n\t\t}\n\n typeToCatch = nextToken();\n if (typeToCatch == null || typeToCatch.length() == 0)\n {\n \terr(\"Illegal argument\");\n \treturn;\n }\n\n Value type = null;\n if (typeToCatch.equals(\"*\")) //$NON-NLS-1$\n {\n \ttypeToCatch = null;\n }\n else\n {\n\t type = getSession().getGlobal(typeToCatch);\n\t if (type == null)\n\t {\n\t \terr(\"Type not found.\");\n\t \treturn;\n\t }\n\n\t String typeName = type.getTypeName();\n\t int at = typeName.indexOf('@');\n\t if (at != -1)\n\t \ttypeName = typeName.substring(0, at);\n\t if (!typeName.endsWith(\"$\"))\n\t {\n\t \terr(\"Not a type: \" + type);\n\t \treturn;\n\t }\n }\n\n CatchAction c;\n\t\ttry {\n\t\t\tc = addCatch(typeToCatch);\n\t\t} catch (NotSupportedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n \tMap<String, Object> args = new HashMap<String, Object>();\n \targs.put(\"id\", c.getId()); //$NON-NLS-1$\n \tc.getId();\n\t}", "@Override\n public String visit(CatchClause n, Object arg) {\n return null;\n }", "public Snippet visit(ThrowStatement n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t Snippet f4 = n.identifier.accept(this, argu);\n\t n.nodeToken4.accept(this, argu);\n\t n.nodeToken5.accept(this, argu);\n\t _ret.returnTemp = \"throw \"+\"new\"+\" RuntimeException(\"+f4.returnTemp+\");\\n\";\n\t\t\ttPlasmaCode+=_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public void visit(BinThrowStatement x){\n }", "public static TryExpression tryCatch(Expression body, CatchBlock[] handlers) { throw Extensions.todo(); }", "public final void catchClause() throws RecognitionException {\n int catchClause_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"catchClause\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(645, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 92) ) { return ; }\n // Java.g:646:5: ( 'catch' '(' formalParameter ')' block )\n dbg.enterAlt(1);\n\n // Java.g:646:9: 'catch' '(' formalParameter ')' block\n {\n dbg.location(646,9);\n match(input,88,FOLLOW_88_in_catchClause3685); if (state.failed) return ;\n dbg.location(646,17);\n match(input,66,FOLLOW_66_in_catchClause3687); if (state.failed) return ;\n dbg.location(646,21);\n pushFollow(FOLLOW_formalParameter_in_catchClause3689);\n formalParameter();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(646,37);\n match(input,67,FOLLOW_67_in_catchClause3691); if (state.failed) return ;\n dbg.location(646,41);\n pushFollow(FOLLOW_block_in_catchClause3693);\n block();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 92, catchClause_StartIndex); }\n }\n dbg.location(647, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"catchClause\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public interface RoutineException {}", "void mo57276a(Exception exc);", "public ParameterNotFoundException( String s )\n\t{\n\t\tsuper( s );\n\t}", "int mo23350e(String str, String str2, Throwable th);", "void mo28890b(int i) throws zzlm;", "@Override\n public String visit(ThrowStmt n, Object arg) {\n return null;\n }", "public static CatchBlock makeCatchBlock(Class type, ParameterExpression variable, Expression body, Expression filter) { throw Extensions.todo(); }", "public JCatchBlock _catch(final JClass exception) {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: nop \n // 1: nop \n // 2: nop \n // 3: laload \n // 4: nop \n // 5: aconst_null \n // 6: nop \n // 7: aconst_null \n // 8: nop \n // 9: nop \n // 10: nop \n // 11: iconst_2 \n // 12: aload_0 /* this */\n // 13: getfield com/sun/codemodel/JTryBlock.body:Lcom/sun/codemodel/JBlock;\n // 16: areturn \n // 17: nop \n // 18: nop \n // 19: nop \n // 20: iconst_m1 \n // 21: nop \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- --------- -------------------------------\n // 0 22 0 this Lcom/sun/codemodel/JTryBlock;\n // 0 22 1 exception Lcom/sun/codemodel/JClass;\n // 9 13 2 cb Lcom/sun/codemodel/JCatchBlock;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public static void scannerError(String fmt, Object... varArgs) throws Exception\r\n\t{\r\n\t\tString diagnosticTxt = String.format(fmt, varArgs);\r\n\t\tthrow new ScannerException((Scanner.iSourceLineNr + 1), diagnosticTxt);\r\n\t}", "@jsweet.lang.Name(\"catch\")\r\n native public <U> Promise<U> Catch();", "public int getParameter3() {\n/* 59 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public static void main(String[] args) throws IOException, SQLException {\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"1\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"2\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In releases prior to Java SE 7\n\t\t\t}catch(IOException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}catch(SQLException ex){\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//duplicate code\n\t\t\t\t\tthrow ex;//duplicate code\n\t\t\t}\n\t\t\t\n\t\t\ttry{\n\t\t\t\t\tif(args[0].equals(\"3\")){\n\t\t\t\t\t\t\tthrow new IOException(\"test\");\n\t\t\t\t\t}else if(args[0].equals(\"4\")){\n\t\t\t\t\t\t\tthrow new SQLException(\"test\");\n\t\t\t\t\t}\n\t\t\t//In Java SE 7 and later, eliminates the duplicated code\n\t\t\t//The catch clause specifies the types of exceptions that the block can handle, \n\t\t\t// and each exception type is separated with a vertical bar (|).\n\t\t\t//Note: The catch parameter ex is final \n\t\t\t//\t\tand therefore you cannot assign any values to it within the catch block.\n\t\t\t//Bytecode generated by compiling a catch block that handles multiple exception types \n\t\t\t// will be smaller (and thus superior) than compiling many catch blocks that handle only one exception type each.\n\t\t\t}catch(IOException | SQLException ex){\n\t\t\t\t\t//ex = new SQLException(\"\");//Compile Error: The parameter ex of a multi-catch block cannot be assigned.\n\t\t\t\t\tSystem.out.println(\"Exception:\" + ex);//eliminates the duplicated code\n\t\t\t\t\tthrow ex;\t\n\t\t\t}\t\t\t\n\t}", "public ParameterNotFoundException()\n\t{\n\t\tsuper();\n\t}", "public int getParameter2() {\n/* 53 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void mo1944a() throws cf {\r\n }", "private void handleBlocksTryCatchFinally(DetailAST aAstReturn) {\n\n\t\tif (aAstReturn != null) {\n\n\t\t\tif (aAstReturn.getType() == TokenTypes.LITERAL_RETURN) {\n\n\t\t\t\tlog(aAstReturn.getLineNo());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void catching(Throwable t) {\n\n\t}", "public void visit(ThrowStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n }", "public void rethrowException2(String exceptionName) throws FirstException, SecondException {//rethrow FirstException, SecondException\n\t\t\ttry {\n\t\t\t\t\tif (exceptionName.equals(\"First\")) {\n\t\t\t\t\t\t\tthrow new FirstException();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new SecondException();\n\t\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t\t//This analysis is disabled if the catch parameter is assigned to another value in the catch block.\n\t\t\t\t\t//e = new FirstException();//If you add this line, Compile Error: Unhandled exception type Exception\n\t\t\t\t\tthrow e;\n\t\t\t}\n\t}", "public void m23078a(String str, Exception exception) {\n }", "void L3() throws Exception{\n\t\tSystem.out.println(\"1\");\n\t\tthrow e;\n\t}", "public abstract V a(String str) throws gh;", "void mo28889a(int i, String str) throws zzlm;", "int mo23354w(String str, String str2, Throwable th);", "public void visit(TryStatement n) {\n n.f0.accept(this);\n n.f1.accept(this);\n n.f2.accept(this);\n n.f3.accept(this);\n }", "public void syntax_error(Symbol current_token){}", "public int getParameter1() {\n/* 47 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected void syntaxError(String line) {\n\t\tthrow new RuntimeException(\"Syntax error: \" + line);\n\t}", "void mo1335i(String str, String str2, Throwable th);", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "@Override\n public String visit(TryStmt n, Object arg) {\n return null;\n }", "public void falschesSpiel(SpielException e);", "public void mo1964g() throws cf {\r\n }", "void mo1332e(String str, String str2, Throwable th);", "public SmartScriptParserException(String message) {super(message);}", "public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }", "void method() throws /*RuntimeException* (working)//*Exception(not working)*/ArithmeticException\n { \n System.out.println(\"SubClass\"); \n }", "public void test(String s) throws Exception {\n }", "protected abstract void exceptionsCatching( ExceptionType exceptionType );", "@Override\n public Void visit(TryStatement node, StatementVisitor mv) {\n \n BlockStatement tryBlock = node.getTryBlock();\n CatchNode catchNode = node.getCatchNode();\n BlockStatement finallyBlock = node.getFinallyBlock();\n \n if (catchNode != null && finallyBlock != null) {\n Label startCatch = new Label();\n Label endCatch = new Label(), handlerCatch = new Label();\n Label endFinally = new Label(), handlerFinally = new Label();\n Label noException = new Label();\n Label exceptionHandled = new Label();\n \n mv.enterFinallyScoped();\n \n int savedEnv = saveEnvironment(mv);\n mv.mark(startCatch);\n mv.enterWrapped();\n tryBlock.accept(this, mv);\n mv.exitWrapped();\n mv.nop();\n mv.mark(endCatch);\n mv.goTo(noException);\n \n mv.mark(handlerCatch);\n restoreEnvironment(mv, savedEnv);\n mv.enterWrapped();\n catchNode.accept(this, mv);\n mv.exitWrapped();\n mv.mark(endFinally);\n \n // restore temp abrupt targets\n List<Label> tempLabels = mv.exitFinallyScoped();\n \n // various finally blocks\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.goTo(exceptionHandled);\n \n mv.mark(handlerFinally);\n int var = mv.newVariable(Types.Throwable);\n mv.store(var, Types.Throwable);\n restoreEnvironment(mv, savedEnv);\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.load(var, Types.Throwable);\n mv.athrow();\n mv.freeVariable(var);\n \n mv.mark(noException);\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.goTo(exceptionHandled);\n \n // abrupt completion (return, break, continue) finally blocks\n if (tempLabels != null) {\n assert tempLabels.size() % 2 == 0;\n for (int i = 0, size = tempLabels.size(); i < size; i += 2) {\n Label actual = tempLabels.get(i);\n Label temp = tempLabels.get(i + 1);\n \n mv.mark(temp);\n restoreEnvironment(mv, savedEnv);\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.goTo(actual);\n }\n }\n \n mv.mark(exceptionHandled);\n \n mv.freeVariable(savedEnv);\n mv.visitTryCatchBlock(startCatch, endCatch, handlerCatch,\n Types.ScriptException.getInternalName());\n mv.visitTryCatchBlock(startCatch, endFinally, handlerFinally,\n Types.ScriptException.getInternalName());\n } else if (catchNode != null) {\n Label startCatch = new Label(), endCatch = new Label(), handlerCatch = new Label();\n Label exceptionHandled = new Label();\n \n int savedEnv = saveEnvironment(mv);\n mv.mark(startCatch);\n mv.enterWrapped();\n tryBlock.accept(this, mv);\n mv.exitWrapped();\n mv.nop();\n mv.mark(endCatch);\n mv.goTo(exceptionHandled);\n mv.mark(handlerCatch);\n restoreEnvironment(mv, savedEnv);\n catchNode.accept(this, mv);\n mv.mark(exceptionHandled);\n \n mv.freeVariable(savedEnv);\n mv.visitTryCatchBlock(startCatch, endCatch, handlerCatch,\n Types.ScriptException.getInternalName());\n } else {\n assert finallyBlock != null;\n Label startFinally = new Label(), endFinally = new Label(), handlerFinally = new Label();\n Label noException = new Label();\n Label exceptionHandled = new Label();\n \n mv.enterFinallyScoped();\n \n int savedEnv = saveEnvironment(mv);\n mv.mark(startFinally);\n mv.enterWrapped();\n tryBlock.accept(this, mv);\n mv.exitWrapped();\n mv.nop();\n mv.mark(endFinally);\n mv.goTo(noException);\n \n // restore temp abrupt targets\n List<Label> tempLabels = mv.exitFinallyScoped();\n \n mv.mark(handlerFinally);\n int var = mv.newVariable(Types.Throwable);\n mv.store(var, Types.Throwable);\n restoreEnvironment(mv, savedEnv);\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.load(var, Types.Throwable);\n mv.athrow();\n mv.freeVariable(var);\n \n mv.mark(noException);\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.goTo(exceptionHandled);\n \n // abrupt completion (return, break, continue) finally blocks\n if (tempLabels != null) {\n assert tempLabels.size() % 2 == 0;\n for (int i = 0, size = tempLabels.size(); i < size; i += 2) {\n Label actual = tempLabels.get(i);\n Label temp = tempLabels.get(i + 1);\n \n mv.mark(temp);\n restoreEnvironment(mv, savedEnv);\n mv.enterFinally();\n finallyBlock.accept(this, mv);\n mv.exitFinally();\n mv.goTo(actual);\n }\n }\n \n mv.mark(exceptionHandled);\n \n mv.freeVariable(savedEnv);\n mv.visitTryCatchBlock(startFinally, endFinally, handlerFinally,\n Types.ScriptException.getInternalName());\n }\n \n return null;\n }", "public static void catchingOnlyFromTry(){\n int x =1;\n try{\n if (true){throw new RuntimeException();}\n }\n catch (RuntimeException e){\n x*=2;\n System.out.println(x);\n if (true){throw new Error();}\n }\n catch(Error err){\n x*=3;\n System.out.println(x);\n }\n x*=5;\n System.out.println(x);\n }", "int mo23348d(String str, String str2, Throwable th);", "@Override\n\tpublic void error(String message, Object... params) {\n\n\t}", "void mo1031a(Throwable th);", "void doCatch(Throwable t) throws Throwable;", "@Override\n\tpublic void VisitThrowNode(BunThrowNode Node) {\n\n\t}", "protected void syntaxError(Object obj) {\n\t\tsyntaxError(obj.toString());\n\t}", "void mo1341v(String str, String str2, Throwable th);", "void mo131985a(int i, String str, String str2, Throwable th);", "public static void main(String[] args) {\ntry\n{\n\tnew exceptiontest().a(); \n} \ncatch (Exception e)\n{\n\te.printStackTrace();\n}\n}", "public SyntaxException() {\n\t\tsuper();\n\t}", "Block getTryBlock();", "public final EObject ruleCatch() throws RecognitionException {\n EObject current = null;\n int ruleCatch_StartIndex = input.index();\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n EObject lv_formalParameter_2_0 = null;\n\n EObject lv_block_4_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 80) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3597:28: ( (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3598:1: (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3598:1: (otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3599:2: otherlv_0= KEYWORD_60 otherlv_1= KEYWORD_4 ( (lv_formalParameter_2_0= ruleFormalParameter ) ) otherlv_3= KEYWORD_5 ( (lv_block_4_0= ruleBlock ) )\n {\n otherlv_0=(Token)match(input,KEYWORD_60,FOLLOW_KEYWORD_60_in_ruleCatch7179); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_0, grammarAccess.getCatchAccess().getCatchKeyword_0());\n \n }\n otherlv_1=(Token)match(input,KEYWORD_4,FOLLOW_KEYWORD_4_in_ruleCatch7191); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getCatchAccess().getLeftParenthesisKeyword_1());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3608:1: ( (lv_formalParameter_2_0= ruleFormalParameter ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3609:1: (lv_formalParameter_2_0= ruleFormalParameter )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3609:1: (lv_formalParameter_2_0= ruleFormalParameter )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3610:3: lv_formalParameter_2_0= ruleFormalParameter\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getCatchAccess().getFormalParameterFormalParameterParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleFormalParameter_in_ruleCatch7211);\n lv_formalParameter_2_0=ruleFormalParameter();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCatchRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"formalParameter\",\n \t\tlv_formalParameter_2_0, \n \t\t\"FormalParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,KEYWORD_5,FOLLOW_KEYWORD_5_in_ruleCatch7224); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_3, grammarAccess.getCatchAccess().getRightParenthesisKeyword_3());\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3631:1: ( (lv_block_4_0= ruleBlock ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3632:1: (lv_block_4_0= ruleBlock )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3632:1: (lv_block_4_0= ruleBlock )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3633:3: lv_block_4_0= ruleBlock\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getCatchAccess().getBlockBlockParserRuleCall_4_0()); \n \t \n }\n pushFollow(FOLLOW_ruleBlock_in_ruleCatch7244);\n lv_block_4_0=ruleBlock();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCatchRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"block\",\n \t\tlv_block_4_0, \n \t\t\"Block\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 80, ruleCatch_StartIndex); }\n }\n return current;\n }", "public void toss(Exception e);", "public T caseExceptionDeclaration(ExceptionDeclaration object) {\n\t\treturn null;\n\t}", "public void doSomething(String input) throws MyBusinessException {\n // code ...\n }", "public static void main(String[] args)\n{\ntry\n{\nnew Ex().m1();\n}\n///Exception e is a superclass of all the Exceptions in java// \n///In compile Time This Exception has been already Caught///\ncatch(ArithmeticException e)\n{\nSystem.out.println(\"Cannot Divide by Zero\");\n}\ncatch(Exception e)\n{\nSystem.out.println(\"Cannot Divide by Zero\");\n}\n}", "private V e() throws com.amap.api.col.n3.gh {\n /*\n r6 = this;\n r0 = 0\n r1 = 0\n L_0x0002:\n int r2 = r6.b\n if (r1 >= r2) goto L_0x00cd\n com.amap.api.col.n3.ki r2 = com.amap.api.col.n3.ki.c() // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n android.content.Context r3 = r6.d // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.net.Proxy r3 = com.amap.api.col.n3.ik.a(r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n r6.a((java.net.Proxy) r3) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n byte[] r2 = r2.a((com.amap.api.col.n3.kj) r6) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n java.lang.Object r2 = r6.a((byte[]) r2) // Catch:{ ic -> 0x0043, gh -> 0x0032, Throwable -> 0x002a }\n int r0 = r6.b // Catch:{ ic -> 0x0025, gh -> 0x0020, Throwable -> 0x002a }\n r1 = r0\n r0 = r2\n goto L_0x0002\n L_0x0020:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0033\n L_0x0025:\n r0 = move-exception\n r5 = r2\n r2 = r0\n r0 = r5\n goto L_0x0044\n L_0x002a:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"未知错误\"\n r0.<init>(r1)\n throw r0\n L_0x0032:\n r2 = move-exception\n L_0x0033:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 < r3) goto L_0x0002\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0043:\n r2 = move-exception\n L_0x0044:\n int r1 = r1 + 1\n int r3 = r6.b\n if (r1 >= r3) goto L_0x008a\n int r3 = r6.e // Catch:{ InterruptedException -> 0x0053 }\n int r3 = r3 * 1000\n long r3 = (long) r3 // Catch:{ InterruptedException -> 0x0053 }\n java.lang.Thread.sleep(r3) // Catch:{ InterruptedException -> 0x0053 }\n goto L_0x0002\n L_0x0053:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x0082\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x0078\n goto L_0x0082\n L_0x0078:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x0082:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x008a:\n java.lang.String r0 = \"http连接失败 - ConnectionException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"socket 连接异常 - SocketException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"未知的错误\"\n java.lang.String r1 = r2.a()\n boolean r0 = r0.equals(r1)\n if (r0 != 0) goto L_0x00c5\n java.lang.String r0 = \"服务器连接失败 - UnknownServiceException\"\n java.lang.String r1 = r2.getMessage()\n boolean r0 = r0.equals(r1)\n if (r0 == 0) goto L_0x00bb\n goto L_0x00c5\n L_0x00bb:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = r2.a()\n r0.<init>(r1)\n throw r0\n L_0x00c5:\n com.amap.api.col.n3.gh r0 = new com.amap.api.col.n3.gh\n java.lang.String r1 = \"http或socket连接失败 - ConnectionException\"\n r0.<init>(r1)\n throw r0\n L_0x00cd:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.api.col.n3.gi.e():java.lang.Object\");\n }", "public static void main(String[] args) {\n\t\t\n\t\ttry {\n\t\t\tthrow new CustomException(\"Custom Exception\");\n\t\t} catch (CustomException e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(\"Catch Block\"); \n\t\t\t \n System.out.println(e.getMessage()); \n\t\t}\n\t}", "public MethodException(String informative) {\n super(VARIABLE_EXCEPTION_MESSAGE + informative);\n }", "private void syntaxError(String message, int line) {\n\t\tString error = String.format(\"Syntax error: %s on line %d.\", message,\r\n\t\t\t\tline);\r\n\t\terrors.add(error);\r\n\r\n\t\tthis.syntaxError = true;\r\n\t}", "public abstract void mo33865a(Throwable th, Throwable th2);", "public void testingTryCatch() {\r\n\t\tSystem.err.println(\"Class NewFeatures, method testingTryCatch called!\");\r\n\t\ttry (FileInputStream stream = new FileInputStream(\"hey\")) {\r\n\t\t\tSystem.out.println(\"Try/block accessed!\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tThread.currentThread().getStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(\"Class NewFeatures, method testingTryCatch done!\");\r\n\t}", "public static void main(String[] args) {\n\t\ttry{//try=keyword\n\t\t\tint i=9/0;//this code gives an exception so written inside try block\n\t\t}catch(Exception e) {// here instead of ArithmeticExceptionwe can also write error, throwable(super class of error.exception)\n\t\t\t//if we know that we will get which excpetion then we can write that particular exception, but if we dont know which\n\t\t\t//exception will come we can directly write exception, we need not to take care which exception will come.\n\t\t\t//here inside catch block we need to write the name of the exception\n\t\t\te.printStackTrace();//when this particluar method is used, we will gt the output \"ABC\", but alon with that we will also\n\t\t\t// get this exception line that where exactly the execption is.\n\t\t\tSystem.out.println(e.getMessage());// this method gives what exactly is the error message.ie, / by zero\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"ABC\");\n\t\t\n\n\t}", "public static void demoException() {\n\n try {\n print(1, \"hello\");\n String b = null;\n b.indexOf(\"a\");\n\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n\n try {\n print(1, \"hello\");\n int a = 2;\n a = a / 0;\n /** add a log file when an Exception occurs */\n } catch (NullPointerException npe) {\n print(3, \"NPE\");\n } catch (Exception e) {\n print(4, \"Exception\");\n } finally {\n /** code will be executed anyway regardless of exception */\n print(2, \"finally\");\n // 做清理工作\n }\n }", "static void doStuff() {\n try {\n throw new Error();\n } catch (Error me) {\n throw me; // We catch but then rethrow it.\n }\n }", "void error(String messageKey, Object... args);", "default void visitFailed(ClassName name, Exception e){\n }", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n StringReader stringReader0 = new StringReader(\"catch\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 106, 0);\n javaCharStream0.maxNextCharInd = (-3000);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StringReader\", e);\n }\n }", "private static Exception method_7085(Exception var0) {\r\n return var0;\r\n }", "void failed (Exception e);", "private void throwsError() throws OBException {\n }", "private void constructorDeclaratorRest(MethodType x, ClassType object)\r\n {\r\n Scope scope = object.scope;\r\n\r\n x.parameter = formalParameters();\r\n if (nextSymbol == Keyword.THROWSSY)\r\n {\r\n lookAhead();\r\n x.throwing = qualidentList();\r\n }\r\n else\r\n x.throwing = new String[0];\r\n\r\n Vector label = new Vector();\r\n label.add(Operation.newLabel() + \"\");\r\n x.scope = block(x, null, scope, label, Scope.MAIN, null, x.operation);\r\n\r\n scope.declInsertOverload(x);\r\n }", "private void error(String string) {\n\t\r\n}", "BasicException.Parameter getIdParameter();", "public DynamicDeckDynamoException(String paramString, Throwable throwable) {\n super(paramString, throwable);\n }", "static void d() throws LowLevelException {\n e();\n }", "public static void main(String[] args) {\n /**\n * Exception will occur here ,after catch block control will goto finally block\n */\n try {\n int i = 10 / 0;\n } catch (Exception e) {\n System.out.println(\"Inside 1st catch block\"+e.getMessage());\n } finally {\n System.out.println(\"Inside 1st finally block: Numeric overflow in the expression\");\n }\n /**\n * In this case exception won't .After executing try block control will go to finally block.\n */\n\n try{\n int i=10/10;\n }catch (Exception e){\n System.out.println(\"Inside 2nd catch block\"+e.getMessage());\n }finally {\n System.out.println(\"Inside 2nd finally block: code has reached 2nd finally block\");\n }\n }", "public ReaderException( String code ){ super(code); }", "public static TypeReference newTryCatchReference(int tryCatchBlockIndex) {\n/* 296 */ return new TypeReference(0x42000000 | tryCatchBlockIndex << 8);\n/* */ }", "@Override\r\n\tpublic void error(Statement s, Throwable cause) {\n\r\n\t}", "public JDBFException (String message, Object [] args){\r\n super(Messages.format(message, args));\r\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n FBProcedureCall fBProcedureCall0 = new FBProcedureCall();\n int int0 = (-11);\n fBProcedureCall0.addParam(1203, \"mutSn)_E\");\n // Undeclared exception!\n try { \n fBProcedureCall0.addParam((-11), \"mutSn)_E\");\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -11\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "public void error(Exception e);", "private XMLParseException syntaxError(String context,\n int lineNr) {\n String msg = \"Syntax error while parsing \" + context;\n return new XMLParseException(this.getTagName(), lineNr, msg);\n }", "@Override\n\tpublic void catchPiece() {\n\t\t\n\t}", "void mo1330d(String str, String str2, Throwable th);", "public void mo1963f() throws cf {\r\n }", "public static TryExpression tryFault(Expression body, Expression fault) { throw Extensions.todo(); }", "@Test\n public void test098() throws Throwable {\n NumberInput numberInput0 = new NumberInput((Component) null, \"\", \"m\", \"m\");\n // Undeclared exception!\n try {\n Component component0 = numberInput0.param((CharSequence) \"m\", (CharSequence) \"\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }" ]
[ "0.78254026", "0.7520823", "0.6623258", "0.6388202", "0.6337667", "0.62771845", "0.61811453", "0.6134547", "0.6109649", "0.6108349", "0.59787786", "0.5977756", "0.5932014", "0.5931313", "0.58750486", "0.5793527", "0.57790893", "0.57766896", "0.5774026", "0.5756763", "0.5750745", "0.5746897", "0.57370585", "0.5717047", "0.571179", "0.57052004", "0.5694374", "0.5682522", "0.56765586", "0.56756395", "0.5627407", "0.562175", "0.5620055", "0.5606943", "0.55940294", "0.55712557", "0.5558978", "0.5555772", "0.5552216", "0.5542624", "0.5525227", "0.55240905", "0.55194795", "0.5516977", "0.5507688", "0.5498567", "0.5495798", "0.5488012", "0.5478957", "0.54717964", "0.54661125", "0.54642284", "0.5454468", "0.5442325", "0.5436607", "0.5433216", "0.54152286", "0.5413438", "0.5410578", "0.5406414", "0.5402725", "0.5392635", "0.53914285", "0.53850895", "0.53791237", "0.53689694", "0.5364508", "0.5348922", "0.5346913", "0.53444326", "0.5342541", "0.5341671", "0.5329638", "0.5325688", "0.5320495", "0.53014404", "0.5298601", "0.5294365", "0.5290361", "0.52786624", "0.5277392", "0.5276735", "0.5260853", "0.5260291", "0.5255952", "0.5255795", "0.5253541", "0.5251647", "0.5249104", "0.5238483", "0.52371854", "0.52356416", "0.52302885", "0.52290016", "0.52285296", "0.52278453", "0.5224805", "0.52218616", "0.521079", "0.5208663" ]
0.6227714
6
( "default" | "case" type ) ':'
private boolean switchLabel(Scope scope, Vector queue) { boolean x; if (x = nextSymbol == Keyword.DEFAULTSY) { lookAhead(); } else { matchKeyword(Keyword.CASESY); Type t = new Type(); t.type = Keyword.INTSY; follower.add(Keyword.COLONSY); castExpression(scope, t, true, queue); follower.remove(follower.size() - 1); } matchKeyword(Keyword.COLONSY); return x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void rule__TypeCaseClause__Group__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11033:1: ( ( ':' ) )\r\n // InternalGo.g:11034:1: ( ':' )\r\n {\r\n // InternalGo.g:11034:1: ( ':' )\r\n // InternalGo.g:11035:2: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeCaseClauseAccess().getColonKeyword_1()); \r\n }\r\n match(input,64,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeCaseClauseAccess().getColonKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchCase__Group_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11194:1: ( ( 'default' ) )\r\n // InternalGo.g:11195:1: ( 'default' )\r\n {\r\n // InternalGo.g:11195:1: ( 'default' )\r\n // InternalGo.g:11196:2: 'default'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getDefaultKeyword_1_1()); \r\n }\r\n match(input,82,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getDefaultKeyword_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchCase__Group_0__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11114:1: ( ( 'case' ) )\r\n // InternalGo.g:11115:1: ( 'case' )\r\n {\r\n // InternalGo.g:11115:1: ( 'case' )\r\n // InternalGo.g:11116:2: 'case'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getCaseKeyword_0_1()); \r\n }\r\n match(input,81,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getCaseKeyword_0_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static SwitchExpression switch_(Class type, Expression switchValue, Expression defaultBody, Method method, Iterable<SwitchCase> cases) { throw Extensions.todo(); }", "@Override\n public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {\n if (node.jjtGetChild(0) == null) {\n //rsvc.error(\"#switch() error : null argument\");\n return false;\n }\n\n /*\n * does it have a value? If you have a null reference, then no.\n */\n Object value = node.jjtGetChild(0).value(context);\n\n if (value == null) {\n value = \"[DEFAULT]\";\n }\n\n /*\n * get the arg\n */\n String arg = value.toString();\n\n Node n = node.jjtGetChild(1);\n Node child;\n Node renderNode;\n int numChildren = n.jjtGetNumChildren();\n for (int i = 0; i < numChildren; i++) {\n child = n.jjtGetChild(i);\n if (child instanceof ASTDirective) {\n ASTDirective directive = ((ASTDirective) child);\n String dirName = ((ASTDirective) child).getDirectiveName();\n\n if (dirName.equalsIgnoreCase(\"case\")) {\n String casetoken = directive.jjtGetChild(0).literal();\n\n if (casetoken.equalsIgnoreCase(arg)) {\n // render all the children until we hit either\n // a case directive, default directive, or the end of this switch\n for (int j = i + 1; j < numChildren; j++) {\n renderNode = n.jjtGetChild(j);\n if (renderNode instanceof ASTDirective) {\n String directiveName = ((ASTDirective) renderNode).getDirectiveName();\n if (directiveName.equalsIgnoreCase(\"case\") || directiveName.equalsIgnoreCase(\"default\")) {\n break;\n }\n }\n\n renderNode.render(context, writer);\n }\n\n break;\n }\n } else if (dirName.equalsIgnoreCase(\"default\")) {\n for (int j = i + 1; j < numChildren; j++) {\n renderNode = n.jjtGetChild(j);\n renderNode.render(context, writer);\n }\n\n break;\n }\n }\n }\n\n return true;\n }", "public final void rule__TypeSwitchCase__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:3836:1: ( ( ( rule__TypeSwitchCase__Group_0__0 ) ) | ( ( rule__TypeSwitchCase__Group_1__0 ) ) )\r\n int alt28=2;\r\n int LA28_0 = input.LA(1);\r\n\r\n if ( (LA28_0==81) ) {\r\n alt28=1;\r\n }\r\n else if ( (LA28_0==82) ) {\r\n alt28=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 28, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt28) {\r\n case 1 :\r\n // InternalGo.g:3837:2: ( ( rule__TypeSwitchCase__Group_0__0 ) )\r\n {\r\n // InternalGo.g:3837:2: ( ( rule__TypeSwitchCase__Group_0__0 ) )\r\n // InternalGo.g:3838:3: ( rule__TypeSwitchCase__Group_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getGroup_0()); \r\n }\r\n // InternalGo.g:3839:3: ( rule__TypeSwitchCase__Group_0__0 )\r\n // InternalGo.g:3839:4: rule__TypeSwitchCase__Group_0__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchCase__Group_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getGroup_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalGo.g:3843:2: ( ( rule__TypeSwitchCase__Group_1__0 ) )\r\n {\r\n // InternalGo.g:3843:2: ( ( rule__TypeSwitchCase__Group_1__0 ) )\r\n // InternalGo.g:3844:3: ( rule__TypeSwitchCase__Group_1__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getGroup_1()); \r\n }\r\n // InternalGo.g:3845:3: ( rule__TypeSwitchCase__Group_1__0 )\r\n // InternalGo.g:3845:4: rule__TypeSwitchCase__Group_1__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchCase__Group_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public boolean visit(SwitchCase node) {\n if (ScopeAnalyzer.hasFlag(ScopeAnalyzer.VARIABLES, flags) && !node.isDefault() && isInside(node.getExpression())) {\n SwitchStatement switchStatement= (SwitchStatement) node.getParent();\n ITypeBinding binding= switchStatement.getExpression().resolveTypeBinding();\n if (binding != null && binding.isEnum()) {\n IVariableBinding[] declaredFields= binding.getDeclaredFields();\n for (IVariableBinding variableBinding : declaredFields) {\n if (variableBinding.isEnumConstant()) {\n breakStatement = requestor.acceptBinding(variableBinding);\n if (breakStatement)\n return false;\n }\n }\n }\n }\n\n return false;\n }", "public static String enumPatternItemCase()\n {\n read_if_needed_();\n \n return _enum_pattern_item_case;\n }", "public final void rule__TypeCaseClause__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11006:1: ( ( ruleTypeSwitchCase ) )\r\n // InternalGo.g:11007:1: ( ruleTypeSwitchCase )\r\n {\r\n // InternalGo.g:11007:1: ( ruleTypeSwitchCase )\r\n // InternalGo.g:11008:2: ruleTypeSwitchCase\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeCaseClauseAccess().getTypeSwitchCaseParserRuleCall_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleTypeSwitchCase();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeCaseClauseAccess().getTypeSwitchCaseParserRuleCall_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "CaseStatement createCaseStatement();", "public static int getDefaultCaseType()\n {\n return defaults.case_type;\n }", "public final void rule__ExprCaseClause__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10385:1: ( ( ':' ) )\r\n // InternalGo.g:10386:1: ( ':' )\r\n {\r\n // InternalGo.g:10386:1: ( ':' )\r\n // InternalGo.g:10387:2: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExprCaseClauseAccess().getColonKeyword_2()); \r\n }\r\n match(input,64,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExprCaseClauseAccess().getColonKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public T caseSwitch(Engine.Switch object) {\n\t\treturn null;\n\t}", "@Override\n public String visit(SwitchStmt n, Object arg) {\n return null;\n }", "public int getCase() {\n\t\treturn (case_type);\n\t}", "public static SwitchExpression switch_(Expression switchValue, Expression defaultBody, Method method, Iterable<SwitchCase> cases) { throw Extensions.todo(); }", "@Override\n public String visit(SwitchExpr n, Object arg) {\n return null;\n }", "public final void rule__ExprSwitchCase__Group_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10546:1: ( ( 'default' ) )\r\n // InternalGo.g:10547:1: ( 'default' )\r\n {\r\n // InternalGo.g:10547:1: ( 'default' )\r\n // InternalGo.g:10548:2: 'default'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExprSwitchCaseAccess().getDefaultKeyword_1_1()); \r\n }\r\n match(input,82,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExprSwitchCaseAccess().getDefaultKeyword_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private static String type(String arg) {\n if ( arg.contains(\".\") )\n return \"ip\";\n try {\n Integer.parseInt(arg);\n return \"port\";\n } catch (NumberFormatException ignored) {\n return arg;\n }\n }", "public final void mT47() throws RecognitionException {\n try {\n int _type = T47;\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:45:5: ( 'case' )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:45:7: 'case'\n {\n match(\"case\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }", "public final void rule__ExprSwitchCase__Group_0__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10466:1: ( ( 'case' ) )\r\n // InternalGo.g:10467:1: ( 'case' )\r\n {\r\n // InternalGo.g:10467:1: ( 'case' )\r\n // InternalGo.g:10468:2: 'case'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExprSwitchCaseAccess().getCaseKeyword_0_1()); \r\n }\r\n match(input,81,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExprSwitchCaseAccess().getCaseKeyword_0_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleTypeSwitchCase() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:2042:2: ( ( ( rule__TypeSwitchCase__Alternatives ) ) )\r\n // InternalGo.g:2043:2: ( ( rule__TypeSwitchCase__Alternatives ) )\r\n {\r\n // InternalGo.g:2043:2: ( ( rule__TypeSwitchCase__Alternatives ) )\r\n // InternalGo.g:2044:3: ( rule__TypeSwitchCase__Alternatives )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getAlternatives()); \r\n }\r\n // InternalGo.g:2045:3: ( rule__TypeSwitchCase__Alternatives )\r\n // InternalGo.g:2045:4: rule__TypeSwitchCase__Alternatives\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchCase__Alternatives();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getAlternatives()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static SwitchExpression switch_(Class type, Expression switchValue, Expression defaultBody, Method method, SwitchCase[] cases) {\n return switch_(type, switchValue, defaultBody, method, Arrays.asList(cases));\n }", "@Override\n public String visit(SwitchEntry n, Object arg) {\n return null;\n }", "public Constant resolveCase(BlockScope scope, TypeBinding testType, SwitchStatement switchStatement) {\n resolve(scope);\n return null;\n }", "public final void rule__XSwitchExpression__Group_2_1_0_0__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:10910:1: ( ( ':' ) )\r\n // InternalDroneScript.g:10911:1: ( ':' )\r\n {\r\n // InternalDroneScript.g:10911:1: ( ':' )\r\n // InternalDroneScript.g:10912:2: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_1_0_0_1()); \r\n }\r\n match(input,61,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_1_0_0_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static void switchTest(Enum obj) {\n String className = obj.getClass().getSimpleName();\n //int key = obj.ordinal();\n String res=\"undefined\";\n switch (className) {\n case \"E1\":\n try {\n res=\"it's \"+className+\".\"+((E1)obj).name();\n } catch (Exception e) {\n }\n break;\n case \"E2\":\n try {\n res=\"it's \"+className+\".\"+((E2)obj).name();\n } catch (Exception e) {\n\n }\n break;\n default:\n// try {\n// res=\"It's \"+className+\".\"+((E3)obj).name();\n// } catch (Exception e) {\n//\n// }\n res=\"undefined\";\n } // sw\n System.out.println(res);\n }", "private String getType(char ch)\n\t{\n\t\tif (Character.isUpperCase(ch))\n\t\t{\n\t\t\treturn \"uppercase\";\n\t\t}\n\t\telse if (Character.isDigit(ch))\n\t\t{\n\t\t\treturn \"int\";\n\t\t}\n\t\telse if (Character.isLowerCase(ch))\n\t\t{\n\t\t\treturn \"lowercase\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"special\";\n\t\t}\n\t}", "public final void rule__TypeSwitchCase__Group_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11168:1: ( ( () ) )\r\n // InternalGo.g:11169:1: ( () )\r\n {\r\n // InternalGo.g:11169:1: ( () )\r\n // InternalGo.g:11170:2: ()\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getTypeSwitchCaseAction_1_0()); \r\n }\r\n // InternalGo.g:11171:2: ()\r\n // InternalGo.g:11171:3: \r\n {\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getTypeSwitchCaseAction_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchCase__Group_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11087:1: ( ( () ) )\r\n // InternalGo.g:11088:1: ( () )\r\n {\r\n // InternalGo.g:11088:1: ( () )\r\n // InternalGo.g:11089:2: ()\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseAccess().getTypeSwitchCaseAction_0_0()); \r\n }\r\n // InternalGo.g:11090:2: ()\r\n // InternalGo.g:11090:3: \r\n {\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseAccess().getTypeSwitchCaseAction_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void entryRuleTypeSwitchCase() throws RecognitionException {\r\n try {\r\n // InternalGo.g:2030:1: ( ruleTypeSwitchCase EOF )\r\n // InternalGo.g:2031:1: ruleTypeSwitchCase EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchCaseRule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleTypeSwitchCase();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchCaseRule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public void setCase(int case_type) {\n\t\tthis.case_type = case_type;\n\t}", "public T caseSwitch(Switch object) {\n\t\treturn null;\n\t}", "public final void mT__78() throws RecognitionException {\n try {\n int _type = T__78;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:76:7: ( 'case' )\n // InternalSpeADL.g:76:9: 'case'\n {\n match(\"case\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public static SwitchExpression switch_(Expression switchValue, Expression defaultBody, SwitchCase[] cases) {\n return switch_(switchValue, defaultBody, null, Arrays.asList(cases));\n }", "public final void rule__TypeSwitchStmt__Group__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10574:1: ( ( 'switch' ) )\r\n // InternalGo.g:10575:1: ( 'switch' )\r\n {\r\n // InternalGo.g:10575:1: ( 'switch' )\r\n // InternalGo.g:10576:2: 'switch'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchStmtAccess().getSwitchKeyword_0()); \r\n }\r\n match(input,80,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchStmtAccess().getSwitchKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public T caseClause(Clause object)\n {\n return null;\n }", "public final void rule__TypeSwitchStmt__Group_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10762:1: ( ( ( ';' )? ) )\r\n // InternalGo.g:10763:1: ( ( ';' )? )\r\n {\r\n // InternalGo.g:10763:1: ( ( ';' )? )\r\n // InternalGo.g:10764:2: ( ';' )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchStmtAccess().getSemicolonKeyword_1_1()); \r\n }\r\n // InternalGo.g:10765:2: ( ';' )?\r\n int alt95=2;\r\n int LA95_0 = input.LA(1);\r\n\r\n if ( (LA95_0==42) ) {\r\n alt95=1;\r\n }\r\n switch (alt95) {\r\n case 1 :\r\n // InternalGo.g:10765:3: ';'\r\n {\r\n match(input,42,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchStmtAccess().getSemicolonKeyword_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public String toString() {\n String leftstring = _left.toString();\n String rightstring = _right.toString();\n \n String left;\n if (_left.isArrowType()) left = \"(\" + leftstring + \")\";\n else if (_left.isBaseType()) left = leftstring;\n else throw new Error(\"Missed a case in a switch for type kinds.\");\n return left + \" ⇒ \" + rightstring;\n }", "@Override\n public String nameAndType() {\n\t String n = \"noname\";\n\t if (name != null) {\n\t\t n=name;\n\t }\n\t return \"if \"+n+\":\";\n }", "String getDefaultType();", "String kind();", "String kind();", "DefaultCaseBlockRule createDefaultCaseBlockRule();", "protected abstract String statementType();", "public T caseTypeDeclaration(TypeDeclaration object)\n {\n return null;\n }", "public final void rule__XSwitchExpression__Group_2_0_0_0__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11296:1: ( ( ':' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11297:1: ( ':' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11297:1: ( ':' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11298:1: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_0_0_0_1()); \r\n }\r\n match(input,110,FOLLOW_110_in_rule__XSwitchExpression__Group_2_0_0_0__1__Impl23085); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_0_0_0_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchCase__Group_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11102:1: ( rule__TypeSwitchCase__Group_0__1__Impl rule__TypeSwitchCase__Group_0__2 )\r\n // InternalGo.g:11103:2: rule__TypeSwitchCase__Group_0__1__Impl rule__TypeSwitchCase__Group_0__2\r\n {\r\n pushFollow(FOLLOW_17);\r\n rule__TypeSwitchCase__Group_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchCase__Group_0__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchCase__Group_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11075:1: ( rule__TypeSwitchCase__Group_0__0__Impl rule__TypeSwitchCase__Group_0__1 )\r\n // InternalGo.g:11076:2: rule__TypeSwitchCase__Group_0__0__Impl rule__TypeSwitchCase__Group_0__1\r\n {\r\n pushFollow(FOLLOW_67);\r\n rule__TypeSwitchCase__Group_0__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchCase__Group_0__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private PatternType matchPatternEnum(String s){\n s = s.toLowerCase();\n switch(s){\n case \"factory method\":\n return PatternType.FACTORY_METHOD;\n case \"prototype\":\n return PatternType.PROTOTYPE;\n case \"singleton\":\n return PatternType.SINGLETON;\n case \"(object)adapter\":\n return PatternType.OBJECT_ADAPTER;\n case \"command\":\n return PatternType.COMMAND;\n case \"composite\":\n return PatternType.COMPOSITE;\n case \"decorator\":\n return PatternType.DECORATOR;\n case \"observer\":\n return PatternType.OBSERVER;\n case \"state\":\n return PatternType.STATE;\n case \"strategy\":\n return PatternType.STRATEGY;\n case \"bridge\":\n return PatternType.BRIDGE;\n case \"template method\":\n return PatternType.TEMPLATE_METHOD;\n case \"visitor\":\n return PatternType.VISITOR;\n case \"proxy\":\n return PatternType.PROXY;\n case \"proxy2\":\n return PatternType.PROXY2;\n case \"chain of responsibility\":\n return PatternType.CHAIN_OF_RESPONSIBILITY;\n default:\n System.out.println(\"Was not able to match pattern with an enum. Exiting because this should not happen\");\n System.exit(0);\n\n }\n //should never get here because we exit on the default case\n return null;\n }", "private String handleControlStructures(ASTNode node) {\n\n if (node.getNodeType() == ASTNode.CATCH_CLAUSE) {\n CatchClause statement = (CatchClause) node;\n return statement.getClass().getSimpleName();\n\n } else if (node.getNodeType() == ASTNode.DO_STATEMENT) {\n DoStatement statement = (DoStatement) node;\n return statement.getClass().getSimpleName();\n\n } else if (node.getNodeType() == ASTNode.FOR_STATEMENT) {\n ForStatement statement = (ForStatement) node;\n return statement.getClass().getSimpleName();\n\n } else if (node.getNodeType() == ASTNode.ENHANCED_FOR_STATEMENT) {\n EnhancedForStatement statement = (EnhancedForStatement) node;\n return statement.getClass().getSimpleName();\n\n } else if (node.getNodeType() == ASTNode.IF_STATEMENT) {\n StringBuilder str = new StringBuilder();\n IfStatement statement = (IfStatement) node;\n str.append(statement.getClass().getSimpleName());\n if (statement.getElseStatement() != null)\n str.append(statement.getElseStatement().getClass().getSimpleName());\n return str.toString();\n\n } else if (node.getNodeType() == ASTNode.SWITCH_STATEMENT) {\n SwitchStatement statement = (SwitchStatement) node;\n return statement.getClass().getSimpleName();\n\n\n } else if (node.getNodeType() == ASTNode.SYNCHRONIZED_STATEMENT) {\n SynchronizedStatement statement = (SynchronizedStatement) node;\n return statement.getClass().getSimpleName();\n\n } else if (node.getNodeType() == ASTNode.TRY_STATEMENT) {\n TryStatement statement = (TryStatement) node;\n return statement.getClass().getSimpleName();\n\n }\n //while statement\n else {\n WhileStatement statement = (WhileStatement) node;\n return statement.getClass().getSimpleName();\n }\n }", "public static boolean defaultCase(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"defaultCase\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, DEFAULT_CASE, \"<default case>\");\n r = defaultCase_0(b, l + 1);\n r = r && consumeTokens(b, 1, DEFAULT, COLON);\n p = r; // pin = 2\n r = r && statements(b, l + 1);\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public T caseVariableDeclaration(VariableDeclaration object)\r\n {\r\n return null;\r\n }", "public static void main(String[] args) {\n \r\n \r\n int day = 2;\r\n String dayType;\r\n String dayString;\r\n \r\n switch (day) \r\n {\r\n case 1: dayString = \"Monday\";\r\n \t\t\r\n break;\r\n case 2: dayString = \"Tuesday\";\r\n break;\r\n case 3: dayString = \"Wednesday\";\r\n break;\r\n case 4: dayString = \"Thursday\";\r\n break;\r\n case 5: dayString = \"Friday\";\r\n break;\r\n case 6: dayString = \"Saturday\";\r\n break;\r\n case 7: dayString = \"Sunday\";\r\n break;\r\n default: dayString = \"Invalid day\";\r\n }\r\n \r\n switch (day) \r\n {\r\n //multiple cases without break statements \r\n \r\n case 1: \r\n case 2:\r\n case 3:\r\n case 4:\r\n case 5:\r\n dayType = \"Weekday\";\r\n break;\r\n case 6:\r\n case 7:\r\n dayType = \"Weekend\"; \r\n break;\r\n \r\n default: dayType= \"Invalid daytype\";\r\n }\r\n \r\n System.out.println(dayString+\" is a \"+ dayType);\r\n }", "public T caseStringLiteral(StringLiteral object)\n {\n return null;\n }", "public T caseStringLiteral(StringLiteral object)\n {\n return null;\n }", "public final void rule__XSwitchExpression__Group_2_0_0_0__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:10775:1: ( ( ':' ) )\r\n // InternalDroneScript.g:10776:1: ( ':' )\r\n {\r\n // InternalDroneScript.g:10776:1: ( ':' )\r\n // InternalDroneScript.g:10777:2: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_0_0_0_2()); \r\n }\r\n match(input,61,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_0_0_0_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchCase__Group_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11156:1: ( rule__TypeSwitchCase__Group_1__0__Impl rule__TypeSwitchCase__Group_1__1 )\r\n // InternalGo.g:11157:2: rule__TypeSwitchCase__Group_1__0__Impl rule__TypeSwitchCase__Group_1__1\r\n {\r\n pushFollow(FOLLOW_66);\r\n rule__TypeSwitchCase__Group_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchCase__Group_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__TypeSwitchGuard__Group_0__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10978:1: ( ( ':=' ) )\r\n // InternalGo.g:10979:1: ( ':=' )\r\n {\r\n // InternalGo.g:10979:1: ( ':=' )\r\n // InternalGo.g:10980:2: ':='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchGuardAccess().getColonEqualsSignKeyword_0_1()); \r\n }\r\n match(input,79,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchGuardAccess().getColonEqualsSignKeyword_0_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XSwitchExpression__Group_2_1_0_0__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11514:1: ( ( ':' ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11515:1: ( ':' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11515:1: ( ':' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:11516:1: ':'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_1_0_0_2()); \r\n }\r\n match(input,110,FOLLOW_110_in_rule__XSwitchExpression__Group_2_1_0_0__2__Impl23514); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_1_0_0_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n\tpublic void visit(CaseExpression arg0) {\n\t\t\n\t}", "private ParseTree parseSwitchStatement() {\n SourcePosition start = getTreeStartLocation();\n eat(TokenType.SWITCH);\n eat(TokenType.OPEN_PAREN);\n ParseTree expression = parseExpression();\n eat(TokenType.CLOSE_PAREN);\n eat(TokenType.OPEN_CURLY);\n ImmutableList<ParseTree> caseClauses = parseCaseClauses();\n eat(TokenType.CLOSE_CURLY);\n return new SwitchStatementTree(getTreeLocation(start), expression, caseClauses);\n }", "@Override\n\tpublic void visit(CaseExpression arg0) {\n\n\t}", "private static void printSwitchCase(Node oroot, int i,String s, ArrayList<Token> list, String p) {\n\t\tString taps =\"\";\n\t\tfor(int k = 0; k<i+2; k++){\t// get how many taps at front of each line.\n\t\t\ttaps +=\"\\t\";\n\t\t}\n\t\tif(oroot.children.size() == 0){\t\t// if node does not have sub node, this means it is most inner case,return\n\t\t\tSystem.out.println(taps+\"switch(s[index + \"+ i +\"]){\");\n\t\t\tSystem.out.println(taps+\"default:return new Token(\"+\"Token.Tag.\"+getTag(s,list)+\", \\\"\"+s+\"\\\",0);\");\n\t\t\tSystem.out.println(taps+\"}\");\n\t\t\treturn;\n\t\t}\n\t\tString temp =\"\"; // remember each level's char\n\t\tString prob =p;\t// get possible match. for example, when reading <<, but the prob will still be <.\n\t\tif(oroot.children.size()!= 0){\n\t\t\tSystem.out.println(taps+\"switch(s[index + \"+ i +\"]){\");\n\t\t\tfor(int j = 0;j<oroot.children.size(); j++){\n\t\t\t\ttemp = s;\n\t\t\t\tprob = bestMatch(s,list); // find the best match possible\n\t\t\t\ts += oroot.children.get(j).current;\t\n\t\t\t\tif(prob.length() == 0){\n\t\t\t\t\tprob = p;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(taps+\"case '\"+oroot.children.get(j).current+\"':\");\n\t\t\t\tint m = j;\n\t\t\t\tint n = i;\n\t\t\t\ti++; // get deep into level\n\t\t\t\tprintSwitchCase(oroot.children.get(j), i,s, list,prob);\n\t\t\t\t\n\t\t\t\ts = temp;\t// make sure it string s be previous level s\n\t\t\t\tj = m;\n\t\t\t\ti = n;\n\t\t\t}\n\t\t\tif(i!=0){// if it is not first level\n\t\t\t\tif(prob.equals(\"\")){\t// if possible match is empty string, means null, no possible match.\n\t\t\t\t\tSystem.out.println(taps+\"default:return null;\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(taps+\"default:return new Token(\"+\"Token.Tag.\"+getTag(prob,list)+\", \\\"\"+prob+\"\\\",0);\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(taps+\"}\");\n\t\t\t}\n\t\t}\t\n\t}", "public static SwitchExpression switch_(Expression switchValue, Expression defaultBody, Method method, SwitchCase[] cases) {\n return switch_(switchValue, defaultBody, method, Arrays.asList(cases));\n }", "public final void ruleTypeCaseClause() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:2017:2: ( ( ( rule__TypeCaseClause__Group__0 ) ) )\r\n // InternalGo.g:2018:2: ( ( rule__TypeCaseClause__Group__0 ) )\r\n {\r\n // InternalGo.g:2018:2: ( ( rule__TypeCaseClause__Group__0 ) )\r\n // InternalGo.g:2019:3: ( rule__TypeCaseClause__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeCaseClauseAccess().getGroup()); \r\n }\r\n // InternalGo.g:2020:3: ( rule__TypeCaseClause__Group__0 )\r\n // InternalGo.g:2020:4: rule__TypeCaseClause__Group__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__TypeCaseClause__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeCaseClauseAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ExprSwitchCase__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:3815:1: ( ( ( rule__ExprSwitchCase__Group_0__0 ) ) | ( ( rule__ExprSwitchCase__Group_1__0 ) ) )\r\n int alt27=2;\r\n int LA27_0 = input.LA(1);\r\n\r\n if ( (LA27_0==81) ) {\r\n alt27=1;\r\n }\r\n else if ( (LA27_0==82) ) {\r\n alt27=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 27, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt27) {\r\n case 1 :\r\n // InternalGo.g:3816:2: ( ( rule__ExprSwitchCase__Group_0__0 ) )\r\n {\r\n // InternalGo.g:3816:2: ( ( rule__ExprSwitchCase__Group_0__0 ) )\r\n // InternalGo.g:3817:3: ( rule__ExprSwitchCase__Group_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExprSwitchCaseAccess().getGroup_0()); \r\n }\r\n // InternalGo.g:3818:3: ( rule__ExprSwitchCase__Group_0__0 )\r\n // InternalGo.g:3818:4: rule__ExprSwitchCase__Group_0__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__ExprSwitchCase__Group_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExprSwitchCaseAccess().getGroup_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalGo.g:3822:2: ( ( rule__ExprSwitchCase__Group_1__0 ) )\r\n {\r\n // InternalGo.g:3822:2: ( ( rule__ExprSwitchCase__Group_1__0 ) )\r\n // InternalGo.g:3823:3: ( rule__ExprSwitchCase__Group_1__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExprSwitchCaseAccess().getGroup_1()); \r\n }\r\n // InternalGo.g:3824:3: ( rule__ExprSwitchCase__Group_1__0 )\r\n // InternalGo.g:3824:4: rule__ExprSwitchCase__Group_1__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__ExprSwitchCase__Group_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExprSwitchCaseAccess().getGroup_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private static String getSwitchCaseMapping(String windowName2) {\n\r\n\t\tString switchcase = \"\";\r\n\t\tVector<WindowTableModelMapping> maps = getMapColumns(windowName2);\r\n\t\tfor (int i = 0; i < maps.size(); i++) {\r\n\t\t\tWindowTableModelMapping mp = maps.get(i);\r\n\t\t\tswitchcase = switchcase + \" case \" + i + \":\\n\";\r\n\t\t\tswitchcase = switchcase + \"value = \" + windowName2.toLowerCase()\r\n\t\t\t\t\t+ \".get\" + mp.getMethodName() + \"();\\n break; \\n\";\r\n\r\n\t\t}\r\n\t\treturn switchcase;\r\n\t}", "public final void rule__XSwitchExpression__Group_2__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7758:1: ( ( ':' ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7759:1: ( ':' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7759:1: ( ':' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:7760:1: ':'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_1()); \n }\n match(input,48,FOLLOW_48_in_rule__XSwitchExpression__Group_2__1__Impl15734); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXSwitchExpressionAccess().getColonKeyword_2_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public T caseExpression_String(Expression_String object)\r\n {\r\n return null;\r\n }", "public Snippet visit(Case n, Snippet argu) {\n\t\t Snippet _ret=new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f1 = n.identifier.accept(this, argu);\n\t _ret.returnTemp = \"case \"+f1.returnTemp;\n\t return _ret;\n\t }", "protected void sequence_TypeCaseClause_TypeSwitchCase(ISerializationContext context, TypeSwitchCase semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "public final void rule__TypeSwitchStmt__Group__5__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:10708:1: ( ( '}' ) )\r\n // InternalGo.g:10709:1: ( '}' )\r\n {\r\n // InternalGo.g:10709:1: ( '}' )\r\n // InternalGo.g:10710:2: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchStmtAccess().getRightCurlyBracketKeyword_5()); \r\n }\r\n match(input,58,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchStmtAccess().getRightCurlyBracketKeyword_5()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void mCOLON() throws RecognitionException {\n try {\n int _type = COLON;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2805:3: ( ':' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2806:3: ':'\n {\n match(':'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public T caseDeclaration(Declaration object)\n {\n return null;\n }", "public T caseDeclaration(Declaration object)\n {\n return null;\n }", "public final void switchLabel() throws RecognitionException {\n int switchLabel_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"switchLabel\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(665, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 96) ) { return ; }\n // Java.g:666:5: ( 'case' constantExpression ':' | 'case' enumConstantName ':' | 'default' ':' )\n int alt119=3;\n try { dbg.enterDecision(119);\n\n int LA119_0 = input.LA(1);\n\n if ( (LA119_0==89) ) {\n int LA119_1 = input.LA(2);\n\n if ( (LA119_1==Identifier) ) {\n int LA119_3 = input.LA(3);\n\n if ( (LA119_3==75) ) {\n int LA119_5 = input.LA(4);\n\n if ( (synpred180_Java()) ) {\n alt119=1;\n }\n else if ( (synpred181_Java()) ) {\n alt119=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 119, 5, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else if ( ((LA119_3>=29 && LA119_3<=30)||LA119_3==40||(LA119_3>=42 && LA119_3<=43)||LA119_3==48||LA119_3==51||LA119_3==64||LA119_3==66||(LA119_3>=90 && LA119_3<=110)) ) {\n alt119=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 119, 3, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else if ( ((LA119_1>=FloatingPointLiteral && LA119_1<=DecimalLiteral)||LA119_1==47||(LA119_1>=56 && LA119_1<=63)||(LA119_1>=65 && LA119_1<=66)||(LA119_1>=69 && LA119_1<=72)||(LA119_1>=105 && LA119_1<=106)||(LA119_1>=109 && LA119_1<=113)) ) {\n alt119=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 119, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else if ( (LA119_0==74) ) {\n alt119=3;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 119, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(119);}\n\n switch (alt119) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:666:9: 'case' constantExpression ':'\n {\n dbg.location(666,9);\n match(input,89,FOLLOW_89_in_switchLabel3798); if (state.failed) return ;\n dbg.location(666,16);\n pushFollow(FOLLOW_constantExpression_in_switchLabel3800);\n constantExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(666,35);\n match(input,75,FOLLOW_75_in_switchLabel3802); if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:667:9: 'case' enumConstantName ':'\n {\n dbg.location(667,9);\n match(input,89,FOLLOW_89_in_switchLabel3812); if (state.failed) return ;\n dbg.location(667,16);\n pushFollow(FOLLOW_enumConstantName_in_switchLabel3814);\n enumConstantName();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(667,33);\n match(input,75,FOLLOW_75_in_switchLabel3816); if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:668:9: 'default' ':'\n {\n dbg.location(668,9);\n match(input,74,FOLLOW_74_in_switchLabel3826); if (state.failed) return ;\n dbg.location(668,19);\n match(input,75,FOLLOW_75_in_switchLabel3828); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 96, switchLabel_StartIndex); }\n }\n dbg.location(669, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"switchLabel\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void ruleTypeSwitchStmt() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:1967:2: ( ( ( rule__TypeSwitchStmt__Group__0 ) ) )\r\n // InternalGo.g:1968:2: ( ( rule__TypeSwitchStmt__Group__0 ) )\r\n {\r\n // InternalGo.g:1968:2: ( ( rule__TypeSwitchStmt__Group__0 ) )\r\n // InternalGo.g:1969:3: ( rule__TypeSwitchStmt__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getTypeSwitchStmtAccess().getGroup()); \r\n }\r\n // InternalGo.g:1970:3: ( rule__TypeSwitchStmt__Group__0 )\r\n // InternalGo.g:1970:4: rule__TypeSwitchStmt__Group__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__TypeSwitchStmt__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getTypeSwitchStmtAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public T caseCharType(CharType object)\n {\n return null;\n }", "public final void mCOLON() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = COLON;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:436:6: ( ':' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:436:16: ':'\n\t\t\t{\n\t\t\tmatch(':'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "public T caseStatement(Statement object)\n {\n return null;\n }", "public T caseStatement(Statement object)\n {\n return null;\n }", "default String getTypeName() {\n JdlFieldEnum type = getType();\n return switch (type) {\n case ENUM -> getEnumEntityName()\n .orElseThrow(() -> new IllegalStateException(\"An enum field must have its enum entity name set\"));\n default -> ((\"UUID\".equals(type.name())) ? type.name() : type.toCamelUpper());\n };\n }", "public ICase retourneLaCase() ;", "public T caseExprString(ExprString object)\n {\n return null;\n }", "@Override\n\tpublic Void visit(Case casee) {\n\t\tprintIndent(\"case\");\n\t\tindent++;\n\t\tcasee.var.accept(this);\n\t\tfor (var v : casee.cases)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "CaseStmtRule createCaseStmtRule();", "public T caseCharEnum(CharEnum object)\n {\n return null;\n }", "public final void synpred181_Java_fragment() throws RecognitionException {\n // Java.g:667:9: ( 'case' enumConstantName ':' )\n dbg.enterAlt(1);\n\n // Java.g:667:9: 'case' enumConstantName ':'\n {\n dbg.location(667,9);\n match(input,89,FOLLOW_89_in_synpred181_Java3812); if (state.failed) return ;\n dbg.location(667,16);\n pushFollow(FOLLOW_enumConstantName_in_synpred181_Java3814);\n enumConstantName();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(667,33);\n match(input,75,FOLLOW_75_in_synpred181_Java3816); if (state.failed) return ;\n\n }\n }", "private final void step4() { switch (b[k])\n\t {\n\t case 'e': if (ends(\"icate\")) { r(\"ic\"); break; }\n\t if (ends(\"ative\")) { r(\"\"); break; }\n\t if (ends(\"alize\")) { r(\"al\"); break; }\n\t break;\n\t case 'i': if (ends(\"iciti\")) { r(\"ic\"); break; }\n\t break;\n\t case 'l': if (ends(\"ical\")) { r(\"ic\"); break; }\n\t if (ends(\"ful\")) { r(\"\"); break; }\n\t break;\n\t case 's': if (ends(\"ness\")) { r(\"\"); break; }\n\t break;\n\t } }", "public final EObject ruleSwitchCase() throws RecognitionException {\n EObject current = null;\n\n EObject lv_caseExpression_1_0 = null;\n\n EObject lv_resultExpression_3_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3041:6: ( ( 'case' ( (lv_caseExpression_1_0= ruleImpliesExpression ) ) ':' ( (lv_resultExpression_3_0= ruleExpression ) ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3042:1: ( 'case' ( (lv_caseExpression_1_0= ruleImpliesExpression ) ) ':' ( (lv_resultExpression_3_0= ruleExpression ) ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3042:1: ( 'case' ( (lv_caseExpression_1_0= ruleImpliesExpression ) ) ':' ( (lv_resultExpression_3_0= ruleExpression ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3042:3: 'case' ( (lv_caseExpression_1_0= ruleImpliesExpression ) ) ':' ( (lv_resultExpression_3_0= ruleExpression ) )\n {\n match(input,47,FOLLOW_47_in_ruleSwitchCase5245); \n\n createLeafNode(grammarAccess.getSwitchCaseAccess().getCaseKeyword_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3046:1: ( (lv_caseExpression_1_0= ruleImpliesExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3047:1: (lv_caseExpression_1_0= ruleImpliesExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3047:1: (lv_caseExpression_1_0= ruleImpliesExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3048:3: lv_caseExpression_1_0= ruleImpliesExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getSwitchCaseAccess().getCaseExpressionImpliesExpressionParserRuleCall_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleImpliesExpression_in_ruleSwitchCase5266);\n lv_caseExpression_1_0=ruleImpliesExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getSwitchCaseRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"caseExpression\",\n \t \t\tlv_caseExpression_1_0, \n \t \t\t\"ImpliesExpression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n match(input,20,FOLLOW_20_in_ruleSwitchCase5276); \n\n createLeafNode(grammarAccess.getSwitchCaseAccess().getColonKeyword_2(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3074:1: ( (lv_resultExpression_3_0= ruleExpression ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3075:1: (lv_resultExpression_3_0= ruleExpression )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3075:1: (lv_resultExpression_3_0= ruleExpression )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:3076:3: lv_resultExpression_3_0= ruleExpression\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getSwitchCaseAccess().getResultExpressionExpressionParserRuleCall_3_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleExpression_in_ruleSwitchCase5297);\n lv_resultExpression_3_0=ruleExpression();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getSwitchCaseRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"resultExpression\",\n \t \t\tlv_resultExpression_3_0, \n \t \t\t\"Expression\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "java.lang.String getScheme();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();" ]
[ "0.60315603", "0.5666418", "0.55431753", "0.54653233", "0.54369104", "0.5296547", "0.5296115", "0.5245778", "0.52315444", "0.52239233", "0.5222001", "0.5209033", "0.51777434", "0.5176324", "0.5148611", "0.51386464", "0.51378435", "0.5110892", "0.50620615", "0.5049201", "0.50379556", "0.5019791", "0.5005738", "0.49961334", "0.49931067", "0.4958898", "0.49576187", "0.4957498", "0.4956948", "0.4955756", "0.49281424", "0.49197838", "0.48896307", "0.48877558", "0.48825648", "0.48730144", "0.48612207", "0.48608488", "0.485967", "0.4850642", "0.4848972", "0.48407915", "0.48407915", "0.48257416", "0.4801822", "0.4784833", "0.47832492", "0.47796902", "0.47683045", "0.47602338", "0.47542953", "0.4748663", "0.47413167", "0.47408623", "0.47385067", "0.47385067", "0.47307596", "0.4719581", "0.47164637", "0.471106", "0.47017908", "0.47015747", "0.46987382", "0.4697799", "0.46969998", "0.46953544", "0.46923047", "0.46877947", "0.46868885", "0.46840748", "0.46711582", "0.46639585", "0.46620739", "0.46481124", "0.46436113", "0.46436113", "0.46382457", "0.46290722", "0.4621331", "0.46079102", "0.4599892", "0.4599892", "0.4597306", "0.4582352", "0.45720318", "0.45661813", "0.4564258", "0.45635158", "0.45565635", "0.45443007", "0.45408103", "0.45391238", "0.45370775", "0.45370775", "0.45370775", "0.45370775", "0.45370775", "0.45370775", "0.45370775", "0.45370775" ]
0.4785547
45
expression1 [ assign expression ]
private Operation expression(Scope scope, Vector queue) { Operation root = expression1(scope, queue); if (assign.contains(nextSymbol)) { Operation op = new Operation(); op.left = root; op.operator = assignmentOperator(); op.right = expression(scope, queue); root = op; } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private static AssignExpr retrieveAssignExpression(Expression expression) {\n return expression.asAssignExpr();\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression0, LambdaExpression lambdaExpression1) { throw Extensions.todo(); }", "public JCExpressionStatement makeAssignment(Tag tag, String varname, JCExpression exp1, JCExpression exp2) {\n return treeMaker.Exec(treeMaker.Assign(treeMaker.Ident(getNameFromString(varname)), treeMaker.Binary(tag, exp1, exp2)));\n }", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public Stmt createAssignment(Assign expr) {\n return createEval(expr);\n }", "@Override\n public Expression assign(String var, Expression expression) {\n return new Minus(getExpression1().assign(var, expression), getExpression2().assign(var, expression));\n }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1);\n }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1, false, method);\n }", "public static BinaryExpression assign(Expression left, Expression right) { throw Extensions.todo(); }", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "@Override\n public void visitAssignment(AssignmentExpression assignmentExpression) {\n assignmentExpression.interpret(context);\n }", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public void setExpression(Object expression);", "@Test\n\tpublic void testAssignment(){\n\t\tVariable x = new Variable(\"x\");\n\t\tOperator plus = new Operator(\"+\");\n\t\tExpression one = f.createNumNode(1);\n\t\tExpression two = f.createNumNode(2);\n\t\tExpression exp = f.createInfixNode(plus, one, two);\n\t\tStatement assign = f.createAssignNode(x,exp);\n\t\tassertEquals(assign.textRepresentation(), \"x = 1 + 2;\");\n\t\n\t\tASTNodeCountVisitor v = new ASTNodeCountVisitor();\n\t\tassign.accept(v);\n\t\tassertEquals(\"assignment test1 fail\", v.numCount, 2);\n\t\tassertEquals(\"assignment test2 fail\", v.infixCount, 1);\n\t\tassertEquals(\"assignment test3 fail\", v.assignCount, 1);\n\t}", "@Override\n public Integer visitAssign(CalculatorParser.AssignContext ctx) {\n String id = ctx.ID().getText(); // id is left-hand side of '='\n int value = visit(ctx.expr()); // compute value of expression on right\n memory.put(id, value); // store it in memory\n return value;\n }", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public AssignExpr assign_expr() {\n if (lexer.token != Symbol.IDENT) {\n error.signal(\"Expecting identifier at assign expression\");\n }\n \n String type = symbolTable.getVariable(lexer.getStringValue());\n if(type == null){\n error.show(\"Tried to assign a value to a variable (\"+lexer.getStringValue()+\") that hasn't been declared.\");\n } else {\n if(type.equals(\"STRING\")){\n error.show(\"Tried to assign a value to a declared string variable (\"+lexer.getStringValue()+\")\");\n }\n }\n \n Ident id = new Ident(lexer.getStringValue());\n \n lexer.nextToken();\n if (lexer.token != Symbol.ASSIGN) {\n error.signal(\"Expecting assign symbol at assign expression\");\n }\n lexer.nextToken();\n Expr e = expr();\n\n if(type != null && type.toLowerCase().equals(\"int\") && e.getType(symbolTable) != null && e.getType(symbolTable).toLowerCase().equals(\"float\"))\n error.show(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n else if (type != null && e.getType(symbolTable) != null && !type.equals(e.getType(symbolTable)))\n error.warning(\"Trying to assign a \"+e.getType(symbolTable)+\" to a \"+type);\n \n return new AssignExpr(id, e);\n }", "public final void rule__Expression2__ExpressionAssignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17885:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17886:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17886:2: ( ruleExpression )\r\n // InternalGo.g:17887:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpression2Access().getExpressionExpressionParserRuleCall_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpression2Access().getExpressionExpressionParserRuleCall_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "private static Expression retrieveAssignExpressionValue(Expression expression) {\n return retrieveAssignExpression(expression).getValue();\n }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "assign_op getAssign_op();", "public interface AttributeAssignmentExpression extends EObject {\r\n\r\n\tObject toProlog(String type, String variableName, String entityName);\r\n\r\n\tString toPrologExecution();\r\n}", "public Expression assign(String var, Expression expression) {\r\n // if this variable is val no meter if is capital or small letter.\r\n if (this.variable.equalsIgnoreCase(var)) {\r\n return expression;\r\n }\r\n return this;\r\n }", "public JCExpressionStatement makeAssignment(JCExpression lhs, JCExpression rhs) {\n return treeMaker.Exec(treeMaker.Assign(lhs, rhs));\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression left = super.getLeft();\n Expression right = super.getRight();\n return new Mult(left.assign(var, expression), right.assign(var, expression));\n }", "Syntax.Node ParseAssignment(Token t, Syntax.NodeVar left) throws Exception{\n while (true){\n if(t.type==TokenType.ASSIGNMENT_OPERATOR){\n var right = ParseExpression();\n return new Syntax.AssignmentNode(\":=\", left, right);\n }\n else {\n lexer.putBack(t);\n break;\n //throw new Exception(\"Error in ParseAssignment!!! can't assign it \");\n }\n }\n throw new Exception(\"Error in ParseAssignment!!! \");\n\n }", "public final void rule__Expression__ExpAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17855:1: ( ( ruleExpression2 ) )\r\n // InternalGo.g:17856:2: ( ruleExpression2 )\r\n {\r\n // InternalGo.g:17856:2: ( ruleExpression2 )\r\n // InternalGo.g:17857:3: ruleExpression2\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpressionAccess().getExpExpression2ParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpressionAccess().getExpExpression2ParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression rightShiftAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.RightShiftAssign, expression0, expression1);\n }", "public OnSetClause addAssignment(Expression expression) {\n assignments.add(new Assignment(expression));\n return this;\n }", "public static BinaryExpression orAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.OrAssign, expression0, expression1);\n }", "public static BinaryExpression orAssign(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.OrAssign, expression0, expression1);\n }", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public Expression assign(String var, Expression expression) {\n Cos p = new Cos(this.getExp().assign(var, expression));\n return p;\n }", "public static BinaryExpression subtractAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.SubtractAssign, expression0, expression1);\n }", "public final void rule__Operand__ExpressionAssignment_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18245:1: ( ( ruleExpression ) )\r\n // InternalGo.g:18246:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:18246:2: ( ruleExpression )\r\n // InternalGo.g:18247:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOperandAccess().getExpressionExpressionParserRuleCall_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOperandAccess().getExpressionExpressionParserRuleCall_2_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public static BinaryExpression multiplyAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) {\n return makeBinary(ExpressionType.MultiplyAssign, expression0, expression1, false, method, lambdaExpression);\n }", "public static BinaryExpression moduloAssign(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.ModuloAssign, expression0, expression1);\n }", "public Expression assign(String var, Expression expression) {\n return new Cos(super.getExpression().assign(var, expression));\n }", "public static BinaryExpression multiplyAssignChecked(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.MultiplyAssignChecked, expression0, expression1);\n }", "@Override\n public Expression assign(String var, Expression expression) {\n Expression e1 = getEx2().assign(var, expression);\n Expression e2 = getEx2().assign(var, expression);\n return new Log(e1, e2);\n }", "public final void rule__Affectation__ExprAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:4196:1: ( ( ruleExpression ) )\n // InternalBrowser.g:4197:2: ( ruleExpression )\n {\n // InternalBrowser.g:4197:2: ( ruleExpression )\n // InternalBrowser.g:4198:3: ruleExpression\n {\n before(grammarAccess.getAffectationAccess().getExprExpressionParserRuleCall_2_0()); \n pushFollow(FOLLOW_2);\n ruleExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAffectationAccess().getExprExpressionParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ExpressionStmt__ExpAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17195:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17196:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17196:2: ( ruleExpression )\r\n // InternalGo.g:17197:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpressionStmtAccess().getExpExpressionParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpressionStmtAccess().getExpExpressionParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static BinaryExpression rightShiftAssign(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.RightShiftAssign, expression0, expression1, false, method);\n }", "public AssignStatement(Element element) {\n super(element);\n }", "private Expr expression() {\n return assignment();\n }", "public static BinaryExpression multiplyAssignChecked(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.MultiplyAssignChecked, expression0, expression1, false, method);\n }", "public Code visitAssignmentNode(StatementNode.AssignmentNode node) {\n beginGen(\"Assignment\");\n /* Generate code to evaluate the expression */\n Code code = new Code();\n /* Generate the code to load the address of the variable */\n for(int i= 0; i < node.getExps().size(); i++) {\n \tExpNode exp = node.getExps().get(i);\n \tcode.append(exp.genCode(this));\n }\n for(int i = node.getLValues().size() - 1; i >= 0; i--) {\n \tExpNode lValue = node.getLValues().get(i);\n \tcode.append(lValue.genCode(this));\n \tcode.genStore(lValue.getType());\n }\n endGen(\"Assignment\");\n return code;\n }", "private AssignNode parseStatementIdentifier(Token identifier) {\n\t\tswitch (tokenReader.getCurrent().getType()) {\n\t\tcase ASSIGN:\n\t\t\ttokenReader.moveNext();\n\t\t\treturn new AssignNode(identifier, parserExpression.parse());\n\t\tcase ASSIGN_MINUS: case ASSIGN_PLUS:\n\t\t\treturn new AssignNode(identifier, new BinaryOperationNode(tokenReader.getCurrentAndMoveNext(), new VarNode(identifier), parserExpression.parse()));\n\t\tcase INCR: case DECR:\n\t\t\tToken oneToken = new Token(TokenType.NUMBER, \"1\", tokenReader.getCurrent().getIndex(), tokenReader.getCurrent().getRow(), tokenReader.getCurrent().getColumn());\n\t\t\tConstantNode one = new ConstantNode(oneToken);\n\t\t\treturn new AssignNode(identifier, new BinaryOperationNode(tokenReader.getCurrentAndMoveNext(), new VarNode(identifier), one));\n\t\tdefault:\n\t\t\tthrow new FunwapException(\"Invalid statement.\", tokenReader.getCurrent());\n\t\t}\n\t}", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public final void rule__ExpressionList__ExpAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17810:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17811:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17811:2: ( ruleExpression )\r\n // InternalGo.g:17812:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpressionListAccess().getExpExpressionParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpressionListAccess().getExpExpressionParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void assignment() throws RecognitionException {\n CommonTree IDENT14=null;\n Object e =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:315:3: ( ^( '=' IDENT e= expression ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:315:5: ^( '=' IDENT e= expression )\n {\n match(input,38,FOLLOW_38_in_assignment524); \n\n match(input, Token.DOWN, null); \n IDENT14=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_assignment526); \n\n pushFollow(FOLLOW_expression_in_assignment530);\n e=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n \n localScope.set((IDENT14!=null?IDENT14.getText():null), e); \n lastAssignmentResult = e;\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return ;\n }", "public static BinaryExpression orAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) {\n return makeBinary(ExpressionType.OrAssign, expression0, expression1, false, method, lambdaExpression);\n }", "@Override\n\tpublic void visit(AssignNode node) {\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\t/**\n\t\t * Verificam fiii si construim perechea Variabila, Valoare pentru a fi\n\t\t * inserata in HahMap-ul din Evaluator\n\t\t */\n\t\tVariable x = null;\n\t\tValue i = null;\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(1).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(0).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(0).getName());\n\t\t}\n\t\tEvaluator.variables.put(x.getName(), i.getName());\n\t\tnode.setName(i.getName());\n\t}", "public final void rule__Expression2__Expression2Assignment_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17900:1: ( ( ruleExpression2 ) )\r\n // InternalGo.g:17901:2: ( ruleExpression2 )\r\n {\r\n // InternalGo.g:17901:2: ( ruleExpression2 )\r\n // InternalGo.g:17902:3: ruleExpression2\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpression2Access().getExpression2Expression2ParserRuleCall_1_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpression2Access().getExpression2Expression2ParserRuleCall_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public AssignAST(String name, AST right) {\n\t\tthis.left = new SymbolAST(name);\n\t\tthis.right = right;\n\t}", "private Term parseAssign(final boolean required) throws ParseException {\n Term t1 = parseConditional(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '=') {\n Term t2 = parseAssign(true);\n if (t1 instanceof Term.Ref && ((Term.Ref) t1).getVariable() != null) {\n t1 = new Term.Assign(t1, t2);\n } else {\n reportError(\"Variable expected on the left side of assignment '='.\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public static BinaryExpression subtractAssign(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.SubtractAssign, expression0, expression1, false, method);\n }", "public static BinaryExpression moduloAssign(Expression expression0, Expression expression1, Method method) {\n return makeBinary(ExpressionType.ModuloAssign, expression0, expression1, false, method);\n }", "public Expression substitute(Expression _e1, Expression _e2) {\n\t\t//Util.dump(toString());\n\t\tfor (int i = 0; i < quantificators.length; i++) {\n\t\t\t/*Expression boundExpr = quantificators[i].getBoundVar();\n\t\t\tif (_e.equals(boundExpr)) {\n\t\t\t\treturn this;\n\t\t\t}*/\n\t\t\tquantificators[i].substitute(_e1, _e2);\n\t\t}\n\t\tExpression[] subformula = getSubExpressions();\n\t\tsubformula[0] = subformula[0].substitute(_e1,_e2);\n\t\treturn this;\n\t}", "public void visit(AssignmentOperator n) {\n n.f0.accept(this);\n }", "public void setExpression(PrimaryExpression e)\r\n {\r\n\tm_expression = e;\r\n\te.setParent(this, COL_EXPRESSION);\r\n }", "protected Element evalAssurance(Assurance ass){\n\t\tRecord r1 = ass.getLeftRecord();\n\t\tRecord r2 = ass.getRightRecord();\n\t\tOperator op = ass.getOperator();\n\t\tElement an = el(\"bpws:assign\");\n\t\tif (r1.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r1.getFormular(), \"nswomoxsd:leftValue\"));\n\t\tif (r2.getType() == RecordType.FORMULAR)\n\t\t\tan.appendChild(setExpr(r2.getFormular(), \"nswomoxsd:rightValue\"));\n\t\tan.appendChild(\n\t\t\tsetExpr(\n\t\t\t\tgetMyVarPath(\"/nswomoxsd:leftValue\") + \n\t\t\t\top.value() +\n\t\t\t\tgetMyVarPath(\"nswomoxsd:rightValue\"),\n\t\t\t\t\"nswomoxsd:value\"\n\t\t\t)\n\t\t);\n\t\treturn an;\n\t}", "public final void rule__Index__ExpressionAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18305:1: ( ( ruleExpression ) )\r\n // InternalGo.g:18306:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:18306:2: ( ruleExpression )\r\n // InternalGo.g:18307:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getIndexAccess().getExpressionExpressionParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getIndexAccess().getExpressionExpressionParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__Expression2__Group_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:12491:1: ( ( ( rule__Expression2__ExpressionAssignment_1_1 ) ) )\r\n // InternalGo.g:12492:1: ( ( rule__Expression2__ExpressionAssignment_1_1 ) )\r\n {\r\n // InternalGo.g:12492:1: ( ( rule__Expression2__ExpressionAssignment_1_1 ) )\r\n // InternalGo.g:12493:2: ( rule__Expression2__ExpressionAssignment_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpression2Access().getExpressionAssignment_1_1()); \r\n }\r\n // InternalGo.g:12494:2: ( rule__Expression2__ExpressionAssignment_1_1 )\r\n // InternalGo.g:12494:3: rule__Expression2__ExpressionAssignment_1_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Expression2__ExpressionAssignment_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpression2Access().getExpressionAssignment_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XReturnExpression__ExpressionAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:19090:1: ( ( ruleXExpression ) )\r\n // InternalDroneScript.g:19091:2: ( ruleXExpression )\r\n {\r\n // InternalDroneScript.g:19091:2: ( ruleXExpression )\r\n // InternalDroneScript.g:19092:3: ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXReturnExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXReturnExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public String visit(AssignmentStatement n, LLVMRedux argu) throws Exception {\n String Identifier = n.f0.accept(this, argu);\n String storeArg1 = u.decodeIdentifier(Identifier);\n String type = u.getIdentifierType(Identifier);\n String storeArg2 = n.f2.accept(this, argu);\n u.println(\"store \"+u.javaTypeToLLVMType(type)+\" \"+storeArg2+\", \"+u.pointer(u.javaTypeToLLVMType(type))+\" \"+storeArg1);\n return storeArg1;\n }", "public final void rule__ExpressionList__Expression2Assignment_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17825:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17826:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17826:2: ( ruleExpression )\r\n // InternalGo.g:17827:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpressionListAccess().getExpression2ExpressionParserRuleCall_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpressionListAccess().getExpression2ExpressionParserRuleCall_2_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "protected Assign assign(Position pos, Expr e, Assign.Operator asgn, Expr val) throws SemanticException {\n Assign a = (Assign) xnf.Assign(pos, e, asgn, val).type(e.type());\n if (a instanceof FieldAssign) {\n assert (e instanceof Field);\n assert ((Field) e).fieldInstance() != null;\n a = ((FieldAssign) a).fieldInstance(((Field)e).fieldInstance());\n } else if (a instanceof SettableAssign) {\n assert (e instanceof X10Call);\n X10Call call = (X10Call) e;\n List<Expr> args = CollectionUtil.append(Collections.singletonList(val), call.arguments());\n X10Call n = xnf.X10Call(pos, call.target(), nf.Id(pos, SettableAssign.SET), call.typeArguments(), args);\n n = (X10Call) n.del().disambiguate(this).typeCheck(this).checkConstants(this);\n X10MethodInstance smi = n.methodInstance();\n X10MethodInstance ami = call.methodInstance();\n // List<Type> aTypes = new ArrayList<Type>(ami.formalTypes());\n // aTypes.add(0, ami.returnType()); // rhs goes before index\n // MethodInstance smi = xts.findMethod(ami.container(),\n // xts.MethodMatcher(ami.container(), SET, aTypes, context));\n a = ((SettableAssign) a).methodInstance(smi);\n a = ((SettableAssign) a).applyMethodInstance(ami);\n }\n return a;\n }", "public final void ruleOpSingleAssign() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:517:2: ( ( '=' ) )\r\n // InternalDroneScript.g:518:2: ( '=' )\r\n {\r\n // InternalDroneScript.g:518:2: ( '=' )\r\n // InternalDroneScript.g:519:3: '='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpSingleAssignAccess().getEqualsSignKeyword()); \r\n }\r\n match(input,13,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpSingleAssignAccess().getEqualsSignKeyword()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }", "@Override\r\n\tpublic Instruction lexParse(String[] words, LexicalParser lexParser) {\r\n\t\tif (words.length!=3) return null;\r\n\t\t\r\n\t\tif (!words[1].equals(\"=\")) return null;\r\n\t\t\r\n\t\trhs=TermParser.parse(words[2]);\r\n\t\tif (rhs==null) return null;\r\n\t\t\r\n\t\tTerm var=TermParser.parse(words[0]);\r\n\t\tif (var==null) return null;\r\n\t\t\r\n\t\treturn new SimpleAssignment(words[0], rhs);\r\n\t}", "public AssignStmt assign_stmt() {\n AssignExpr ae = assign_expr();\n if (lexer.token != Symbol.SEMICOLON) {\n error.signal(\"Semicolon expected after assignment\");\n }\n lexer.nextToken();\n\n return new AssignStmt(ae);\n }", "public final void rule__Condition__ExpAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17675:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17676:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17676:2: ( ruleExpression )\r\n // InternalGo.g:17677:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n public void visit(VariableAssignNode variableAssignNode) {\n }", "public static UnaryExpression postIncrementAssign(Expression expression) {\n return makeUnary(ExpressionType.PostIncrementAssign, expression, expression.getType());\n }", "SetExpr (String i, Expr e) {\n varName = i;\n expr = e;\n }", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "public final void expression() throws RecognitionException {\n int expression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"expression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(708, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 105) ) { return ; }\n // Java.g:709:5: ( conditionalExpression ( assignmentOperator expression )? )\n dbg.enterAlt(1);\n\n // Java.g:709:9: conditionalExpression ( assignmentOperator expression )?\n {\n dbg.location(709,9);\n pushFollow(FOLLOW_conditionalExpression_in_expression4079);\n conditionalExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(709,31);\n // Java.g:709:31: ( assignmentOperator expression )?\n int alt126=2;\n try { dbg.enterSubRule(126);\n try { dbg.enterDecision(126);\n\n try {\n isCyclicDecision = true;\n alt126 = dfa126.predict(input);\n }\n catch (NoViableAltException nvae) {\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(126);}\n\n switch (alt126) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:709:32: assignmentOperator expression\n {\n dbg.location(709,32);\n pushFollow(FOLLOW_assignmentOperator_in_expression4082);\n assignmentOperator();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(709,51);\n pushFollow(FOLLOW_expression_in_expression4084);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(126);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 105, expression_StartIndex); }\n }\n dbg.location(710, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"expression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public LlvmValue visit(Assign n){\n\t\t\n\t\tSystem.out.format(\"assign********\\n\");\n\t\t\n\t\tLlvmValue rhs = n.exp.accept(this);\n\t\tLlvmRegister returns;\n\t\t//Nesta parte, para retornarmos o tipo certo, tivemos que converter todos os parametros do tipo\n\t\t//[ A x iB] para ponteiros. o Assembly reclamava quando tinha algum store ou algo do genero com tipos\n\t\t// diferentes\n\t\tif(rhs.type.toString().contains(\"x i\")){\n\t\t\t//System.out.format(\"expressao de rhs envolve arrays. fazendo casting...\\n\");\n\t\t\t\n\t\t\t//Fazer bitcast\n\t\t\tif(rhs.type.toString().contains(\" x i32\")){\n\t\t\t\treturns = new LlvmRegister(LlvmPrimitiveType.I32PTR);\n\t\t\t}else if(rhs.type.toString().contains(\" x i8\")){\n\t\t\t\treturns = new LlvmRegister(new LlvmPointer(LlvmPrimitiveType.I8));\n\t\t\t//Esse else eh meio inutil, mas pelo fato de eu querer usar elseif, deixei ele aqui mesmo.\n\t\t\t}else{\n\t\t\t\treturns = new LlvmRegister(rhs.type);\n\t\t\t}\n\t\t\t\n\t\t\tassembler.add(new LlvmBitcast(returns, rhs, returns.type));\n\t\t\tassembler.add(new LlvmStore(returns, n.var.accept(this)));\n\t\t}else{\n\t\t\t//Caso o tipo ja esteja ok, soh damos store com o rhs mesmo.\n\t\t\tassembler.add(new LlvmStore(rhs, n.var.accept(this)));\n\t\t}\n\t\treturn null;\n\t}", "public final void rule__XThrowExpression__ExpressionAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:19075:1: ( ( ruleXExpression ) )\r\n // InternalDroneScript.g:19076:2: ( ruleXExpression )\r\n {\r\n // InternalDroneScript.g:19076:2: ( ruleXExpression )\r\n // InternalDroneScript.g:19077:3: ruleXExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXThrowExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXThrowExpressionAccess().getExpressionXExpressionParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "CDAssignStatement(CDExpression destination, CDExpression source) {\n _destination = destination;\n _source = source;\n }", "public BaseExpression(Expression e) {\r\n this.e1 = e;\r\n }", "@Override\n\tpublic Object evaluate(Interpreter interpreter)\n\t{\n\t\t((VarToken) A).assign(interpreter, (String) B.evaluate(interpreter));\n\t\treturn null;\n\t}", "public void inputExpression(String expression, Matrix a, Matrix b) {\n\t\tif(a == null || b == null) return;\n\t\texpression = expression.replaceAll(\"\\\\s+\", \"\");\n\t\tfor(Character c : expression.trim().toCharArray())\n\t\t\tif(!(isOperator(c.toString()) || isNumber(c.toString()) \n\t\t\t\t|| isMatrix(c.toString()) || c == '(' || c == ')')) {\n\t\t\t\tthrow new IllegalArgumentException(INVALID_CHARACTER_MESSAGE);\n\t\t\t}\n\t\tif(characterCount(expression, '(') > characterCount(expression, ')'))\n\t\t\tthrow new IllegalArgumentException(\"Expecting ')'\");\n\t\telse if(characterCount(expression, '(') < characterCount(expression, ')'))\n\t\t\tthrow new IllegalArgumentException(\"Expecting '('\");\n\t\tthis.expression = expression;\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\t\n\t\tread( toReversePolishNotation( addSpaces(expression) ) );\n\t}", "public static UnaryExpression preIncrementAssign(Expression expression) {\n return makeUnary(ExpressionType.PreIncrementAssign, expression, expression.getType());\n }", "public void setExpression(Expression expression) {\n if (expression == null) {\n throw new IllegalArgumentException();\n }\n ASTNode oldChild = this.expression;\n preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);\n this.expression = expression;\n postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);\n }", "public final void rule__AstAssignParameter__ValueAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23024:1: ( ( ruleAstExpression ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23025:1: ( ruleAstExpression )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23025:1: ( ruleAstExpression )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:23026:1: ruleAstExpression\n {\n before(grammarAccess.getAstAssignParameterAccess().getValueAstExpressionParserRuleCall_2_0()); \n pushFollow(FOLLOW_ruleAstExpression_in_rule__AstAssignParameter__ValueAssignment_246141);\n ruleAstExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAstAssignParameterAccess().getValueAstExpressionParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
[ "0.8057695", "0.76524186", "0.7237177", "0.7232695", "0.7214998", "0.7162806", "0.71588033", "0.70275915", "0.70017743", "0.69440114", "0.6915929", "0.69068205", "0.68872577", "0.6855224", "0.68438435", "0.6806313", "0.67563474", "0.67459285", "0.6649631", "0.66354823", "0.66122484", "0.6565439", "0.6564944", "0.6532865", "0.6530641", "0.65283483", "0.6516346", "0.6502929", "0.65022105", "0.6494992", "0.64595234", "0.6446587", "0.6419533", "0.6414391", "0.63878036", "0.6377731", "0.63704383", "0.6358386", "0.63409853", "0.6328683", "0.6327224", "0.6305992", "0.62998176", "0.6298543", "0.6296832", "0.62929916", "0.6251127", "0.62504625", "0.6236566", "0.62009394", "0.619598", "0.6193384", "0.61729676", "0.6166585", "0.61507165", "0.6149619", "0.6126761", "0.6120691", "0.6116458", "0.6112142", "0.61056757", "0.6096441", "0.60883164", "0.6076144", "0.60719454", "0.60397303", "0.6034016", "0.6029352", "0.6028889", "0.60283846", "0.60215646", "0.60174847", "0.60143745", "0.60043913", "0.5989508", "0.59874904", "0.5980651", "0.5973757", "0.5939787", "0.5939315", "0.5911195", "0.5909593", "0.590722", "0.5899773", "0.5897772", "0.5886521", "0.587475", "0.58667797", "0.58656174", "0.5862925", "0.5850938", "0.5837343", "0.58239806", "0.5823766", "0.58036685", "0.5799208", "0.5796598", "0.5788196", "0.5784145", "0.57791525" ]
0.61721015
53
expression2 [ conditionalExpr ]
private Operation expression1(Scope scope, Vector queue) { follower.add(Keyword.QUESTIONMARKSY); Operation op = expression2(scope, queue); follower.remove(follower.size() - 1); if (nextSymbol == Keyword.QUESTIONMARKSY) { Operation a = new Operation(); a.operator = nextSymbol; a.right = conditionalExpr(scope, queue); a.left = op; op = a; } return op; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ConditionalExpression createConditionalExpression();", "public static ConditionalExpression condition(Expression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "String getIfFunction(String condition, String exprtrue, String exprfalse);", "public static ConditionalExpression condition(Expression expression0, Expression expression1, Expression expression2, Class clazz) { throw Extensions.todo(); }", "public interface IConditionalExpression {\n}", "static ExpressionParsingState composeConditionalExpression(\n final ExpressionParsingState state, final int nodeIndex) {\n \n final String input = state.get(nodeIndex).getInput();\n \n if (StringUtils.isEmptyOrWhitespace(input)) {\n return null;\n }\n\n // Trying to fail quickly...\n final int condSuffixPos = input.indexOf(CONDITION_SUFFIX_CHAR);\n if (condSuffixPos == -1) {\n return state;\n }\n \n final String condStr = input.substring(0, condSuffixPos);\n final String remainder = input.substring(condSuffixPos + 1);\n\n if (remainder.indexOf(CONDITION_SUFFIX_CHAR) != -1) {\n // There are two \"?\" symbols\n return null;\n }\n\n final int thenElseSepPos = remainder.indexOf(CONDITION_THENELSE_SEPARATOR_CHAR);\n if (remainder.lastIndexOf(CONDITION_THENELSE_SEPARATOR_CHAR) != thenElseSepPos) {\n // There are two \":\" symbols\n return null;\n }\n\n String thenStr = null;\n String elseStr = null;\n if (thenElseSepPos != -1) {\n if (thenElseSepPos == 0) {\n // Maybe it is a default operation\n return state;\n }\n thenStr = remainder.substring(0, thenElseSepPos);\n elseStr = remainder.substring(thenElseSepPos + 1);\n } else {\n thenStr = remainder;\n }\n\n \n final Expression condExpr = ExpressionParsingUtil.parseAndCompose(state, condStr);\n if (condExpr == null) {\n return null;\n }\n\n final Expression thenExpr = ExpressionParsingUtil.parseAndCompose(state, thenStr);\n if (thenExpr == null) {\n return null;\n }\n\n Expression elseExpr = VariableExpression.NULL_VALUE;\n if (elseStr != null) {\n elseExpr = ExpressionParsingUtil.parseAndCompose(state, elseStr);\n if (elseExpr == null) {\n return null;\n }\n }\n\n \n final ConditionalExpression conditionalExpressionResult = \n new ConditionalExpression(condExpr, thenExpr, elseExpr);\n state.setNode(nodeIndex,conditionalExpressionResult);\n \n return state;\n \n }", "public Object visitConditionalExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n Object c = dispatch(n.getGeneric(2));\n \n if (a instanceof Long) {\n return (! ((Long) a).equals(new Long(0))) ? b : c;\n }\n else {\n return parens(a) + \" ? \" + parens(b) + \" : \" + parens(c);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD b = ensureBDD(dispatch(n.getGeneric(1)));\n BDD c = ensureBDD(dispatch(n.getGeneric(2)));\n BDD ab, na, nac, bdd;\n \n //implement with a & b | !a & c\n ab = a.and(b);\n b.free();\n na = a.not();\n a.free();\n nac = na.and(c);\n c.free();\n na.free();\n bdd = ab.or(nac);\n nac.free();\n ab.free();\n \n return bdd;\n }\n }", "Expression getCond();", "Expr getCond();", "IfPrimaryExpr createIfPrimaryExpr();", "public void visit(BinConditionalExpression x){\n }", "public ExpressionNode getCondition();", "IfExp createIfExp();", "@Override\n public String visit(ConditionalExpr n, Object arg) {\n return null;\n }", "@Override\r\n\tpublic void visit(ConditionExpression conditionExpression) {\n\r\n\t}", "public void visit(ConditionalExpression n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "private static boolean condenseConditional2_type2(Op03SimpleStatement ifStatement) {\n Statement innerStatement = ifStatement.getStatement();\n if (!(innerStatement instanceof IfStatement)) return false;\n IfStatement innerIf = (IfStatement)innerStatement;\n Op03SimpleStatement tgt1 = ifStatement.getTargets().get(0);\n final Op03SimpleStatement tgt2 = ifStatement.getTargets().get(1);\n if (tgt1.getSources().size() != 1) return false;\n if (tgt2.getSources().size() != 1) return false;\n if (tgt1.getTargets().size() != 1) return false;\n if (tgt2.getTargets().size() != 1) return false;\n Op03SimpleStatement evTgt = tgt1.getTargets().get(0);\n evTgt = Misc.followNopGoto(evTgt, true, false);\n Op03SimpleStatement oneSource = tgt1;\n if (!(evTgt.getSources().contains(oneSource) || evTgt.getSources().contains(oneSource = oneSource.getTargets().get(0)))) {\n return false;\n }\n if (evTgt.getSources().size() < 2) return false; // FIXME. Shouldnt' clear, below.\n if (tgt2.getTargets().get(0) != evTgt) return false; // asserted tgt2 is a source of evTgt.\n Statement stm1 = tgt1.getStatement();\n Statement stm2 = tgt2.getStatement();\n if (!(stm1 instanceof AssignmentSimple && stm2 instanceof AssignmentSimple)) {\n return false;\n }\n AssignmentSimple a1 = (AssignmentSimple)stm1;\n AssignmentSimple a2 = (AssignmentSimple)stm2;\n LValue lv = a1.getCreatedLValue();\n if (!lv.equals(a2.getCreatedLValue())) return false;\n ConditionalExpression condition = innerIf.getCondition().getNegated();\n condition = condition.simplify();\n ifStatement.replaceStatement(new AssignmentSimple(innerIf.getLoc(), lv, new TernaryExpression(innerIf.getLoc(), condition, a1.getRValue(), a2.getRValue())));\n ifStatement.getSSAIdentifiers().consumeEntry(evTgt.getSSAIdentifiers());\n oneSource.replaceStatement(new Nop());\n oneSource.removeTarget(evTgt);\n tgt2.replaceStatement(new Nop());\n tgt2.removeTarget(evTgt);\n evTgt.removeSource(oneSource);\n evTgt.removeSource(tgt2);\n evTgt.getSources().add(ifStatement);\n for (Op03SimpleStatement tgt : ifStatement.getTargets()) {\n tgt.removeSource(ifStatement);\n }\n ifStatement.getTargets().clear();\n ifStatement.addTarget(evTgt);\n tgt1.replaceStatement(new Nop());\n // Reduce count, or lvalue condensing won't work.\n if (lv instanceof StackSSALabel) {\n ((StackSSALabel) lv).getStackEntry().decSourceCount();\n }\n return true;\n }", "private void Conditional(){\n\t\tLogicOR();\n\t\t\n\t\tfor(;;){\n\t\t\tif(eat(\"for\")){\n\t\t\t\tInlineFor();\n\t\t\t}else if(eat(\"if\")){\n\t\t\t\tExpression();\n\t\t\t\tif(eat(\"else\"))\n\t\t\t\t\tConditional();\n\t\t\t}else if(eat(\"defined\") || eat(\"!defined\"));\n\t\t\telse for(;;){\n\t\t\t\tif(eat(\"?\")){\n\t\t\t\t\tExpression();\n\t\t\t\t\tassert_eat(\":\");\n\t\t\t\t\tConditional();\n\t\t\t\t}else return;\n\t\t\t}\n\t\t}\n\t}", "private Conditional ifStatement()\n\t{\n\t\t// IfStatement --> if ( Expression ) Statement [ else Statement ]\n\t\tConditional c = null;\n\t\t\n\t\t// if\n\t\tmatch(TokenType.If);\n\t\t// (\n\t\tmatch(TokenType.LeftParen);\n\t\t// <<Expression>>\n\t\tExpression e = expression();\n\t\t// )\n\t\tmatch(TokenType.RightParen);\n\t\t// <<Statement>>\n\t\tStatement s = statement();\n\t\t\n\t\t// else가 나오면\n\t\tif (token.type().equals(TokenType.Else))\n\t\t{\n\t\t\t// else\n\t\t\ttoken = lexer.next();\n\t\t\t\n\t\t\t// <<Statement>>\n\t\t\tStatement elseState = statement();\n\t\t\tc = new Conditional(e, s, elseState);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tc = new Conditional(e, s);\n\t\t}\n\t\t\n\t\treturn c; // student exercise\n\t}", "private IfElement _if(String expression, CodeElement... body)\n {\n return _ifElse(expression, Arrays.asList(body), null);\n }", "public Conditional(){\n\t\tint m,n;\n\t\tLexer.lex();//skip over \"if\"\n\t\tLexer.lex();//skip over '('\n\t\tcpr=new ComparisonExpr();\n\t\tLexer.lex();//skip over ')'\n\t\tswitch(cpr.op){\n\t\tcase '<':\n\t\t\tCode.gen(\"if_icmpge \");\n\t\t\tbreak;\n\t\tcase '>':\n\t\t\tCode.gen(\"if_icmple \");\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\tCode.gen(\"if_icmpne \");\n\t\t\tbreak;\n\t\tcase '!':\n\t\t\tCode.gen(\"if_icmpeq \");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\tn=Code.getPtr();\n\t\tCode.gen(\"\");\n\t\tCode.gen(\"\");\n\t\tstmt=new Statement();\n\t\tif(Lexer.nextToken==Token.KEY_ELSE){//have an else part\n\t\t\tCode.gen(\"goto \");\n\t\t\tm=Code.getPtr();\n\t\t\tCode.gen(\"\");\n\t\t\tCode.gen(\"\");\n\t\t\tCode.backpatch(n, Integer.toString(Code.getPtr()));\n\t\t\tLexer.lex();\n\t\t\tstmtr=new Statement();\n\t\t\tCode.backpatch(m, Integer.toString(Code.getPtr()));\n\t\t}else{\n\t\t\tCode.backpatch(n, Integer.toString(Code.getPtr()));\n\t\t}\n\t\t\n\t}", "@Override\r\n public boolean evaluate(String expr) {\r\n return translate(\"${If[\" + expr + \",TRUE,FALSE]}\").equals(\"TRUE\");\r\n }", "public static ConditionalExpression ifThenElse(Expression test, Expression ifTrue, Expression ifFalse) { throw Extensions.todo(); }", "OclExpression getCondition();", "@Override\r\n\tpublic Object visitCond(CondContext ctx) { \r\n\t\tBoolean condExpr = (Boolean) visit(ctx.condstat().expr(0));\r\n\t\tif(condExpr){\r\n\t\t\treturn visit(ctx.condstat().expr(1));\r\n\t\t}else{\r\n\t\t\treturn visit(ctx.condstat().expr(2));\r\n\t\t}\r\n\t}", "public static ConditionalExpression ifThen(Expression test, Expression ifTrue) { throw Extensions.todo(); }", "private Operation conditionalExpr(Scope scope, Vector queue)\r\n {\r\n Operation root = new Operation();\r\n\r\n matchKeyword(Keyword.QUESTIONMARKSY);\r\n follower.add(Keyword.COLONSY);\r\n root.left = expression(scope, queue);\r\n follower.remove(follower.size() - 1);\r\n matchKeyword(Keyword.COLONSY);\r\n root.right = expression1(scope, queue);\r\n\r\n return root;\r\n }", "public static BinaryExpression coalesce(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static int conditionalOp(int n1,int n2, double n3)\n\t{\n\t\tdouble x=n1; //implicit data type conversion\n\t\tSystem.out.println(\"value after implicit type casting: \"+x);\n\t\treturn (int)((((n1>n2)?n1:n2)>n3)?((n1>n2)?n1:n2):n3); //one line conditional operator and explicit data type conversion;\n\t}", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public Expression getExpression() {\n return optionalConditionExpression; }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public ConditionalStatement(IExpression condition, IStatement s0, IStatement s1)\n {\n super(\"Conditional\", null);\n // TODO - anything else you need\n }", "AlgNode handleConditionalExecute( AlgNode node, Statement statement, LogicalQueryInformation queryInformation );", "String getBooleanTrueExpression();", "private void parseCondition() {\n Struct type1 = parseExpr().type;\n\n int op;\n if (RELATIONAL_OPERATORS.contains(nextToken.kind)) {\n scan();\n op = token.kind;\n } else {\n error(\"Relational operator expected\");\n op = Token.NONE;\n }\n\n int opcode;\n switch (token.kind) {\n case Token.GTR:\n opcode = Code.OP_JGT;\n break;\n case Token.GEQ:\n opcode = Code.OP_JGE;\n break;\n case Token.LESS:\n opcode = Code.OP_JLT;\n break;\n case Token.LEQ:\n opcode = Code.OP_JLE;\n break;\n case Token.EQL:\n opcode = Code.OP_JEQ;\n break;\n case Token.NEQ:\n opcode = Code.OP_JNE;\n break;\n default:\n opcode = Code.OP_TRAP;\n error(\"Illegal comparison operator\");\n break;\n }\n\n Struct type2 = parseExpr().type;\n\n if (!type1.compatibleWith(type2)) {\n error(\"Incompatible types in comparison\");\n }\n if (type1.isRefType() && type2.isRefType()) {\n if (op != Token.EQL && op != Token.NEQ) {\n error(\"Reference types can only be compared \"\n + \"for equality and inequality\");\n }\n }\n\n code.putFalseJump(opcode, 42); // Will be fixed later\n }", "static Expression decomposeCondition(Expression e,\n HsqlArrayList conditions) {\n\n if (e == null) {\n return Expression.EXPR_TRUE;\n }\n\n Expression arg1 = e.getLeftNode();\n Expression arg2 = e.getRightNode();\n int type = e.getType();\n\n if (type == OpTypes.AND) {\n arg1 = decomposeCondition(arg1, conditions);\n arg2 = decomposeCondition(arg2, conditions);\n\n if (arg1 == Expression.EXPR_TRUE) {\n return arg2;\n }\n\n if (arg2 == Expression.EXPR_TRUE) {\n return arg1;\n }\n\n e.setLeftNode(arg1);\n e.setRightNode(arg2);\n\n return e;\n } else if (type == OpTypes.EQUAL) {\n if (arg1.getType() == OpTypes.ROW\n && arg2.getType() == OpTypes.ROW) {\n for (int i = 0; i < arg1.nodes.length; i++) {\n Expression part = new ExpressionLogical(arg1.nodes[i],\n arg2.nodes[i]);\n\n part.resolveTypes(null, null);\n conditions.add(part);\n }\n\n return Expression.EXPR_TRUE;\n }\n }\n\n if (e != Expression.EXPR_TRUE) {\n conditions.add(e);\n }\n\n return Expression.EXPR_TRUE;\n }", "BooleanExpression createBooleanExpression();", "BooleanExpression createBooleanExpression();", "@Test\n public void ternaryOperatorsExplored(){\n int x;\n x= 4>3 ? 2:1;\n assertEquals(2,x);\n\n assertTrue(5>=4 ? true:false);\n\n assertFalse(3>6 ? true:false);\n }", "private Data iff(Node line, Namespace namespace) {\n\n\t\tNode cond = line.next;\n\t\tNode a = cond.next;\n\t\tNode b = a.next;\n\t\t\n\t\tif (Boolean.TRUE.equals(e.eval(cond, namespace).value)) {\n\t\t\treturn e.eval(a, namespace);\n\t\t} else if (b != null) {\n\t\t\treturn e.eval(b, namespace);\n\t\t}\n\t\t\n\t\treturn NO_RESULT;\n\t}", "IfStatement createIfStatement();", "@Override\n public Expression translateSyntacticSugar() {\n return new Condition(this.e1, BooleanConstant.TRUE, this.e2);\n }", "public Snippet visit(ConditionalAndExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t Snippet f0 = n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f2 = n.identifier1.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp+\" && \"+f2.returnTemp;\n\t return _ret;\n\t }", "public final void conditionalExpression() throws RecognitionException {\n int conditionalExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"conditionalExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(741, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 107) ) { return ; }\n // Java.g:742:5: ( conditionalOrExpression ( '?' expression ':' expression )? )\n dbg.enterAlt(1);\n\n // Java.g:742:9: conditionalOrExpression ( '?' expression ':' expression )?\n {\n dbg.location(742,9);\n pushFollow(FOLLOW_conditionalOrExpression_in_conditionalExpression4332);\n conditionalOrExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(742,33);\n // Java.g:742:33: ( '?' expression ':' expression )?\n int alt128=2;\n try { dbg.enterSubRule(128);\n try { dbg.enterDecision(128);\n\n int LA128_0 = input.LA(1);\n\n if ( (LA128_0==64) ) {\n alt128=1;\n }\n } finally {dbg.exitDecision(128);}\n\n switch (alt128) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:742:35: '?' expression ':' expression\n {\n dbg.location(742,35);\n match(input,64,FOLLOW_64_in_conditionalExpression4336); if (state.failed) return ;\n dbg.location(742,39);\n pushFollow(FOLLOW_expression_in_conditionalExpression4338);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(742,50);\n match(input,75,FOLLOW_75_in_conditionalExpression4340); if (state.failed) return ;\n dbg.location(742,54);\n pushFollow(FOLLOW_expression_in_conditionalExpression4342);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(128);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 107, conditionalExpression_StartIndex); }\n }\n dbg.location(743, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"conditionalExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "Expr expr();", "public void visit(ConditionalOrExpression n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "public static BinaryExpression greaterThanOrEqual(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "LogicExpression getExpr();", "public final void rule__AstExpressionIf__ConditionAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25535:1: ( ( ruleAstExpression ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25536:1: ( ruleAstExpression )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25536:1: ( ruleAstExpression )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25537:1: ruleAstExpression\n {\n before(grammarAccess.getAstExpressionIfAccess().getConditionAstExpressionParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleAstExpression_in_rule__AstExpressionIf__ConditionAssignment_151309);\n ruleAstExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAstExpressionIfAccess().getConditionAstExpressionParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void testNested2() throws Exception {\n String contents = \n \"(true ? 2 : 7) + (true ? 2 : 7)\";\n assertType(contents, \"java.lang.Integer\");\n }", "@Override\n public R visit(ConditionalOrExpression n, A argu) {\n R _ret = null;\n n.conditionalAndExpression.accept(this, argu);\n n.nodeListOptional.accept(this, argu);\n return _ret;\n }", "@Override\n public void visit(CondFactExpr CondFactExpr) {\n Code.loadConst(1);\n Code.putFalseJump(Code.eq, 0);\n andList.add(Code.pc - 2);\n\n }", "public If(Condition con, Statement exp1, Statement exp2)\n {\n this.condition = con;\n this.exp1 = exp1;\n this.exp2 = exp2;\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private String cond(String col, String op, String value) {\n if (col != null) {\n return col + \" \" + op + \" \" + value;\n } else if (op != null) {\n return \" \" + op + \" \" + value;\n } else {\n return value;\n }\n }", "public static BinaryExpression addChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public Expression getCondition()\n {\n return this.condition;\n }", "Conditional createConditional();", "public final EObject ruleExpression() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject this_ConditionalExpression_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2469:28: (this_ConditionalExpression_0= ruleConditionalExpression )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2471:5: this_ConditionalExpression_0= ruleConditionalExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n newCompositeNode(grammarAccess.getExpressionAccess().getConditionalExpressionParserRuleCall()); \r\n \r\n }\r\n pushFollow(FOLLOW_ruleConditionalExpression_in_ruleExpression5641);\r\n this_ConditionalExpression_0=ruleConditionalExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n \r\n current = this_ConditionalExpression_0; \r\n afterParserOrEnumRuleCall();\r\n \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }", "public final EObject ruleConditionalExpression() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_2=null;\n Token otherlv_4=null;\n EObject this_ConditionalOrExpression_0 = null;\n\n EObject lv_trueStatement_3_0 = null;\n\n EObject lv_falseStatement_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:148:28: ( (this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )? ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:149:1: (this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )? )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:149:1: (this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )? )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:150:5: this_ConditionalOrExpression_0= ruleConditionalOrExpression ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )?\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getConditionalExpressionAccess().getConditionalOrExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleConditionalOrExpression_in_ruleConditionalExpression313);\n this_ConditionalOrExpression_0=ruleConditionalOrExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_ConditionalOrExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:1: ( ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) ) )?\n int alt2=2;\n int LA2_0 = input.LA(1);\n\n if ( (LA2_0==26) ) {\n int LA2_1 = input.LA(2);\n\n if ( (synpred1_InternalJavaJRExpression()) ) {\n alt2=1;\n }\n }\n switch (alt2) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:2: ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) ) ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) ) otherlv_4= ':' ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:2: ( ( ( () '?' ) )=> ( () otherlv_2= '?' ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:158:3: ( ( () '?' ) )=> ( () otherlv_2= '?' )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:160:5: ( () otherlv_2= '?' )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:160:6: () otherlv_2= '?'\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:160:6: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:161:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElementAndSet(\n grammarAccess.getConditionalExpressionAccess().getTestExpressionConditionAction_1_0_0_0(),\n current);\n \n }\n\n }\n\n otherlv_2=(Token)match(input,26,FOLLOW_26_in_ruleConditionalExpression348); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_2, grammarAccess.getConditionalExpressionAccess().getQuestionMarkKeyword_1_0_0_1());\n \n }\n\n }\n\n\n }\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:170:3: ( (lv_trueStatement_3_0= ruleJasperReportsExpression ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:171:1: (lv_trueStatement_3_0= ruleJasperReportsExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:171:1: (lv_trueStatement_3_0= ruleJasperReportsExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:172:3: lv_trueStatement_3_0= ruleJasperReportsExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getConditionalExpressionAccess().getTrueStatementJasperReportsExpressionParserRuleCall_1_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJasperReportsExpression_in_ruleConditionalExpression371);\n lv_trueStatement_3_0=ruleJasperReportsExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getConditionalExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"trueStatement\",\n \t\tlv_trueStatement_3_0, \n \t\t\"JasperReportsExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,27,FOLLOW_27_in_ruleConditionalExpression383); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_4, grammarAccess.getConditionalExpressionAccess().getColonKeyword_1_2());\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:192:1: ( (lv_falseStatement_5_0= ruleJasperReportsExpression ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:193:1: (lv_falseStatement_5_0= ruleJasperReportsExpression )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:193:1: (lv_falseStatement_5_0= ruleJasperReportsExpression )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:194:3: lv_falseStatement_5_0= ruleJasperReportsExpression\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getConditionalExpressionAccess().getFalseStatementJasperReportsExpressionParserRuleCall_1_3_0()); \n \t \n }\n pushFollow(FOLLOW_ruleJasperReportsExpression_in_ruleConditionalExpression404);\n lv_falseStatement_5_0=ruleJasperReportsExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getConditionalExpressionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"falseStatement\",\n \t\tlv_falseStatement_5_0, \n \t\t\"JasperReportsExpression\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public static BinaryExpression coalesce(Expression expression0, Expression expression1, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "private IfElement _ifElse(String expression, List<CodeElement> body, List<CodeElement> elseBody)\n {\n return _ifElseIf(expression, body, Collections.emptyList(), Collections.emptyList(), elseBody);\n }", "public static BinaryExpression lessThanOrEqual(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression equal(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private Term parseConditional(final boolean required) throws ParseException {\n Term t1 = parseLogicalOr(required);\n int tt = _tokenizer.next();\n if (tt == '?') {\n Term t2 = parseTerm(true);\n tt = _tokenizer.next();\n if (tt == ':') {\n if (isTypeChecking() && !t1.isB()) {\n reportError(\"Boolean operand expected before '?' in conditional '?:' term.\");\n }\n Term t3 = parseTerm(true);\n if (t2.isB() && t3.isB()) {\n t1 = new Term.Cond(Term.TYPE_B, t1, t2, t3);\n } else if ((t2.isD() && t3.isN() || t2.isN() && t3.isD())) {\n t1 = new Term.Cond(Term.TYPE_D, t1, t2, t3);\n } else if ((t2.isI() && t3.isI())) {\n t1 = new Term.Cond(Term.TYPE_I, t1, t2, t3);\n } else if (!isTypeChecking()) {\n t1 = new Term.Cond(Term.TYPE_D, t1, t2, t3);\n } else {\n reportError(\"Boolean or numeric operands expected in conditional '?:' term.\");\n }\n } else {\n _tokenizer.pushBack();\n reportError(\"Missing ':' part of conditional '?:' term.\");\n }\n } else {\n _tokenizer.pushBack();\n }\n return t1;\n }", "@Test\n public void basicConditionTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n }", "public final void expression() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:2: ( ( EQUAL ) | ( LT ) | ( GT ) | ( LTGT ) | ( AND ) | ( OR ) )\r\n int alt52=6;\r\n switch ( input.LA(1) ) {\r\n case EQUAL:\r\n {\r\n alt52=1;\r\n }\r\n break;\r\n case LT:\r\n {\r\n alt52=2;\r\n }\r\n break;\r\n case GT:\r\n {\r\n alt52=3;\r\n }\r\n break;\r\n case LTGT:\r\n {\r\n alt52=4;\r\n }\r\n break;\r\n case AND:\r\n {\r\n alt52=5;\r\n }\r\n break;\r\n case OR:\r\n {\r\n alt52=6;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 52, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt52) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:4: ( EQUAL )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:4: ( EQUAL )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:5: EQUAL\r\n {\r\n match(input,EQUAL,FOLLOW_EQUAL_in_expression1015); \r\n out(\"=\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:175:4: ( LT )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:175:4: ( LT )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:175:5: LT\r\n {\r\n match(input,LT,FOLLOW_LT_in_expression1024); \r\n out(\"<\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:176:4: ( GT )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:176:4: ( GT )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:176:5: GT\r\n {\r\n match(input,GT,FOLLOW_GT_in_expression1033); \r\n out(\">\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:177:4: ( LTGT )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:177:4: ( LTGT )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:177:5: LTGT\r\n {\r\n match(input,LTGT,FOLLOW_LTGT_in_expression1043); \r\n out(\"<>\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:178:4: ( AND )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:178:4: ( AND )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:178:5: AND\r\n {\r\n match(input,AND,FOLLOW_AND_in_expression1052); \r\n out(\" AND \");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:179:4: ( OR )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:179:4: ( OR )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:179:5: OR\r\n {\r\n match(input,OR,FOLLOW_OR_in_expression1062); \r\n out(\" OR \");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public interface BooleanExpression extends Expression {\n /**\n * Evaluate the expression\n * \n * @return the result of the evaluation (true or false)\n */\n boolean evaluate();\n}", "@Override\n public void visit(final OpConditional opCondition) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpConditional\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(new OpConditional(rewriteOp2(opCondition, rewriter), rewriter.getResult()));\n }", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "public void visit(ConditionalAndExpression n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }", "String getIfElse();", "@Override\n public R visit(ConditionalAndExpression n, A argu) {\n R _ret = null;\n n.valueLogical.accept(this, argu);\n n.nodeListOptional.accept(this, argu);\n return _ret;\n }", "public static TreeNode makeIf(TreeNode condition,\n TreeNode thenNode,\n TreeNode elseNode,\n ArrowType retType) {\n return new IfNode(condition, thenNode, elseNode, retType);\n }", "@Override\n public Object visitIfelsestatement(TranslationGrammarParser.IfelsestatementContext ctx) {\n Boolean cond = (Boolean) magicVisit(ctx.condition(), current_node);\n if (cond == null) {\n return null;\n }\n ArrayList<Node<TokenAttributes>> temp;\n if (cond) {\n temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.t, current_node);\n } else {\n temp = (ArrayList<Node<TokenAttributes>>) magicVisit(ctx.f, current_node);\n }\n if (temp == null) {\n return null;\n }\n return temp;\n }", "public void visit(ConditionElement1 conditionElement1) {\n\t\t\n\t\t// if a != 0, jmp true1\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc+Code.ne);\n\t\tCode.put2(11);\n\t\t\n\t\t// if b != 0, jmp true2\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc + Code.ne);\n\t\tCode.put2(8);\n\t\t\n\t\t// false: put 0,jmp next \n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jmp);\n\t\tCode.put2(5);\n\t\t\n\t\t// true1\n\t\tCode.put(Code.pop);\n\t\t\n\t\t// true2\n\t\tCode.loadConst(1);\n\t\t\n\t\t// next\n\t}", "public final EObject ruleConditionalOrExpression() throws RecognitionException {\n EObject current = null;\n\n Token lv_op_2_0=null;\n EObject this_ConditionalAndExpression_0 = null;\n\n EObject lv_right_3_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:230:28: ( (this_ConditionalAndExpression_0= ruleConditionalAndExpression ( ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) ) ( (lv_right_3_0= ruleConditionalAndExpression ) ) )* ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:231:1: (this_ConditionalAndExpression_0= ruleConditionalAndExpression ( ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) ) ( (lv_right_3_0= ruleConditionalAndExpression ) ) )* )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:231:1: (this_ConditionalAndExpression_0= ruleConditionalAndExpression ( ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) ) ( (lv_right_3_0= ruleConditionalAndExpression ) ) )* )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:232:5: this_ConditionalAndExpression_0= ruleConditionalAndExpression ( ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) ) ( (lv_right_3_0= ruleConditionalAndExpression ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getConditionalOrExpressionAccess().getConditionalAndExpressionParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleConditionalAndExpression_in_ruleConditionalOrExpression499);\n this_ConditionalAndExpression_0=ruleConditionalAndExpression();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n \n current = this_ConditionalAndExpression_0; \n afterParserOrEnumRuleCall();\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:240:1: ( ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) ) ( (lv_right_3_0= ruleConditionalAndExpression ) ) )*\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==28) ) {\n int LA3_2 = input.LA(2);\n\n if ( (synpred2_InternalJavaJRExpression()) ) {\n alt3=1;\n }\n\n\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:240:2: ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) ) ( (lv_right_3_0= ruleConditionalAndExpression ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:240:2: ( ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:240:3: ( ( () ( ( '||' ) ) ) )=> ( () ( (lv_op_2_0= '||' ) ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:247:6: ( () ( (lv_op_2_0= '||' ) ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:247:7: () ( (lv_op_2_0= '||' ) )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:247:7: ()\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:248:5: \n \t {\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getConditionalOrExpressionAccess().getBinaryExpressionLeftAction_1_0_0_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:253:2: ( (lv_op_2_0= '||' ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:254:1: (lv_op_2_0= '||' )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:254:1: (lv_op_2_0= '||' )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:255:3: lv_op_2_0= '||'\n \t {\n \t lv_op_2_0=(Token)match(input,28,FOLLOW_28_in_ruleConditionalOrExpression550); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t newLeafNode(lv_op_2_0, grammarAccess.getConditionalOrExpressionAccess().getOpVerticalLineVerticalLineKeyword_1_0_0_1_0());\n \t \n \t }\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElement(grammarAccess.getConditionalOrExpressionRule());\n \t \t }\n \t \t\tsetWithLastConsumed(current, \"op\", lv_op_2_0, \"||\");\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n\n\n \t }\n\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:268:4: ( (lv_right_3_0= ruleConditionalAndExpression ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:269:1: (lv_right_3_0= ruleConditionalAndExpression )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:269:1: (lv_right_3_0= ruleConditionalAndExpression )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:270:3: lv_right_3_0= ruleConditionalAndExpression\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getConditionalOrExpressionAccess().getRightConditionalAndExpressionParserRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleConditionalAndExpression_in_ruleConditionalOrExpression586);\n \t lv_right_3_0=ruleConditionalAndExpression();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getConditionalOrExpressionRule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"right\",\n \t \t\tlv_right_3_0, \n \t \t\t\"ConditionalAndExpression\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop3;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "final public void conditional() throws ParseException {\n jj_consume_token(IF);\n if (jj_2_40(4)) {\n jj_consume_token(39);\n } else {\n ;\n }\n jj_consume_token(BLOCKEDP);\n label_6:\n while (true) {\n if (jj_2_41(4)) {\n ;\n } else {\n break label_6;\n }\n jj_consume_token(34);\n }\n jj_consume_token(37);\n label_7:\n while (true) {\n if (jj_2_42(4)) {\n ;\n } else {\n break label_7;\n }\n jj_consume_token(34);\n }\n if (jj_2_43(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(38);\n }", "public void setCondition(ExpressionNode condition);", "Expression createExpression();", "public abstract String\n conditional();", "public final void rule__AstStatementIf__ConditionAssignment_1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25011:1: ( ( ruleAstExpression ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25012:1: ( ruleAstExpression )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25012:1: ( ruleAstExpression )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:25013:1: ruleAstExpression\n {\n before(grammarAccess.getAstStatementIfAccess().getConditionAstExpressionParserRuleCall_1_0()); \n pushFollow(FOLLOW_ruleAstExpression_in_rule__AstStatementIf__ConditionAssignment_150241);\n ruleAstExpression();\n\n state._fsp--;\n\n after(grammarAccess.getAstStatementIfAccess().getConditionAstExpressionParserRuleCall_1_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "com.google.type.Expr getCelExpression();", "@Test\n public void testPredicate2() throws Exception {\n final RuleDescr rule = ((RuleDescr) (parse(\"rule\", \"rule X when Foo(eval( $var.equals(\\\"xyz\\\") )) then end\")));\n final PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n final List<?> constraints = pattern.getConstraint().getDescrs();\n TestCase.assertEquals(1, constraints.size());\n final ExprConstraintDescr predicate = ((ExprConstraintDescr) (constraints.get(0)));\n TestCase.assertEquals(\"eval( $var.equals(\\\"xyz\\\") )\", predicate.getExpression());\n }", "public Snippet visit(ConditionalOrExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t Snippet f0 = n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f2 = n.identifier1.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp+\" || \"+f2.returnTemp;\n\t return _ret;\n\t }", "protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "static boolean translateIF() {\n index++;\r\n lex();\r\n\r\n //Skip adding \"(\" to stack\r\n lex();\r\n\r\n while (!lexeme.equals(\")\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n tParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\") ||\r\n token.equals(\"GREATER_THAN\") || token.equals(\"LESS_THAN\") || token.equals(\"EQUALS\") || token.equals(\"LESS_OR_EQUAL\") ||\r\n token.equals(\"GRETER_OR_EQUAL\") || token.equals(\"NOT_EQUAL\")) {\r\n stack.add(index, lexeme);\r\n index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n tParen();\r\n } else {\r\n index--;\r\n stack.add(index, lexeme);\r\n index++;\r\n index++;\r\n }\r\n } else {\r\n index--;\r\n stack.add(index, lexeme);\r\n index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n index++;\r\n break;\r\n }\r\n }\r\n\r\n //Skip the \")\"\r\n lex();\r\n\r\n // Beginning the execution and evaluation of the translated code.\r\n index = 0;\r\n\r\n while (!stack.get(index).equals(\"=\") && !stack.get(index).equals(\"!=\") && !stack.get(index).equals(\">=\") &&\r\n !stack.get(index).equals(\"<=\") && !stack.get(index).equals(\">\") && !stack.get(index).equals(\"<\")) {\r\n index ++;\r\n }\r\n\r\n int operand1 = 0;\r\n int operand2 = 0;\r\n String operator = stack.get(index);\r\n stack.remove(index);\r\n index--;\r\n\r\n if (operator.equals(\"=\") || operator.equals(\"!=\") || operator.equals(\">=\") ||\r\n operator.equals(\"<=\") || operator.equals(\">\") || operator.equals(\"<\")) {\r\n\r\n try {\r\n operand2 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand2 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n\r\n stack.remove(index);\r\n index--;\r\n\r\n try {\r\n operand1 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand1 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n\r\n stack.remove(index);\r\n\r\n if (evaluateCon(operand1, operand2, operator))\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n else {\r\n try {\r\n operand2 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand2 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n stack.remove(index);\r\n index--;\r\n\r\n try {\r\n operand1 = Integer.parseInt(stack.get(index));\r\n }\r\n catch (NumberFormatException e) {\r\n operand1 = Integer.parseInt(varList.get(search(stack.get(index)) + 1));\r\n }\r\n stack.remove(index);\r\n\r\n execute(evaluate(operand1, operand2, operator));\r\n }\r\n\r\n return false;\r\n }", "public static BinaryExpression greaterThan(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public void setConditionalOperator(String conditionalOperator) {\n this.conditionalOperator = conditionalOperator;\n }", "IfStmtRule createIfStmtRule();", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public String getConditionalOperator() {\n return conditionalOperator;\n }", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "Expression expression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = orExpression();\r\n\t\tif (isKind(OP_QUESTION)) {\r\n\t\t\tconsume();\r\n\t\t\tExpression e1 = expression();\r\n\t\t\tmatch(OP_COLON);\r\n\t\t\tExpression e2 = expression();\r\n\t\t\te0 = new ExpressionConditional(first, e0, e1, e2);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public Object cond(List<?> instructiones){\n List<?> listTemp = instructiones.subList(1, instructiones.size());\n List<?> listTemp2 = (List<?>) listTemp.get(0);\n int i = 0;\n \n for(int u=0;u<listTemp2.size();u++) {\n \tObject inst=listTemp2.get(u);\n \tList<?> instruccion = (List<?>)inst;\n \t\n if (instruccion.contains(\"equal\")){\n if (equals(instruccion.get(1), instruccion.get(2))){\n return instruccion;\n }\n } else if (instruccion.contains(\"<\")){\n if (Menor(instruccion.get(1), instruccion.get(2))){\n return instruccion.get(3);\n }\n } else if (instruccion.contains(\">\")){\n if (Mayor(instruccion.get(1), instruccion.get(2))){\n \treturn instruccion.get(3);\n }\n } else if (i == listTemp2.size()){\n return listTemp2.get(i);\n }\n i++;\n }\n \n return null;\n }", "@Override\n\tpublic Object visit(ASTCondEq node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\" eq \");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}" ]
[ "0.77976996", "0.73492837", "0.6872344", "0.66864616", "0.6670527", "0.66375184", "0.66106826", "0.65334576", "0.6344973", "0.6306212", "0.6295149", "0.629398", "0.6113412", "0.60834706", "0.59616464", "0.5939651", "0.5937162", "0.5912977", "0.5909564", "0.5891631", "0.5878868", "0.5866312", "0.58588165", "0.58532304", "0.58454084", "0.5841283", "0.5811618", "0.57900715", "0.57841206", "0.5772207", "0.5747204", "0.5736607", "0.57233363", "0.57066464", "0.5686635", "0.566489", "0.5661629", "0.5654407", "0.5622315", "0.5622315", "0.5620553", "0.56041396", "0.5595442", "0.55762345", "0.5573016", "0.55611736", "0.55451816", "0.55447656", "0.5537159", "0.5535377", "0.5528516", "0.55127746", "0.550904", "0.55066305", "0.55044556", "0.55042154", "0.55008465", "0.5497403", "0.5480317", "0.5478281", "0.5475689", "0.5469892", "0.5462621", "0.5454441", "0.5451584", "0.5437774", "0.5432308", "0.54316586", "0.5429743", "0.54167753", "0.54006135", "0.5390283", "0.5390015", "0.5386267", "0.5385499", "0.53832877", "0.5368578", "0.5355951", "0.5353926", "0.53526074", "0.5348995", "0.53385", "0.533435", "0.5333423", "0.53232235", "0.5316493", "0.5311653", "0.5308012", "0.52917093", "0.52906877", "0.5290151", "0.5276578", "0.52740806", "0.52722824", "0.52639323", "0.5255748", "0.5251564", "0.52492666", "0.5238052", "0.5235611" ]
0.5394963
71
'?' expression ':' expression1
private Operation conditionalExpr(Scope scope, Vector queue) { Operation root = new Operation(); matchKeyword(Keyword.QUESTIONMARKSY); follower.add(Keyword.COLONSY); root.left = expression(scope, queue); follower.remove(follower.size() - 1); matchKeyword(Keyword.COLONSY); root.right = expression1(scope, queue); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String bindNull() {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IS\";\n } else if (operator.equals(\"!=\")) {\n op = \"IS NOT\";\n } else {\n op = operator;\n }\n if (column != null && skipNulls) {\n return \"1 = 1\";\n } else {\n return cond(column, op, \"NULL\");\n }\n }", "private Operation expression1(Scope scope, Vector queue)\r\n {\r\n follower.add(Keyword.QUESTIONMARKSY);\r\n Operation op = expression2(scope, queue);\r\n follower.remove(follower.size() - 1);\r\n\r\n if (nextSymbol == Keyword.QUESTIONMARKSY)\r\n {\r\n Operation a = new Operation();\r\n a.operator = nextSymbol;\r\n a.right = conditionalExpr(scope, queue);\r\n a.left = op;\r\n op = a;\r\n }\r\n\r\n return op;\r\n }", "Expression expression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = orExpression();\r\n\t\tif (isKind(OP_QUESTION)) {\r\n\t\t\tconsume();\r\n\t\t\tExpression e1 = expression();\r\n\t\t\tmatch(OP_COLON);\r\n\t\t\tExpression e2 = expression();\r\n\t\t\te0 = new ExpressionConditional(first, e0, e1, e2);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public static BinaryExpression coalesce(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public Object visitConditionalExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n Object c = dispatch(n.getGeneric(2));\n \n if (a instanceof Long) {\n return (! ((Long) a).equals(new Long(0))) ? b : c;\n }\n else {\n return parens(a) + \" ? \" + parens(b) + \" : \" + parens(c);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD b = ensureBDD(dispatch(n.getGeneric(1)));\n BDD c = ensureBDD(dispatch(n.getGeneric(2)));\n BDD ab, na, nac, bdd;\n \n //implement with a & b | !a & c\n ab = a.and(b);\n b.free();\n na = a.not();\n a.free();\n nac = na.and(c);\n c.free();\n na.free();\n bdd = ab.or(nac);\n nac.free();\n ab.free();\n \n return bdd;\n }\n }", "public static ConditionalExpression condition(Expression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "@Test\n public void testFromWithTernaryFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from (isFull ? $cheesery : $market) ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from (isFull ? $cheesery : $market)\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "static ExpressionParsingState composeConditionalExpression(\n final ExpressionParsingState state, final int nodeIndex) {\n \n final String input = state.get(nodeIndex).getInput();\n \n if (StringUtils.isEmptyOrWhitespace(input)) {\n return null;\n }\n\n // Trying to fail quickly...\n final int condSuffixPos = input.indexOf(CONDITION_SUFFIX_CHAR);\n if (condSuffixPos == -1) {\n return state;\n }\n \n final String condStr = input.substring(0, condSuffixPos);\n final String remainder = input.substring(condSuffixPos + 1);\n\n if (remainder.indexOf(CONDITION_SUFFIX_CHAR) != -1) {\n // There are two \"?\" symbols\n return null;\n }\n\n final int thenElseSepPos = remainder.indexOf(CONDITION_THENELSE_SEPARATOR_CHAR);\n if (remainder.lastIndexOf(CONDITION_THENELSE_SEPARATOR_CHAR) != thenElseSepPos) {\n // There are two \":\" symbols\n return null;\n }\n\n String thenStr = null;\n String elseStr = null;\n if (thenElseSepPos != -1) {\n if (thenElseSepPos == 0) {\n // Maybe it is a default operation\n return state;\n }\n thenStr = remainder.substring(0, thenElseSepPos);\n elseStr = remainder.substring(thenElseSepPos + 1);\n } else {\n thenStr = remainder;\n }\n\n \n final Expression condExpr = ExpressionParsingUtil.parseAndCompose(state, condStr);\n if (condExpr == null) {\n return null;\n }\n\n final Expression thenExpr = ExpressionParsingUtil.parseAndCompose(state, thenStr);\n if (thenExpr == null) {\n return null;\n }\n\n Expression elseExpr = VariableExpression.NULL_VALUE;\n if (elseStr != null) {\n elseExpr = ExpressionParsingUtil.parseAndCompose(state, elseStr);\n if (elseExpr == null) {\n return null;\n }\n }\n\n \n final ConditionalExpression conditionalExpressionResult = \n new ConditionalExpression(condExpr, thenExpr, elseExpr);\n state.setNode(nodeIndex,conditionalExpressionResult);\n \n return state;\n \n }", "private String reduceOperation(String op1, String opd, String op2, StringBuffer expr) {\r\n if (opd == null) {\r\n if (op1 == null || op2 == null) {\r\n return null;\r\n } else if (\"AND\".equals(op1) && \"AND\".equals(op2)) {\r\n return \"AND\";\r\n } else {\r\n return \"OR\";\r\n }\r\n } else {\r\n if (op1 != null) {\r\n expr.append(op1).append(\" \");\r\n }\r\n expr.append(opd).append(\" \");\r\n return op2;\r\n }\r\n }", "public final void conditionalExpression() throws RecognitionException {\n int conditionalExpression_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"conditionalExpression\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(741, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 107) ) { return ; }\n // Java.g:742:5: ( conditionalOrExpression ( '?' expression ':' expression )? )\n dbg.enterAlt(1);\n\n // Java.g:742:9: conditionalOrExpression ( '?' expression ':' expression )?\n {\n dbg.location(742,9);\n pushFollow(FOLLOW_conditionalOrExpression_in_conditionalExpression4332);\n conditionalOrExpression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(742,33);\n // Java.g:742:33: ( '?' expression ':' expression )?\n int alt128=2;\n try { dbg.enterSubRule(128);\n try { dbg.enterDecision(128);\n\n int LA128_0 = input.LA(1);\n\n if ( (LA128_0==64) ) {\n alt128=1;\n }\n } finally {dbg.exitDecision(128);}\n\n switch (alt128) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:742:35: '?' expression ':' expression\n {\n dbg.location(742,35);\n match(input,64,FOLLOW_64_in_conditionalExpression4336); if (state.failed) return ;\n dbg.location(742,39);\n pushFollow(FOLLOW_expression_in_conditionalExpression4338);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(742,50);\n match(input,75,FOLLOW_75_in_conditionalExpression4340); if (state.failed) return ;\n dbg.location(742,54);\n pushFollow(FOLLOW_expression_in_conditionalExpression4342);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(128);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 107, conditionalExpression_StartIndex); }\n }\n dbg.location(743, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"conditionalExpression\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Override\n\tpublic Number operate(Number expr1) {\n\t\treturn null;\n\t}", "Expr expr();", "@Override\n\tpublic String getOperator() {\n\t\treturn \"?\";\n\t}", "public static BinaryExpression coalesce(Expression expression0, Expression expression1, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "private String cond(String col, String op, String value) {\n if (col != null) {\n return col + \" \" + op + \" \" + value;\n } else if (op != null) {\n return \" \" + op + \" \" + value;\n } else {\n return value;\n }\n }", "@Override\n public String visit(BooleanLiteralExpr n, Object arg) {\n return null;\n }", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "String getBooleanTrueExpression();", "String getBooleanFalseExpression();", "@Override\n public String visit(ConditionalExpr n, Object arg) {\n return null;\n }", "public Expression getExpression() {\n return optionalConditionExpression; }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder(90);\n StringBuilder stringBuilder1 = stringBuilder0.appendCodePoint(90);\n SQLUtil.addOptionalCondition(\" NOT NULL\", stringBuilder1);\n assertEquals(\"Z or NOT NULL\", stringBuilder1.toString());\n assertEquals(\"Z or NOT NULL\", stringBuilder0.toString());\n }", "ConditionalExpression createConditionalExpression();", "@Test\n public void ternaryOperatorsExplored(){\n int x;\n x= 4>3 ? 2:1;\n assertEquals(2,x);\n\n assertTrue(5>=4 ? true:false);\n\n assertFalse(3>6 ? true:false);\n }", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }", "@Test void testCaseExpressionDialect1() {\n sql(\"case x when 2, 4 then 3 ^when^ then 5 else 4 end\")\n .fails(\"(?s)Encountered \\\"when then\\\" at .*\");\n }", "private void parseQuestionMark(@NotNull ParserState state) {\n if (state.is(m_types.C_FUN_PARAMS)) {\n state.mark(m_types.C_FUN_PARAM)\n .mark(m_types.C_NAMED_PARAM);\n }\n // Start of a new optional parameter :: let f x |>?<|(y ...\n else if (state.is(m_types.C_FUN_PARAM) && !state.hasScopeToken()) {\n state.complete().popEnd()\n .mark(m_types.C_FUN_PARAM)\n .mark(m_types.C_NAMED_PARAM);\n }\n // Condition ?\n else if (state.is(m_types.C_BINARY_CONDITION) && !state.isPrevious(m_types.C_MATCH_EXPR)) {\n IElementType nextType = state.rawLookup(1);\n // ... |>?<| ... : ...\n if (nextType != m_types.LIDENT) {\n state.popEnd();\n }\n }\n }", "public String eval(String p1 ) {\n\t}", "Expression eqExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = relExpression();\r\n\t\twhile(isKind(OP_EQ, OP_NEQ)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = relExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "String getExpression();", "String getExpression();", "public void testNested2() throws Exception {\n String contents = \n \"(true ? 2 : 7) + (true ? 2 : 7)\";\n assertType(contents, \"java.lang.Integer\");\n }", "public boolean isExpression (Object value);", "@Override\r\n public boolean evaluate(String expr) {\r\n return translate(\"${If[\" + expr + \",TRUE,FALSE]}\").equals(\"TRUE\");\r\n }", "public static ConditionalExpression condition(Expression expression0, Expression expression1, Expression expression2, Class clazz) { throw Extensions.todo(); }", "public static BinaryExpression addChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\t\t\n\t}", "private static void ternary(){\n int y=10;\n String animal;\n animal=(y<20)?\"Horse\":\"Tiger\";\n System.out.println(animal);\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression equal(Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "private boolean isSymbolOperatorAhead() {\r\n\t\treturn expression[currentIndex] == '*' || expression[currentIndex] == '+' || expression[currentIndex] == '!'\r\n\t\t\t\t|| (currentIndex + 2 < expression.length && expression[currentIndex] == ':'\r\n\t\t\t\t\t\t&& expression[currentIndex + 1] == '+' && expression[currentIndex + 2] == ':');\r\n\t}", "@Override\n\tpublic void visit(IsNullExpression arg0) {\n\n\t}", "ExpOperand createExpOperand();", "public static BinaryExpression equal(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression and(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "String getIfFunction(String condition, String exprtrue, String exprfalse);", "public final void logicExpresion() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:121:2: ( detailExpresion | detailExpresion ( expression )? detailExpresion | between | detailExpresion IS ( NOT )? NULL | detailExpresion IN open selectStatement close | OPEN logicExpresions CLOSE )\r\n int alt22=6;\r\n alt22 = dfa22.predict(input);\r\n switch (alt22) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:121:4: detailExpresion\r\n {\r\n pushFollow(FOLLOW_detailExpresion_in_logicExpresion445);\r\n detailExpresion();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:122:4: detailExpresion ( expression )? detailExpresion\r\n {\r\n pushFollow(FOLLOW_detailExpresion_in_logicExpresion452);\r\n detailExpresion();\r\n\r\n state._fsp--;\r\n\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:122:20: ( expression )?\r\n int alt20=2;\r\n int LA20_0 = input.LA(1);\r\n\r\n if ( ((LA20_0>=AND && LA20_0<=OR)||(LA20_0>=EQUAL && LA20_0<=LTGT)) ) {\r\n alt20=1;\r\n }\r\n switch (alt20) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:122:21: expression\r\n {\r\n pushFollow(FOLLOW_expression_in_logicExpresion455);\r\n expression();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n pushFollow(FOLLOW_detailExpresion_in_logicExpresion459);\r\n detailExpresion();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:123:5: between\r\n {\r\n pushFollow(FOLLOW_between_in_logicExpresion465);\r\n between();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:124:5: detailExpresion IS ( NOT )? NULL\r\n {\r\n pushFollow(FOLLOW_detailExpresion_in_logicExpresion471);\r\n detailExpresion();\r\n\r\n state._fsp--;\r\n\r\n match(input,IS,FOLLOW_IS_in_logicExpresion473); \r\n out(\" is \");\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:124:39: ( NOT )?\r\n int alt21=2;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( (LA21_0==NOT) ) {\r\n alt21=1;\r\n }\r\n switch (alt21) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:124:40: NOT\r\n {\r\n match(input,NOT,FOLLOW_NOT_in_logicExpresion478); \r\n out(\" not \");\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n match(input,NULL,FOLLOW_NULL_in_logicExpresion485); \r\n out(\" null \");\r\n\r\n }\r\n break;\r\n case 5 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:125:5: detailExpresion IN open selectStatement close\r\n {\r\n pushFollow(FOLLOW_detailExpresion_in_logicExpresion493);\r\n detailExpresion();\r\n\r\n state._fsp--;\r\n\r\n match(input,IN,FOLLOW_IN_in_logicExpresion495); \r\n out(\" in \"); \r\n pushFollow(FOLLOW_open_in_logicExpresion499);\r\n open();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_selectStatement_in_logicExpresion501);\r\n selectStatement();\r\n\r\n state._fsp--;\r\n\r\n pushFollow(FOLLOW_close_in_logicExpresion503);\r\n close();\r\n\r\n state._fsp--;\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:126:5: OPEN logicExpresions CLOSE\r\n {\r\n match(input,OPEN,FOLLOW_OPEN_in_logicExpresion509); \r\n out(\" ( \"); \r\n pushFollow(FOLLOW_logicExpresions_in_logicExpresion513);\r\n logicExpresions();\r\n\r\n state._fsp--;\r\n\r\n match(input,CLOSE,FOLLOW_CLOSE_in_logicExpresion515); \r\n out(\" ) \"); \r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "private StringBuilder getOperand() {\r\n\t\tif (\"\".equals(operator)) {\r\n\t\t\treturn firstNumber;\r\n\t\t} else {\r\n\t\t\treturn secondNumber;\r\n\t\t}\r\n\t}", "public T expr(final String expr, final Object... values) {\r\n\t\treturn op(ConditionValueType.EXPRESSION, concatenate(expr, values));\r\n\t}", "@Test\n public void defaultOperatorsEvaluateFalseTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 != 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <> 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 < 0\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 > 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 >= 3\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 >= 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <= 0\", \"expr\").render(null), is((Object)false));\n }", "String getBooleanExpression(boolean flag);", "@Test\n void lambda_condition_with_missing_left_operand() throws Exception {\n runner.run(\n \"TAKE 10 from numbers with greater than val AS var\",\n \"{numbers: [{val: 12}]}\",\n r -> r.containsValidationMessage(\"missing left operand in condition\"));\n }", "public static BinaryExpression andAlso(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private Object eval(SimpleExpr expr) {\n Object res = eval(expr.getExpr().get(0));\n\n for (int i = 1; i < expr.getExpr().size(); i++) {\n Object res2 = eval(expr.getExpr().get(i));\n String opt = expr.getOpt().get(i - 1);\n\n if (\"+\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res + (Double) res2;\n } else if (res instanceof Double && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof Boolean && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof String) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Double) {\n res = \"\" + res + res2;\n } else if (res instanceof String && res2 instanceof Boolean) {\n res = \"\" + res + res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else if (\"-\".equals(opt)) {\n if (res instanceof Double && res2 instanceof Double) {\n res = (Double) res - (Double) res2;\n } else {\n throw new RaydenScriptException(\"Expression error: SimpleExpr error\");\n }\n } else {\n throw new RaydenScriptException(\"Expression error: Invalid operator '\" + opt + \"'.\");\n }\n }\n\n return res;\n }", "@Test\n void lambda_condition_with_missing_right_operand() throws Exception {\n runner.run(\n \"TAKE 10 from numbers with val greater than AS var\",\n \"{numbers: [{val: 12}]}\",\n r -> r.containsValidationMessage(\"missing right operand in condition\"));\n }", "private ParseTree maybeParseOptionalExpression(ParseTree operand) {\n // The optional chain's source info should cover the lhs operand also\n SourcePosition start = operand.location.start;\n\n while (peek(TokenType.QUESTION_DOT)) {\n eat(TokenType.QUESTION_DOT);\n switch (peekType()) {\n case OPEN_PAREN:\n ArgumentListTree arguments = parseArguments();\n operand =\n new OptChainCallExpressionTree(\n getTreeLocation(start),\n operand,\n arguments,\n /* isStartOfOptionalChain = */ true,\n arguments.hasTrailingComma);\n break;\n case OPEN_SQUARE:\n eat(TokenType.OPEN_SQUARE);\n ParseTree member = parseExpression();\n eat(TokenType.CLOSE_SQUARE);\n operand =\n new OptionalMemberLookupExpressionTree(\n getTreeLocation(start), operand, member, /* isStartOfOptionalChain = */ true);\n break;\n case NO_SUBSTITUTION_TEMPLATE:\n case TEMPLATE_HEAD:\n reportError(\"template literal cannot be used within optional chaining\");\n break;\n default:\n if (peekIdOrKeyword()) {\n IdentifierToken id = eatIdOrKeywordAsId();\n operand =\n new OptionalMemberExpressionTree(\n getTreeLocation(start), operand, id, /* isStartOfOptionalChain = */ true);\n } else {\n reportError(\"syntax error: %s not allowed in optional chain\", peekType());\n }\n }\n operand = parseRemainingOptionalChainSegment(operand);\n }\n return operand;\n }", "public static String parseExpressionForOperator(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n String operator = expression.substring(space + 1, space + 2);\n return operator;\n }", "String getOr_op();", "public final void expression() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:2: ( ( EQUAL ) | ( LT ) | ( GT ) | ( LTGT ) | ( AND ) | ( OR ) )\r\n int alt52=6;\r\n switch ( input.LA(1) ) {\r\n case EQUAL:\r\n {\r\n alt52=1;\r\n }\r\n break;\r\n case LT:\r\n {\r\n alt52=2;\r\n }\r\n break;\r\n case GT:\r\n {\r\n alt52=3;\r\n }\r\n break;\r\n case LTGT:\r\n {\r\n alt52=4;\r\n }\r\n break;\r\n case AND:\r\n {\r\n alt52=5;\r\n }\r\n break;\r\n case OR:\r\n {\r\n alt52=6;\r\n }\r\n break;\r\n default:\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 52, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt52) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:4: ( EQUAL )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:4: ( EQUAL )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:174:5: EQUAL\r\n {\r\n match(input,EQUAL,FOLLOW_EQUAL_in_expression1015); \r\n out(\"=\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:175:4: ( LT )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:175:4: ( LT )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:175:5: LT\r\n {\r\n match(input,LT,FOLLOW_LT_in_expression1024); \r\n out(\"<\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:176:4: ( GT )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:176:4: ( GT )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:176:5: GT\r\n {\r\n match(input,GT,FOLLOW_GT_in_expression1033); \r\n out(\">\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:177:4: ( LTGT )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:177:4: ( LTGT )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:177:5: LTGT\r\n {\r\n match(input,LTGT,FOLLOW_LTGT_in_expression1043); \r\n out(\"<>\");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 5 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:178:4: ( AND )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:178:4: ( AND )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:178:5: AND\r\n {\r\n match(input,AND,FOLLOW_AND_in_expression1052); \r\n out(\" AND \");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 6 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:179:4: ( OR )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:179:4: ( OR )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:179:5: OR\r\n {\r\n match(input,OR,FOLLOW_OR_in_expression1062); \r\n out(\" OR \");\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n stringBuilder0.append(\"alter materialized viewjcsh%4%|@v9\");\n SQLUtil.addOptionalCondition((String) null, stringBuilder0);\n assertEquals(\"alter materialized viewjcsh%4%|@v9 or null\", stringBuilder0.toString());\n }", "@Override\n public Node visit(BinaryExpression nd, Void v) {\n if (\"??\".equals(nd.getOperator())) return nd;\n return nd.getLeft().accept(this, v);\n }", "LogicExpression getExpr();", "@Test\n public void testPredicate2() throws Exception {\n final RuleDescr rule = ((RuleDescr) (parse(\"rule\", \"rule X when Foo(eval( $var.equals(\\\"xyz\\\") )) then end\")));\n final PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n final List<?> constraints = pattern.getConstraint().getDescrs();\n TestCase.assertEquals(1, constraints.size());\n final ExprConstraintDescr predicate = ((ExprConstraintDescr) (constraints.get(0)));\n TestCase.assertEquals(\"eval( $var.equals(\\\"xyz\\\") )\", predicate.getExpression());\n }", "public static BinaryExpression orElse(Expression expression0, Expression expression1) {\n return makeBinary(ExpressionType.OrElse, expression0, expression1);\n }", "public interface Expression {\n public boolean interpret(String context);\n}", "public static BinaryExpression add(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "ExprNull createExprNull();", "@Test\n\tpublic void testExpression() throws ParseException {\n\t\tExpression expression = langParser(\"a\").expression();\n\t\tassertEquals(expression.getClass(), Identifier.class);\n\t\texpression = langParser(\"a()\").expression();\n\t\tassertEquals(expression.getClass(), FunctionCall.class);\n\t\texpression = langParser(\"a.b\").expression();\n\t\tassertEquals(expression.getClass(), MemberAccess.class);\n\t\texpression = langParser(\"1\").expression();\n\t\tassertEquals(expression.getClass(), LongLiteral.class);\n\t\texpression = langParser(\"1.1\").expression();\n\t\tassertEquals(expression.getClass(), DoubleLiteral.class);\n\t\texpression = langParser(\"if(a,b,c)\").expression();\n\t\tassertEquals(expression.getClass(), TernaryIf.class);\n\t}", "public static boolean isExpression(String expr) {\r\n return expr != null && expr.startsWith(\"%{\") && expr.endsWith(\"}\");\r\n }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private static Expr parseValue(String string) {\r\n\t\tif (string.isEmpty()) return null;\r\n\r\n\t\tchar first = string.charAt(0);\r\n\t\tif (first != '\"' && first != '-' && isReserved(first)) {\r\n\t\t\treturn new ExprUnary(Operator.get(Character.toString(first)), new ExprVal(string.substring(1)));\r\n\t\t} else {\r\n\t\t\treturn new ExprVal(string);\r\n\t\t}\r\n\t}", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public String evaluate(String expression);", "@Test\n public void defaultOperatorsEvaluteTrueTest() throws Exception {\n\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 != 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <> 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 < 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 > 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 1\", \"expr\").render(null), is((Object)true));\n\n // negative numbers\n assertThat(getNode(\"1 > -1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1 < 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1.0 > -1.0\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1.0 < 1.0\", \"expr\").render(null), is((Object)true));\n }", "public static BinaryExpression greaterThanOrEqual(Expression expression0, Expression expression1, boolean liftToNull, Method method) { throw Extensions.todo(); }", "public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD bdd;\n \n bdd = a.not();\n \n a.free();\n \n return bdd;\n }\n }", "@Override\r\n\tpublic String infixToPostfix(String expression) {\r\n\t\tStringBuilder pf = new StringBuilder(); // the postfix expression \r\n\t\texpression = removespaces(expression); \r\n\t\texpression = CheckInputValidation(expression);\r\n\t\texpression = DummyZero(expression);\r\n\t\tString e = expression;\r\n\t\tfor(i1 = 0 ; i1 < e.length() ;i1++) { \r\n\t\t\t//take operand and append it to the string\r\n\t\t\tif(Character.isDigit(e.charAt(i1)) || Character.isLetter(e.charAt(i1))) { //check if the character is letter or number\r\n\t\t\t\tint j =0; //counter to know how many digits in the following operand \r\n\t\t\t\twhile (i1 != e.length() &&e.charAt(i1) != '+' &&e.charAt(i1) != '-' && e.charAt(i1) != '/' && e.charAt(i1) != '*'&&e.charAt(i1) != ')'&&e.charAt(i1) != '(' ) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\ti1++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j>0) {\r\n\t\t\t\t\tString s = e.substring(i1-j, i1);\r\n\t\t\t\t\tpf.append( s ).append(' ');\r\n\t\t\t\t}\r\n\t\t\t\ti1--;\r\n\t\t\t\tif(i1 == e.length()-1 ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (e.charAt(i1)=='(') {\r\n\t\t\t\topt.push(e.charAt(i1));\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i1)=='-'||e.charAt(i1)=='/'||e.charAt(i1)=='+'||e.charAt(i1)=='*') {\r\n\t\t\t\twhile(!(opt.isEmpty()) && higherpres(e.charAt(i1)) && (char)opt.peek() !='(') {\r\n\t\t\t\t\tpf.append( opt.pop() ).append(' ');\r\n\t\t\t\t}\r\n\t\t\t\topt.push(e.charAt(i1));\r\n\t\t\t}\r\n\t\t\telse if (e.charAt(i1)==')') {\r\n\t\t\t\twhile((char)opt.peek() != '(') {\r\n\t\t\t\t\tpf.append( opt.pop() ).append(' ');\r\n\t\t\t\t}\r\n\t\t\t\topt.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!(opt.isEmpty()) ) {\r\n\t\t\tif((char)opt.peek() != '(') {\r\n\t\t\t\tpf.append(opt.pop()).append(' ');}\r\n\t\t\telse if((char)opt.peek()=='(') {\r\n\t\t\t\topt.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pf.toString();\r\n\t\t\r\n\t}", "public interface Expression {\n public boolean interpret(String context);\n}", "public interface Expression {\n public boolean interpret(String context);\n}", "public static void main(String[] args) {\n Pattern p = Pattern.compile(\"2*5?$\");\n Matcher m = p.matcher(regex1);\n if (m.matches()) {\n System.out.println(\"YES ¦ \");\n } else {\n System.out.println(\"NO\");\n }\n\n }", "EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }", "OrExpr createOrExpr();", "private boolean peekOptionalChainSuffix() {\n return peek(TokenType.OPEN_PAREN) // a?.b( ...\n || peek(TokenType.OPEN_SQUARE) // a?.b[ ...\n || peek(TokenType.PERIOD) // a?.b. ...\n // TEMPLATE_HEAD and NO_SUBSTITUTION_TEMPLATE are actually not allowed within optional\n // chaining and leads to an early error as dictated by the spec.\n // https://tc39.es/proposal-optional-chaining/#sec-left-hand-side-expressions-static-semantics-early-errors\n || peek(TokenType.NO_SUBSTITUTION_TEMPLATE) // a?.b`text`\n || peek(TokenType.TEMPLATE_HEAD); // a?.b`text ${substitution} text`\n }", "private boolean hasPrecedence(char op1, char op2) {\n if (op1 == '(' || op1 == ')') {\n return false;\n }\n if ((op1 == '+' || op1 == '-') && (op2 == '*' || op2 == '/')) {\n return false;\n }\n return true;\n }", "CriteriaExpression<?> getLeftHandOperand();", "public void testNested3() throws Exception {\n String contents = \n \"(8 ?: 7) + (8 ?: 7)\";\n assertType(contents, \"java.lang.Integer\");\n }", "public String visit(NotExpression n, Object argu) \n\t{\n\t\tString _ret=null;\n\t if (n.f1.accept(this, argu).equals(\"boolean\"))\n\t \t_ret = \"boolean\";\n\t return _ret;\n\t}", "@Test\n\tpublic void expression1() throws SyntaxException, LexicalException {\n\t\tString input = \"2\";\n\t\tshow(input);\n\t\tScanner scanner = new Scanner(input).scan();\n\t\tshow(scanner);\n\t\tSimpleParser parser = new SimpleParser(scanner);\n\t\tparser.expression(); // Call expression directly.\n\t}", "BooleanLiteralExp createBooleanLiteralExp();", "@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }", "BooleanExpression createBooleanExpression();", "BooleanExpression createBooleanExpression();", "boolean operator(Character input){\r\n //detects operands\r\n if(input == '^'||input == '-'||input == '+'||input == '/'||input == '*'|| input =='('|| input ==')'){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }", "public Object visitLogicalAndExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n Object b = dispatch(n.getGeneric(1));\n \n if (a instanceof Long && b instanceof Long) {\n return (Long) a & (Long) b;\n }\n else {\n return parens(a) + \" && \" + parens(b);\n }\n }\n else {\n BDD a, b, bdd;\n \n a = ensureBDD(dispatch(n.getGeneric(0)));\n b = ensureBDD(dispatch(n.getGeneric(1)));\n \n bdd = a.andWith(b);\n \n return bdd;\n }\n }", "String WHERE() { return yyline+\"/\"+yycolumn+\"(\"+yychar+\")\" ;}" ]
[ "0.62908936", "0.59015656", "0.57753634", "0.56565255", "0.56375515", "0.5615637", "0.5604816", "0.5518981", "0.5435942", "0.5426964", "0.5414378", "0.54013515", "0.5304313", "0.52987695", "0.5296063", "0.5278303", "0.524338", "0.5243097", "0.5241887", "0.52236706", "0.52156264", "0.5183807", "0.5167313", "0.5149218", "0.5116129", "0.50640184", "0.50606513", "0.50579274", "0.50487465", "0.5042026", "0.50182605", "0.5002935", "0.49971563", "0.4970609", "0.4970609", "0.49660137", "0.4957629", "0.49352616", "0.49256793", "0.4913898", "0.4913346", "0.4905642", "0.4894316", "0.48888603", "0.48856342", "0.48829147", "0.48718053", "0.48712885", "0.4870254", "0.48617533", "0.48604932", "0.4856558", "0.48500845", "0.48449886", "0.4837476", "0.4835165", "0.48350322", "0.48282257", "0.4823585", "0.4808682", "0.48083594", "0.4798386", "0.47937202", "0.4788248", "0.47842938", "0.47624654", "0.4739635", "0.4733335", "0.4731616", "0.47305673", "0.4718953", "0.47166824", "0.47121602", "0.47094142", "0.47073892", "0.47061002", "0.4693185", "0.46914038", "0.46880534", "0.4671713", "0.46677125", "0.46638075", "0.46593273", "0.46593273", "0.46585456", "0.46575877", "0.46512797", "0.4643456", "0.46414968", "0.46398753", "0.4639556", "0.4634318", "0.46300277", "0.4623483", "0.4622765", "0.46216077", "0.46216077", "0.46214995", "0.46206528", "0.4615741" ]
0.5535028
7
expression3 [ expression2Rest ]
private Operation expression2(Scope scope, Vector queue) { Operation root = expression3(scope, queue); if (infix.contains(nextSymbol)) root = expression2Rest(root, scope, queue); return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String[] getTwoExpr(String expr, String op) {\n\t\t\n\t\tString[] exprArr = new String[2]; \n\t\t\n\t\tint commaPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, op.length() + 1, ',');\n\t\tString expr1 = expr.substring(op.length() + 1, commaPos);\n\t\texprArr[0] = expr1;\n\t\t\n\t\tint endPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, commaPos + 1, ')');\n\t\tString expr2 = expr.substring(commaPos + 1, endPos);\n\t\texprArr[1] = expr2;\n\t\t\n\t\treturn exprArr;\n\t}", "public String visit(ExpressionRest n, Object argu) \n\t{\n\t\tString _ret=null;\n\t\tMap<String, String> parameter = parameters.get(0);\n\t\t\n\t\t\n\t\tString e0 = n.f1.accept(this, argu);\n\t\tif (parameter.containsValue(e0) \n\t\t\t\t&& ((parameters.size() <= 1) \n\t\t\t\t|| n.f1.accept(this, parameters.subList(1, parameters.size()-1)) != null))\n\t\t{\n\t\t\t_ret = e0;\n\t\t}\n\t return _ret;\n\t}", "public ExpressionPart parseExpressions (String[] exp, QBParser parser) {\n\t\texp = fixArray(exp);\n\t//\tSystem.out.println(\"EXPS: \" + Arrays.toString(exp));\n\t\tif(exp[0].startsWith(\"if\")){\n\t\t\tif( (exp[0].length() > 2 && !Character.isLetterOrDigit( exp[0].charAt(2) )) || exp[0].length() == 2){\n\t\t\t\tString name = ExpressionPuller.pullIfThenElse(exp, parser.getCurrentCompilingNamespace());\n\t\t\t\texp = new String[]{name};\n\t\t\t}\n\t\t}\n\t\t\n//\t\tif(exp[0].equals(\"if\")){\n//\t\t\tint thenIdx = MArrays.indexOf(exp, \"then\");\n//\t\t\tString ifPart = MArrays.concat(exp, 1, thenIdx-1);\n//\t\t\t\n//\t\t\tint elseIdx = MArrays.indexOf(exp, \"else\");\n//\t\t\tString thenPart = MArrays.concat(exp, thenIdx+1, elseIdx-thenIdx-1);\n//\t\t\t\n//\t\t\tString elsePart = MArrays.concat(exp, elseIdx+1);\n//\t\t\t\n//\t\t\tExpressionPart ifExpPart = parseExpressions(ifPart);\n//\t\t\tExpressionPart thenExpPart = parseExpressions(thenPart);\n//\t\t\tExpressionPart elseExpPart = parseExpressions(elsePart);\n//\t\t\t\n//\t\t\tExpressionPart totalIf = ExpressionPart.makePrimaryExpressionPart(null, \"if\", new ExpressionPart[]{ifExpPart});\n//\t\t\tExpressionPart totalThen = ExpressionPart.makePrimaryExpressionPart(totalIf, \"then\", new ExpressionPart[]{thenExpPart});\n//\t\t\tExpressionPart total = ExpressionPart.makePrimaryExpressionPart(totalThen, \"else\", new ExpressionPart[]{elseExpPart});\n//\t\t\n//\t\t\treturn total;\n//\t\t}\n\t\t\n\n\t\t// Go though all of the operators in order from their respective order of operations.\n\t\tfor( String[] ops : operators() ){\n\t\t\t\n\t\t\tint idx = -1;\n\t\t\t// Some operators have the same precedence, so we need to deal with that\n\t\t\tfor( String op : ops ) {\n\t\t\t\tidx = Math.max(idx, MArrays.lastIndexOf(exp, op));\n\t\t\t}\n\t\t\t\n\t\t\t// if we found one of these opeartors, then we\n\t\t\t// need to deal with it.\n\t\t\tif( idx != -1 ){\n\t\t\t\t// get the function (thats easy, it is what we just found)\n\t\t\t\tString function = exp[idx];\n\t\t\t\t\n\t\t\t\t// get all stuff before and after this point\n\t\t\t\t// the first is the caller and the second is the\n\t\t\t\t// argument believe me it works because\n\t\t\t\t// 3 * 4 / 6 + 1 * 2 - 3 ^ 2 * 2 = (3 * 4 / 6 + 1 * 2) - (3 ^ 2 * 2)\n\t\t\t\tString[] before = Arrays.copyOfRange(exp, 0, idx);\n\t\t\t\tString[] after = Arrays.copyOfRange(exp, idx + 1, exp.length);\n\t\t\t\t\n\t\t\t\t// now, using recursion we make the expression parts out of them\n\t\t\t\tExpressionPart part1 = parseExpressions( before, parser );\n\t\t\t\tExpressionPart part2 = parseExpressions( after, parser );\n\t\t\t\t\n\t\t\t\tif(function.equals(\"->\")){\n\t\t\t\t\tExpressionPart tmp = part1;\n\t\t\t\t\tpart1 = part2;\n\t\t\t\t\tpart2 = tmp;\n\t\t\t\t}\n\t\t\t\t// now put the whole thing together, and you now have a mess\n\t\t\t\treturn ExpressionPart.makePrimaryExpressionPart(part1, function, new ExpressionPart[]{part2} );\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// If there are no more \"Binary Functions\"\n\t\t// what is left must be grouped or it must be a function\n\t\tif( exp.length == 1 ){\n\t\t\tString str = exp[0];\n\t\t\tif( completelySurrounded(str) ){\n\t\t\t\tString middle = str.substring(1, str.length() - 1);\n\t\t\t\treturn parseExpressions(middle);\n\t\t\t}\n\t\t\t// This must then be a function\n\t\t\telse if(str.endsWith(\")\")){\n\t\t\t\t\n\t\t\t\t// this function will get the last index of a dot ('.') that is outside parenthesis\n\t\t\t\t// the dot is used to determine if the function is being called by an object\n\t\t\t\tint dotIdx = lastDotIndex(str);\n\t\t\t\t\n\t\t\t\t// now we find the index that the arguments start on\n\t\t\t\tint idx = str.indexOf('(',dotIdx);\n\t\t\t\t\n\t\t\t\t// check to make sure there is one.\n\t\t\t\tif( idx < 0 ){\n\t\t\t\t\tthrow new RuntimeException(\"Expected '('\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from here it is pretty straight forward to get the function,\n\t\t\t\t// caller and parameters.\n\t\t\t\tString function = str.substring(0, idx);\n\t\t\t\tString args = str.substring(idx + 1, str.length() - 1);\n\t\t\t\tString caller = null;\n\t\t\t\t\n\t\t\t\t// if there is not dot, then there is no caller and the function is global\n\t\t\t\tif( dotIdx >= 0 ){\n\t\t\t\t\tcaller = function.substring( 0, dotIdx );\n\t\t\t\t\tfunction = function.substring( dotIdx + 1 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now use recursion to build the parts and make a new part.\n\t\t\t\tExpressionPart part1 = caller !=null ? parseExpressions(caller) : null;\n\t\t\t\tExpressionPart[] parts = parseParams(args);\n\t\t\t\t\n\t\t\t\treturn ExpressionPart.makePrimaryExpressionPart(part1, function, parts);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t// This is the base case, the very bottom of the ladder, this is where all\n\t\t\t\t// that is left is some entity that has no function.\n\t\t\t\treturn ExpressionPart.makeExpressionPart(exp[0]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new RuntimeException(\"Syntax Error\");\n\t}", "private static int evaluateExpression(String expression, int number1, int number2){\n if(expression.equals(\"plus\")){\n \treturn (number1 + number2);\n }else if(expression.equals(\"minus\")){\n \treturn (number1 - number2);\n }else if(expression.equals(\"times\")){\n \treturn(number1 * number2);\n }else if(expression.equals(\"divide\")){\n \treturn(number1 / number2);\n }\n return 0;\n \n }", "public ArrayAccess(PrimaryExpression e1, Expression e2)\r\n {\r\n\tsetExpression(e1);\r\n\tsetAccessExpression(e2);\r\n }", "public Arginfo visit(ExpressionRest n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n n.f1.accept(this, argu);\n return _ret;\n }", "public Expression(Expression exp1, Operator op, Expression exp2) {\r\n\t\t// Remember, this is in postfix notation.\r\n\t\telements.addAll(exp1.elements);\r\n\t\telements.addAll(exp2.elements);\r\n\t\telements.add(op);\r\n\t}", "public static BinaryExpression addAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "EvaluatorException mo19168b(String str, String str2, int i, String str3, int i2);", "public static BinaryExpression andAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static BinaryExpression add(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public static int expression()\r\n {\r\n //get the start state of this term\r\n int r,t1,f1;\r\n t1=r=term();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if this is concatenation\r\n if(expression.charAt(index)=='.'||isVocab(expression.charAt(index))||expression.charAt(index)=='\\\\'\r\n ||expression.charAt(index)=='['||expression.charAt(index)=='(')\r\n {\r\n //get the start state of this expression and\r\n //update next1 and next2\r\n int t2,cur;\r\n cur=state-1;\r\n t2=expression();\r\n if(stateList.get(cur).getNext1()==stateList.get(cur).getNext2())\r\n {\r\n stateList.get(cur).setNext1(t2);\r\n }\r\n stateList.get(cur).setNext2(t2);\r\n\r\n }\r\n\r\n //if there is no more input, we are done\r\n if(index>=expression.length())\r\n {\r\n return r;\r\n }\r\n\r\n //if this is alternation\r\n if(expression.charAt(index)=='|')\r\n {\r\n //if there is nothing after '|', it is a invalid expression\r\n index++;\r\n if(index>expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n //create a branch state,set the nex1 of the branch state to the term\r\n //so a|b and a|b|c both work\r\n int t2;\r\n f1=state-1;\r\n\r\n state st=new state(state,\"BR\",t1,-1);\r\n stateList.add(st);\r\n r=state;\r\n state++;\r\n\r\n //get the start state of this expression\r\n t2=expression();\r\n\r\n //update the branch state's next2 to the start state of the expression\r\n stateList.get(f1+1).setNext2(t2);\r\n\r\n //update term's next1 and next2\r\n if(stateList.get(f1).getNext1()==stateList.get(f1).getNext2())\r\n {\r\n stateList.get(f1).setNext1(state);\r\n }\r\n stateList.get(f1).setNext2(state);\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "@Override\n\tpublic Number operate(Number expr1) {\n\t\treturn null;\n\t}", "public final void rule__Expression2__Expression2Assignment_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17900:1: ( ( ruleExpression2 ) )\r\n // InternalGo.g:17901:2: ( ruleExpression2 )\r\n {\r\n // InternalGo.g:17901:2: ( ruleExpression2 )\r\n // InternalGo.g:17902:3: ruleExpression2\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpression2Access().getExpression2Expression2ParserRuleCall_1_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpression2Access().getExpression2Expression2ParserRuleCall_1_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "private static String[] get3LetExpr(String expr, String op) {\n\t\tString[] exprArr = new String[3]; \n\t\t\n\t\tint commaPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, op.length() + 1, ',');\n\t\tString label = expr.substring(op.length() + 1, commaPos);\n\t\texprArr[0] = label;\n\t\tif(logger.isDebugEnabled()){\n\t\t\tlogger.debug(\"let label = \" + label);\n\t\t}\n\t\t\n\t\tint secondCommaPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, commaPos + 1, ',');\n\t\tString expr1 = expr.substring(commaPos + 1, secondCommaPos);\n\t\texprArr[1] = expr1;\n\t\t\n\t\tif(logger.isDebugEnabled()){\n\t\t\tlogger.debug(\"let expr1 = \" + expr1);\n\t\t}\n\t\t\n\t\tint endPos = SyntaxChecker.checkMatchedParansAndReturnNextDelim(expr, secondCommaPos + 1, ')');\n\t\tString expr2 = expr.substring(secondCommaPos + 1, endPos);\n\t\texprArr[2] = expr2;\n\t\tif(logger.isDebugEnabled()){\n\t\t\tlogger.debug(\"let expr2 = \" + expr2);\n\t\t}\n\t\t\n\t\treturn exprArr;\n\t\n\t}", "public Expression substitute(Expression _e1, Expression _e2) {\n\t\t//Util.dump(toString());\n\t\tfor (int i = 0; i < quantificators.length; i++) {\n\t\t\t/*Expression boundExpr = quantificators[i].getBoundVar();\n\t\t\tif (_e.equals(boundExpr)) {\n\t\t\t\treturn this;\n\t\t\t}*/\n\t\t\tquantificators[i].substitute(_e1, _e2);\n\t\t}\n\t\tExpression[] subformula = getSubExpressions();\n\t\tsubformula[0] = subformula[0].substitute(_e1,_e2);\n\t\treturn this;\n\t}", "public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }", "public final void rule__ExpressionList__Expression2Assignment_2_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17825:1: ( ( ruleExpression ) )\r\n // InternalGo.g:17826:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:17826:2: ( ruleExpression )\r\n // InternalGo.g:17827:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpressionListAccess().getExpression2ExpressionParserRuleCall_2_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpressionListAccess().getExpression2ExpressionParserRuleCall_2_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static BlockExpression block(Expression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "private double evaluarExp2() throws Excepciones{\n char op;\n double resultado;\n double resultadoParcial;\n resultado = evaluarExp3();\n while((op = token.charAt(0)) == '+' || op == '-') {\n obtieneToken();\n resultadoParcial = evaluarExp3();\n switch(op) {\n case '-':\n resultado = resultado - resultadoParcial;\n break;\n case '+':\n resultado = resultado + resultadoParcial;\n break;\n } \n }\n return resultado;\n }", "public final void rule__Slice__Expression2Assignment_0_4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18335:1: ( ( ruleExpression ) )\r\n // InternalGo.g:18336:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:18336:2: ( ruleExpression )\r\n // InternalGo.g:18337:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSliceAccess().getExpression2ExpressionParserRuleCall_0_4_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSliceAccess().getExpression2ExpressionParserRuleCall_0_4_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Test\n\tpublic void expression1() throws SyntaxException, LexicalException {\n\t\tString input = \"2\";\n\t\tshow(input);\n\t\tScanner scanner = new Scanner(input).scan();\n\t\tshow(scanner);\n\t\tSimpleParser parser = new SimpleParser(scanner);\n\t\tparser.expression(); // Call expression directly.\n\t}", "SEIntegerVariable getOperand2();", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "String getExpression();", "String getExpression();", "public static void main(String[] args) {\n\n System.out.println(\"119.1+(28.2+37.3*(46.4-55.5)-4.6+(3/2)+1) = \" + evaluateExpression(\"119.1 + ( 28.2 + 37.3 * ( 46.4 - 55.5 ) - 4.6 + ( 3 / 2 ) + 1 )\"));\n\n}", "public static BlockExpression block(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void rule__Assignment__Expressionlist2Assignment_3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17315:1: ( ( ruleExpressionList ) )\r\n // InternalGo.g:17316:2: ( ruleExpressionList )\r\n {\r\n // InternalGo.g:17316:2: ( ruleExpressionList )\r\n // InternalGo.g:17317:3: ruleExpressionList\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getAssignmentAccess().getExpressionlist2ExpressionListParserRuleCall_3_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpressionList();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getAssignmentAccess().getExpressionlist2ExpressionListParserRuleCall_3_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public Object getExpression();", "public char[] evaluateExpression(char[] binaryStr1, String op, char[] binaryStr2) {\n\t\t// TODO: Implement this method.\n\t\treturn binaryStr1;\n\t}", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "private void stage1_2() {\n\n\t\tString s = \"E $:( 3E0 , 3E0 ) ( $:( 3E0 , 3E0 ) \";\n\n//\t s = SymbolicString.makeConcolicString(s);\n\t\tStringReader sr = new StringReader(s);\n\t\tSystem.out.println(s);\n\t\tFormula formula = new Formula(s);\n\t\tMap<String, Decimal> actual = formula.getVariableValues();\n\t}", "public static BinaryExpression andAlso(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "Expr expr();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "@Override\n public void execute() {\n\n String value=\"\";\n ////System.out.println(expCtx.printBlock().printExtra().arrayCall().getText());\n boolean chh = false;\n try {\n chh = expCtx.printBlock().printExtra().expression().assignmentExpression().assignment().additiveExpression().multiplicativeExpression().unaryExpression().unaryExpressionNotPlusMinus().postfixExpression().primary().arrayCall()!=null;\n }catch (NullPointerException e){\n\n }\n if (expCtx.printBlock().printExtra().arrayCall()!=null\n ||chh){\n //System.out.println(\"FOUND ARRAY\");\n List<Integer> matchList = new ArrayList<Integer>();\n Pattern regex = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n //System.out.println(expCtx.printBlock().getText());\n Matcher regexMatcher = regex.matcher(expCtx.printBlock().getText());\n List<Integer> dummy = null;\n while (regexMatcher.find()) {//Finds Matching Pattern in String\n //System.out.println(\"IN MATCHER\");\n //System.out.println(ClypsCustomVisitor.testingExpression(regexMatcher.group(1).trim(), dummy, expCtx.start.getLine()));\n matchList.add(Integer.parseInt(ClypsCustomVisitor.testingExpression(regexMatcher.group(1).trim(), dummy, expCtx.start.getLine())));//Fetching Group from String\n }\n value = ClypsCustomVisitor.testingExpression(expCtx.printBlock().getText(), matchList, expCtx.start.getLine());\n //System.out.println(value);\n }else {\n //System.out.println(\"NOT ARRAY\");\n List<Integer> dummy = null;\n value = ClypsCustomVisitor.testingExpression(expCtx.printBlock().getText(), dummy, expCtx.start.getLine());\n //System.out.println(value);\n }\n\n if (value.contains(\"\\\"\")&&value.matches(\".*[a-zA-Z]+.*\")&&value.matches(\".*[0-9]+.*\")){\n //System.out.println(\"WE IN\");\n String[] temp = value.split(\"\\\\+\");\n ArrayList<String> store = new ArrayList<>();\n for (int i = 0;i<temp.length;i++){\n try {\n store.add(new Expression(temp[i]).eval().toPlainString());\n }catch (NullPointerException e){\n store.add(temp[i]);\n }\n }\n String send=\"\";\n for (String i:store){\n //System.out.println(i);\n send=send.concat(i);\n }\n //System.out.println(\"WE OUT\");\n //System.out.println(send);\n\n send=send.replaceAll(\"\\\"\",\"\").replaceAll(\"\\\\+\",\"\");\n ////System.out.println(\"ACTUAL PRINT\");\n if (expCtx.printHead().getText().contains(\"ln\"))\n System.out.println(send);\n else\n System.out.print(send);\n }else {\n //System.out.println(\"YEP\");\n //CAUTION: REPLACES ALL + SIGNS\n value=value.replaceAll(\"\\\"\",\"\").replaceAll(\"\\\\+\",\"\");\n ////System.out.println(\"ACTUAL PRINT\");\n if (expCtx.printHead().getText().contains(\"ln\"))\n System.out.println(value);\n else\n System.out.print(value);\n }\n\n\n\n\n\n }", "public static String parseExpressionForSecondFraction(String expression) {\n int space = expression.indexOf(\" \");\n String frac1 = expression.substring(0, space);\n String operator = expression.substring(space + 1, space + 2);\n int length = expression.length();\n String frac2 = expression.substring(space + 3, length);\n return frac2;\n }", "public static BlockExpression block(Expression expression0, Expression expression1, Expression expression2, Expression expression3) { throw Extensions.todo(); }", "public static BinaryExpression andAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression) { throw Extensions.todo(); }", "public static BinaryExpression add(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "Expression createExpression();", "FullExpression createFullExpression();", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression0, LambdaExpression lambdaExpression1) { throw Extensions.todo(); }", "public final void rule__Expression__ExpAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:17855:1: ( ( ruleExpression2 ) )\r\n // InternalGo.g:17856:2: ( ruleExpression2 )\r\n {\r\n // InternalGo.g:17856:2: ( ruleExpression2 )\r\n // InternalGo.g:17857:3: ruleExpression2\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpressionAccess().getExpExpression2ParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpressionAccess().getExpExpression2ParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void parseExpression() {\n String regex = \"[ ]\";\n //\"?<=[-+*/()ep])|(?=[-+*/()ei]\";\n String[] splitString = infix.split(regex);\n infixList.addAll(Arrays.asList(splitString));\n }", "public static ConditionalExpression condition(Expression expression0, Expression expression1, Expression expression2) { throw Extensions.todo(); }", "@Test\r\n\tpublic void testProcessPass3()\r\n\t{\t\t\r\n\t\tToken t1 = new Token(TokenTypes.EXP4.name(), 1, null);\r\n\t\tToken t2 = new Token(TokenTypes.OP4.name(), 1, null);\r\n\t\tToken t3 = new Token(TokenTypes.EXP5.name(), 1, null);\r\n\t\tArrayList<Token> tkns = new ArrayList<Token>();\r\n\t\ttkns.add(t1);\r\n\t\ttkns.add(t2);\t\t\t\r\n\t\ttkns.add(t3);\r\n\t\t\r\n\t\tToken t4 = new Token(TokenTypes.EXP4.name(), 1, tkns);\r\n\r\n\t\tToken.pass3(t4);\r\n\t\t\r\n\t\tassertEquals(t4.getCode().toString(), \"OP4.getOperater(), EXP4_B.getValue() ,EXP5.getValue() , EXP4_A.setValue(result)\");\r\n\t\t\r\n\t}", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "public static BinaryExpression divideAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final EObject ruleExpression_2() throws RecognitionException {\n EObject current = null;\n int ruleExpression_2_StartIndex = input.index();\n EObject this_Expression_3_0 = null;\n\n Enumerator lv_op_2_0 = null;\n\n EObject lv_rhs_3_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 88) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3864:28: ( (this_Expression_3_0= ruleExpression_3 ( () ( (lv_op_2_0= ruleEqualityOperator ) ) ( (lv_rhs_3_0= ruleExpression_3 ) ) )* ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3865:1: (this_Expression_3_0= ruleExpression_3 ( () ( (lv_op_2_0= ruleEqualityOperator ) ) ( (lv_rhs_3_0= ruleExpression_3 ) ) )* )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3865:1: (this_Expression_3_0= ruleExpression_3 ( () ( (lv_op_2_0= ruleEqualityOperator ) ) ( (lv_rhs_3_0= ruleExpression_3 ) ) )* )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3866:2: this_Expression_3_0= ruleExpression_3 ( () ( (lv_op_2_0= ruleEqualityOperator ) ) ( (lv_rhs_3_0= ruleExpression_3 ) ) )*\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getExpression_2Access().getExpression_3ParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleExpression_3_in_ruleExpression_27750);\n this_Expression_3_0=ruleExpression_3();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_Expression_3_0;\n afterParserOrEnumRuleCall();\n \n }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3877:1: ( () ( (lv_op_2_0= ruleEqualityOperator ) ) ( (lv_rhs_3_0= ruleExpression_3 ) ) )*\n loop67:\n do {\n int alt67=2;\n alt67 = dfa67.predict(input);\n switch (alt67) {\n \tcase 1 :\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3877:2: () ( (lv_op_2_0= ruleEqualityOperator ) ) ( (lv_rhs_3_0= ruleExpression_3 ) )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3877:2: ()\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3878:2: \n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t /* */ \n \t \t\n \t }\n \t if ( state.backtracking==0 ) {\n\n \t current = forceCreateModelElementAndSet(\n \t grammarAccess.getExpression_2Access().getEqualityExpressionLhsAction_1_0(),\n \t current);\n \t \n \t }\n\n \t }\n\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3886:2: ( (lv_op_2_0= ruleEqualityOperator ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3887:1: (lv_op_2_0= ruleEqualityOperator )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3887:1: (lv_op_2_0= ruleEqualityOperator )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3888:3: lv_op_2_0= ruleEqualityOperator\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getExpression_2Access().getOpEqualityOperatorEnumRuleCall_1_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleEqualityOperator_in_ruleExpression_27783);\n \t lv_op_2_0=ruleEqualityOperator();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getExpression_2Rule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"op\",\n \t \t\tlv_op_2_0, \n \t \t\t\"EqualityOperator\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3904:2: ( (lv_rhs_3_0= ruleExpression_3 ) )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3905:1: (lv_rhs_3_0= ruleExpression_3 )\n \t {\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3905:1: (lv_rhs_3_0= ruleExpression_3 )\n \t // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:3906:3: lv_rhs_3_0= ruleExpression_3\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getExpression_2Access().getRhsExpression_3ParserRuleCall_1_2_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleExpression_3_in_ruleExpression_27804);\n \t lv_rhs_3_0=ruleExpression_3();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getExpression_2Rule());\n \t \t }\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"rhs\",\n \t \t\tlv_rhs_3_0, \n \t \t\t\"Expression_3\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop67;\n }\n } while (true);\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 88, ruleExpression_2_StartIndex); }\n }\n return current;\n }", "public T expr(final Expression expression) {\r\n\t\tif (expression.values() == null)\r\n\t\t\treturn expr(expression.expression());\r\n\t\treturn expr(expression.expression(), expression.values()\r\n\t\t\t\t.toArray());\r\n\t}", "public Expression getE1() {\r\n return e1;\r\n }", "private String reduceOperation(String op1, String opd, String op2, StringBuffer expr) {\r\n if (opd == null) {\r\n if (op1 == null || op2 == null) {\r\n return null;\r\n } else if (\"AND\".equals(op1) && \"AND\".equals(op2)) {\r\n return \"AND\";\r\n } else {\r\n return \"OR\";\r\n }\r\n } else {\r\n if (op1 != null) {\r\n expr.append(op1).append(\" \");\r\n }\r\n expr.append(opd).append(\" \");\r\n return op2;\r\n }\r\n }", "public Or(Expression e1, Expression e2) {\n this.e1 = e1;\n this.e2 = e2;\n }", "FunctionAsAttribute listeExpressions(FunctionAsAttribute ff) throws EvaluatorException {\r\n FunctionAsAttribute ret = ff;\r\n if (ArithmeticExpressionEvaluator.isStartOfArithmeticExpression(actualSymbol()) /*&& lookafterSymbol().type() != SymboleTypes.DOUBLEPOINT*/) {\r\n CombinedReturnObject recNum = eAE.expression();\r\n //----addNew\r\n\r\n ret.listOfCombined.addAll(recNum.asArrayList());\r\n //----addNew\r\n //----Ancient\r\n //ret.listOfCombined.add(recNum);\r\n //----Ancient\r\n\r\n if (actualSymbol().type() == SymboleTypes.COMMA || actualSymbol().type() == SymboleTypes.CLOSEDPARENTHESIS) {\r\n ret = listeExpression2(ret);\r\n } else {\r\n throw new UnexpectedSymbolExceptionExpectedAnotherArgumentOrAClosedParenthesis(actualSymbol());\r\n }\r\n } /*else if (((actualSymbol().type() == SymboleTypes.VARIABLE) && (lookafterSymbol().type() == SymboleTypes.DOUBLEPOINT))) {\r\n Symbol varsymb = actualSymbol();\r\n nextSymbol();\r\n nextSymbol();\r\n if (actualSymbol().type() == SymboleTypes.VARIABLE) {\r\n Symbol varsymb2 = actualSymbol();\r\n nextSymbol();\r\n ff.listOfCombined = eAE.myEvaluator().getVariableFamilyValues(varsymb.stringValue(), varsymb2.stringValue());\r\n } else {\r\n System.out.println(\"Expected a variable and found - \" + actualSymbol().toString());\r\n throw new UnexpectedSymbolException(actualSymbol());\r\n }\r\n }*/ else if (actualSymbol().type() == SymboleTypes.CLOSEDPARENTHESIS) {\r\n ret = ff;\r\n } else {\r\n\r\n //System.out.println(\"FNCError ! - \" + actualSymbol());\r\n throw new BadParenthesizedExpectedClosedException(actualSymbol());\r\n }\r\n return ret;\r\n }", "public void testNested3() throws Exception {\n String contents = \n \"(8 ?: 7) + (8 ?: 7)\";\n assertType(contents, \"java.lang.Integer\");\n }", "Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}", "public static BinaryExpression and(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public List<Expression> getSubExpressions();", "public static void expression(CommonTree ast, IRTree irt)\n {\n CommonTree ast1;\n IRTree irt1 = new IRTree();\n Token t = ast.getToken();\n int tt = t.getType();\n if (tt == REALNUM) {\n constant(ast, irt1);\n irt.setOp(\"CONST\");\n irt.addSub(irt1);\n }\n else if(tt == PLUS || tt == MINUS || tt == TIMES || tt == DIVIDE)\n {\n //do something\n irt.setOp(\"BINOP\");\n IRTree irt2 = new IRTree();\n expression((CommonTree)ast.getChild(0), irt1);\n expression((CommonTree)ast.getChild(1), irt2);\n\tif(tt == PLUS)\n \t\t irt.addSub(new IRTree(\"+\")); \n\telse if(tt == MINUS)\n\t\tirt.addSub(new IRTree(\"-\"));\n\telse if(tt == TIMES)\n\t\tirt.addSub(new IRTree(\"*\"));\n\telse if(tt == DIVIDE)\n\t\tirt.addSub(new IRTree(\"/\"));\n irt.addSub(irt1);\n irt.addSub(irt2);\n }\n else\n\tSystem.out.println(\"unrecognised type \" + tt);\n }", "final public Expression TriplesNode(Exp stack) throws ParseException {\n Expression expression1;\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ATLIST:\n case ATPATH:\n case LPAREN:\n case AT:\n expression1 = Collection(stack);\n break;\n case LBRACKET:\n expression1 = BlankNodePropertyList(stack);\n break;\n default:\n jj_la1[224] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n {if (true) return expression1;}\n throw new Error(\"Missing return statement in function\");\n }", "public final void rule__Slice__ExpressionAssignment_0_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18320:1: ( ( ruleExpression ) )\r\n // InternalGo.g:18321:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:18321:2: ( ruleExpression )\r\n // InternalGo.g:18322:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSliceAccess().getExpressionExpressionParserRuleCall_0_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSliceAccess().getExpressionExpressionParserRuleCall_0_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static BinaryExpression andAlso(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public void visit (Object expr) {\n\t\t\t\n\t\t\toffset += 2;\n\t\t\t\n\t\t\tif (expr instanceof VariableReferenceExpr) {\n\t\t\t\tvisit ( (VariableReferenceExpr) expr);\n\t\t\t} else if (expr instanceof UnionExpr) {\n\t\t\t\tvisit ( (UnionExpr) expr);\n\t\t\t} else if ( expr instanceof UnaryExpr) {\n\t\t\t\tvisit ( (UnaryExpr) expr);\n\t\t\t} else if ( expr instanceof TextNodeStep ) {\n\t\t\t\tvisit ( (TextNodeStep) expr) ;\n\t\t\t} else if ( expr instanceof RelationalExpr) {\n\t\t\t\tvisit ( (RelationalExpr) expr);\n\t\t\t} else if ( expr instanceof ProcessingInstructionNodeStep) {\n\t\t\t\tvisit ( (ProcessingInstructionNodeStep) expr) ;\n\t\t\t} else if ( expr instanceof Predicate) {\n\t\t\t\tvisit ( (Predicate) expr );\n\t\t\t} else if ( expr instanceof PathExpr) {\n\t\t\t\tvisit ( (PathExpr) expr) ;\n\t\t\t} else if ( expr instanceof NumberExpr) {\n\t\t\t\tvisit ( (NumberExpr) expr);\n\t\t\t} else if ( expr instanceof NameStep) {\n\t\t\t\tvisit ( (NameStep) expr);\n\t\t\t} else if ( expr instanceof MultiplicativeExpr) {\n\t\t\t\tvisit ( (MultiplicativeExpr) expr);\n\t\t\t} else if ( expr instanceof LogicalExpr) {\n\t\t\t\tvisit ( (LogicalExpr) expr);\n\t\t\t} else if ( expr instanceof LocationPath) {\n\t\t\t\tvisit ( (LocationPath) expr);\n\t\t\t} else if ( expr instanceof LiteralExpr) {\n\t\t\t\tvisit ( (LiteralExpr) expr);\n\t\t\t} else if ( expr instanceof FunctionCallExpr) {\n\t\t\t\tvisit ( (FunctionCallExpr) expr);\n\t\t\t} else if ( expr instanceof FilterExpr) {\n\t\t\t\tvisit ( (FilterExpr) expr);\n\t\t\t} else if ( expr instanceof EqualityExpr) {\n\t\t\t\tvisit ( (EqualityExpr) expr);\n\t\t\t} else if ( expr instanceof CommentNodeStep) {\n\t\t\t\tvisit ( (CommentNodeStep)expr);\n\t\t\t} else if ( expr instanceof AllNodeStep) {\n\t\t\t\tvisit ( (AllNodeStep) expr);\n\t\t\t} else if ( expr instanceof AdditiveExpr) {\n\t\t\t\tvisit ( (AdditiveExpr) expr);\n\t\t\t} else if (expr instanceof List) {\n\t\t\t\tvisitList((List)expr);\n\t\t\t} else if (expr != null) {\n\t\t\t\tout(\"Panic: Unknown expression kind {0} \",expr.getClass().getName()); //$NON-NLS-1$\n\t\t\t} else {\n\t\t\t\tout(\"null - unset\");\n\t\t\t}\n\t\t\t\n\t\t\toffset -= 2;\n\t\t}", "public static int evaluateExpression(String expression) {\r\n // Create operandStack of ints to store operands\r\n Stack<Integer> operandStack = new Stack<>();\r\n \r\n // Create operatorStack of characters to store operators\r\n Stack<Character> operatorStack = new Stack<>();\r\n \r\n // Insert Blanks\r\n expression = insertBlanks(expression);\r\n \r\n // Extract operands and operators by splitting around blanks\r\n String[] tokens = expression.split(\" \");\r\n \r\n /* Phase 1: Scan tokens\r\n Enhanced for loop, puts every element of tokens in token each time\r\n Like writing token = tokens[i] every time\r\n */\r\n for (String token: tokens) { \r\n if(token.length() == 0) // It's a blank\r\n continue; // Go to the while loop\r\n else if (token.charAt(0) == '+' || token.charAt(0) == '-') {\r\n // process all +, -, *, / in the top of the operator stack\r\n while (!operatorStack.isEmpty() && // While stack isn't empty\r\n (operatorStack.peek() == '+' || // and has an operator on top\r\n operatorStack.peek() == '-' || // Like if you had (2 * 3) + 5 \r\n operatorStack.peek() == '*' || // Or if you had (2 - 3) + 5, do that last no matter what b/c +- is lowest priority\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n // After processing the all the previous operations, push the +- operator onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '*' || token.charAt(0) == '/') {\r\n // Proess all *, / in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '*' ||\r\n operatorStack.peek() == '/' ||\r\n operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the * or / onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if (token.charAt(0) == '^') {\r\n // Proess all ^ in the top of the operator stack\r\n while(!operatorStack.isEmpty() &&\r\n (operatorStack.peek() == '^')) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n //Push the ^ onto the stack\r\n operatorStack.push(token.charAt(0));\r\n }\r\n else if(token.trim().charAt(0) == '(') {\r\n operatorStack.push('(');\r\n } \r\n else if(token.trim().charAt(0) == ')') {\r\n while(operatorStack.peek() != '(') {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n operatorStack.pop(); // pop\r\n }\r\n else {\r\n operandStack.push(new Integer(token));\r\n }\r\n }\r\n // Phase two: process everything left over\r\n while (!operatorStack.isEmpty()) {\r\n processAnOperator(operandStack, operatorStack);\r\n }\r\n \r\n return operandStack.pop(); \r\n }", "public String evaluate(ArrayList<String> expression)\n {\n Stack<String> Values = new Stack<String>(), Operations = new Stack<String>();\n\n for (int i = 0; i < expression.size(); i++)\n\t\t{\n\t\t\tif (expression.get(i).equals(\"(\"))\n Operations.push(expression.get(i));\n else if (expression.get(i).equals(\")\"))\n {\n while (Operations.peek().equals(\"(\"))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.pop();\n }\n else if (expression.get(i).equals(\"+\") || expression.get(i).equals(\"-\") || expression.get(i).equals(\"*\") || expression.get(i).equals(\"/\"))\n {\n while (!Operations.empty() && precedence(expression.get(i), Operations.peek()))\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n Operations.push(expression.get(i));\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\tValues.push(expression.get(i));\n\t\t\t}\n }\n while (!Operations.empty())\n Values.push(apply(Operations.pop(), Values.pop(), Values.pop()));\n return Values.pop();\n }", "public static BinaryExpression leftShiftAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "public MType visit(ExpressionRest n, MType argu) {\n \tMType _ret=null;\n \tn.f1.accept(this, argu);\n \treturn _ret;\n }", "public Node expression()\r\n\t{\r\n\t\tNode lhs = term();\r\n\t\tif(lhs!=null)\r\n\t\t{\r\n\t\t\tint index = lexer.getPosition();\r\n\t\t\tLexer.Token token = lexer.getToken();\r\n\t\t\twhile(token == Lexer.Token.PLUS\r\n\t\t\t\t||token == Lexer.Token.MINUS)\r\n\t\t\t{\r\n\t\t\t\tNode rhs = term(); \r\n\t\t\t\tif(rhs!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(token == Lexer.Token.PLUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Add(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(token == Lexer.Token.MINUS)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlhs = new Sub(lhs,rhs);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = lexer.getPosition();\r\n\t\t\t\t\ttoken = lexer.getToken();\r\n\t\t\t\t}\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\tlexer.setPosition(index);\r\n\t\t}\r\n\t\treturn lhs;\r\n\t}", "public final ManchesterOWLSyntaxAutoComplete.expression_return expression() {\n ManchesterOWLSyntaxAutoComplete.expression_return retval = new ManchesterOWLSyntaxAutoComplete.expression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.conjunction_return c = null;\n ManchesterOWLSyntaxAutoComplete.expression_return chainItem = null;\n ManchesterOWLSyntaxAutoComplete.conjunction_return conj = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return cpe = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:106:2:\n // ( ^( DISJUNCTION (c= conjunction )+ ) | ^( PROPERTY_CHAIN\n // (chainItem= expression )+ ) | conj= conjunction | cpe=\n // complexPropertyExpression )\n int alt4 = 4;\n switch (input.LA(1)) {\n case DISJUNCTION: {\n alt4 = 1;\n }\n break;\n case PROPERTY_CHAIN: {\n alt4 = 2;\n }\n break;\n case IDENTIFIER:\n case ENTITY_REFERENCE:\n case CONJUNCTION:\n case NEGATED_EXPRESSION:\n case SOME_RESTRICTION:\n case ALL_RESTRICTION:\n case VALUE_RESTRICTION:\n case CARDINALITY_RESTRICTION:\n case ONE_OF: {\n alt4 = 3;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt4 = 4;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 4, 0, input);\n throw nvae;\n }\n switch (alt4) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:4:\n // ^( DISJUNCTION (c= conjunction )+ )\n {\n match(input, DISJUNCTION, FOLLOW_DISJUNCTION_in_expression226);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:19:\n // (c= conjunction )+\n int cnt2 = 0;\n loop2: do {\n int alt2 = 2;\n int LA2_0 = input.LA(1);\n if (LA2_0 >= IDENTIFIER && LA2_0 <= ENTITY_REFERENCE\n || LA2_0 == CONJUNCTION || LA2_0 == NEGATED_EXPRESSION\n || LA2_0 >= SOME_RESTRICTION && LA2_0 <= ONE_OF) {\n alt2 = 1;\n }\n switch (alt2) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:107:21:\n // c= conjunction\n {\n pushFollow(FOLLOW_conjunction_in_expression235);\n c = conjunction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(c.node.getCompletions());\n }\n }\n break;\n default:\n if (cnt2 >= 1) {\n break loop2;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(2, input);\n throw eee;\n }\n cnt2++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:6:\n // ^( PROPERTY_CHAIN (chainItem= expression )+ )\n {\n match(input, PROPERTY_CHAIN, FOLLOW_PROPERTY_CHAIN_in_expression248);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:24:\n // (chainItem= expression )+\n int cnt3 = 0;\n loop3: do {\n int alt3 = 2;\n int LA3_0 = input.LA(1);\n if (LA3_0 >= IDENTIFIER && LA3_0 <= ENTITY_REFERENCE\n || LA3_0 >= DISJUNCTION && LA3_0 <= NEGATED_EXPRESSION\n || LA3_0 >= SOME_RESTRICTION && LA3_0 <= ONE_OF\n || LA3_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n alt3 = 1;\n }\n switch (alt3) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:110:25:\n // chainItem= expression\n {\n pushFollow(FOLLOW_expression_in_expression256);\n chainItem = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(chainItem.node\n .getCompletions());\n }\n }\n break;\n default:\n if (cnt3 >= 1) {\n break loop3;\n }\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n EarlyExitException eee = new EarlyExitException(3, input);\n throw eee;\n }\n cnt3++;\n } while (true);\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:114:5:\n // conj= conjunction\n {\n pushFollow(FOLLOW_conjunction_in_expression276);\n conj = conjunction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(conj.node\n .getCompletions());\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:118:5:\n // cpe= complexPropertyExpression\n {\n pushFollow(FOLLOW_complexPropertyExpression_in_expression291);\n cpe = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(cpe.node\n .getCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "Expression getExp();", "public final void rule__ReturnStmt__ExpressionlistAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:16760:1: ( ( ruleExpressionList ) )\r\n // InternalGo.g:16761:2: ( ruleExpressionList )\r\n {\r\n // InternalGo.g:16761:2: ( ruleExpressionList )\r\n // InternalGo.g:16762:3: ruleExpressionList\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getReturnStmtAccess().getExpressionlistExpressionListParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpressionList();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getReturnStmtAccess().getExpressionlistExpressionListParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void inputExpression(String expression, Matrix a, Matrix b) {\n\t\tif(a == null || b == null) return;\n\t\texpression = expression.replaceAll(\"\\\\s+\", \"\");\n\t\tfor(Character c : expression.trim().toCharArray())\n\t\t\tif(!(isOperator(c.toString()) || isNumber(c.toString()) \n\t\t\t\t|| isMatrix(c.toString()) || c == '(' || c == ')')) {\n\t\t\t\tthrow new IllegalArgumentException(INVALID_CHARACTER_MESSAGE);\n\t\t\t}\n\t\tif(characterCount(expression, '(') > characterCount(expression, ')'))\n\t\t\tthrow new IllegalArgumentException(\"Expecting ')'\");\n\t\telse if(characterCount(expression, '(') < characterCount(expression, ')'))\n\t\t\tthrow new IllegalArgumentException(\"Expecting '('\");\n\t\tthis.expression = expression;\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\t\n\t\tread( toReversePolishNotation( addSpaces(expression) ) );\n\t}", "public static BinaryExpression coalesce(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n\tpublic void visit(ExtractExpression arg0) {\n\t\t\n\t}", "Expression() { }", "@Override\n public String toString() {\n return \"(\" + getExpression1() + \" - \" + getExpression2() + \")\";\n }", "private Op rewriteOp1(final Op1 op1) {\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n op1.getSubOp().visit(rewriter);\n return rewriter.getResult();\n }", "public static BinaryExpression powerAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final Object expression() throws RecognitionException {\n Object result = null;\n\n\n CommonTree INTEGER15=null;\n CommonTree BOOL16=null;\n CommonTree IDENT17=null;\n Object op1 =null;\n\n Object op2 =null;\n\n Object call18 =null;\n\n\n try {\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:322:3: ( ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call ) )\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:323:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n {\n OperationExecuter oe = null;\n\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:324:3: ( ^( '+' op1= expression op2= expression ) | ^( '-' op1= expression op2= expression ) | ^( '*' op1= expression op2= expression ) | ^( '/' op1= expression op2= expression ) | ^( '%' op1= expression op2= expression ) | ^( ARITH_NEGATION op1= expression ) | ^( '||' op1= expression op2= expression ) | ^( '&&' op1= expression op2= expression ) | ^( '==' op1= expression op2= expression ) | ^( '!=' op1= expression op2= expression ) | ^( '>=' op1= expression op2= expression ) | ^( '<=' op1= expression op2= expression ) | ^( '>' op1= expression op2= expression ) | ^( '<' op1= expression op2= expression ) | ^( BOOL_NEGATION op1= expression ) | INTEGER | BOOL | IDENT | call )\n int alt14=19;\n switch ( input.LA(1) ) {\n case 32:\n {\n alt14=1;\n }\n break;\n case 34:\n {\n alt14=2;\n }\n break;\n case 31:\n {\n alt14=3;\n }\n break;\n case 35:\n {\n alt14=4;\n }\n break;\n case 29:\n {\n alt14=5;\n }\n break;\n case ARITH_NEGATION:\n {\n alt14=6;\n }\n break;\n case 50:\n {\n alt14=7;\n }\n break;\n case 30:\n {\n alt14=8;\n }\n break;\n case 39:\n {\n alt14=9;\n }\n break;\n case 28:\n {\n alt14=10;\n }\n break;\n case 41:\n {\n alt14=11;\n }\n break;\n case 37:\n {\n alt14=12;\n }\n break;\n case 40:\n {\n alt14=13;\n }\n break;\n case 36:\n {\n alt14=14;\n }\n break;\n case BOOL_NEGATION:\n {\n alt14=15;\n }\n break;\n case INTEGER:\n {\n alt14=16;\n }\n break;\n case BOOL:\n {\n alt14=17;\n }\n break;\n case IDENT:\n {\n alt14=18;\n }\n break;\n case CALL:\n {\n alt14=19;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt14) {\n case 1 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:325:4: ^( '+' op1= expression op2= expression )\n {\n match(input,32,FOLLOW_32_in_expression564); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression570);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression576);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"+\"); \n\n }\n break;\n case 2 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:326:6: ^( '-' op1= expression op2= expression )\n {\n match(input,34,FOLLOW_34_in_expression590); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression596);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression602);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"-\"); \n\n }\n break;\n case 3 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:327:6: ^( '*' op1= expression op2= expression )\n {\n match(input,31,FOLLOW_31_in_expression614); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression620);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression626);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"*\"); \n\n }\n break;\n case 4 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:328:6: ^( '/' op1= expression op2= expression )\n {\n match(input,35,FOLLOW_35_in_expression638); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression644);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression650);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"/\"); \n\n }\n break;\n case 5 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:329:6: ^( '%' op1= expression op2= expression )\n {\n match(input,29,FOLLOW_29_in_expression662); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression668);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression674);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"%\"); \n\n }\n break;\n case 6 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:330:6: ^( ARITH_NEGATION op1= expression )\n {\n match(input,ARITH_NEGATION,FOLLOW_ARITH_NEGATION_in_expression686); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression692);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"ARITH_NEGATION\"); \n\n }\n break;\n case 7 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:331:6: ^( '||' op1= expression op2= expression )\n {\n match(input,50,FOLLOW_50_in_expression710); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression716);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression722);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"||\"); \n\n }\n break;\n case 8 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:332:6: ^( '&&' op1= expression op2= expression )\n {\n match(input,30,FOLLOW_30_in_expression733); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression739);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression745);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"&&\"); \n\n }\n break;\n case 9 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:333:6: ^( '==' op1= expression op2= expression )\n {\n match(input,39,FOLLOW_39_in_expression756); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression762);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression768);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"==\"); \n\n }\n break;\n case 10 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:334:6: ^( '!=' op1= expression op2= expression )\n {\n match(input,28,FOLLOW_28_in_expression779); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression785);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression791);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"!=\"); \n\n }\n break;\n case 11 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:335:6: ^( '>=' op1= expression op2= expression )\n {\n match(input,41,FOLLOW_41_in_expression802); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression808);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression814);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">=\"); \n\n }\n break;\n case 12 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:336:6: ^( '<=' op1= expression op2= expression )\n {\n match(input,37,FOLLOW_37_in_expression825); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression831);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression837);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<=\"); \n\n }\n break;\n case 13 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:337:6: ^( '>' op1= expression op2= expression )\n {\n match(input,40,FOLLOW_40_in_expression848); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression854);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression860);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\">\"); \n\n }\n break;\n case 14 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:338:6: ^( '<' op1= expression op2= expression )\n {\n match(input,36,FOLLOW_36_in_expression872); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression878);\n op1=expression();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_expression_in_expression884);\n op2=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,op2,\"<\"); \n\n }\n break;\n case 15 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:339:6: ^( BOOL_NEGATION op1= expression )\n {\n match(input,BOOL_NEGATION,FOLLOW_BOOL_NEGATION_in_expression896); \n\n match(input, Token.DOWN, null); \n pushFollow(FOLLOW_expression_in_expression902);\n op1=expression();\n\n state._fsp--;\n\n\n match(input, Token.UP, null); \n\n\n oe = new OperationExecuter(op1,null,\"BOOL_NEGATION\"); \n\n }\n break;\n case 16 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:340:6: INTEGER\n {\n INTEGER15=(CommonTree)match(input,INTEGER,FOLLOW_INTEGER_in_expression920); \n\n oe = new OperationExecuter(localScope, (INTEGER15!=null?INTEGER15.getText():null),\"INTEGER\"); \n\n }\n break;\n case 17 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:341:6: BOOL\n {\n BOOL16=(CommonTree)match(input,BOOL,FOLLOW_BOOL_in_expression964); \n\n oe = new OperationExecuter(localScope, (BOOL16!=null?BOOL16.getText():null),\"BOOL\"); \n\n }\n break;\n case 18 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:342:6: IDENT\n {\n IDENT17=(CommonTree)match(input,IDENT,FOLLOW_IDENT_in_expression1010); \n\n oe = new OperationExecuter(localScope, (IDENT17!=null?IDENT17.getText():null),\"IDENT\"); \n\n }\n break;\n case 19 :\n // /v/filer4b/v38q001/rjnevels/Desktop/Antlr Eclipse Test/workspace3/BFlat/src/a/b/c/EvaluatorWalker.g:343:6: call\n {\n pushFollow(FOLLOW_call_in_expression1055);\n call18=call();\n\n state._fsp--;\n\n\n result = call18;\n\n }\n break;\n\n }\n\n\n if (oe != null) result = oe.doOperation();\n if (result == null)\n BFlatGUI.debugPrint(0, \"result of expression is null!\");\n \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n\n finally {\n \t// do for sure before leaving\n }\n return result;\n }", "public final void rule__Slice__Expression3Assignment_1_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18350:1: ( ( ruleExpression ) )\r\n // InternalGo.g:18351:2: ( ruleExpression )\r\n {\r\n // InternalGo.g:18351:2: ( ruleExpression )\r\n // InternalGo.g:18352:3: ruleExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getSliceAccess().getExpression3ExpressionParserRuleCall_1_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getSliceAccess().getExpression3ExpressionParserRuleCall_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public void splitExpression(String expression, String op) {\n operator = new arithmetic_op(op);\n expression = expression.trim();\n int index = expression.indexOf(op);\n left = new arithmetic_ex((expression.substring(0, index)).trim());\n right = new arithmetic_ex((expression.substring(index + 1)).trim());\n }", "private int parseExpression(Queue<String> exp) {\n int value = parseTerm(exp);\n while (exp.peek().equals(\"+\") || exp.peek().equals(\"-\")) {\n String op = exp.dequeue().getData().toString();\n if (op.equals(\"+\")) {\n value = value + parseTerm(exp);\n } else {\n value = value - parseTerm(exp);\n }\n }\n return value;\n }", "public final void rule__Arguments__Group_2_3__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5536:1: ( ( ( ( rule__Arguments__ExpressionsAssignment_2_3_1 ) ) ( ( rule__Arguments__ExpressionsAssignment_2_3_1 )* ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5537:1: ( ( ( rule__Arguments__ExpressionsAssignment_2_3_1 ) ) ( ( rule__Arguments__ExpressionsAssignment_2_3_1 )* ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5537:1: ( ( ( rule__Arguments__ExpressionsAssignment_2_3_1 ) ) ( ( rule__Arguments__ExpressionsAssignment_2_3_1 )* ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5538:1: ( ( rule__Arguments__ExpressionsAssignment_2_3_1 ) ) ( ( rule__Arguments__ExpressionsAssignment_2_3_1 )* )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5538:1: ( ( rule__Arguments__ExpressionsAssignment_2_3_1 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5539:1: ( rule__Arguments__ExpressionsAssignment_2_3_1 )\n {\n before(grammarAccess.getArgumentsAccess().getExpressionsAssignment_2_3_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5540:1: ( rule__Arguments__ExpressionsAssignment_2_3_1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5540:2: rule__Arguments__ExpressionsAssignment_2_3_1\n {\n pushFollow(FOLLOW_rule__Arguments__ExpressionsAssignment_2_3_1_in_rule__Arguments__Group_2_3__1__Impl10869);\n rule__Arguments__ExpressionsAssignment_2_3_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getArgumentsAccess().getExpressionsAssignment_2_3_1()); \n\n }\n\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5543:1: ( ( rule__Arguments__ExpressionsAssignment_2_3_1 )* )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5544:1: ( rule__Arguments__ExpressionsAssignment_2_3_1 )*\n {\n before(grammarAccess.getArgumentsAccess().getExpressionsAssignment_2_3_1()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5545:1: ( rule__Arguments__ExpressionsAssignment_2_3_1 )*\n loop32:\n do {\n int alt32=2;\n int LA32_0 = input.LA(1);\n\n if ( ((LA32_0>=RULE_INT && LA32_0<=RULE_LOWER)||LA32_0==22) ) {\n alt32=1;\n }\n\n\n switch (alt32) {\n \tcase 1 :\n \t // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5545:2: rule__Arguments__ExpressionsAssignment_2_3_1\n \t {\n \t pushFollow(FOLLOW_rule__Arguments__ExpressionsAssignment_2_3_1_in_rule__Arguments__Group_2_3__1__Impl10881);\n \t rule__Arguments__ExpressionsAssignment_2_3_1();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop32;\n }\n } while (true);\n\n after(grammarAccess.getArgumentsAccess().getExpressionsAssignment_2_3_1()); \n\n }\n\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Expression concat(Expression expr) {\r\n\t\telements.addAll(expr.elements);\r\n\t\treturn this;\r\n\t}", "public static BinaryExpression addAssignChecked(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "long addExpression(Expression expression);", "public static String evaluate( String expr )\n {\n\n\tString[] arr = expr.split(\"//s+\");\n\tString ret = \"\";\n\tALStack<String> stack = new ALStack<String>();\n\tfor( String s: arr)\n\t stack.push(s);\n\n\tif( stack.peek().equals(\"(\")){\n\t stack.pop();\n\t int operator = findOp(stack.pop());\n\t ret = unload(operator, stack);\n\t return ret;\n\t}\n\treturn \"\";\n }", "public String eval(String p1 ) {\n\t}", "@Test\n\tpublic void testBuildExpressionWithThreeArguments() {\n\t\t\n\t\tWord wordA = new Word(\"apple\", 1);\n\t\tWord wordB = new Word(\"car\", 1);\n\t\tWord wordC = new Word(\"roof\", 2);\n\t\t\n\t\tExpressionBuilder<Word> builder = new ExpressionBuilder<>();\n\t\tbuilder.append(null, wordA);\n\t\tbuilder.append(new AndOperator<Word>(), wordB);\n\t\tbuilder.append(new OrOperator<Word>(), wordC);\n\t\t\n\t\tExpression<Word> resultExpression = builder.getExpression();\n\t\t\n\t\tString expectedResult = \"((apple [1] AND car [1]) OR roof [2])\";\n\t\t\n\t\tSystem.out.println(resultExpression.evaluate());\n\t\tassertEquals(expectedResult, resultExpression.toString());\n\t\t\n\t}", "public final void entryRuleExpression2() throws RecognitionException {\r\n try {\r\n // InternalGo.g:2380:1: ( ruleExpression2 EOF )\r\n // InternalGo.g:2381:1: ruleExpression2 EOF\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getExpression2Rule()); \r\n }\r\n pushFollow(FOLLOW_1);\r\n ruleExpression2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getExpression2Rule()); \r\n }\r\n match(input,EOF,FOLLOW_2); if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public static BinaryExpression exclusiveOrAssign(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "public final void rule__Arguments__Group_2__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5408:1: ( ( ( rule__Arguments__ExpressionsAssignment_2_2 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5409:1: ( ( rule__Arguments__ExpressionsAssignment_2_2 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5409:1: ( ( rule__Arguments__ExpressionsAssignment_2_2 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5410:1: ( rule__Arguments__ExpressionsAssignment_2_2 )\n {\n before(grammarAccess.getArgumentsAccess().getExpressionsAssignment_2_2()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5411:1: ( rule__Arguments__ExpressionsAssignment_2_2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:5411:2: rule__Arguments__ExpressionsAssignment_2_2\n {\n pushFollow(FOLLOW_rule__Arguments__ExpressionsAssignment_2_2_in_rule__Arguments__Group_2__2__Impl10618);\n rule__Arguments__ExpressionsAssignment_2_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getArgumentsAccess().getExpressionsAssignment_2_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Test\n\tpublic void test3()\n\t{\n\t\tassertEquals(\n\t\t\t\"$1: (spacex|spx)\\n\" +\n\t\t\t\"$webpage: {<a=$1> b=reddit}\",\n\t\t\texplodeRulesAndCreateString(\"webpage: a=(spacex|spx) b=reddit\")\n\t\t);\n\t}", "public static BlockExpression block(Expression expression0, Expression expression1, Expression expression2, Expression expression3, Expression expression4) { throw Extensions.todo(); }" ]
[ "0.574101", "0.5719535", "0.5641727", "0.56271416", "0.55587834", "0.5546606", "0.54591465", "0.5433889", "0.5413436", "0.53979915", "0.5388574", "0.53555775", "0.5354336", "0.5351162", "0.53447264", "0.53229666", "0.532202", "0.5295287", "0.52539134", "0.52471685", "0.52471584", "0.5242904", "0.5209894", "0.5205635", "0.5184337", "0.5184337", "0.51835495", "0.5158116", "0.51376444", "0.51333314", "0.5129015", "0.5118065", "0.5111551", "0.51007545", "0.5077862", "0.5070522", "0.5070522", "0.5070522", "0.5070522", "0.5068727", "0.506465", "0.5059489", "0.50577164", "0.5054469", "0.50481796", "0.5047892", "0.50368", "0.50359553", "0.5029207", "0.50209403", "0.5012353", "0.50077206", "0.5005866", "0.50054085", "0.50026566", "0.49995533", "0.4980922", "0.49780914", "0.49759594", "0.49687502", "0.49638665", "0.4942893", "0.49409914", "0.4939858", "0.4929569", "0.4927761", "0.49231693", "0.4916744", "0.49111202", "0.4908451", "0.49063277", "0.4899953", "0.48999006", "0.48981473", "0.48921874", "0.48920795", "0.48886397", "0.48863277", "0.48775122", "0.486874", "0.4862931", "0.48553625", "0.48531836", "0.48527512", "0.48416486", "0.48407176", "0.48381072", "0.48328736", "0.48290348", "0.48151067", "0.48142534", "0.481005", "0.48053545", "0.480157", "0.47928154", "0.47852525", "0.47842047", "0.47829098", "0.4778393", "0.47747862" ]
0.6631491
0
arguments | '.' ident argumentsOpt
private void superSuffix(Operation base, Scope scope, Vector queue) { if (nextSymbol == Keyword.LPARSY) base.left.left = arguments(scope, null, queue); else { matchKeyword(Keyword.DOTSY); base = base.right = new Operation(); base.left = new Operation(); base.left.name = nextToken; matchKeyword(Keyword.IDENTSY); base.left.left = argumentsOpt(scope, null, queue); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Optional<String[]> arguments();", "void setArguments(String arguments);", "String getArguments();", "public Code visitArgumentsNode(ExpNode.ArgumentsNode node) {\n beginGen(\"Arguments\");\n Code code = new Code();\n for(ExpNode exp : node.getArgs()) {\n code.append(exp.genCode(this));\n }\n endGen(\"Arguments\");\n return code;\n }", "Argument metavar(String... metavar);", "void setArguments(List<String> arguments);", "@Override\n public int getNumberArguments() {\n return 1;\n }", "int getArgIndex();", "public final PythonParser.arglist_return arglist() throws RecognitionException {\n PythonParser.arglist_return retval = new PythonParser.arglist_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token COMMA279=null;\n Token COMMA281=null;\n Token STAR282=null;\n Token COMMA283=null;\n Token DOUBLESTAR284=null;\n Token DOUBLESTAR285=null;\n Token STAR286=null;\n Token COMMA287=null;\n Token DOUBLESTAR288=null;\n Token DOUBLESTAR289=null;\n PythonParser.test_return s = null;\n\n PythonParser.test_return k = null;\n\n PythonParser.argument_return argument278 = null;\n\n PythonParser.argument_return argument280 = null;\n\n\n PythonTree COMMA279_tree=null;\n PythonTree COMMA281_tree=null;\n PythonTree STAR282_tree=null;\n PythonTree COMMA283_tree=null;\n PythonTree DOUBLESTAR284_tree=null;\n PythonTree DOUBLESTAR285_tree=null;\n PythonTree STAR286_tree=null;\n PythonTree COMMA287_tree=null;\n PythonTree DOUBLESTAR288_tree=null;\n PythonTree DOUBLESTAR289_tree=null;\n\n\n List arguments = new ArrayList();\n List kws = new ArrayList();\n List gens = new ArrayList();\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:5: ( argument[arguments, kws, gens, true] ( COMMA argument[arguments, kws, gens, false] )* ( COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )? )? | STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )\n int alt147=3;\n switch ( input.LA(1) ) {\n case NAME:\n case LAMBDA:\n case NOT:\n case LPAREN:\n case PLUS:\n case MINUS:\n case TILDE:\n case LBRACK:\n case LCURLY:\n case BACKQUOTE:\n case INT:\n case LONGINT:\n case FLOAT:\n case COMPLEX:\n case STRING:\n {\n alt147=1;\n }\n break;\n case STAR:\n {\n alt147=2;\n }\n break;\n case DOUBLESTAR:\n {\n alt147=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 147, 0, input);\n\n throw nvae;\n }\n\n switch (alt147) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:7: argument[arguments, kws, gens, true] ( COMMA argument[arguments, kws, gens, false] )* ( COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )? )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_argument_in_arglist7394);\n argument278=argument(arguments, kws, gens, true);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, argument278.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:44: ( COMMA argument[arguments, kws, gens, false] )*\n loop142:\n do {\n int alt142=2;\n int LA142_0 = input.LA(1);\n\n if ( (LA142_0==COMMA) ) {\n int LA142_1 = input.LA(2);\n\n if ( (LA142_1==NAME||(LA142_1>=LAMBDA && LA142_1<=NOT)||LA142_1==LPAREN||(LA142_1>=PLUS && LA142_1<=MINUS)||(LA142_1>=TILDE && LA142_1<=LBRACK)||LA142_1==LCURLY||(LA142_1>=BACKQUOTE && LA142_1<=STRING)) ) {\n alt142=1;\n }\n\n\n }\n\n\n switch (alt142) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:45: COMMA argument[arguments, kws, gens, false]\n \t {\n \t COMMA279=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7398); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t COMMA279_tree = (PythonTree)adaptor.create(COMMA279);\n \t adaptor.addChild(root_0, COMMA279_tree);\n \t }\n \t pushFollow(FOLLOW_argument_in_arglist7400);\n \t argument280=argument(arguments, kws, gens, false);\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, argument280.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop142;\n }\n } while (true);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1587:11: ( COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )? )?\n int alt145=2;\n int LA145_0 = input.LA(1);\n\n if ( (LA145_0==COMMA) ) {\n alt145=1;\n }\n switch (alt145) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1587:12: COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )?\n {\n COMMA281=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7416); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA281_tree = (PythonTree)adaptor.create(COMMA281);\n adaptor.addChild(root_0, COMMA281_tree);\n }\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:15: ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )?\n int alt144=3;\n int LA144_0 = input.LA(1);\n\n if ( (LA144_0==STAR) ) {\n alt144=1;\n }\n else if ( (LA144_0==DOUBLESTAR) ) {\n alt144=2;\n }\n switch (alt144) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:17: STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n {\n STAR282=(Token)match(input,STAR,FOLLOW_STAR_in_arglist7434); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR282_tree = (PythonTree)adaptor.create(STAR282);\n adaptor.addChild(root_0, STAR282_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7438);\n s=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, s.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:52: ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n int alt143=2;\n int LA143_0 = input.LA(1);\n\n if ( (LA143_0==COMMA) ) {\n alt143=1;\n }\n switch (alt143) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:53: COMMA DOUBLESTAR k= test[expr_contextType.Load]\n {\n COMMA283=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7442); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA283_tree = (PythonTree)adaptor.create(COMMA283);\n adaptor.addChild(root_0, COMMA283_tree);\n }\n DOUBLESTAR284=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7444); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR284_tree = (PythonTree)adaptor.create(DOUBLESTAR284);\n adaptor.addChild(root_0, DOUBLESTAR284_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7448);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n\n }\n break;\n\n }\n\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1589:17: DOUBLESTAR k= test[expr_contextType.Load]\n {\n DOUBLESTAR285=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7469); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR285_tree = (PythonTree)adaptor.create(DOUBLESTAR285);\n adaptor.addChild(root_0, DOUBLESTAR285_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7473);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n if (arguments.size() > 1 && gens.size() > 0) {\n actions.errorGenExpNotSoleArg(new PythonTree(((Token)retval.start)));\n }\n retval.args =arguments;\n retval.keywords =kws;\n retval.starargs =actions.castExpr((s!=null?((PythonTree)s.tree):null));\n retval.kwargs =actions.castExpr((k!=null?((PythonTree)k.tree):null));\n \n }\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1601:7: STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n STAR286=(Token)match(input,STAR,FOLLOW_STAR_in_arglist7520); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR286_tree = (PythonTree)adaptor.create(STAR286);\n adaptor.addChild(root_0, STAR286_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7524);\n s=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, s.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1601:42: ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n int alt146=2;\n int LA146_0 = input.LA(1);\n\n if ( (LA146_0==COMMA) ) {\n alt146=1;\n }\n switch (alt146) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1601:43: COMMA DOUBLESTAR k= test[expr_contextType.Load]\n {\n COMMA287=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7528); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA287_tree = (PythonTree)adaptor.create(COMMA287);\n adaptor.addChild(root_0, COMMA287_tree);\n }\n DOUBLESTAR288=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7530); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR288_tree = (PythonTree)adaptor.create(DOUBLESTAR288);\n adaptor.addChild(root_0, DOUBLESTAR288_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7534);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n retval.starargs =actions.castExpr((s!=null?((PythonTree)s.tree):null));\n retval.kwargs =actions.castExpr((k!=null?((PythonTree)k.tree):null));\n \n }\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1606:7: DOUBLESTAR k= test[expr_contextType.Load]\n {\n root_0 = (PythonTree)adaptor.nil();\n\n DOUBLESTAR289=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7553); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR289_tree = (PythonTree)adaptor.create(DOUBLESTAR289);\n adaptor.addChild(root_0, DOUBLESTAR289_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7557);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n if ( state.backtracking==0 ) {\n\n retval.kwargs =actions.castExpr((k!=null?((PythonTree)k.tree):null));\n \n }\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public void setArguments(List<String> arguments) {\n this.arguments = arguments;\n }", "Object[] args();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "ImmutableList<String> mainArgs();", "Object[] getArguments();", "Object[] getArguments();", "public Object[] getArguments() { return args;}", "List<IArgumentBuilder> getArguments();", "<E> Argument choices(E... values);", "private static String printOptionalArgs() {\n String output = \"\";\n for (int i = 0; i < MAX_OPTIONAL_ARGS; i++)\n output += \" [-\" + VALID_OPTIONAL_ARGS[i] + \"]\";\n return output + \" \";\n }", "public abstract ValidationResults validArguments(String[] arguments);", "public void printArgsInterpretation() {\n StringBuilder usage = new StringBuilder();\n usage.append(\"You launched the CuratorClient with the following options:\");\n usage.append(\"\\n\");\n usage.append(\"\\tCurator host: \");\n usage.append(host);\n usage.append(\"\\n\");\n usage.append(\"\\tCurator port: \");\n usage.append(port);\n usage.append(\"\\n\");\n usage.append(\"\\tInput directory: \");\n usage.append(inputDir.toString());\n usage.append(\"\\n\");\n usage.append(\"\\tOutput directory: \");\n usage.append(outputDir.toString());\n usage.append(\"\\n\");\n usage.append(\"\\tRun in testing mode? \");\n usage.append(testing ? \"Yes.\" : \"No.\");\n usage.append(\"\\n\");\n\n System.out.println( usage.toString() );\n }", "private Term[] parseArgumentList() throws ParseException {\n \n final Term[] args = parseTermList();\n final int tt = _tokenizer.next();\n if (tt != ')') {\n _tokenizer.pushBack();\n reportError(\"Missing ')' or ','.\"); /*I18N*/\n }\n \n return args;\n }", "ArgList createArgList();", "public void varArg(int ... i) {\n System.out.println(\"Multi arg method\");\n }", "java.lang.String getArg();", "public SeqArg(Argument a1, Argument a2){\n this.a1 = a1;\n this.a2 = a2;\n }", "public GoRun flags(String... args) {\n if (args.length % 2 != 0) {\n throw new InvalidParameterException(\"given args are not even\");\n }\n\n for (int i = 0; i < args.length; i += 2) {\n shortOption(args[i], args[i + 1]);\n }\n return this;\n }", "public static Sequence<? extends String> getArguments() {\n return Entry.getArguments();\n }", "public Document getArguments() {\n return arguments;\n }", "@Test\n public void testArguments() {\n System.out.println(\"arguments\");\n assertThat(Arguments.valueOf(\"d\"), is(notNullValue()));\n assertThat(Arguments.valueOf(\"i\"), is(notNullValue()));\n assertThat(Arguments.valueOf(\"num\"), is(notNullValue()));\n }", "public String getArgumentLine() {\n return \"\";\n }", "public interface IArgsParser {\r\n\tvoid parse(String [] aParams, Iterable<IArgument> args);\r\n}", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "public String[] getArguments() {\n return this.arguments;\n }", "@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}", "@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }", "int getNumberOfArguments();", "@Override\n public int getArgLength() {\n return 4;\n }", "private void parseOptionalArguments(DataSet edges, Value[] values,\n int argIndex) {\n if (values.length > argIndex) {\n while (values.length > argIndex) {\n parseStringArguments(edges, values[argIndex++]);\n }\n }\n }", "@Override\n public ValidationResults validArguments(String[] arguments) {\n final int MANDATORY_NUM_OF_ARGUMENTS = 1;\n if (arguments.length == MANDATORY_NUM_OF_ARGUMENTS) {\n // Check if CommandMAN was called on itself (Checker doesn't need to\n // validate CommandMAN twice).\n if (arguments[0].equals(this.getCommandName())) {\n this.toDocument = this; // man will document itself.\n } else {\n // Man will document this command object.\n try {\n this.toDocument = Checker.getCommand(arguments[0], true);\n } catch (Exception ex) {\n return new ValidationResults(false, \"No manual entry for \"\n + arguments[0]); // CMD does not exist.\n }\n }\n return new ValidationResults(true, null);\n }\n return new ValidationResults(false, \"Requires \"\n + MANDATORY_NUM_OF_ARGUMENTS + \" argument.\");\n }", "public static boolean arguments(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"arguments\")) return false;\n if (!nextTokenIs(b, LPAREN)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, LPAREN);\n r = r && arguments_1(b, l + 1);\n r = r && consumeToken(b, RPAREN);\n exit_section_(b, m, ARGUMENTS, r);\n return r;\n }", "public void argumentOrginazer(String[] args){\n\t\tfor(String arg:args) {\n\t\t\t\n\t\t\tif(arg.toLowerCase().contains(\"-s\")) {// The -s argument will make a starters plot\n\t\t\t\tif(!player.isOp()){\n\t\t\t\t\tplayer.sendMessage(\"You need to be op to create a starters plot!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if( arg.toLowerCase().contains(\"h:\") || arg.toLowerCase().contains(\"height:\")) {\n\t\t\t\t// the h:<number> or height:<number> argument can set a custum height for the given plot\n\t\t\t\tint temp = arg.indexOf(\":\") + 1;\n\t\t\t\theigth = Integer.valueOf((String) arg.subSequence(temp, arg.length()));\n\t\t\t\t\n\t\t\t} else if( arg.toLowerCase().contains(\"d:\") || arg.toLowerCase().contains(\"depth:\")) {\n\t\t\t\t// the d:<number> of depth:<number> will set a custum depth for the plot and also\n\t\t\t\t// places bedrock at the proper places\n\t\t\t\tint temp = arg.indexOf(\":\") + 1;\n\t\t\t\tdepth = Integer.valueOf((String) arg.subSequence(temp, arg.length()));\n\t\t\t\t\n\t\t\t} else if ( arg.toLowerCase().contains(\"n\") || arg.toLowerCase().contains(\"name:\")) {\n\t\t\t\t// The N:<name of plot> or name:<name of plot> will specify the name of the plot that\n\t\t\t\t// is about to be made. The plugin will terminate this action if no name is put in.\n\t\t\t\tint temp = arg.indexOf(\":\") + 1;\n\t\t\t\tname = (String) arg.subSequence(temp, arg.length());\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// Error catching for yet unknow arguments :P\n\t\t\t\tplayer.sendMessage(ChatColor.RED + \"The argument: \" + arg + \"does not exist.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t// Error catching for the 2 posistions the player selected\n\t\tposition1 = PlayerCords.getPlayerCords(player.getName())[0];\n\t\tposition2 = PlayerCords.getPlayerCords(player.getName())[1];\n\t\tif(position1 == null || position2 == null) {\n\t\t\tplayer.sendMessage(\"You did not select 2 points to create the plot from\");\n\t\t\treturn;\n\t\t}\n\t\t//debug\n\t\tplayer.sendMessage(position1.getBlockY() + \" 2nd \" + position2.getBlockY());\n\t\t\n\t\t//You need to give a plot name.\n\t\tif (name == null){\n\t\t\tplayer.sendMessage(ChatColor.RED + \"You forgot to give a plot name\");\n\t\t}\n\t\t\n\t\t// return more propper vectors for the plot creation so the region can be set\n\t\tVector[] temp = CreatePhysicalPlot.getProperVectors(position1, position2, heigth, depth);\n\t\tposition1 = temp[0];\n\t\tposition2 = temp[1];\n\t\t\n\t\t//makes the region and checks if this is legal on the given position and returns null\n\t\t//if an error occures\n\t\tProtectedRegion plotRegion = setRegion();\n\t\t\n\t\tif(plotRegion == null){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//gets the region form the just created plot\n\t\tList<String> regionIds = Arrays.asList(plotRegion.getId());\n\t\t\n\t\t//Searches the region for any city and returns null if it fails\n\t\tCityPlot cityPlot = getCityPlot(plotRegion);\n\t\tif(cityPlot == null){\n\t\t\tplayer.sendMessage(\"You need to be in a city plot to make a residence plot\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Builds the plot in the game world.\n CreatePhysicalPlot.CreatePlot(position1, position2, heigth, depth, player.getWorld(), player);\n // Instantates the plot object for the server to store and work with\n\t\tcreateResidentPlot(name, player.getWorld(), regionIds, cityPlot);\t\t\n\t}", "public ArgumentsParser() {\n this(new String[0]);\n }", "public static void showArgs(String[] asArgs)\n {\n out();\n int cArgs = asArgs.length;\n out(cArgs + \" command line arguments:\");\n for (int i = 0; i < cArgs; ++i)\n {\n out(\"[\" + i + \"]=\\\"\" + asArgs[i] + \"\\\"\");\n }\n out();\n }", "public List<Argument> getArguments() {\n return arguments;\n }", "protected static List<String> arguments(String[] args) {\n List<String> arguments = new ArrayList<>(args.length);\n for (int i = 0; i < args.length; ++i) {\n if (args[i].equals(\"--\")) {\n arguments.addAll(Arrays.asList(args).subList(i + 1, args.length));\n break;\n } else if (!args[i].startsWith(\"-\")) {\n arguments.add(args[i]);\n }\n }\n return arguments;\n }", "public LsArguments(String... args) {\n this();\n this.args = args;\n this.argsIsSet = true;\n }", "public void analyseArguments(String[] args) throws ArgumentsException {\n \t\t\n for (int i=0;i<args.length;i++){ \n \n \n if (args[i].matches(\"-s\")){\n affichage = true;\n }\n else if (args[i].matches(\"-seed\")) {\n aleatoireAvecGerme = true;\n i++; \n \t// traiter la valeur associee\n try { \n seed =new Integer(args[i]);\n \n }\n catch (Exception e) {\n throw new ArgumentsException(\"Valeur du parametre -seed invalide :\" + args[i]);\n } \t\t\n }\n \n else if (args[i].matches(\"-mess\")){\n i++; \n \t// traiter la valeur associee\n messageString = args[i];\n if (args[i].matches(\"[0,1]{7,}\")) {\n messageAleatoire = false;\n nbBitsMess = args[i].length();\n \n } \n else if (args[i].matches(\"[0-9]{1,6}\")) {\n messageAleatoire = true;\n nbBitsMess = new Integer(args[i]);\n if (nbBitsMess < 1) \n throw new ArgumentsException (\"Valeur du parametre -mess invalide : \" + nbBitsMess);\n }\n else \n throw new ArgumentsException(\"Valeur du parametre -mess invalide : \" + args[i]);\n }\n \n else throw new ArgumentsException(\"Option invalide :\"+ args[i]);\n \n }\n \n }", "int getArgumentsCount();", "public static void main(String arg[]) {\n\n }", "@Override\n\tpublic void traverseArg(UniArg node) {\n\t}", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "Argument help(String help);", "static public Object[] arguments(int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) {\r\n\t\t// return an array of arguments\r\n\t\tObject[] args = new Object[argc];\r\n\t\t// add arguments\r\n\t\tswitch (argc > 8 ? 8 : argc) {\r\n\t\tcase 8: args[7] = l7;\r\n\t\tcase 7: args[6] = l6;\r\n\t\tcase 6: args[5] = l5;\r\n\t\tcase 5: args[4] = l4;\r\n\t\tcase 4: args[3] = l3;\r\n\t\tcase 3: args[2] = l2;\r\n\t\tcase 2: args[1] = l1;\r\n\t\tcase 1: args[0] = l0;\r\n\t\t}\r\n\t\tif (rest != null)\r\n\t\t\tSystem.arraycopy(rest, 0, args, 8, rest.length);\r\n\t\treturn args;\r\n\t}", "@Test(expectedExceptions=ArgumentsAreMutuallyExclusiveException.class)\n public void mutuallyExclusiveArgumentsTest() {\n String[] commandLine = new String[] {\"--foo\",\"5\"};\n\n parsingEngine.addArgumentSource( MutuallyExclusiveArgProvider.class );\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n\n MutuallyExclusiveArgProvider argProvider = new MutuallyExclusiveArgProvider();\n parsingEngine.loadArgumentsIntoObject( argProvider );\n\n Assert.assertEquals(argProvider.foo.intValue(), 5, \"Argument is not correctly initialized\");\n\n // But when foo and bar come together, danger!\n commandLine = new String[] {\"--foo\",\"5\",\"--bar\",\"6\"};\n\n parsingEngine.parse( commandLine );\n parsingEngine.validate();\n }", "public final void setArguments(Arguments value) {\n setProperty(new TestElementProperty(ARGUMENTS, value));\n }", "public LsArguments() {\n this.options = LsOptions.EMPTY;\n }", "protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "public void setArgumentStrings(String[] arguments) {\r\n ArrayList<Object> l = new ArrayList<Object>();\r\n l.addAll(Arrays.asList(arguments));\r\n setArguments(l);\r\n }", "static public void main(String... va) {\n }", "static boolean argumentListPart(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"argumentListPart\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = namedArgument(b, l + 1);\n if (!r) r = expression(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::argument_list_part_recover);\n return r;\n }", "@Override\n\tpublic void addArg(FormulaElement arg){\n\t}", "void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }", "default String args() {\n return (String) metadata().get(\"x-uri-args\");\n }", "public List<Expression> getArgs()\n {\n return args;\n }", "public static void m3983a(String[] args) {\n }", "@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}", "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "public String getOptionArg(String[] names) {\n\t\tString[] args = getOptionArgArray(names);\n\t\tif (args.length > 0) {\n\t\t\treturn args[0];\n\t\t}\n\t\treturn \"\";\n\t}", "@Override\n public void parseArguments(String arguments) throws InvalidArgumentException {\n TerminusLogger.info(\"Parsing add question arguments\");\n if (CommonUtils.isStringNullOrEmpty(arguments)) {\n TerminusLogger.warning(\"Failed to parse arguments: arguments is empty\");\n throw new InvalidArgumentException(this.getFormat(), Messages.ERROR_MESSAGE_MISSING_ARGUMENTS);\n }\n // Regex to find arguments\n ArrayList<String> argArray = CommonUtils.findArguments(arguments);\n if (!isValidQuestionsArgument(argArray)) {\n throw new InvalidArgumentException(this.getFormat(), Messages.ERROR_MESSAGE_MISSING_ARGUMENTS);\n }\n this.question = argArray.get(0);\n this.answer = argArray.get(1);\n TerminusLogger.info(String.format(\"Parsed argument (question = %s, answer = %s) to Add Question Command\", \n question, answer));\n }", "public static void main(String[] ignored) {\n\t\tfinal String[] argv = new String[] {\n\n\t\t\t\t/* short options */\n\t\t\t\t\"-ab\",\n\t\t\t\t\"dd-argument\",\n\t\t\t\t\"-0\",\n\t\t\t\t\"-1\",\n\t\t\t\t\"-2\",\n\n\t\t\t\t/* long options */\n\t\t\t\t\"--add=123\",\n\t\t\t\t\"--append\",\n\t\t\t\t\"--delete-float=3.141952\",\n\t\t\t\t\"--delete-double=3.141952\",\n\t\t\t\t\"--verbose\",\n\t\t\t\t\"--create=789\",\n\t\t\t\t\"-c987\",\n\t\t\t\t\"--file=filename1\",\n\n\t\t\t\t/* non-option arguments */\n\t\t\t\t\"--\",\n\t\t\t\t\"hello\",\n\t\t\t\t\"there\",\n\t\t};\n\n\t\ttry {\n\n\t\t\t/* Two ways to build options, via create() method or using() */\n\t\t\tfinal Options options = new Options.Builder()\n\n\t\t\t\t\t/* Short options */\n\t\t\t\t\t.create(\"a\")\n\t\t\t\t\t.create(\"b\")\n\t\t\t\t\t.create(\"c\", int.class)\n\t\t\t\t\t.create(\"d\", String.class)\n\t\t\t\t\t.create(\"0\")\n\t\t\t\t\t.create(\"1\")\n\t\t\t\t\t.create(\"2\")\n\n\t\t\t\t\t.group('o', suboptions -> suboptions\n\t\t\t\t\t\t\t.create(\"ro\")\n\t\t\t\t\t\t\t.create(\"rw\")\n\t\t\t\t\t\t\t.create(\"name\", String.class))\n\n\t\t\t\t\t/* Long options */\n\t\t\t\t\t.using(Option.of(\"add\", int.class))\n\t\t\t\t\t.using(Option.of(\"append\"))\n\t\t\t\t\t.using(Option.of(\"delete-float\", float.class))\n\t\t\t\t\t.using(Option.of(\"delete-double\", double.class))\n\t\t\t\t\t.using(Option.of(\"verbose\"))\n\t\t\t\t\t.using(Option.of(\"create\", int.class))\n\t\t\t\t\t.using(Option.of(\"file\", String.class))\n\t\t\t\t\t.build();\n\n\t\t\t/* Handler be notified when option is matched */\n\t\t\tfinal Option<Integer> create = options.get(\"create\", int.class);\n\t\t\tcreate.onMatch(n -> System.out.printf(\"Creating new entry %d%n\", n));\n\n\t\t\t/* Setup and parse the command line arguments */\n\t\t\tfinal Args args = Args.of(argv, options);\n\n\t\t\t/* All matched options */\n\t\t\tSystem.out.println(\"-- Example 3:\");\n\t\t\tSystem.out.println(\"Matched options:\");\n\t\t\tfinal List<Option<?>> matched = options.getAllMatched();\n\t\t\tmatched.forEach(System.out::println);\n\n\t\t\t/* Anything that was unmatched by the parser is stored here */\n\t\t\tSystem.out.println(\"Unmatched args:\");\n\t\t\tfinal List<String> unmatched = args.getUnmatchedArgs();\n\t\t\tunmatched.forEach(System.out::println);\n\n\t\t\t/* 2 ways to work with user options: getOption or findMatched */\n\n\t\t\t/*\n\t\t\t * Find methods always return a java Optional. Unmatched option with no command\n\t\t\t * line match, the returned optional will be empty, otherwise the Optional will\n\t\t\t * have the option with the commanline arg/value.\n\t\t\t */\n\t\t\tfinal Optional<Option<Boolean>> a = options.findMatched(\"a\", boolean.class);\n\t\t\ta.ifPresent(opt -> System.out.println(\"Option A is found!\"));\n\n\t\t\t/* Get method will throw unchecked OptionNotFoundException if not found */\n\t\t\tfinal Option<Integer> add = options.get(\"add\", int.class);\n\t\t\tif (add.isMatched()) {\n\t\t\t\tSystem.out.printf(\"add this amount %d%n\", add.getValue());\n\t\t\t}\n\n\t\t} catch (UnrecognizedArgException | InvalidArgException e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\tSystem.err.printf(\"Usage: %s [-a|-b|-0|-1|-2] [-c arg] [-d arg]%n\", \"Example3\");\n\t\t\tSystem.err.printf(\" \"\n\t\t\t\t\t+ \" [--add element]\"\n\t\t\t\t\t+ \" [--append]\"\n\t\t\t\t\t+ \" [--delete-float arg]\"\n\t\t\t\t\t+ \" [--delete-double arg]\"\n\t\t\t\t\t+ \" [--verbose]\"\n\t\t\t\t\t+ \" [--create arg]\"\n\t\t\t\t\t+ \" [--file arg]\"\n\t\t\t\t\t+ \"%n\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t/*\n\t\t * Next step: Example 4 - working with beans\n\t\t * \n\t\t * A much easiest way to deal with many options is using the BeanOption API.\n\t\t * Example 4 demostrates its usage.\n\t\t */\n\t}", "<E> Argument choices(Collection<E> values);", "public Command(String[] arguments) {\n this.setArguments(arguments);\n }", "public interface CmdLineOption {\n \n /**\n * Checks if this option parser recognizes the specified\n * option name.\n */\n boolean accepts(String optionName);\n\n /**\n * Called if the option that this parser recognizes is found.\n * \n * @param parser\n * The parser that's using this option object.\n * \n * For example, if the option \"-quiet\" is simply an alias to\n * \"-verbose 5\", then the implementation can just call the\n * {@link CmdLineParser#parse(String[])} method recursively. \n * \n * @param params\n * The rest of the arguments. This method can use this\n * object to access the arguments of the option if necessary.\n * \n * @return\n * The number of arguments consumed. For example, return 0\n * if this option doesn't take any parameter.\n */\n int parseArguments( CmdLineParser parser, Parameters params ) throws CmdLineException;\n \n// /**\n// * Adds the usage message for this option. \n// * <p>\n// * This method is used to build usage message for the parser.\n// * \n// * @param buf\n// * Messages should be appended to this buffer.\n// * If you add something, make sure you add '\\n' at the end. \n// */\n// void appendUsage( StringBuffer buf );\n \n \n /**\n * SPI for {@link CmdLineOption}.\n * \n * Object of this interface is passed to\n * {@link CmdLineOption}s to make it easy/safe to parse\n * additional parameters for options.\n */\n public interface Parameters {\n /**\n * Gets the recognized option name.\n * \n * @return\n * This option name has been passed to the\n * {@link CmdLineOption#accepts(String)} method and\n * the method has returned <code>true</code>.\n */\n String getOptionName();\n \n /**\n * Gets the additional parameter to this option.\n * \n * @param idx\n * specifying 0 will retrieve the token next to the option.\n * For example, if the command line looks like \"-o abc -d x\",\n * then <code>getParameter(0)</code> for \"-o\" returns \"abc\"\n * and <code>getParameter(1)</code> will return \"-d\".\n * \n * @return\n * Always return non-null valid String. If an attempt is\n * made to access a non-existent index, this method throws\n * appropriate {@link CmdLineException}.\n */\n String getParameter( int idx ) throws CmdLineException;\n \n /**\n * The convenience method of\n * <code>Integer.parseInt(getParameter(idx))</code>\n * with proper error handling.\n * \n * @exception CmdLineException\n * If the parameter is not an integer, it throws an\n * approrpiate {@link CmdLineException}.\n */\n int getIntParameter( int idx ) throws CmdLineException;\n }\n \n}", "public List<String> getOptionArgList(String[] names) {\n\t\tOpt op = getOption(names);\n\t\tif (op != null) {\n\t\t\treturn op.getArgList();\n\t\t}\n\t\treturn Collections.EMPTY_LIST;\n\t}", "OclExpression getArgument();", "public void processArgs(final String args[]) throws OptionsException {\n\t\tOptionContainer option = null;\n\t\tint quant = -1;\n\t\tint qcount = 0;\n\t\tboolean moreData = false;\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (option == null) {\n\t\t\t\tif (args[i].charAt(0) != '-')\n\t\t\t\t\tthrow new OptionsException(\"Unexpected value: \" + args[i]);\n\n\t\t\t\t// see what kind of argument we have\n\t\t\t\tif (args[i].length() == 1)\n\t\t\t\t\tthrow new OptionsException(\"Illegal argument: '-'\");\n\n\t\t\t\tif (args[i].charAt(1) == '-') {\n\t\t\t\t\t// we have a long argument\n\t\t\t\t\t// since we don't accept inline values we can take\n\t\t\t\t\t// everything left in the string as argument, unless\n\t\t\t\t\t// there is a = in there...\n\t\t\t\t\tfinal String tmp = args[i].substring(2);\n\t\t\t\t\tfinal int pos = tmp.indexOf('=');\n\t\t\t\t\tif (pos == -1) {\n\t\t\t\t\t\toption = opts.get(tmp);\n\t\t\t\t\t\tmoreData = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption = opts.get(tmp.substring(0, pos));\n\t\t\t\t\t\t// modify the option a bit so the code below\n\t\t\t\t\t\t// handles the moreData correctly\n\t\t\t\t\t\targs[i] = \"-?\" + tmp.substring(pos + 1);\n\t\t\t\t\t\tmoreData = true;\n\t\t\t\t\t}\n\t\t\t\t} else if (args[i].charAt(1) == 'X') {\n\t\t\t\t\t// extra argument, same as long argument\n\t\t\t\t\tfinal String tmp = args[i].substring(1);\n\t\t\t\t\tfinal int pos = tmp.indexOf('=');\n\t\t\t\t\tif (pos == -1) {\n\t\t\t\t\t\toption = opts.get(tmp);\n\t\t\t\t\t\tmoreData = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption = opts.get(tmp.substring(0, pos));\n\t\t\t\t\t\t// modify the option a bit so the code below\n\t\t\t\t\t\t// handles the moreData correctly\n\t\t\t\t\t\targs[i] = \"-?\" + tmp.substring(pos + 1);\n\t\t\t\t\t\tmoreData = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// single char argument\n\t\t\t\t\toption = opts.get(\"\" + args[i].charAt(1));\n\t\t\t\t\t// is there more data left in the argument?\n\t\t\t\t\tmoreData = args[i].length() > 2 ? true : false;\n\t\t\t\t}\n\n\t\t\t\tif (option != null) {\n\t\t\t\t\t// make sure we overwrite previously set arguments\n\t\t\t\t\toption.resetArguments();\n\t\t\t\t\tfinal int card = option.getCardinality();\n\t\t\t\t\tif (card == CAR_ONE) {\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\toption = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tquant = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO_ONE) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\tqcount = 1;\n\t\t\t\t\t\tquant = 2;\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\toption = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO_MANY) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\tqcount = 1;\n\t\t\t\t\t\tquant = -1;\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\tqcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\toption = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new OptionsException(\"Unknown argument: \" + args[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// store the `value'\n\t\t\t\toption.addArgument(args[i]);\n\t\t\t\tif (++qcount == quant) {\n\t\t\t\t\tquant = 0;\n\t\t\t\t\tqcount = 0;\n\t\t\t\t\toption = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public DrawCommand(String command, Object... arguments) {\n\t\tthis.command = command;\n\t\tthis.args2 = arguments;\n\t\tisList = false;\n\t}", "private void writeArguments(Method m) {\n Class<?>[] args = m.getParameterTypes();\n int size = args.length;\n for (int i = 0; i < size; i++) {\n writer.print(args[i].getCanonicalName() + \" arg\" + i);\n if (i != size - 1)\n writer.print(\", \");\n }\n }", "public LsArguments(LsOptions options) {\n if(options == null) {\n throw new NullPointerException(\"options argument cannot be null\");\n }\n this.options = options;\n }", "static Stream<Arguments> args() {\n\t\treturn Stream.of(\n\t\t\tArguments.of(0, 1, 0, 0, \"one\"),\n\t\t\tArguments.of(3, 1, 0, 3, \"one \"),\n\t\t\tArguments.of(4, 2, 1, 0, \"one \"),\n\n\t\t\tArguments.of(0, 2, 0, 0, \"one two\"),\n\t\t\tArguments.of(1, 2, 0, 1, \"one two\"),\n\t\t\tArguments.of(2, 2, 0, 2, \"one two\"),\n\t\t\tArguments.of(3, 2, 0, 3, \"one two\"),\n\t\t\tArguments.of(7, 2, 1, 3, \"one two\"),\n\t\t\tArguments.of(7, 2, 1, 3, \"one two \"),\n\t\t\tArguments.of(8, 3, 2, 0, \"one two \"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"'one'\"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"'one' \"),\n\t\t\tArguments.of(6, 2, 1, 0, \"'one' \"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"'one'\"),\n\t\t\tArguments.of(1, 1, 0, 0, \"'one'\"),\n\t\t\tArguments.of(2, 1, 0, 1, \"'one'\"),\n\t\t\tArguments.of(3, 1, 0, 2, \"'one'\"),\n\t\t\tArguments.of(4, 1, 0, 3, \"'one'\"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"'one'\"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"'one' \"),\n\t\t\tArguments.of(1, 1, 0, 0, \"'one' \"),\n\t\t\tArguments.of(2, 1, 0, 1, \"'one' \"),\n\t\t\tArguments.of(3, 1, 0, 2, \"'one' \"),\n\t\t\tArguments.of(4, 1, 0, 3, \"'one' \"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"'one' \"),\n\t\t\tArguments.of(6, 2, 1, 0, \"'one' \"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"\\\"one\\\"\"),\n\t\t\tArguments.of(1, 1, 0, 0, \"\\\"one\\\"\"),\n\t\t\tArguments.of(2, 1, 0, 1, \"\\\"one\\\"\"),\n\t\t\tArguments.of(3, 1, 0, 2, \"\\\"one\\\"\"),\n\t\t\tArguments.of(4, 1, 0, 3, \"\\\"one\\\"\"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"\\\"one\\\"\"),\n\n\t\t\tArguments.of(0, 1, 0, 0, \"\\\"one\\\" \"),\n\t\t\tArguments.of(1, 1, 0, 0, \"\\\"one\\\" \"),\n\t\t\tArguments.of(2, 1, 0, 1, \"\\\"one\\\" \"),\n\t\t\tArguments.of(3, 1, 0, 2, \"\\\"one\\\" \"),\n\t\t\tArguments.of(4, 1, 0, 3, \"\\\"one\\\" \"),\n\t\t\t// Arguments.of(5, 1, 0, 3, \"\\\"one\\\" \"),\n\t\t\tArguments.of(6, 2, 1, 0, \"\\\"one\\\" \")\n\t\t\t);\n\t}", "private void parseArgs(String[] object) throws IllegalArgumentException {\n Object object2;\n int n;\n int n2;\n int n3 = 0;\n boolean bl = false;\n boolean bl2 = true;\n block6 : do {\n int n4 = ((Object)object).length;\n n2 = 0;\n n = ++n3;\n if (n3 >= n4) break;\n object2 = object[n3];\n if (((String)object2).equals(\"--\")) {\n n = n3 + 1;\n break;\n }\n if (((String)object2).startsWith(\"--setuid=\")) {\n if (this.mUidSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mUidSpecified = true;\n this.mUid = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--setgid=\")) {\n if (this.mGidSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mGidSpecified = true;\n this.mGid = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--target-sdk-version=\")) {\n if (this.mTargetSdkVersionSpecified) throw new IllegalArgumentException(\"Duplicate target-sdk-version specified\");\n this.mTargetSdkVersionSpecified = true;\n this.mTargetSdkVersion = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).equals(\"--runtime-args\")) {\n bl = true;\n continue;\n }\n if (((String)object2).startsWith(\"--runtime-flags=\")) {\n this.mRuntimeFlags = Integer.parseInt(((String)object2).substring(((String)object2).indexOf(61) + 1));\n continue;\n }\n if (((String)object2).startsWith(\"--seinfo=\")) {\n if (this.mSeInfoSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mSeInfoSpecified = true;\n this.mSeInfo = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).startsWith(\"--capabilities=\")) {\n if (this.mCapabilitiesSpecified) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mCapabilitiesSpecified = true;\n if (((String[])(object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\", 2))).length == 1) {\n this.mPermittedCapabilities = this.mEffectiveCapabilities = Long.decode((String)object2[0]).longValue();\n continue;\n }\n this.mPermittedCapabilities = Long.decode((String)object2[0]);\n this.mEffectiveCapabilities = Long.decode((String)object2[1]);\n continue;\n }\n if (((String)object2).startsWith(\"--rlimit=\")) {\n String[] arrstring = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\");\n if (arrstring.length != 3) throw new IllegalArgumentException(\"--rlimit= should have 3 comma-delimited ints\");\n object2 = new int[arrstring.length];\n for (n = 0; n < arrstring.length; ++n) {\n object2[n] = Integer.parseInt(arrstring[n]);\n }\n if (this.mRLimits == null) {\n this.mRLimits = new ArrayList();\n }\n this.mRLimits.add((int[])object2);\n continue;\n }\n if (((String)object2).startsWith(\"--setgroups=\")) {\n if (this.mGids != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1).split(\",\");\n this.mGids = new int[((String[])object2).length];\n n = ((Object[])object2).length - 1;\n do {\n if (n < 0) continue block6;\n this.mGids[n] = Integer.parseInt((String)object2[n]);\n --n;\n } while (true);\n }\n if (((String)object2).equals(\"--invoke-with\")) {\n if (this.mInvokeWith != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n ++n3;\n try {\n this.mInvokeWith = object[n3];\n }\n catch (IndexOutOfBoundsException indexOutOfBoundsException) {\n throw new IllegalArgumentException(\"--invoke-with requires argument\");\n }\n }\n if (((String)object2).startsWith(\"--nice-name=\")) {\n if (this.mNiceName != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mNiceName = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).equals(\"--mount-external-default\")) {\n this.mMountExternal = 1;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-read\")) {\n this.mMountExternal = 2;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-write\")) {\n this.mMountExternal = 3;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-full\")) {\n this.mMountExternal = 6;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-installer\")) {\n this.mMountExternal = 5;\n continue;\n }\n if (((String)object2).equals(\"--mount-external-legacy\")) {\n this.mMountExternal = 4;\n continue;\n }\n if (((String)object2).equals(\"--query-abi-list\")) {\n this.mAbiListQuery = true;\n continue;\n }\n if (((String)object2).equals(\"--get-pid\")) {\n this.mPidQuery = true;\n continue;\n }\n if (((String)object2).startsWith(\"--instruction-set=\")) {\n this.mInstructionSet = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).startsWith(\"--app-data-dir=\")) {\n this.mAppDataDir = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n if (((String)object2).equals(\"--preload-app\")) {\n this.mPreloadApp = object[++n3];\n continue;\n }\n if (((String)object2).equals(\"--preload-package\")) {\n this.mPreloadPackage = object[++n3];\n this.mPreloadPackageLibs = object[++n3];\n this.mPreloadPackageLibFileName = object[++n3];\n this.mPreloadPackageCacheKey = object[++n3];\n continue;\n }\n if (((String)object2).equals(\"--preload-default\")) {\n this.mPreloadDefault = true;\n bl2 = false;\n continue;\n }\n if (((String)object2).equals(\"--start-child-zygote\")) {\n this.mStartChildZygote = true;\n continue;\n }\n if (((String)object2).equals(\"--set-api-blacklist-exemptions\")) {\n this.mApiBlacklistExemptions = (String[])Arrays.copyOfRange(object, n3 + 1, ((Object)object).length);\n n3 = ((Object)object).length;\n bl2 = false;\n continue;\n }\n if (((String)object2).startsWith(\"--hidden-api-log-sampling-rate=\")) {\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n try {\n this.mHiddenApiAccessLogSampleRate = Integer.parseInt((String)object2);\n bl2 = false;\n }\n catch (NumberFormatException numberFormatException) {\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Invalid log sampling rate: \");\n ((StringBuilder)object).append((String)object2);\n throw new IllegalArgumentException(((StringBuilder)object).toString(), numberFormatException);\n }\n }\n if (((String)object2).startsWith(\"--hidden-api-statslog-sampling-rate=\")) {\n object2 = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n try {\n this.mHiddenApiAccessStatslogSampleRate = Integer.parseInt((String)object2);\n bl2 = false;\n }\n catch (NumberFormatException numberFormatException) {\n object = new StringBuilder();\n ((StringBuilder)object).append(\"Invalid statslog sampling rate: \");\n ((StringBuilder)object).append((String)object2);\n throw new IllegalArgumentException(((StringBuilder)object).toString(), numberFormatException);\n }\n }\n if (((String)object2).startsWith(\"--package-name=\")) {\n if (this.mPackageName != null) throw new IllegalArgumentException(\"Duplicate arg specified\");\n this.mPackageName = ((String)object2).substring(((String)object2).indexOf(61) + 1);\n continue;\n }\n n = n3;\n if (!((String)object2).startsWith(\"--usap-pool-enabled=\")) break;\n this.mUsapPoolStatusSpecified = true;\n this.mUsapPoolEnabled = Boolean.parseBoolean(((String)object2).substring(((String)object2).indexOf(61) + 1));\n bl2 = false;\n } while (true);\n if (!this.mAbiListQuery && !this.mPidQuery) {\n if (this.mPreloadPackage != null) {\n if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --preload-package.\");\n } else if (this.mPreloadApp != null) {\n if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --preload-app.\");\n } else if (bl2) {\n if (!bl) {\n object2 = new StringBuilder();\n ((StringBuilder)object2).append(\"Unexpected argument : \");\n ((StringBuilder)object2).append((String)object[n]);\n throw new IllegalArgumentException(((StringBuilder)object2).toString());\n }\n this.mRemainingArgs = new String[((Object)object).length - n];\n object2 = this.mRemainingArgs;\n System.arraycopy(object, n, object2, 0, ((String[])object2).length);\n }\n } else if (((Object)object).length - n > 0) throw new IllegalArgumentException(\"Unexpected arguments after --query-abi-list.\");\n if (!this.mStartChildZygote) return;\n bl = false;\n object = this.mRemainingArgs;\n n = ((Object)object).length;\n n3 = n2;\n do {\n bl2 = bl;\n if (n3 >= n) break;\n if (((String)object[n3]).startsWith(\"--zygote-socket=\")) {\n bl2 = true;\n break;\n }\n ++n3;\n } while (true);\n if (!bl2) throw new IllegalArgumentException(\"--start-child-zygote specified without --zygote-socket=\");\n }", "public ProgramExp getArgument() {\n return argument;\n }", "void addCommandLineExtension(ICommandLineArgumentsExtension extension);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "public int getArgumentCount() {\n return arguments.length;\n }", "public Object[] getArguments() {\n return arguments;\n }", "public static void main(String[] args) {\nSystem.out.println(\"you passed...\"+args.length);\r\nfor(int i=0;i<args.length;i++)\r\n{\r\n\tSystem.out.println(\"data is\"+args[i]);\r\n}\r\n\t}", "public static Stream<Arguments> simpleArguments() {\n return Stream.of(Arguments.of(1, 2));\n }", "public DrawCommand(String command, List<Double> arguments) {\n\t\tthis.command = command;\n\t\tthis.args1 = arguments;\n\t\tisList = true;\n\t}", "public String getArgumentString() {\n\t\treturn null;\n\t}", "public ArgumentsParser(String... args) {\n this.arguments = new HashMap<>(args.length);\n this.args = Arrays.copyOf(args, args.length);\n }" ]
[ "0.6526618", "0.62188", "0.617067", "0.6165467", "0.6068398", "0.5925369", "0.59005386", "0.577267", "0.57644427", "0.57426924", "0.573043", "0.57293475", "0.57293475", "0.57142687", "0.57071096", "0.57071096", "0.56829256", "0.56778187", "0.5620054", "0.5617508", "0.559691", "0.55758816", "0.5536816", "0.5526529", "0.5524504", "0.55185145", "0.54931843", "0.54917234", "0.5487188", "0.54836", "0.5480553", "0.5466108", "0.54625523", "0.54562664", "0.5445025", "0.54331946", "0.5400161", "0.5391774", "0.5383147", "0.537666", "0.5370101", "0.536583", "0.5350582", "0.53499204", "0.5345791", "0.5335059", "0.5321344", "0.5317042", "0.53131074", "0.53130585", "0.5303668", "0.52994615", "0.5286096", "0.5286096", "0.5286096", "0.5286096", "0.5286096", "0.5276283", "0.5268375", "0.5256481", "0.52436674", "0.5240199", "0.52299184", "0.5214186", "0.5212354", "0.52121073", "0.5211279", "0.520511", "0.5204253", "0.5198823", "0.51921296", "0.51890904", "0.5186384", "0.51818347", "0.5181608", "0.5158233", "0.5157236", "0.5153902", "0.51531315", "0.5139546", "0.51343024", "0.51325583", "0.51304823", "0.5124465", "0.51225495", "0.5122102", "0.511886", "0.51171136", "0.5100581", "0.5098339", "0.50963825", "0.50951374", "0.50951374", "0.50951374", "0.5090384", "0.508798", "0.5087283", "0.5083025", "0.50734633", "0.5066177", "0.5065945" ]
0.0
-1
basicType arrayCreatorRest | qualident ( arrayCreatorRest | classCreatorRest )
private Operation creator(Scope scope, Vector queue) { Operation root = null; Type t = new Type(); if ((t.type = basicType()) != Keyword.NONESY) { root = arrayCreatorRest(t, scope, queue); } else { Token x = nextToken; t.ident = new Token(nextToken); t.ident.string = x.string = qualident(); unresolved.add(x.string); if (nextSymbol == Keyword.LBRACKETSY) { root = arrayCreatorRest(t, scope, queue); } else { root = classCreatorRest(x, scope, queue); } } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void creator() throws RecognitionException {\n int creator_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"creator\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(857, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 126) ) { return ; }\n // Java.g:858:5: ( nonWildcardTypeArguments createdName classCreatorRest | createdName ( arrayCreatorRest | classCreatorRest ) )\n int alt158=2;\n try { dbg.enterDecision(158);\n\n int LA158_0 = input.LA(1);\n\n if ( (LA158_0==40) ) {\n alt158=1;\n }\n else if ( (LA158_0==Identifier||(LA158_0>=56 && LA158_0<=63)) ) {\n alt158=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 158, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(158);}\n\n switch (alt158) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:858:9: nonWildcardTypeArguments createdName classCreatorRest\n {\n dbg.location(858,9);\n pushFollow(FOLLOW_nonWildcardTypeArguments_in_creator5341);\n nonWildcardTypeArguments();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(858,34);\n pushFollow(FOLLOW_createdName_in_creator5343);\n createdName();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(858,46);\n pushFollow(FOLLOW_classCreatorRest_in_creator5345);\n classCreatorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:859:9: createdName ( arrayCreatorRest | classCreatorRest )\n {\n dbg.location(859,9);\n pushFollow(FOLLOW_createdName_in_creator5355);\n createdName();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(859,21);\n // Java.g:859:21: ( arrayCreatorRest | classCreatorRest )\n int alt157=2;\n try { dbg.enterSubRule(157);\n try { dbg.enterDecision(157);\n\n int LA157_0 = input.LA(1);\n\n if ( (LA157_0==48) ) {\n alt157=1;\n }\n else if ( (LA157_0==66) ) {\n alt157=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 157, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(157);}\n\n switch (alt157) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:859:22: arrayCreatorRest\n {\n dbg.location(859,22);\n pushFollow(FOLLOW_arrayCreatorRest_in_creator5358);\n arrayCreatorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:859:41: classCreatorRest\n {\n dbg.location(859,41);\n pushFollow(FOLLOW_classCreatorRest_in_creator5362);\n classCreatorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(157);}\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 126, creator_StartIndex); }\n }\n dbg.location(860, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"creator\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void arrayCreatorRest() throws RecognitionException {\n int arrayCreatorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"arrayCreatorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(871, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 129) ) { return ; }\n // Java.g:872:5: ( '[' ( ']' ( '[' ']' )* arrayInitializer | expression ']' ( '[' expression ']' )* ( '[' ']' )* ) )\n dbg.enterAlt(1);\n\n // Java.g:872:9: '[' ( ']' ( '[' ']' )* arrayInitializer | expression ']' ( '[' expression ']' )* ( '[' ']' )* )\n {\n dbg.location(872,9);\n match(input,48,FOLLOW_48_in_arrayCreatorRest5439); if (state.failed) return ;\n dbg.location(873,9);\n // Java.g:873:9: ( ']' ( '[' ']' )* arrayInitializer | expression ']' ( '[' expression ']' )* ( '[' ']' )* )\n int alt164=2;\n try { dbg.enterSubRule(164);\n try { dbg.enterDecision(164);\n\n int LA164_0 = input.LA(1);\n\n if ( (LA164_0==49) ) {\n alt164=1;\n }\n else if ( (LA164_0==Identifier||(LA164_0>=FloatingPointLiteral && LA164_0<=DecimalLiteral)||LA164_0==47||(LA164_0>=56 && LA164_0<=63)||(LA164_0>=65 && LA164_0<=66)||(LA164_0>=69 && LA164_0<=72)||(LA164_0>=105 && LA164_0<=106)||(LA164_0>=109 && LA164_0<=113)) ) {\n alt164=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 164, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(164);}\n\n switch (alt164) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:873:13: ']' ( '[' ']' )* arrayInitializer\n {\n dbg.location(873,13);\n match(input,49,FOLLOW_49_in_arrayCreatorRest5453); if (state.failed) return ;\n dbg.location(873,17);\n // Java.g:873:17: ( '[' ']' )*\n try { dbg.enterSubRule(161);\n\n loop161:\n do {\n int alt161=2;\n try { dbg.enterDecision(161);\n\n int LA161_0 = input.LA(1);\n\n if ( (LA161_0==48) ) {\n alt161=1;\n }\n\n\n } finally {dbg.exitDecision(161);}\n\n switch (alt161) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:873:18: '[' ']'\n \t {\n \t dbg.location(873,18);\n \t match(input,48,FOLLOW_48_in_arrayCreatorRest5456); if (state.failed) return ;\n \t dbg.location(873,22);\n \t match(input,49,FOLLOW_49_in_arrayCreatorRest5458); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop161;\n }\n } while (true);\n } finally {dbg.exitSubRule(161);}\n\n dbg.location(873,28);\n pushFollow(FOLLOW_arrayInitializer_in_arrayCreatorRest5462);\n arrayInitializer();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:874:13: expression ']' ( '[' expression ']' )* ( '[' ']' )*\n {\n dbg.location(874,13);\n pushFollow(FOLLOW_expression_in_arrayCreatorRest5476);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(874,24);\n match(input,49,FOLLOW_49_in_arrayCreatorRest5478); if (state.failed) return ;\n dbg.location(874,28);\n // Java.g:874:28: ( '[' expression ']' )*\n try { dbg.enterSubRule(162);\n\n loop162:\n do {\n int alt162=2;\n try { dbg.enterDecision(162);\n\n try {\n isCyclicDecision = true;\n alt162 = dfa162.predict(input);\n }\n catch (NoViableAltException nvae) {\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(162);}\n\n switch (alt162) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:874:29: '[' expression ']'\n \t {\n \t dbg.location(874,29);\n \t match(input,48,FOLLOW_48_in_arrayCreatorRest5481); if (state.failed) return ;\n \t dbg.location(874,33);\n \t pushFollow(FOLLOW_expression_in_arrayCreatorRest5483);\n \t expression();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n \t dbg.location(874,44);\n \t match(input,49,FOLLOW_49_in_arrayCreatorRest5485); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop162;\n }\n } while (true);\n } finally {dbg.exitSubRule(162);}\n\n dbg.location(874,50);\n // Java.g:874:50: ( '[' ']' )*\n try { dbg.enterSubRule(163);\n\n loop163:\n do {\n int alt163=2;\n try { dbg.enterDecision(163);\n\n int LA163_0 = input.LA(1);\n\n if ( (LA163_0==48) ) {\n int LA163_2 = input.LA(2);\n\n if ( (LA163_2==49) ) {\n alt163=1;\n }\n\n\n }\n\n\n } finally {dbg.exitDecision(163);}\n\n switch (alt163) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:874:51: '[' ']'\n \t {\n \t dbg.location(874,51);\n \t match(input,48,FOLLOW_48_in_arrayCreatorRest5490); if (state.failed) return ;\n \t dbg.location(874,55);\n \t match(input,49,FOLLOW_49_in_arrayCreatorRest5492); if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop163;\n }\n } while (true);\n } finally {dbg.exitSubRule(163);}\n\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(164);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 129, arrayCreatorRest_StartIndex); }\n }\n dbg.location(876, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"arrayCreatorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void innerCreator() throws RecognitionException {\n int innerCreator_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"innerCreator\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(867, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 128) ) { return ; }\n // Java.g:868:5: ( ( nonWildcardTypeArguments )? Identifier classCreatorRest )\n dbg.enterAlt(1);\n\n // Java.g:868:9: ( nonWildcardTypeArguments )? Identifier classCreatorRest\n {\n dbg.location(868,9);\n // Java.g:868:9: ( nonWildcardTypeArguments )?\n int alt160=2;\n try { dbg.enterSubRule(160);\n try { dbg.enterDecision(160);\n\n int LA160_0 = input.LA(1);\n\n if ( (LA160_0==40) ) {\n alt160=1;\n }\n } finally {dbg.exitDecision(160);}\n\n switch (alt160) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: nonWildcardTypeArguments\n {\n dbg.location(868,9);\n pushFollow(FOLLOW_nonWildcardTypeArguments_in_innerCreator5415);\n nonWildcardTypeArguments();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(160);}\n\n dbg.location(868,35);\n match(input,Identifier,FOLLOW_Identifier_in_innerCreator5418); if (state.failed) return ;\n dbg.location(868,46);\n pushFollow(FOLLOW_classCreatorRest_in_innerCreator5420);\n classCreatorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 128, innerCreator_StartIndex); }\n }\n dbg.location(869, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"innerCreator\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public final void classCreatorRest() throws RecognitionException {\n int classCreatorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classCreatorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(878, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 130) ) { return ; }\n // Java.g:879:5: ( arguments ( classBody )? )\n dbg.enterAlt(1);\n\n // Java.g:879:9: arguments ( classBody )?\n {\n dbg.location(879,9);\n pushFollow(FOLLOW_arguments_in_classCreatorRest5523);\n arguments();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(879,19);\n // Java.g:879:19: ( classBody )?\n int alt165=2;\n try { dbg.enterSubRule(165);\n try { dbg.enterDecision(165);\n\n int LA165_0 = input.LA(1);\n\n if ( (LA165_0==44) ) {\n alt165=1;\n }\n } finally {dbg.exitDecision(165);}\n\n switch (alt165) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: classBody\n {\n dbg.location(879,19);\n pushFollow(FOLLOW_classBody_in_classCreatorRest5525);\n classBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(165);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 130, classCreatorRest_StartIndex); }\n }\n dbg.location(880, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classCreatorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@Test\n public void testArrayCreationWithGeneralReturnType() {\n final Object obj = ArrayUtils.toArray(\"foo\", \"bar\");\n assertTrue(obj instanceof String[]);\n }", "public static void arrayCreation() {\n int[] arr = new int[3];\n // as we are using new operator and that is how we create objects hence arrays\n // are called objects\n // every array in java is an object\n System.out.println(arr.getClass()\n .getSimpleName()); // int[]\n System.out.println(arr.getClass()\n .getName()); // [I\n\n int[] a1 = new int[3];\n int[][] a2 = new int[3][3];\n double[] a3 = new double[3];\n short[] a4 = new short[3];\n byte[] a5 = new byte[3];\n boolean[] a6 = new boolean[3];\n long[] a7 = new long[3];\n float[] a8 = new float[3];\n Integer[] a9 = new Integer[3];\n\n System.out.println(a1.getClass()\n .getName()); // [I\n System.out.println(a2.getClass()\n .getName()); // [[I\n System.out.println(a3.getClass()\n .getName()); // [D\n System.out.println(a4.getClass()\n .getName()); // [S\n System.out.println(a5.getClass()\n .getName()); // [B\n System.out.println(a6.getClass()\n .getName()); // [Z\n System.out.println(a7.getClass()\n .getName()); // [J\n System.out.println(a8.getClass()\n .getName()); // [F\n System.out.println(a9.getClass()\n .getName()); // [Ljava.lang.Integer;\n\n // at the time of the array initialization we should compulsory specify the size\n // new int[3] we should specify the size else it will lead to compilation error\n\n // It is legal to have size zero in java\n int[] a = new int[0];\n System.out.println(a);\n\n }", "public final EObject ruleArrayCreator() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_6=null;\n Token otherlv_7=null;\n EObject lv_type_2_0 = null;\n\n EObject lv_size_4_0 = null;\n\n EObject lv_initialization_8_0 = null;\n\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2169:28: ( ( () otherlv_1= 'new' ( (lv_type_2_0= ruleType ) ) ( (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+ | ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2170:1: ( () otherlv_1= 'new' ( (lv_type_2_0= ruleType ) ) ( (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+ | ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2170:1: ( () otherlv_1= 'new' ( (lv_type_2_0= ruleType ) ) ( (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+ | ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2170:2: () otherlv_1= 'new' ( (lv_type_2_0= ruleType ) ) ( (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+ | ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2170:2: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2171:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getArrayCreatorAccess().getArrayCreatorAction_0(),\n current);\n \n }\n\n }\n\n otherlv_1=(Token)match(input,45,FOLLOW_45_in_ruleArrayCreator5178); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \tnewLeafNode(otherlv_1, grammarAccess.getArrayCreatorAccess().getNewKeyword_1());\n \n }\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2180:1: ( (lv_type_2_0= ruleType ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2181:1: (lv_type_2_0= ruleType )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2181:1: (lv_type_2_0= ruleType )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2182:3: lv_type_2_0= ruleType\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getArrayCreatorAccess().getTypeTypeParserRuleCall_2_0()); \n \t \n }\n pushFollow(FOLLOW_ruleType_in_ruleArrayCreator5199);\n lv_type_2_0=ruleType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getArrayCreatorRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_2_0, \n \t\t\"Type\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2198:2: ( (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+ | ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) ) )\n int alt29=2;\n int LA29_0 = input.LA(1);\n\n if ( (LA29_0==46) ) {\n int LA29_1 = input.LA(2);\n\n if ( (LA29_1==47) ) {\n alt29=2;\n }\n else if ( (LA29_1==RULE_INT) ) {\n alt29=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 29, 1, input);\n\n throw nvae;\n }\n }\n else {\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 29, 0, input);\n\n throw nvae;\n }\n switch (alt29) {\n case 1 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2198:3: (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2198:3: (otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']' )+\n int cnt27=0;\n loop27:\n do {\n int alt27=2;\n int LA27_0 = input.LA(1);\n\n if ( (LA27_0==46) ) {\n alt27=1;\n }\n\n\n switch (alt27) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2198:5: otherlv_3= '[' ( (lv_size_4_0= ruleIntLiteral ) ) otherlv_5= ']'\n \t {\n \t otherlv_3=(Token)match(input,46,FOLLOW_46_in_ruleArrayCreator5213); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_3, grammarAccess.getArrayCreatorAccess().getLeftSquareBracketKeyword_3_0_0());\n \t \n \t }\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2202:1: ( (lv_size_4_0= ruleIntLiteral ) )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2203:1: (lv_size_4_0= ruleIntLiteral )\n \t {\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2203:1: (lv_size_4_0= ruleIntLiteral )\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2204:3: lv_size_4_0= ruleIntLiteral\n \t {\n \t if ( state.backtracking==0 ) {\n \t \n \t \t newCompositeNode(grammarAccess.getArrayCreatorAccess().getSizeIntLiteralParserRuleCall_3_0_1_0()); \n \t \t \n \t }\n \t pushFollow(FOLLOW_ruleIntLiteral_in_ruleArrayCreator5234);\n \t lv_size_4_0=ruleIntLiteral();\n\n \t state._fsp--;\n \t if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getArrayCreatorRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"size\",\n \t \t\tlv_size_4_0, \n \t \t\t\"IntLiteral\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n \t }\n\n \t }\n\n\n \t }\n\n \t otherlv_5=(Token)match(input,47,FOLLOW_47_in_ruleArrayCreator5246); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_5, grammarAccess.getArrayCreatorAccess().getRightSquareBracketKeyword_3_0_2());\n \t \n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt27 >= 1 ) break loop27;\n \t if (state.backtracking>0) {state.failed=true; return current;}\n EarlyExitException eee =\n new EarlyExitException(27, input);\n throw eee;\n }\n cnt27++;\n } while (true);\n\n\n }\n break;\n case 2 :\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2225:6: ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2225:6: ( (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2225:7: (otherlv_6= '[' otherlv_7= ']' )+ ( (lv_initialization_8_0= ruleArrayInitializer ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2225:7: (otherlv_6= '[' otherlv_7= ']' )+\n int cnt28=0;\n loop28:\n do {\n int alt28=2;\n int LA28_0 = input.LA(1);\n\n if ( (LA28_0==46) ) {\n alt28=1;\n }\n\n\n switch (alt28) {\n \tcase 1 :\n \t // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2225:9: otherlv_6= '[' otherlv_7= ']'\n \t {\n \t otherlv_6=(Token)match(input,46,FOLLOW_46_in_ruleArrayCreator5268); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_6, grammarAccess.getArrayCreatorAccess().getLeftSquareBracketKeyword_3_1_0_0());\n \t \n \t }\n \t otherlv_7=(Token)match(input,47,FOLLOW_47_in_ruleArrayCreator5280); if (state.failed) return current;\n \t if ( state.backtracking==0 ) {\n\n \t \tnewLeafNode(otherlv_7, grammarAccess.getArrayCreatorAccess().getRightSquareBracketKeyword_3_1_0_1());\n \t \n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt28 >= 1 ) break loop28;\n \t if (state.backtracking>0) {state.failed=true; return current;}\n EarlyExitException eee =\n new EarlyExitException(28, input);\n throw eee;\n }\n cnt28++;\n } while (true);\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2233:3: ( (lv_initialization_8_0= ruleArrayInitializer ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2234:1: (lv_initialization_8_0= ruleArrayInitializer )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2234:1: (lv_initialization_8_0= ruleArrayInitializer )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:2235:3: lv_initialization_8_0= ruleArrayInitializer\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getArrayCreatorAccess().getInitializationArrayInitializerParserRuleCall_3_1_1_0()); \n \t \n }\n pushFollow(FOLLOW_ruleArrayInitializer_in_ruleArrayCreator5303);\n lv_initialization_8_0=ruleArrayInitializer();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getArrayCreatorRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"initialization\",\n \t\tlv_initialization_8_0, \n \t\t\"ArrayInitializer\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "public void testConstructorWithStringTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{\\\"string1\\\", \\\"string2\\\"}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", string1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && string2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'String'.\", string1.getType().equals(TYPE_FULL_STRING)\r\n && string2.getType().equals(TYPE_FULL_STRING));\r\n assertEquals(\"Element should be \\\"string1\\\".\", \"string1\", string1.getValue());\r\n assertEquals(\"Element should be \\\"string2\\\".\", \"string2\", string2.getValue());\r\n }", "public EOOrQualifier(com.webobjects.foundation.NSArray qualifiers){\n //TODO codavaj!!\n }", "Array createArray();", "public interface Creator {\n public abstract Item factoryMethod();\n public abstract Item factoryMethod(String name);\n public abstract Item factoryMethod(String name, List<Flower> flowerList);\n}", "public IClass getType() {\n IClass result = null;\n if (_javaMethod.getReturnType().isArray()) {\n result = new ArrayDef(new ExternalClass(_javaMethod.getReturnType().getComponentType()));\n }\n else {\n result = new ExternalClass(_javaMethod.getReturnType());\n }\n\n return result;\n }", "com.exacttarget.wsdl.partnerapi.ObjectDefinition getObjectDefinitionArray(int i);", "public ArrayAccessor() {\r\n super(\"<array>\");\r\n }", "public void testConstructorWithSingleDimensionComplexTypeArray() throws Exception {\r\n root\r\n .addChild(createArray(\"array1\", TYPE_OBJECT, \"1\", \"{object:ob1,object:ob2, object:ob1}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n\r\n assertEquals(\"array1[0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[0]);\r\n assertEquals(\"array1[1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), array1[1]);\r\n assertEquals(\"array1[2] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[2]);\r\n }", "public void testConstructorWithMultiDimensionComplexTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_OBJECT, \"2\",\r\n \"{{object:ob1,object:ob2}, {object:ob2,object:ob1}}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 2.\", 2, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n Object[] subArray1 = (Object[]) array1[0];\r\n Object[] subArray2 = (Object[]) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertEquals(\"Array[0] should have 2 elements.\", 2, subArray1.length);\r\n assertEquals(\"Array[1] should have 2 elements.\", 2, subArray2.length);\r\n\r\n assertEquals(\"Array[0][0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), subArray1[0]);\r\n assertEquals(\"Array[0][1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), subArray1[1]);\r\n assertEquals(\"Array[0][1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), subArray2[0]);\r\n assertEquals(\"Array[0][0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), subArray2[1]);\r\n }", "@jdk.Exported\npublic interface ArrayType extends ReferenceType {\n\n /**\n * Creates a new instance of this array class in the target VM.\n * The array is created with the given length and each component\n * is initialized to is standard default value.\n *\n * @param length the number of components in the new array\n * @return the newly created {@link ArrayReference} mirroring\n * the new object in the target VM.\n *\n * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.\n */\n ArrayReference newInstance(int length);\n\n /**\n * Gets the JNI signature of the components of this\n * array class. The signature\n * describes the declared type of the components. If the components\n * are objects, their actual type in a particular run-time context\n * may be a subclass of the declared class.\n *\n * @return a string containing the JNI signature of array components.\n */\n String componentSignature();\n\n /**\n * Returns a text representation of the component\n * type of this array.\n *\n * @return a text representation of the component type.\n */\n String componentTypeName();\n\n /**\n * Returns the component type of this array,\n * as specified in the array declaration.\n * <P>\n * Note: The component type of a array will always be\n * created or loaded before the array - see\n * <cite>The Java&trade; Virtual Machine Specification</cite>,\n * section 5.3.3 - Creating Array Classes.\n * However, although the component type will be loaded it may\n * not yet be prepared, in which case the type will be returned\n * but attempts to perform some operations on the returned type\n * (e.g. {@link ReferenceType#fields() fields()}) will throw\n * a {@link ClassNotPreparedException}.\n * Use {@link ReferenceType#isPrepared()} to determine if\n * a reference type is prepared.\n *\n * @see Type\n * @see Field#type() Field.type() - for usage examples\n * @return the {@link Type} of this array's components.\n */\n Type componentType() throws ClassNotLoadedException;\n}", "public void testConstructorWithMultiDimensionSimpleTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"2\", \"{{0,1}, {2,3}}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'int'.\", TYPE_INT, array.getType());\r\n assertEquals(\"Dimension should be 2.\", 2, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n Object[] subArray1 = (Object[]) array1[0];\r\n Object[] subArray2 = (Object[]) array1[1];\r\n\r\n ObjectSpecification[] values = {(ObjectSpecification) subArray1[0],\r\n (ObjectSpecification) subArray1[1], (ObjectSpecification) subArray2[0],\r\n (ObjectSpecification) subArray2[1]};\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertEquals(\"Array[0] should have 2 elements.\", 2, subArray1.length);\r\n assertEquals(\"Array[1] should have 2 elements.\", 2, subArray2.length);\r\n\r\n for (int i = 0; i < 4; i++) {\r\n assertEquals(\"SpecType of array elements should be simple.\",\r\n ObjectSpecification.SIMPLE_SPECIFICATION, values[i].getSpecType());\r\n assertEquals(\"Elements should be 'int'.\", TYPE_INT, values[i].getType());\r\n assertEquals(\"Wrong element value.\", (String) (\"\" + i), values[i].getValue());\r\n }\r\n }", "public String[] getCreators() {\n/* 123 */ return getStringArray(\"creator\");\n/* */ }", "public void testForArray() {\n /**\n * a local TestClass with an incorrect array.\n */\n class TestClassWrong {\n @RenderMe\n private int[] testArray = {1, 2};\n\n /**\n * default c-tor\n */\n TestClassWrong() { }\n }\n /**\n * TestClass with a correctly annotated Array.\n */\n class TestClassCorrect {\n\n @RenderMe(with = \"Renderer.ArrayRenderer\")\n private int[] testArray = {1, 2};\n\n /**\n * default c-tor\n */\n TestClassCorrect() { }\n }\n\n TestClassWrong wrong = new TestClassWrong();\n TestClassCorrect correct = new TestClassCorrect();\n Renderer rendererForWrong = new Renderer(wrong);\n Renderer rendererForCorrect = new Renderer(correct);\n\n assertNotEquals(\"Instance of: TestClassWrong\\ntestArray (int[]) Value:[ 1, 2, ]\\n\", rendererForWrong.render());\n assertEquals(\"Instance of: TestClassCorrect\\ntestArray (int[]) Value:[ 1, 2, ]\\n\", rendererForCorrect.render());\n\n }", "private ArrayOps() {\r\n }", "public void testConstructorWithStringTypeArrayWithReferences() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{str1, \\\"string2\\\"}\"));\r\n\r\n ConfigurationObject object = createObject(\"str1\", TYPE_FULL_STRING);\r\n ConfigurationObject params = new DefaultConfigurationObject(\"params\");\r\n params.addChild(createParam(1, TYPE_FULL_STRING, \"string1\"));\r\n object.addChild(params);\r\n root.addChild(object);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertTrue(\"Elements should be 'String'.\", string1.getType().equals(TYPE_FULL_STRING)\r\n && string2.getType().equals(TYPE_FULL_STRING));\r\n assertEquals(\"Element should be str1.\", specificationFactory.getObjectSpecification(\"str1\",\r\n null), string1);\r\n assertEquals(\"Element should be \\\"string2\\\".\", \"string2\", string2.getValue());\r\n }", "Object getROIs();", "public static void main(String[] args) {\n MyParent4[] myParent4s = new MyParent4[1];\n System.out.println(myParent4s.getClass());\n\n MyParent4[][] myParent4s1 = new MyParent4[1][1];\n System.out.println(myParent4s1.getClass());\n }", "public void testCreateArray() {\n System.out.println(\"createArray\");// NOI18N\n \n TypeID type = new TypeID(TypeID.Kind.PRIMITIVE, \"javacode\");// NOI18N\n PrimitiveDescriptor arrayDescriptor = new PrimitiveDescriptor() {\n public Object deserialize(String serialized) {\n return \"array\"; //NOI18N\n }\n public boolean isValidInstance(Object object) {\n return true;\n }\n public String serialize(Object value) {\n return \"array\"; // NOI18N\n }\n };\n \n PropertyValue arrayPropertyValue = PropertyValue.createValue( arrayDescriptor, type, DesignComponentTest.PROPERTY3_VALUE_STRING);// NOI18N\n List<PropertyValue> array = new ArrayList();\n array.add(arrayPropertyValue);\n \n PropertyValue result = PropertyValue.createArray(type, array);\n \n assertEquals(PropertyValue.Kind.ARRAY, result.getKind());\n type = type.getArrayType();\n assertEquals(type,result.getType());\n assertNotNull(result.getArray());\n }", "@Test\n public void whenCreateContainerShouldReturnTheStringType() {\n SimpleArray<String> arr = new SimpleArray<>(2);\n arr.add(\"first\");\n arr.add(\"second\");\n\n assertThat(arr.get(0), is(\"first\"));\n assertThat(arr.get(1), is(\"second\"));\n }", "JDefinedClass objectFactory();", "RESTElement createRESTElement();", "public static void main(final String[] args) {\n int [] numbers;\n\n // initialize array of primitives\n numbers = new int[7];\n\n System.out.println(numbers);\n\n // a different way to get an array of primitives\n numbers = IntArray.getIntArray();\n\n // and now for something completely different: reference types\n final Dwarf[] dwarfs = DwarfArray.getDwarfs();\n\n // have them do something\n for (final Dwarf d : dwarfs) {\n d.greet();\n }\n\n // demonstrating covariance\n Object[] objects = dwarfs;\n objects[0] = new Dwarf(\"Grumpy\");\n // objects[1] = \"this string literal is an object --> no compile time error\";\n }", "public interface Serial\r\n{\r\n// use string constants to enforce consistency\r\n// between readers and writers\r\npublic static final String OBJECT = \"object\";\r\npublic static final String FIELD = \"field\";\r\npublic static final String NAME = \"name\";\r\npublic static final String TYPE = \"type\";\r\npublic static final String VALUE = \"value\";\r\npublic static final String ARRAY = \"array\";\r\npublic static final String LENGTH = \"length\";\r\npublic static final String ID = \"id\";\r\npublic static final String IDREF = \"idref\";\r\n\r\n// next is used to disambiguate shadowed fields\r\npublic static final String DECLARED = \"declaredClass\";\r\n\r\n\r\npublic static final Class[] primitiveArrays =\r\n new Class[]{\r\n int[].class,\r\n boolean[].class,\r\n byte[].class,\r\n short[].class,\r\n long[].class,\r\n char[].class,\r\n float[].class,\r\n double[].class\r\n };\r\n\r\n// now declare the wrapper classes for each primitive object type\r\n// note that this order must correspond to the order in primitiveArrays\r\n\r\n// there may be a better way of doing this that does not involve\r\n// wrapper objects (e.g. Integer is the wrapper of int), but I've\r\n// yet to find it\r\n// note that the creation of wrapper objects is a significant\r\n// overhead\r\n// example: reading an array of 1 million int (all zeros) takes\r\n// about 900ms using reflection, versus 350ms hard-coded\r\npublic static final Class[] primitiveWrappers =\r\n new Class[]{\r\n Integer.class,\r\n Boolean.class,\r\n Byte.class,\r\n Short.class,\r\n Long.class,\r\n Character.class,\r\n Float.class,\r\n Double.class\r\n };\r\n\r\npublic static final Class[] primitives =\r\n new Class[]{\r\n int.class,\r\n boolean.class,\r\n byte.class,\r\n short.class,\r\n long.class,\r\n char.class,\r\n float.class,\r\n double.class\r\n };\r\n}", "public static void main(String[] args) {\n\n Supplier<HashMap<String, String>> mapSupplier = HashMap::new;\n Supplier<HashSet<String>> setSupplier = HashSet::new;\n\n // Array Constructor reference\n ArrayConstruction<String> stringArrayConstruction = String[]::new;\n ArrayConstruction<Integer> integerArrayConstruction = Integer[]::new;\n }", "public boolean isArrayType()\n/* */ {\n/* 138 */ return true;\n/* */ }", "public void testConstructorWithNullStringTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{\\\"string1\\\", null}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertEquals(\"SpecType of array1[0] should be simple.\",\r\n ObjectSpecification.SIMPLE_SPECIFICATION, string1.getSpecType());\r\n assertEquals(\"SpecType of array1[1] should be null.\",\r\n ObjectSpecification.NULL_SPECIFICATION, string2.getSpecType());\r\n }", "private RubyArray(Ruby runtime, RubyClass klass, int length) {\n super(runtime, klass);\n values = new IRubyObject[length];\n }", "ArrayValue createArrayValue();", "ArrayTypeRule createArrayTypeRule();", "public final void genericMethodOrConstructorRest() throws RecognitionException {\n int genericMethodOrConstructorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"genericMethodOrConstructorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(309, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 28) ) { return ; }\n // Java.g:310:5: ( ( type | 'void' ) Identifier methodDeclaratorRest | Identifier constructorDeclaratorRest )\n int alt43=2;\n try { dbg.enterDecision(43);\n\n int LA43_0 = input.LA(1);\n\n if ( (LA43_0==Identifier) ) {\n int LA43_1 = input.LA(2);\n\n if ( (LA43_1==Identifier||LA43_1==29||LA43_1==40||LA43_1==48) ) {\n alt43=1;\n }\n else if ( (LA43_1==66) ) {\n alt43=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 43, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n }\n else if ( (LA43_0==47||(LA43_0>=56 && LA43_0<=63)) ) {\n alt43=1;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 43, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(43);}\n\n switch (alt43) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:310:9: ( type | 'void' ) Identifier methodDeclaratorRest\n {\n dbg.location(310,9);\n // Java.g:310:9: ( type | 'void' )\n int alt42=2;\n try { dbg.enterSubRule(42);\n try { dbg.enterDecision(42);\n\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==Identifier||(LA42_0>=56 && LA42_0<=63)) ) {\n alt42=1;\n }\n else if ( (LA42_0==47) ) {\n alt42=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 42, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(42);}\n\n switch (alt42) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:310:10: type\n {\n dbg.location(310,10);\n pushFollow(FOLLOW_type_in_genericMethodOrConstructorRest1088);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:310:17: 'void'\n {\n dbg.location(310,17);\n match(input,47,FOLLOW_47_in_genericMethodOrConstructorRest1092); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(42);}\n\n dbg.location(310,25);\n match(input,Identifier,FOLLOW_Identifier_in_genericMethodOrConstructorRest1095); if (state.failed) return ;\n dbg.location(310,36);\n pushFollow(FOLLOW_methodDeclaratorRest_in_genericMethodOrConstructorRest1097);\n methodDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:311:9: Identifier constructorDeclaratorRest\n {\n dbg.location(311,9);\n match(input,Identifier,FOLLOW_Identifier_in_genericMethodOrConstructorRest1107); if (state.failed) return ;\n dbg.location(311,20);\n pushFollow(FOLLOW_constructorDeclaratorRest_in_genericMethodOrConstructorRest1109);\n constructorDeclaratorRest();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 28, genericMethodOrConstructorRest_StartIndex); }\n }\n dbg.location(312, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"genericMethodOrConstructorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void testConstructorWithSingleDimensionSimpleTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'int'.\", TYPE_INT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] params = array.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, params.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", param1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'int'.\", param1.getType().equals(TYPE_INT)\r\n && param2.getType().equals(TYPE_INT));\r\n assertEquals(\"Element should be 1.\", \"1\", param1.getValue());\r\n assertEquals(\"Element should be 2.\", \"2\", param2.getValue());\r\n }", "public static boolean isArray_crc() {\n return false;\n }", "public interface StandardTypesLocalService {\n BigInteger getNewBigInteger(BigInteger bi);\n BigInteger[] getNewBigIntegerArray(BigInteger[] bia);\n \n BigDecimal getNewBigDecimal(BigDecimal bd);\n BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);\n\n Calendar getNewCalendar(Calendar c);\n Calendar[] getNewCalendarArray(Calendar[] ca);\n \n Date getNewDate(Date d);\n Date[] getNewDateArray(Date[] da);\n\n QName getNewQName(QName qname);\n QName[] getNewQNameArray(QName[] qnames);\n \n URI getNewURI(URI uri);\n URI[] getNewURIArray(URI[] uris);\n \n XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);\n XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);\n \n Duration getNewDuration(Duration d);\n Duration[] getNewDurationArray(Duration[] da);\n \n Object getNewObject(Object obj);\n Object[] getNewObjectArray(Object[] objs);\n \n Image getNewImage(Image img);\n Image[] getNewImageArray(Image[] imgs);\n \n DataHandler getNewDataHandler(DataHandler dh);\n DataHandler[] getNewDataHandlerArray(DataHandler[] dha);\n\n Source getNewSource(Source src);\n Source[] getNewSourceArray(Source[] srcs);\n \n UUID getNewUUID(UUID uuid);\n UUID[] getNewUUIDArray(UUID[] uuids);\n}", "@Override\r\n\tpublic String creatorType() {\n\t\treturn \"ShapeViewer\";\r\n\t}", "public void addCreator(String value) {\n/* 106 */ addStringToSeq(\"creator\", value);\n/* */ }", "public abstract String getCreator();", "@Test\r\n public void testPrimitiveArray()\r\n {\r\n test(int[].class);\r\n }", "default boolean isArray() {\n return false;\n }", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "private RubyArray(Ruby runtime, IRubyObject[] vals, int begin) {\n super(runtime, runtime.getArray());\n this.values = vals;\n this.begin = begin;\n this.realLength = vals.length - begin;\n this.isShared = true;\n }", "public Object[] getConstructorArgs ();", "GenericExample_004(T[] nos) {\r\n\t\tthis.nos = nos;\r\n\t}", "Ingredient[] shape(IRecipe recipe);", "com.exacttarget.wsdl.partnerapi.ObjectDefinition[] getObjectDefinitionArray();", "public <R> R mo27139a(Object... objArr) throws C3885b {\n Constructor constructor = this.f17270c;\n if (constructor != null) {\n try {\n return (R) constructor.newInstance(objArr);\n } catch (InvocationTargetException e) {\n throw new C3885b(\"Oops!\", e.getTargetException());\n } catch (Throwable th) {\n throw new C3885b(\"Oops!\", th);\n }\n } else {\n throw new C3885b(\"Constructor was null!\");\n }\n }", "Multi createMulti();", "ArrayProxyValue createArrayProxyValue();", "public RubyArray(Ruby ruby) {\n \t\tthis(ruby, new ArrayList());\n \t}", "public Object[] getObjectArray1() {\n Object[] customTypes = new Object[10];\n for (int i = 0; i < customTypes.length; i++) {\n ServerCustomType sct = new ServerCustomType();\n sct.setId(i);\n customTypes[i] = sct;\n }\n return customTypes;\n }", "public interface CollectionCreator {\n\n /**\n * Creates a new collection instance to be populated by the binder.\n * \n * @param initialCapacity\n * The number of elements that will be added to the collection. To be\n * used with collections that can benefit from this information.\n * @return the newly created empty collection instance.\n */\n Collection<?> create(int initialCapacity);\n\n}", "private RubyArray(Ruby runtime, boolean objectSpace) {\n super(runtime, runtime.getArray(), objectSpace);\n }", "public boolean isArray();", "public String choseRep(){\n return \"array\";\n }", "private void __sep__Constructors__() {}", "GenericExample_04(T[] nos) {\r\n\t\tthis.nos = nos;\r\n\t}", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "public static void main (String[] args) {\n\t\tC_GenericsMethods genericsMethods = new C_GenericsMethods();\n\t\tgenericsMethods.makeArrayList(\"Manish\");\n\t\tgenericsMethods.makeArrayList(\"Kumar\");\n\t\tgenericsMethods.makeArrayList(\"Samrat\");\n\t\tgenericsMethods.makeArrayList(\"Virat\");\n\t\tgenericsMethods.makeArrayList(123);\n\t\tgenericsMethods.restrciedArrayList(123);\n\t//\tgenericsMethods.restrciedArrayList(\"Virat\");\n\n\t}", "@Override\n\tpublic void registerPrimaryTypes() {\n\t\tobjectType = registerJavaType(getBuilder().getName(), ClassType.CLASS);\n\t}", "public static void main(String[] args) {\n\t\t Supplier<Personne> supplier = Personne::new;\n\t\t System.out.println(supplier.get());\n\t\t \n\t\t //constructeur avec plusieur parametre \n\t\t PersonneSupplier supplierP = Personne::new;\n\t\t Personne personne = supplierP.creerInstance(\"nom1\", \"prenom1\");\n\t\t System.out.println(personne);\n\t\t \n\t\t PersonneSupplier supplierP1 = (nom, prenom) -> new Personne(nom, prenom);\n\t\t Personne personneP1 = supplierP1.creerInstance(\"nom1\", \"prenom1\");\n\t\t System.out.println(personneP1);\n\t\t \n\t\t \n\t\t Supplier<Personne> supplier0 = () -> new Personne();\n\t\t Supplier<Personne> supplier1 = () -> new Personne(\"\",\"\");\n\t\t \n\t\t //Supplier<Integer> I0 = Integer::new;\n\t\t Supplier<Integer> I1 = () -> new Integer(0);\n\t\t //Supplier<String> I2 =(String s) -> new Integer(s);\n\t\t \n\t\t Supplier<ArrayList<Personne>> supplier5 = ArrayList<Personne>::new;\n\t\t Supplier<ArrayList<Personne>> supplier6 = () -> new ArrayList<Personne>(); \n\t\t \n\t\t //Supplier<String[]> supplier7 = String[]::new;\n\t\t //Supplier<> supplier8 = (int size) -> new String[size];\n\t\t \n\t\t \n\t\t //generic\n\t\t //MaFabrique<Integer[]> fabrique = Integer[]::new; \n\t\t //Integer[] entiers = fabrique.creerInstance(10);\n\t\t //System.out.println(\"taille = \"+entiers.length);\n\t\t \n\t\t \n\t\t \n\t\t }", "public void testConstructorWithNullComplexTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_OBJECT, \"1\", \"{object:ob1,object:ob2,null}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n\r\n assertEquals(\"array1[0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[0]);\r\n assertEquals(\"array1[1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), array1[1]);\r\n assertEquals(\"array1[2] should be null.\", ObjectSpecification.NULL_SPECIFICATION,\r\n ((ObjectSpecification) array1[2]).getSpecType());\r\n }", "public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}", "public interface ITestArrays {\n\n /**\n * primitive array method\n *\n * @return double array\n */\n public double[] returnDoubleArray();\n\n /**\n * primitive multi-array method\n *\n * @return multi double array\n */\n public double[][] returnMultiDoubleArray();\n\n /**\n * Method with array/vector return\n *\n * @return list of object names\n */\n public String[] listObjectNames();\n /**\n * Method with array/vector return\n *\n * @param path path to objects\n * @return list of object names\n */\n public String[] listObjectNames(String path);\n /**\n * Method with array/vector return\n *\n * @param path path to objects\n * @param recursive list objects recursively\n * @return list of object names\n */\n public String[] listObjectNames(String path, boolean recursive);\n\n /**\n * Method throwing exception\n *\n * @param path path to create\n * @throws IllegalArgumentException in case of argument error\n */\n public void mkdir(int[] dummy) throws IllegalArgumentException;\n\n /**\n * Method throwing exception\n *\n * @param path path to create\n * @throws IllegalArgumentException in case of argument error\n */\n public void mkdir(int[][] dummy) throws IllegalArgumentException;\n\n /**\n * Method throwing exception\n *\n * @param path path to create\n * @throws IllegalArgumentException in case of argument error\n */\n public void mkdir(String[][] dummy) throws IllegalArgumentException;\n\n /**\n * Method throwing exception\n *\n * @param path path to create\n * @throws IllegalArgumentException in case of argument error\n */\n public void mkdir(String[] dummy) throws IllegalArgumentException;\n\n /**\n * Method throwing exception\n *\n * @param path path to create\n * @throws IllegalArgumentException in case of argument error\n */\n public void mkdir2(String[] dummy) throws IllegalArgumentException;\n}", "public static void main(String args[ ]) {\n\n\t\t//C c1 = new C();\n\t\t//A b1 = new C();\n\t\t//Teste10 t10 = new Teste10();\n\t\t//t10.m1();\n\t\t\n\t\t//System.out.println(c1 instanceof Object);\n\t\t//System.out.println(b1 instanceof B);\n\t\t//System.out.println(b1 instanceof B);\n\t\t//I.getId();\n\t}", "stars.StarType[] getStarArray();", "ImmutableList<SchemaOrgType> getCreatorList();", "public interface DraculaCollection$0$Dracula {\n DraculaArray mo587d();\n}", "@VTID(13)\r\n int getCreator();", "public final java.util.List<p298d.p299a.p300a.p301a.p303y0.p314d.p315a.p322j0.C6439z> mo23417P(java.lang.reflect.Type[] r13, java.lang.annotation.Annotation[][] r14, boolean r15) {\n /*\n r12 = this;\n java.lang.String r0 = \"parameterTypes\"\n p298d.p344x.p346c.C6888i.m12438e(r13, r0)\n java.lang.String r0 = \"parameterAnnotations\"\n p298d.p344x.p346c.C6888i.m12438e(r14, r0)\n java.util.ArrayList r0 = new java.util.ArrayList\n int r1 = r13.length\n r0.<init>(r1)\n java.lang.reflect.Member r1 = r12.mo23408O()\n java.lang.String r2 = \"member\"\n p298d.p344x.p346c.C6888i.m12438e(r1, r2)\n d.a.a.a.y0.b.j1.b.a$a r3 = p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6170a.f12188a\n r4 = 0\n r5 = 0\n if (r3 != 0) goto L_0x004f\n p298d.p344x.p346c.C6888i.m12438e(r1, r2)\n java.lang.Class r2 = r1.getClass()\n java.lang.String r3 = \"getParameters\"\n java.lang.Class[] r6 = new java.lang.Class[r5] // Catch:{ NoSuchMethodException -> 0x0047 }\n java.lang.reflect.Method r3 = r2.getMethod(r3, r6) // Catch:{ NoSuchMethodException -> 0x0047 }\n java.lang.ClassLoader r2 = p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6173b.m11076e(r2)\n java.lang.String r6 = \"java.lang.reflect.Parameter\"\n java.lang.Class r2 = r2.loadClass(r6)\n d.a.a.a.y0.b.j1.b.a$a r6 = new d.a.a.a.y0.b.j1.b.a$a\n java.lang.Class[] r7 = new java.lang.Class[r5]\n java.lang.String r8 = \"getName\"\n java.lang.reflect.Method r2 = r2.getMethod(r8, r7)\n r6.<init>(r3, r2)\n r3 = r6\n goto L_0x004d\n L_0x0047:\n d.a.a.a.y0.b.j1.b.a$a r2 = new d.a.a.a.y0.b.j1.b.a$a\n r2.<init>(r4, r4)\n r3 = r2\n L_0x004d:\n p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6170a.f12188a = r3\n L_0x004f:\n java.lang.reflect.Method r2 = r3.f12189a\n if (r2 != 0) goto L_0x0054\n goto L_0x0058\n L_0x0054:\n java.lang.reflect.Method r3 = r3.f12190b\n if (r3 != 0) goto L_0x005a\n L_0x0058:\n r2 = r4\n goto L_0x0086\n L_0x005a:\n java.lang.Object[] r6 = new java.lang.Object[r5]\n java.lang.Object r1 = r2.invoke(r1, r6)\n java.lang.String r2 = \"null cannot be cast to non-null type kotlin.Array<*>\"\n java.util.Objects.requireNonNull(r1, r2)\n java.lang.Object[] r1 = (java.lang.Object[]) r1\n java.util.ArrayList r2 = new java.util.ArrayList\n int r6 = r1.length\n r2.<init>(r6)\n int r6 = r1.length\n r7 = r5\n L_0x006f:\n if (r7 >= r6) goto L_0x0086\n r8 = r1[r7]\n java.lang.Object[] r9 = new java.lang.Object[r5]\n java.lang.Object r8 = r3.invoke(r8, r9)\n java.lang.String r9 = \"null cannot be cast to non-null type kotlin.String\"\n java.util.Objects.requireNonNull(r8, r9)\n java.lang.String r8 = (java.lang.String) r8\n r2.add(r8)\n int r7 = r7 + 1\n goto L_0x006f\n L_0x0086:\n if (r2 != 0) goto L_0x008a\n r1 = r4\n goto L_0x0092\n L_0x008a:\n int r1 = r2.size()\n java.lang.Integer r1 = java.lang.Integer.valueOf(r1)\n L_0x0092:\n if (r1 != 0) goto L_0x0096\n r1 = r5\n goto L_0x009c\n L_0x0096:\n int r1 = r1.intValue()\n int r3 = r13.length\n int r1 = r1 - r3\n L_0x009c:\n int r3 = r13.length\n int r3 = r3 + -1\n if (r3 < 0) goto L_0x0152\n r6 = r5\n L_0x00a2:\n int r7 = r6 + 1\n r8 = r13[r6]\n java.lang.String r9 = \"type\"\n p298d.p344x.p346c.C6888i.m12438e(r8, r9)\n boolean r9 = r8 instanceof java.lang.Class\n if (r9 == 0) goto L_0x00be\n r10 = r8\n java.lang.Class r10 = (java.lang.Class) r10\n boolean r11 = r10.isPrimitive()\n if (r11 == 0) goto L_0x00be\n d.a.a.a.y0.b.j1.b.c0 r8 = new d.a.a.a.y0.b.j1.b.c0\n r8.<init>(r10)\n goto L_0x00e6\n L_0x00be:\n boolean r10 = r8 instanceof java.lang.reflect.GenericArrayType\n if (r10 != 0) goto L_0x00e0\n if (r9 == 0) goto L_0x00ce\n r9 = r8\n java.lang.Class r9 = (java.lang.Class) r9\n boolean r9 = r9.isArray()\n if (r9 == 0) goto L_0x00ce\n goto L_0x00e0\n L_0x00ce:\n boolean r9 = r8 instanceof java.lang.reflect.WildcardType\n if (r9 == 0) goto L_0x00da\n d.a.a.a.y0.b.j1.b.g0 r9 = new d.a.a.a.y0.b.j1.b.g0\n java.lang.reflect.WildcardType r8 = (java.lang.reflect.WildcardType) r8\n r9.<init>(r8)\n goto L_0x00e5\n L_0x00da:\n d.a.a.a.y0.b.j1.b.s r9 = new d.a.a.a.y0.b.j1.b.s\n r9.<init>(r8)\n goto L_0x00e5\n L_0x00e0:\n d.a.a.a.y0.b.j1.b.h r9 = new d.a.a.a.y0.b.j1.b.h\n r9.<init>(r8)\n L_0x00e5:\n r8 = r9\n L_0x00e6:\n if (r2 != 0) goto L_0x00ea\n r9 = r4\n goto L_0x00f4\n L_0x00ea:\n int r9 = r6 + r1\n java.lang.Object r9 = p298d.p334t.C6790h.m12365s(r2, r9)\n java.lang.String r9 = (java.lang.String) r9\n if (r9 == 0) goto L_0x010e\n L_0x00f4:\n if (r15 == 0) goto L_0x00fe\n int r10 = p005b.p291q.p292a.C5266a.m9790D1(r13)\n if (r6 != r10) goto L_0x00fe\n r10 = 1\n goto L_0x00ff\n L_0x00fe:\n r10 = r5\n L_0x00ff:\n d.a.a.a.y0.b.j1.b.f0 r11 = new d.a.a.a.y0.b.j1.b.f0\n r6 = r14[r6]\n r11.<init>(r8, r6, r9, r10)\n r0.add(r11)\n if (r7 <= r3) goto L_0x010c\n goto L_0x0152\n L_0x010c:\n r6 = r7\n goto L_0x00a2\n L_0x010e:\n java.lang.StringBuilder r13 = new java.lang.StringBuilder\n r13.<init>()\n java.lang.String r14 = \"No parameter with index \"\n r13.append(r14)\n r13.append(r6)\n r14 = 43\n r13.append(r14)\n r13.append(r1)\n java.lang.String r14 = \" (name=\"\n r13.append(r14)\n d.a.a.a.y0.f.d r14 = r12.getName()\n r13.append(r14)\n java.lang.String r14 = \" type=\"\n r13.append(r14)\n r13.append(r8)\n java.lang.String r14 = \") in \"\n r13.append(r14)\n r13.append(r2)\n java.lang.String r14 = \"@ReflectJavaMember\"\n r13.append(r14)\n java.lang.String r13 = r13.toString()\n java.lang.IllegalStateException r14 = new java.lang.IllegalStateException\n java.lang.String r13 = r13.toString()\n r14.<init>(r13)\n throw r14\n L_0x0152:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p298d.p299a.p300a.p301a.p303y0.p304b.p309j1.p311b.C6204y.mo23417P(java.lang.reflect.Type[], java.lang.annotation.Annotation[][], boolean):java.util.List\");\n }", "static private PowerlessArray<String>\n types(final Class<?> actual) {\n final Class<?> end =\n Struct.class.isAssignableFrom(actual) ? Struct.class : Object.class;\n final PowerlessArray.Builder<String> r = PowerlessArray.builder(4);\n for (Class<?> i=actual; end!=i; i=i.getSuperclass()) { ifaces(i, r); }\n return r.snapshot();\n }", "@Override\n public String visit(ArrayCreationExpr n, Object arg) {\n return null;\n }", "public interface Creator<T> {\n\t\tpublic T create() throws APIException;\n\n\t\tpublic void destroy(T t);\n\n\t\tpublic boolean isValid(T t);\n\n\t\tpublic void reuse(T t);\n\t}", "Object createArray(int capacity);", "ComponentType createComponentType();", "BasicRestAnnotation() {\n\t}", "SchemaComponentType createSchemaComponentType();", "public static boolean isArray_quality() {\n return false;\n }", "public boolean isArray(){\n\t\treturn false;\n\t}", "public StudentService_ver2() {//Constructor\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tstuArr[i]=new Student();\n\t\t}\n\t}", "public void setupConvenienceObjects();", "public static void main(String[] args) {\n Student[] students=new Student[1000];\n \n// System.out.println(students[0]);\n// \n// students[0]=new Student(\"A\",1);\n// System.out.println(students[0].getRollNo());\n \n \n \n for(int i=0;i<students.length;i++) {\n \tstudents[i]=new Student(i+\"th\",i);\n \t//System.out.println(students[i].getCurrentStudents());\n }\n \n // System.out.println(students[250].getRollNo());\n \n System.out.println(students[250].getUniformColor());\n students[250].setUniformColor(\"White\");\n \n System.out.println(students[300].getUniformColor());\n\n \n \n System.out.println(Student.UNIFORM_COLOR);\n \n \n Student.aStaticFunction();\n students[999].aStaticFunction();\n \n students[999].aNonStaticFunction();\n \n \n \n \n \n\t}", "public static void main(String[] args)\n\t{\n\t\tBook book1 = new Book(\"Title\", \"Author\", 19.95);\n\t\tSystem.out.println(book1); // Automatically calls toString\n\n\t\t// Create a book2\n\t\tBook book2 = new Book();\n\t\t\n\t\t// Create a book3\n\t\tBook book3 = new Book();\n\t\t\t\t\n\t\t// Create a book4\n\t\tBook book4 = new Book();\n\t\t\n\t\t// Create an array of 4 Books\n\t\tBook[] books = new Book[4];\n\t\tSystem.out.println(Arrays.toString(books));\n\t\t\n\t\t// Assign book1 to the first position of the array\n\t\tbooks[0] = book1;\n\t\t\n\t\t// Assign book2 to the second position of the array\n\t\tbooks[1] = book2;\n\t\t\n\t\tSystem.out.println(Arrays.toString(books));\n\t\t\n\t}", "public final void annotationTypeElementRest() throws RecognitionException {\n int annotationTypeElementRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"annotationTypeElementRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(569, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 80) ) { return ; }\n // Java.g:570:5: ( type annotationMethodOrConstantRest ';' | normalClassDeclaration ( ';' )? | normalInterfaceDeclaration ( ';' )? | enumDeclaration ( ';' )? | annotationTypeDeclaration ( ';' )? )\n int alt102=5;\n try { dbg.enterDecision(102);\n\n switch ( input.LA(1) ) {\n case Identifier:\n case 56:\n case 57:\n case 58:\n case 59:\n case 60:\n case 61:\n case 62:\n case 63:\n {\n alt102=1;\n }\n break;\n case 37:\n {\n alt102=2;\n }\n break;\n case 46:\n {\n alt102=3;\n }\n break;\n case ENUM:\n {\n alt102=4;\n }\n break;\n case 73:\n {\n alt102=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 102, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(102);}\n\n switch (alt102) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:570:9: type annotationMethodOrConstantRest ';'\n {\n dbg.location(570,9);\n pushFollow(FOLLOW_type_in_annotationTypeElementRest3015);\n type();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(570,14);\n pushFollow(FOLLOW_annotationMethodOrConstantRest_in_annotationTypeElementRest3017);\n annotationMethodOrConstantRest();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(570,45);\n match(input,26,FOLLOW_26_in_annotationTypeElementRest3019); if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:571:9: normalClassDeclaration ( ';' )?\n {\n dbg.location(571,9);\n pushFollow(FOLLOW_normalClassDeclaration_in_annotationTypeElementRest3029);\n normalClassDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(571,32);\n // Java.g:571:32: ( ';' )?\n int alt98=2;\n try { dbg.enterSubRule(98);\n try { dbg.enterDecision(98);\n\n int LA98_0 = input.LA(1);\n\n if ( (LA98_0==26) ) {\n alt98=1;\n }\n } finally {dbg.exitDecision(98);}\n\n switch (alt98) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: ';'\n {\n dbg.location(571,32);\n match(input,26,FOLLOW_26_in_annotationTypeElementRest3031); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(98);}\n\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:572:9: normalInterfaceDeclaration ( ';' )?\n {\n dbg.location(572,9);\n pushFollow(FOLLOW_normalInterfaceDeclaration_in_annotationTypeElementRest3042);\n normalInterfaceDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(572,36);\n // Java.g:572:36: ( ';' )?\n int alt99=2;\n try { dbg.enterSubRule(99);\n try { dbg.enterDecision(99);\n\n int LA99_0 = input.LA(1);\n\n if ( (LA99_0==26) ) {\n alt99=1;\n }\n } finally {dbg.exitDecision(99);}\n\n switch (alt99) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: ';'\n {\n dbg.location(572,36);\n match(input,26,FOLLOW_26_in_annotationTypeElementRest3044); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(99);}\n\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:573:9: enumDeclaration ( ';' )?\n {\n dbg.location(573,9);\n pushFollow(FOLLOW_enumDeclaration_in_annotationTypeElementRest3055);\n enumDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(573,25);\n // Java.g:573:25: ( ';' )?\n int alt100=2;\n try { dbg.enterSubRule(100);\n try { dbg.enterDecision(100);\n\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==26) ) {\n alt100=1;\n }\n } finally {dbg.exitDecision(100);}\n\n switch (alt100) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: ';'\n {\n dbg.location(573,25);\n match(input,26,FOLLOW_26_in_annotationTypeElementRest3057); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(100);}\n\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:574:9: annotationTypeDeclaration ( ';' )?\n {\n dbg.location(574,9);\n pushFollow(FOLLOW_annotationTypeDeclaration_in_annotationTypeElementRest3068);\n annotationTypeDeclaration();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(574,35);\n // Java.g:574:35: ( ';' )?\n int alt101=2;\n try { dbg.enterSubRule(101);\n try { dbg.enterDecision(101);\n\n int LA101_0 = input.LA(1);\n\n if ( (LA101_0==26) ) {\n alt101=1;\n }\n } finally {dbg.exitDecision(101);}\n\n switch (alt101) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: ';'\n {\n dbg.location(574,35);\n match(input,26,FOLLOW_26_in_annotationTypeElementRest3070); if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(101);}\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 80, annotationTypeElementRest_StartIndex); }\n }\n dbg.location(575, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"annotationTypeElementRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public static void main(String[] args) {\n\t\tArraySingle arr = new ArraySingle();\r\n\t\t//arr.Test();\r\n\t\tarr.Array_Single_dimen();\r\n\t\r\n\t}", "public boolean _handleSingleArgumentFactory(DeserializationConfig config, BeanDescription beanDesc, VisibilityChecker<?> vchecker, AnnotationIntrospector intr, CreatorCollector creators, AnnotatedMethod factory, boolean isCreator) throws JsonMappingException {\n Class<?> type = factory.getRawParameterType(0);\n if (type == String.class || type == CharSequence.class) {\n if (!isCreator && !vchecker.isCreatorVisible(factory)) {\n return true;\n }\n creators.addStringCreator(factory, isCreator);\n return true;\n } else if (type == Integer.TYPE || type == Integer.class) {\n if (!isCreator && !vchecker.isCreatorVisible(factory)) {\n return true;\n }\n creators.addIntCreator(factory, isCreator);\n return true;\n } else if (type == Long.TYPE || type == Long.class) {\n if (!isCreator && !vchecker.isCreatorVisible(factory)) {\n return true;\n }\n creators.addLongCreator(factory, isCreator);\n return true;\n } else if (type == Double.TYPE || type == Double.class) {\n if (!isCreator && !vchecker.isCreatorVisible(factory)) {\n return true;\n }\n creators.addDoubleCreator(factory, isCreator);\n return true;\n } else if (type == Boolean.TYPE || type == Boolean.class) {\n if (!isCreator && !vchecker.isCreatorVisible(factory)) {\n return true;\n }\n creators.addBooleanCreator(factory, isCreator);\n return true;\n } else if (!isCreator) {\n return false;\n } else {\n creators.addDelegatingCreator(factory, isCreator, null);\n return true;\n }\n }", "ObjectDeclaration objects( Predicate<? super ObjectAssembly> specification );", "public abstract boolean isArrayParams();", "public static void main(String[] args) {\n\t\tCercle[] tabCercle = new Cercle[2];\r\n\t\t\r\n\t\ttabCercle[0] = new Cercle(5);\r\n\t\ttabCercle[1] = new Cercle(8);\r\n\t\t\r\n\t\tfor (int i=0;i<tabCercle.length;i++){\r\n\t\t\tSystem.out.println(tabCercle[i]);\r\n\t\t}\r\n\t\t\r\n\t\t//creer cercle avec classe CercleFactory\r\n\t\tCercle[] tabCercleFact = new Cercle[2];\r\n\t\ttabCercleFact[0] = CercleFactory.creerCercle(6);\r\n\t\ttabCercleFact[1] = CercleFactory.creerCercle(4);\r\n\t\t\r\n\t\tfor (int i=0;i<tabCercleFact.length;i++){\r\n\t\t\tSystem.out.println(tabCercleFact[i]);\r\n\t\t}\r\n\r\n\t}", "@Override\r\n\t\tpublic Array createArrayOf(String typeName, Object[] elements)\r\n\t\t\t\tthrows SQLException {\n\t\t\treturn null;\r\n\t\t}", "public static void main(String a[]) {\n\t\tArtistRegistry registry = new ArtistRegistry();\n\t\tArtist artist = registry.getPrototype(\"maleAnchor\");\n\n\t\t// Set his name\n\t\tartist.setName(\"Batista\");\n\n\t\t// display the custom artist made , client just had to set the name!\n\t\tSystem.out.println(artist);\n\n\t\t// Another example\n\t\t// Let's create a new prototype from existing prototype and add it to registry\n\n\t\tArtist femaleArtist = registry.getPrototype(\"femaleModelNoExperience\");\n\t\tfemaleArtist.setField(\"cinema\");\n\n\t\t// we have created a new prototype model who is female, has no experience and\n\t\t// tagged to cinema field\n\t\t// Now lets add this prototype to registry\n\t\t\n\t\tregistry.addPrototype(femaleArtist, \"femaleCinemaFresh\");\n\t\t\n\t\t\n\t\t//Now lets get the prototype again and assign a name and age \n\t\t\n\t\tArtist femaleCineArtist = registry.getPrototype(\"femaleCinemaFresh\");\n\t\t\n\t\tfemaleCineArtist.setAge(22);\n\t\tfemaleCineArtist.setName(\"Rithika\");\n\t\t\n\t\tSystem.out.println(femaleCineArtist);\n\t\t\n\n\t}", "private static final <R, C extends Collection<? super R>> C m64428a(@C6003d Object[] objArr, C c) {\n for (Object obj : objArr) {\n C14445h0.m62450a(3, \"R\");\n if (obj instanceof Object) {\n c.add(obj);\n }\n }\n return c;\n }", "ResourceAPI createResourceAPI();", "ObjectFactoryGenerator objectFactoryGenerator();" ]
[ "0.66494364", "0.64283484", "0.5847988", "0.54470474", "0.529542", "0.5128437", "0.50747585", "0.50178605", "0.4921848", "0.491676", "0.48715144", "0.48598677", "0.48397464", "0.48310965", "0.48256198", "0.4824616", "0.4815745", "0.48038927", "0.48016745", "0.4762685", "0.47611362", "0.4744022", "0.47250727", "0.47096285", "0.4708445", "0.47059998", "0.47050613", "0.47011513", "0.46964994", "0.46917218", "0.4683188", "0.46778646", "0.46694997", "0.4668277", "0.4660139", "0.46598953", "0.4650725", "0.4608656", "0.46008176", "0.4599015", "0.45970175", "0.45888948", "0.4588747", "0.45871612", "0.4576018", "0.45734215", "0.4562504", "0.45496023", "0.4544048", "0.4540641", "0.4538829", "0.45314988", "0.45304543", "0.45301974", "0.45298934", "0.4528861", "0.45269144", "0.4521165", "0.45194376", "0.4510034", "0.45088944", "0.4508363", "0.45062178", "0.45049414", "0.4499924", "0.4489576", "0.44834828", "0.4480547", "0.4476105", "0.44721365", "0.44676518", "0.44618225", "0.44437873", "0.4441054", "0.44391093", "0.44324026", "0.44275647", "0.44164318", "0.44015703", "0.4398968", "0.43974558", "0.43954256", "0.43940458", "0.43896303", "0.43860477", "0.43805552", "0.4378149", "0.4377045", "0.4368912", "0.4367653", "0.43654814", "0.4361978", "0.43563613", "0.4351851", "0.43515587", "0.43497863", "0.43492237", "0.43460903", "0.4345787", "0.43451464" ]
0.55396366
3
arguments [ classBody ]
private Operation classCreatorRest(Token t, Scope scope, Vector queue) { Vector v = new Vector(); String s = "super"; Operation root = new Operation(); root.type.type = Keyword.NONESY; root.type.ident = t; traceOn(v); root.left = arguments(scope, v, queue); traceOff(v); for(int i = 0; i < v.size(); i++) { Token pt = (Token)v.get(i); if (pt.kind == Keyword.NUMBERSY) s += pt.val; else if (pt.kind == Keyword.LNUMBERSY) s += pt.val + "L"; else if (pt.kind == Keyword.DNUMBERSY) s += pt.fval; else if (pt.kind == Keyword.IDENTSY) s += pt.string; else s += pt.kind.string; } if (s.endsWith("()")) s = ""; else s += ';'; if (nextSymbol == Keyword.LBRACESY) { ClassType x = new ClassType(); x.name = new Token(); x.name.kind = Keyword.IDENTSY; x.name.string = "Anonymous" + anonymous++; x.scope = new Scope(scope, Scope.classed, x.name.string); x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1)); x.implement = new ClassType[1]; x.implement[0] = x.extend; declMember(scope, x); if (!scopeStack.contains(scope)) scopeStack.add(scope); root.type.ident = x.name; root.type.type = Keyword.NONESY; root.left.left = null; Vector old = queue; queue = new Vector(); HashSet dummy = unresolved; unresolved = x.unresolved; unresolved.add(t.string); classBody(x, new Modifier(), s, queue); addToConstructor(x, queue); queue = old; unresolved = dummy; writeList(x); } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void inAClassBody(AClassBody node) {\n // Determine the start and end line numbers.\n int begin = findBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AClassDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AClassDeclaration parent = (AClassDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n } else if (parentNode instanceof\n ASimpleClassInstanceCreationExpression\n || parentNode instanceof\n AQualifiedClassInstanceCreationExpression\n || parentNode instanceof\n AInnerclassClassInstanceCreationExpression) {\n // This handles an anonymous inner class declaration.\n // Use special value of 'new' for anonymous classes.\n cname = ANONYMOUS_CLASS_NAME;\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "public static void main(String[] args) \r\n {\n \tClassB b = new ClassB(11,12,13);\r\n \t\r\n \t\r\n\t\t\r\n\t}", "public final void classCreatorRest() throws RecognitionException {\n int classCreatorRest_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"classCreatorRest\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(878, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 130) ) { return ; }\n // Java.g:879:5: ( arguments ( classBody )? )\n dbg.enterAlt(1);\n\n // Java.g:879:9: arguments ( classBody )?\n {\n dbg.location(879,9);\n pushFollow(FOLLOW_arguments_in_classCreatorRest5523);\n arguments();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(879,19);\n // Java.g:879:19: ( classBody )?\n int alt165=2;\n try { dbg.enterSubRule(165);\n try { dbg.enterDecision(165);\n\n int LA165_0 = input.LA(1);\n\n if ( (LA165_0==44) ) {\n alt165=1;\n }\n } finally {dbg.exitDecision(165);}\n\n switch (alt165) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: classBody\n {\n dbg.location(879,19);\n pushFollow(FOLLOW_classBody_in_classCreatorRest5525);\n classBody();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(165);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 130, classCreatorRest_StartIndex); }\n }\n dbg.location(880, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"classCreatorRest\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public void setBody(ClassBodyNode body);", "private void classBodyDeclaration(ClassType object, Modifier modifier, Vector queue)\r\n {\r\n Modifier x = new Modifier(modifier);\r\n x.cur = 0;\r\n\r\n if (nextSymbol == Keyword.SEMICOLONSY)\r\n {\r\n lookAhead();\r\n return;\r\n }\r\n\r\n if (nextSymbol == Keyword.STATICSY)\r\n {\r\n x.add(modifier());\r\n queue = object.statics;\r\n }\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n Vector label = new Vector();\r\n //label.add(\"\" + Operation.newLabel());\r\n block(null, null, object.scope, label, Scope.MAIN, null, queue);\r\n }\r\n else\r\n {\r\n for(int y = modifier1(); y != 0; y = modifier())\r\n x.add(y);\r\n\r\n if ((x.cur & Keyword.NATIVESY.value) != 0)\r\n Errors.warning(nextToken.source, nextToken.line, nextToken.col, \"native detected!\", false);\r\n\r\n if ((x.cur & x.constructors) == 0)\r\n x.cur |= modifier.cur & modifier.constructors;\r\n\r\n if ((x.cur & Keyword.STATICSY.value) != 0)\r\n queue = object.statics;\r\n\r\n memberDecl(x, object, queue);\r\n }\r\n }", "@Override\n\tpublic void VisitClassNode(BunClassNode Node) {\n\n\t}", "public static void main(String[] args) {\n\t\tLearningMultipleClasses LearningMultipleClassesObject = new LearningMultipleClasses();\r\n\t\t//how to use a specific message by using an object of that class\r\n\t\tLearningMultipleClassesObject.simpleMessage();\r\n\r\n\t}", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "@Override\n\tpublic Void visit(ClassDef classDef) {\n\t\tprintIndent(\"class\");\n\t\tindent++;\n\t\tclassDef.self_type.accept(this);\n\t\tclassDef.base_type.accept(this);\n\t\tfor (var v : classDef.body)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public static void main(String[] args)\n {\n new Bar().bar(class); // bad param list\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tIOUtils.loadMethodIODeps(\"cb\");\n\t\t\n\t\tFile clazz = new File(args[0]);\n\n\t\tfinal ClassReader cr1 = new ClassReader(new FileInputStream(clazz));\n//\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"z.txt\"));\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\t/*ClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_FRAMES) {\n\t\t\t@Override\n\t\t\tprotected String getCommonSuperClass(String type1, String type2) {\n\t\t\t\ttry {\n\t\t\t\t\treturn super.getCommonSuperClass(type1, type2);\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//\t\t\t\t\tSystem.err.println(\"err btwn \" + type1 + \" \" +type2);\n\t\t\t\t\treturn \"java/lang/Unknown\";\n\t\t\t\t}\n\t\t\t}\n\t\t};*/\n\t\t\n\t\tClassWriter cw1 = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n\t\t\n\t\tcr1.accept(new ClassVisitor(Opcodes.ASM5, cw1) {\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new JSRInlinerAdapter(super.visitMethod(access, name, desc, signature, exceptions), access, name, desc, signature, exceptions);\n\t\t\t}\n\t\t}, ClassReader.EXPAND_FRAMES);\n\t\t\n\t\tfinal ClassReader cr = new ClassReader(cw1.toByteArray());\n\t\tTraceClassVisitor tcv = new TraceClassVisitor(null,new Textifier(),pw);\n\t\t//ClassWriter tcv = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS);\n\t\tClassVisitor cv = new ClassVisitor(Opcodes.ASM5, tcv) {\n\t\t\tString className;\n\n\t\t\t@Override\n\t\t\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n\t\t\t\tsuper.visit(version, access, name, signature, superName, interfaces);\n\t\t\t\tthis.className = name;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tboolean isSynthetic = ClassInfoUtils.checkAccess(access, Opcodes.ACC_SYNTHETIC);\n\t\t\t\tboolean isNative = ClassInfoUtils.checkAccess(access, Opcodes.ACC_NATIVE);\n\t\t\t\tboolean isInterface = ClassInfoUtils.checkAccess(access, Opcodes.ACC_INTERFACE);\n\t\t\t\tboolean isAbstract = ClassInfoUtils.checkAccess(access, Opcodes.ACC_ABSTRACT);\n\t\t\t\t\n\t\t\t\tMethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);\n\t\t\t\tif (name.equals(\"toString\") && desc.equals(\"()Ljava/lang/String;\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"equals\") && desc.equals(\"(Ljava/lang/Object;)Z\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (name.equals(\"hashCode\") && desc.equals(\"()I\")) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else if (isSynthetic || isNative || isInterface || isAbstract) {\n\t\t\t\t\treturn mv;\n\t\t\t\t} else {\n\t\t\t\t\tmv = new DependencyAnalyzer(className, \n\t\t\t\t\t\t\taccess, \n\t\t\t\t\t\t\tname, \n\t\t\t\t\t\t\tdesc, \n\t\t\t\t\t\t\tsignature, \n\t\t\t\t\t\t\texceptions, \n\t\t\t\t\t\t\tmv, \n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\ttrue, \n\t\t\t\t\t\t\ttrue);\n\t\t\t\t\t//mv = new CalleeAnalyzer(className, access, name, desc, signature, exceptions, mv, true);\n\t\t\t\t\treturn mv;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcr.accept(cv, ClassReader.EXPAND_FRAMES);\n\t\tpw.flush();\n\t}", "public abstract void body();", "Object getClass_();", "Object getClass_();", "public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}", "private void classes()\n\t{\n\t\t//\tVariables and declarations\n\t\tint b = 5, c = 7, d = 100, e = 576, sum;\n\t\tString fName = \"NULL\", lName = \"NULL\", fullName;\n\t\tt_CH4_Classes noArg = new t_CH4_Classes();\n\t\t\n\t\t//\t\tPrompting the user to enter two separate names, one\n\t\t//\tfor the first name, the other for the last name.\n\t\tSystem.out.print(\"\\nPlease enter a first name: \");\n\t\tfName = in.next();\n\t\tSystem.out.print(\"Please enter a last name: \");\n\t\tlName = in.next();\n\t\t\n\t\t\n\t\t//\t\tCalling the method order that will concatinate the names and\n\t\t//\treturn a full name.\n\t\tnoArg.setName(fName, lName);\n\t\tfullName = noArg.getName();\n\t\tSystem.out.printf(\"Back in Chapter 4, fullName is %s.\\n\", fullName);\n\t\t\n\t\t//\tRunning simple addition method...\n\t\tsum = noArg.add(b, c);\n\t\tSystem.out.printf(\"sum = %d \\n\", sum);\n\t\t//\t...which will perform the same with any values passed...\n\t\tsum = 0;\n\t\tsum = noArg.add(d, e);\n\t\tSystem.out.printf(\"sum = %d \\n\", sum);\n\t\t//\t...including the same variable twice.\n\t\tsum = 0;\n\t\tsum = noArg.add(e, e);\n\t\tSystem.out.printf(\"sum = %d \\n\", sum);\n\t\t\n\t\t//\t\tAbove we declared an object with no arguments. Here\n\t\t//\tis an example of declaring an object with one string argument...\n\t\tt_CH4_Classes oneArg = new t_CH4_Classes(fName);\n\t\tSystem.out.printf(\"Name from oneArg is %s\\n\", oneArg.getName());\n\t\t\n\t\t//\t...or one int argument...\n\t\tt_CH4_Classes oneIntArg = new t_CH4_Classes(fName);\n\t\tSystem.out.printf(\"Name from oneIntArg is %s\\n\", oneIntArg.getName());\n\t\t\n\t\t//\t...or two string arguments...\n\t\tt_CH4_Classes twoArg = new t_CH4_Classes(\"Quenby\", \"Walls\");\n\t\tSystem.out.printf(\"Name from twoArg is %s\\n\", twoArg.getName());\n\t\t\n\t\t//\t...or three arguments, two strings and one int!\n\t\tt_CH4_Classes threeArg = new t_CH4_Classes(fName);\n\t\tSystem.out.printf(\"Name from threeArg is %s\\n\", threeArg.getName());\n\t}", "public ClassBodyNode getBody()throws ClassCastException;", "public NCLBody() {}", "public static void main(String args[]){\n //---------------------------------------------------------------------------\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassVariables classVariables=new ClassVariables(sqlTagsGeneratorTable);\n System.out.println(classVariables.getClassVariablesMethods());\n\t}", "@Override\n public void visit(ClassDefinitionNode classDefinitionNode) {\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello6 class= \"+Hello6.b);\n\t\t//Hello6 h=new Hello6();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tObject a = new ClassObj();\n\t\t ((A) a).Calling();\n\t\t \n\n\t}", "public static void main(String args[]){\n\tClasschild T=new Classchild();\n\tClass1 c=new Class1();\n\tc.addition();\n\tc.subtraction();\n\tT.multiplication();\n\t\n}", "public static void main(String[] args) {\n\t\tSecondLevelClass secondLevelClassObject = new SecondLevelClass(100, 200);\n\t}", "public static void main(String[] args) {\n\t\tnew MethodInnerclass().outerclassmethod();\r\n\t}", "public static void main(String[] args) {\n\n Integer n1 = 1;\n ClassUtil.printClassMethodMessage(n1);\n }", "public static void main(String args[]){\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassSQLContract classSQLContract=\n new ClassSQLContract(sqlTagsGeneratorTable);\n System.out.println(classSQLContract.getClassSQLContract());\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"add new class\");\n\n\t}", "public static void main(String[] args) {\n\t\tClassA x=new ClassB();\r\n\t\tClassB y=(ClassB)x;\r\n\t\tClassB z=new ClassC();\r\n\t\tClassC w=(ClassC)z;\r\n System.out.println(\"Int of classB-\"+y.a);\r\n System.out.println(\"String of classC-\"+w.str1);\r\n System.out.println(\"String of classC-\"+w.str);\r\n\r\n\t\t\r\n\r\n\t}", "public void setBody(ClassBody body) {\n\t\tif(body == null) {\n\t\t\t_componentType.connectTo((Association)createComponentType(new ClassBody()).parentLink());\n\t\t} else {\n\t\t\t_componentType.connectTo((Association) createComponentType(body).parentLink());\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tSystem.out.println(\"Class3\");\n\t\tSystem.out.println(\"Class4\");\n\t\t\n\t}", "public void firstClass(){\n }", "public static void main(String args[]) {\n Subclass subc = new Subclass();\r\n }", "protected abstract Result createClasses( Outline outline, CClassInfo bean );", "public static void main(String[] args) {\n\t\tBbs b1 = new Bbs(1, \"java\", \"fun java\", \"park\");\r\n\t\tBbs b2 = new Bbs(2, \"jsp\", \"fun jsp\", \"hong\");\r\n\t\tBbs b3 = new Bbs(3, \"spring\", \"fun spring\", \"kim\");\r\n\t\t\r\n\t\tSystem.out.println(\"no \"+\"title \"+ \"content \" + \"writer \");\r\n\t\tSystem.out.println(b1);\r\n\t\tSystem.out.println(b2);\r\n\t\tSystem.out.println(b3);\r\n\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tSystem.out.println(\"This is my class \");\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tClassC c = new ClassC();\n\t\tc.display();\n\t\tc.view();\n\n\t}", "public static void main(String[] args) {\n\n Rectangle rectangle = new Rectangle(10.5,10.5,100.5,100.5);\n if(rectangle instanceof Shape){\n rectangle.getParams();\n// rectangle.move1();\n// rectangle.getParams();\n } else {\n System.out.println(\"Это не объект фигуры!\");\n }\n System.out.println();\n }", "public static void main(String[] args) {\n \n\t\t SuperClass sc = new SuperClass();\n\t\t SuperClass sc1 = new SuperClass(5);\n\t\t SuperClass sc2 = new SuperClass(\"P\");\n\t\t SuperClass sc3 = new SuperClass(3,\"R\");\n\t\t SuperClass sc4 = new SuperClass(\"E\",2);\n\t\t \n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tClassC cb = new ClassC();\r\n\t\tcb.protectedMethod();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "void method_106(class_25 var1, int var2, int var3);", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "protected abstract Body newBodyImpl();", "public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }", "@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) {\n\t\tClassTwo obj = new ClassTwo();\n\t}", "protected void run(String classname, Vector args) throws BuildException {\r\n CommandlineJava cmdj = new CommandlineJava();\r\n cmdj.setClassname(classname);\r\n for (int i = 0; i < args.size(); i++) {\r\n cmdj.createArgument().setValue((String) args.elementAt(i));\r\n }\r\n run(cmdj);\r\n }", "public static void main(String[] args) {\n\t\tBox b = new Box(); // object creation of box class\n\t\tb.length = 20;\n\t\tb.width = 30;\n\t\tb.depth = 10;\n\t\tb.calculateArea();\n\t}", "Body getBody();", "public static void main(String[] args) \n\t{\n\t\tChildinteritanceClass obj1=new ChildinteritanceClass();\n\t\tobj1.sum();\n\t\tobj1.sub();\n\t\tobj1.Div();\n\t\tobj1.Mul();\n\n\t}", "public static void main (String []args)\n\t{\n\t\trectangle ob=new rectangle();\n\t\tob.length=10;\n\t\t//it will use the datatypes declared in class rectangle\n\t\tob.breath=20;\n\t\tob.display();\n\t}", "@Override\n\tpublic void buildAttributes(JDefinedClass cls) {\n\n\t}", "public static void main(String[] args)\n\t{\n\t\tJavaClass jc=new JavaClass();\n\t\tjc.name=null;\n\t\tjc.id=0;\n\t\t//constructor\n\t\tJavaClass jc2=new JavaClass();\n\t\t//method\n\t\tJavaClass jc3=new JavaClass();\n\t\tjc3.intiailize();\n\t\t\n\t\t//anonymous object\n\t\tnew JavaClass().intiailize();\n\t\n\t\t//copy constructor\n\t\t\n\t\tJavaClass copyConstructor=new JavaClass(jc2);\n\t\tSystem.out.println(copyConstructor.name);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tClassAndObject CAB = new ClassAndObject();\n\t\tCAB.display(10);\n\t}", "public void consulterClassement() {\n\t\t\n\t}", "protected Map<String, String> getCommentForClassElement(\r\n\t\t\tBodyDeclaration argBodyDeclaration) {\r\n\t\tMap<String, String> parameterMap = null;\r\n\t\tif (argBodyDeclaration.getJavaDoc() == null) {\r\n\t\t\tparameterMap = new HashMap<String, String>();\r\n\t\t} else {\r\n\t\t\tparameterMap = getCommentForClassElement(argBodyDeclaration\r\n\t\t\t\t\t.getJavaDoc().getContent());\r\n\t\t}\r\n\t\treturn parameterMap;\r\n\t}", "public static void main(String[] args) {\n\t\tBlockCode blockcode = new BlockCode();\n\t\t//blockcode.printName();\n\t\t\n\t\t}", "public static void createBodyAndType(World world) {\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\tDemoClass1 obj=new DemoClass1();\n\t//\tobj.add();\n\t\t\t\t\n\t}", "public static void main(String[] args)throws IOException {\r\n\t\t\r\n\t\tExampleDemo Demo=new ExampleDemo();//taking an object\r\n\t\r\n\t\tDemo.display();\r\n\t\t\r\n\t//here it is accepting the object class \r\n\t}", "public DefinedClass(final String className, final byte[] bytes) {\n this.className = className;\n this.bytes = bytes;\n }", "public static void main(String[] args) {\n\t\t\n\t MethodExample object=new MethodExample();\n\t object.greet(\"Sarmed\");\n\t object.greet(\"Farid\");\n\t object.greet(\"John\");\n\t object.greet(\"Gulen\");\n\t}", "public static void main(String[] args) {\n\t\tString []syntaxClasses= {\"SDLC\",\"Manual Testing\", \"Java\", \"GIT\"};\r\n\t\t// today we have java class\r\n\t\tSystem.out.println(\"Today we have \"+syntaxClasses[2]+\" class\");\r\n\t\t\r\n\t\t\r\n\t\tdouble [] numbers= {10.45, 12.89, 5.99};\r\n\t\tSystem.out.println(numbers[0]+\" \"+numbers[1]);\r\n\t\t\r\n\t\t// int [] num; compiler will give an error\r\n\t\t// num ={} \r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t// creating local class objects \n\t\t\n\t}", "Object yangAugmentedInfo(Class classObject);", "Object yangAugmentedInfo(Class classObject);", "public static void run(Class<CrossRideApplication> class1, String[] args) {\n\t\t\r\n\t}", "public FrameBodyASPI() {\r\n super();\r\n }", "public static void main(String[] args) {\n\t\tOuterClass outer = new OuterClass();\n\t\touter.outerMethod();\n\t\t\n\t\t\n\n\t}", "protected abstract void addBodyImpl( Body body );", "public static void main(String[] args) {\n System.out.println(\"Class 1\");\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Parent class object\");\n\t}", "@Override\n\tpublic abstract Classifier run ();", "public static void main(String[] args) {\n\t\tMembers_Inner_class a = new Members_Inner_class();\r\n\t\tMembers_Inner_class.Inner obj = a.new Inner();//Members\r\n\t\tobj.msg();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tnewClass obj=new newClass();\n\t\tobj.positiveNegative();\n\t\tobj.EqualUnequal();\n\t}", "void compileClass() throws IOException {\n tagBracketPrinter(CLASS_TAG, OPEN_TAG_BRACKET);\n try {\n compileClassHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(CLASS_TAG, CLOSE_TAG_BRACKET);\n\n }", "public static void main(String[] args) {\n\t\r\n\t\t\r\n multipleInherit obj=new multipleInherit();\r\n obj.walking();\r\n obj.sleeping();\r\n obj.read();\r\n\t}", "private static void main (String[] args) {\n Buku a = new Buku(\"Matahari\",\r\n \"Tere Liye\",\r\n \"Gramedia\",\r\n \"97860239034\",\r\n \"Novel Remaja\");\r\n\r\n //buat object b dari class Jurnal\r\n Jurnal b = new Jurnal(\"Persepsi Wisatawan Terhadap Kualitas Pelayanan Pramuwisata di Bali\",\r\n \"IBS Putra\",\r\n \"Jurnal IPTA\",\r\n \"Universitas Udayana\",\r\n \"https://doi.org/10.24843/IPTA.2017.v05.i01.p07\",\r\n \"Vo. 5 no. 1\",\r\n \"2017\");\r\n\r\n //Panggil method Cetak dari superclass\r\n a.Cetak();\r\n b.Cetak();\r\n }", "protected PyObject createObject(final PyObject pyClass, final Object[] args, final String[] keywords) {\n\t\treturn pyClass.__call__(convertArgs2Python(args), keywords);\n\t}", "public static void main(String[] args) {\n\t\tnew BodyCleaner().cleanTheBody();\n\t}", "public static void main(String[] args) {\n\t\tB b = new B(37);\n\n\t}", "public static void main(String[] args) {\r\n\t\t//method body\r\n\t}", "public static void main(String[] args) {\n\t\tinstanceblock i1=new instanceblock();\n\t\ti1.m1();\n\t\t\n\t}", "west.twouse.language.sparqlas.Class getClass_();", "void codeAppend(Environment env, Context ctx, Assembler asm,\n ClassDeclaration sbClass, boolean needBuffer)\n throws ClassNotFound, AmbiguousMember {\n if (type.isType(TC_CLASS)) {\n left.codeAppend(env, ctx, asm, sbClass, needBuffer);\n right.codeAppend(env, ctx, asm, sbClass, false);\n } else {\n super.codeAppend(env, ctx, asm, sbClass, needBuffer);\n }\n }", "protected void bodyAdded (ClusterRecord clrec, BodyObject body)\n {\n }", "public static void main( String[] args ) {\n\t\t\n\t\t//Taking it in order, let's instantiate this first so it can\n\t\t// run the constructor that is just a few lines above us.\n\t\tMainClass main = new MainClass();\n\t\t\n\t\t//After that, we can run the other constructor in the other\n\t\t// class.\n\t\tConstructorClass constructor = new ConstructorClass();\n\t\t\n\t}", "public static void main(String[] args) {\n//\t\tcar.changeSize();\r\n//\t\tSystem.out.println(car);\r\n//\t\tcar.bigWheel();\r\n//\t\tSystem.out.println(car);\r\n//\t\tcar.getBody().setMaterial(\"Metall\");\r\n//\t\tSystem.out.println(car);\r\n\t\t\r\n\t\tCar car = new Car(\"Ferrari\", new Body(\"Alu\", \"Color\"), new SteeringWheel(17), new Wheel(17, 4));\r\n\t\tSystem.out.println(car);\r\n\t\tcar.changeSize();\r\n\t\tSystem.out.println(car);\r\n\t\tcar.bigWheel();\r\n\t\tSystem.out.println(car);\r\n\t\tcar.getBody().setMaterial(\"Metall\");\r\n\t\tSystem.out.println(car);\r\n\t}", "public static void main(String[] args) {\n\t\tFive obj=new Five();\n\t\tobj.batchalloedment();\n\t\tobj.display();\n\t\tobj.idcardgeneration();\n\t\tobj.registartion();\n\t}", "ClassInstanceCreationExpression getClass_();", "protected void parseClassElements(TypeDeclaration argType,\r\n\t\t\tIClassCodeGenConfig argDaoConfig,\r\n\t\t\tMap<String, String> argImportClasses) {\r\n\t\tList<BodyDeclaration> bodys = argType.getMembers();\r\n\t\tif (bodys != null) {\r\n\r\n\t\t\t// Get DO class name.\r\n\t\t\tString doPackagePath = getRelativePackageForClass(\r\n\t\t\t\t\targDaoConfig.getPackagePath(), CODEGEN_DO_PACKAGE_PATH);\r\n\t\t\tString doName = getDOName(argDaoConfig.getName());\r\n\t\t\tString doClassName = doPackagePath + \".\" + doName;\r\n\r\n\t\t\tfor (BodyDeclaration bodyDeclar : bodys) {\r\n\t\t\t\tif (bodyDeclar instanceof MethodDeclaration) {\r\n\r\n\t\t\t\t\tMethodDeclaration md = (MethodDeclaration) bodyDeclar;\r\n\r\n\t\t\t\t\t// method's name\r\n\t\t\t\t\tString methodName = md.getName();\r\n\r\n\t\t\t\t\t// comment's map\r\n\t\t\t\t\tMap<String, String> commentsMap = getCommentForClassElement(md);\r\n\r\n\t\t\t\t\tMethodConfig methodConfig = new MethodConfig();\r\n\t\t\t\t\tmethodConfig.setName(methodName);\r\n\r\n\t\t\t\t\t// add annotations for the method\r\n\t\t\t\t\taddAnnotationForConfig(md.getAnnotations(), methodConfig);\r\n\r\n\t\t\t\t\tString returnType = getReturnType(methodConfig, doClassName);\r\n\t\t\t\t\tString mdReturnType = md.getType().toString();\r\n\r\n\t\t\t\t\tif (!StringUtils.isEmpty(returnType)) {\r\n\t\t\t\t\t\treturnType = getClassNameFromImportClasses(returnType,\r\n\t\t\t\t\t\t\t\targImportClasses);\r\n\t\t\t\t\t\tmethodConfig.setReturnType(returnType);\r\n\t\t\t\t\t\targDaoConfig.setOverride();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturnType = getClassNameFromImportClasses(\r\n\t\t\t\t\t\t\t\tmdReturnType, argImportClasses);\r\n\t\t\t\t\t\tmethodConfig.setReturnType(mdReturnType);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add import class for all elements in class.\r\n\t\t\t\t\taddImportClassForConfig(methodConfig, returnType,\r\n\t\t\t\t\t\t\targImportClasses);\r\n\r\n\t\t\t\t\t// Set method's comment and return's comment.\r\n\t\t\t\t\tCommentConfig methodComment = new CommentConfig();\r\n\t\t\t\t\tmethodComment.setValue(commentsMap.get(METHOD_COMMENT));\r\n\t\t\t\t\tmethodConfig.setConfigObject(CommentConfig.MAIN_TAG,\r\n\t\t\t\t\t\t\tmethodComment);\r\n\t\t\t\t\tmethodConfig.setReturnComment(commentsMap\r\n\t\t\t\t\t\t\t.get(RETURN_COMMENT));\r\n\r\n\t\t\t\t\tparseParameters(md, methodConfig, commentsMap, doClassName,\r\n\t\t\t\t\t\t\targDaoConfig, argImportClasses);\r\n\r\n\t\t\t\t\tparseExceptions(md, argDaoConfig, methodConfig,\r\n\t\t\t\t\t\t\tcommentsMap, doClassName);\r\n\r\n\t\t\t\t\tBlockStmt body = md.getBody();\r\n\t\t\t\t\tif (body != null) {\r\n\t\t\t\t\t\tString statement = body.toString();\r\n\t\t\t\t\t\tif (!StringUtils.isEmpty(statement)) {\r\n\t\t\t\t\t\t\tBodyConfig bodyConfig = new BodyConfig();\r\n\t\t\t\t\t\t\tstatement = CodeGenUtils.clearBrace(statement);\r\n\t\t\t\t\t\t\tbodyConfig.setValue(statement);\r\n\t\t\t\t\t\t\tmethodConfig.setConfigObject(BodyConfig.MAIN_TAG,\r\n\t\t\t\t\t\t\t\t\tbodyConfig);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add default exception\r\n\t\t\t\t\t// addDefaultException(methodConfig,\r\n\t\t\t\t\t// CODEGEN_DAO_DEFAULT_EXCEPTION);\r\n\r\n\t\t\t\t\tmethodConfig.clearAnnotations();\r\n\r\n\t\t\t\t\t// add method configuration into the daoConfig\r\n\t\t\t\t\targDaoConfig.setConfigObject(MethodConfig.MAIN_TAG,\r\n\t\t\t\t\t\t\tmethodConfig);\r\n\t\t\t\t} else if (bodyDeclar instanceof FieldDeclaration) {\r\n\t\t\t\t\tFieldConfig fieldConfig = new FieldConfig();\r\n\r\n\t\t\t\t\tFieldDeclaration fd = (FieldDeclaration) bodyDeclar;\r\n\t\t\t\t\tString modify = ModifierSet.getModify(fd.getModifiers());\r\n\t\t\t\t\tString className = fd.getType().toString();\r\n\t\t\t\t\tif (argImportClasses.containsKey(className)) {\r\n\t\t\t\t\t\tclassName = argImportClasses.get(className);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfieldConfig.setModify(modify);\r\n\t\t\t\t\tfieldConfig.setClassName(className);\r\n\r\n\t\t\t\t\tList<VariableDeclarator> list = fd.getVariables();\r\n\t\t\t\t\tif (list != null) {\r\n\t\t\t\t\t\tfor (VariableDeclarator vd : list) {\r\n\t\t\t\t\t\t\tString name = vd.getId().getName();\r\n\t\t\t\t\t\t\tString value = null;\r\n\t\t\t\t\t\t\tif (vd.getInit() != null) {\r\n\t\t\t\t\t\t\t\tvalue = vd.getInit().toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tfieldConfig.setName(name);\r\n\t\t\t\t\t\t\tif (!StringUtils.isEmpty(value)) {\r\n\t\t\t\t\t\t\t\tfieldConfig.setValue(value);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\targDaoConfig.setConfigObject(FieldConfig.MAIN_TAG,\r\n\t\t\t\t\t\t\tfieldConfig);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\t\tString name=\"shubham\";\n\t\tSystem.out.println(name);\n\t\t\n\t\tString str1=\"string 1\";\n\t\tSystem.out.println( str1);\n\t\t\n\t\tString str2;\n\t\tstr2=\"string 2\";\n\t\tSystem.out.println(str2);\n\t\t\n\t\tString str3=new String(\"string 3\");\n\t\tSystem.out.println(str3);\n\t\t\n\t\t\n\t\tMethodExample obj1 = new MethodExample();\n\t\tobj1.add(5, 9);\n\t\n\t\tMethodExample.circlearea(8);\n\t\t\n\t}", "void addClass(String className, ItemStack[] items, ItemStack offHand, ItemStack[] armors);", "public static void main(String[] args) {\n\n\t\t\n\t\t B obj1 = new B();\n\t\t \n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Account = \" + args[TAG_ACCOUNT]);\n System.out.println(\"Side = \" + args[TAG_SIDE]);\n\n System.out.println(FieldsExample.privateStaticValue);\n System.out.println(FieldsExample.packageStaticValue);\n\n FieldsExample ref1 = new FieldsExample();\n FieldsExample ref2 = new FieldsExample();\n FieldsExample ref3 = ref1;\n\n System.out.println(ref1.privateValue); // 0\n\n// log.log(Level.ERROR, \"this is error message\");\n\n MethodsExample.helloFromMethodsExample();\n MethodsExample methodsExample = new MethodsExample();\n // methodsExample.helloFromMethodsExample(); // wrong, better to use ClassName.method();\n }", "public static void main(String[] args) {\n AClass a = new AClass();\r\n a.f(6);\r\n \r\n AClass b = new BClass();\r\n b.f(7);\r\n \r\n AClass c = new CClass();\r\n c.f(10);\r\n \r\n AClass d = new DClass();\r\n d.f(11);\r\n \r\n }", "@Override\n\tpublic void inAInterfaceBody(AInterfaceBody node) {\n // Determine the start and end line numbers.\n int begin = findInterfaceBeginLine(node);\n int end = node.getRBrace().getLine();\n String cname = null;\n Node parentNode = node.parent();\n if (parentNode instanceof AInterfaceDeclaration) {\n // This handles normal class declarations, as well as\n // named inner class declaractions.\n AInterfaceDeclaration parent = (AInterfaceDeclaration) parentNode;\n TIdentifier name = parent.getIdentifier();\n cname = name.getText();\n\n }\n int braceLine = node.getLBrace().getLine();\n ClassDefinition cd = new ClassDefinition(cname, braceLine, begin, end);\n classLines.add(cd);\n }", "public static void main(String[] args) {\nBeta b=new Beta();\nb.marks();\n\n\n\t}", "public static void main(String[] args) throws ClassNotFoundException {\n\t\t\n\t\tFunctionOverloading func = new OverridingFunction();\n\t\tfunc.function();\n//\t\tfunc.functionOverloading(\"Sravan\");\n//\t\t\n//\t\tfunc.functionOverloading();\n//\t\t\n//\t\tfunc.funtionOver(32);\n//\t\tSystem.out.println(\"Data Member: \"+func.number);\n\t}", "public static void main(String[] args) {\n\t\tXYZ obj = new XYZ();\n\t\tobj.myMethod();\n\t\t//XYZ hyd=new DEF();\n\t\t//hyd.myMethod();\n\t//\thyd.childspecificMethod();\n //DEF oy=new DEF();\n\t\t//oy.myMethod();\n\t\tDEF def=new DEF();\n\t\tdef.childspecificMethod();\n\t\tdef.myMethod();\n\n\t}", "public static void main(String[] args) {\n\t\tFirstClass objA = new FirstClass();\r\n SecondClass objB = new SecondClass();\r\n System.out.println(\"in main(): \");\r\n System.out.println(\"objA.a = \"+objA.getFirstClass());\r\n System.out.println(\"objB.b = \"+objB.getSecondClass());\r\n objA.setFirstClass (222);\r\n objB.setSecondClass (333.33);\r\n System.out.println(\"objA.a = \"+objA.getFirstClass());\r\n System.out.println(\"objB.b = \"+objB.getSecondClass());\r\n\t}", "public static void main(String[] args){\n\t\t\tANN neuralNetwork= new ANN();\n\t\t\tCenteredFrame frame = new CenteredFrame(neuralNetwork);\n\t\t\t\n\t\t}" ]
[ "0.6212795", "0.6094653", "0.602533", "0.601708", "0.5859332", "0.5856543", "0.5824258", "0.5799439", "0.57859117", "0.5752963", "0.5740551", "0.57384706", "0.57365674", "0.57365674", "0.57009906", "0.5649859", "0.5627211", "0.56025904", "0.55918074", "0.5585633", "0.5581739", "0.5572404", "0.5494044", "0.5436988", "0.5436237", "0.54327804", "0.54294294", "0.54187465", "0.5417778", "0.5391575", "0.53803074", "0.53761494", "0.5372701", "0.53696704", "0.5367282", "0.53378177", "0.5329365", "0.53268254", "0.5326095", "0.5294068", "0.5293703", "0.52893263", "0.5285013", "0.52822834", "0.5281766", "0.52768517", "0.5258906", "0.52360684", "0.52306885", "0.5225513", "0.5220328", "0.52201074", "0.521798", "0.52125037", "0.52093554", "0.5199548", "0.51869076", "0.518359", "0.518276", "0.5178076", "0.5172271", "0.51696104", "0.51645213", "0.51598656", "0.51598656", "0.5156602", "0.5156384", "0.5150933", "0.5142579", "0.5142068", "0.51416326", "0.51398104", "0.5139129", "0.5130471", "0.5119845", "0.5119787", "0.5115966", "0.51057416", "0.51046413", "0.5103651", "0.5101318", "0.5099865", "0.5099797", "0.50943106", "0.50932676", "0.50868475", "0.50779074", "0.50730383", "0.50727063", "0.50714684", "0.5062497", "0.50527984", "0.5050063", "0.5044952", "0.50447905", "0.5043914", "0.50408334", "0.5040643", "0.5036595", "0.5035662", "0.50333774" ]
0.0
-1
'[' ']' BracketsOpt '.' "class" | ArgumentsOpt | '.' ("class" | "this")
private Operation identifierSuffix(Operation root, Operation next, Scope scope, Vector queue) { if (nextSymbol == Keyword.LBRACKETSY) { lookAhead(); lookAhead(); unresolved.add("JavaArray"); bracketsOpt(); matchKeyword(Keyword.DOTSY); matchKeyword(Keyword.CLASSSY); next.left.operator = Keyword.CLASSSY; } else if (nextSymbol == Keyword.DOTSY) { lookAhead(); if (nextSymbol == Keyword.CLASSSY) { lookAhead(); next.left.operator = Keyword.CLASSSY; } else { next = (next.right = new Operation()); next.left = new Operation(); next.left.operator = nextSymbol; matchKeyword(Keyword.THISSY); } } else { next.left.left = argumentsOpt(scope, null, queue); } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Snippet visit(MethodCallInConstructor n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t String className = \"NEED TO PUT CLASS NAME\";\n\t n.nodeToken.accept(this, argu);\n\t String methodName = n.identifier.accept(this, argu).expType.getTypeName();\n\t this.identifierList = new ArrayList<String>(0);\n\t\t\tidentifierList.add(\"this\");\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeOptional.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t SymbolTableClassEntry stce = classSymbolTable.get(className);\n\t\t\tSymbolTableMethodEntry stme = stce.methods.get(methodName);\n\t\t\tSnippet retExp = new Snippet(\"\", \"\", stme.returnType, false);\n\t\t\tretExp.returnTemp = className + \".\" + methodName + \"(\";\n\t\t\tint i = 0;\n\t\t\tfor(String str : identifierList)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t\tretExp.returnTemp += str;\n\t\t\t\telse\n\t\t\t\t\tretExp.returnTemp += \", \" + str;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tString toAdd =\"\";\n\t\t\t//if(!classes.containsKey(className)){\n\t\t\tif(!inAsync){\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=\"myUniquePlacePoint\";\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=asyncPoint+\"\";\n\t\t\t}\n\t\t\t//}\n\t\t\tretExp.returnTemp +=toAdd+ \")\";\n\t return retExp;\n\t }", "public CopsOptionParser() {\n\t\tsuper();\n\t\taddOption(HELP);\n\t\taddOption(SCENARIO);\n\t\taddOption(VALIDATE_ONLY);\n\t\taddOption(CONF);\n\n\t}", "public ArgumentsParser() {\n this(new String[0]);\n }", "private Term[] parseArgumentList() throws ParseException {\n \n final Term[] args = parseTermList();\n final int tt = _tokenizer.next();\n if (tt != ')') {\n _tokenizer.pushBack();\n reportError(\"Missing ')' or ','.\"); /*I18N*/\n }\n \n return args;\n }", "public Class<? extends DataType>[] getOptionalArgs();", "private Operation selector(Scope scope, Vector queue)\r\n {\r\n Operation root;\r\n\r\n root = new Operation();\r\n\r\n if (nextSymbol == Keyword.DOTSY)\r\n {\r\n lookAhead();\r\n\r\n root.operator = nextSymbol;\r\n\r\n if (nextSymbol == Keyword.IDENTSY)\r\n {\r\n root.name = nextToken;\r\n lookAhead();\r\n root.left = argumentsOpt(scope, null, queue);\r\n }\r\n else if (nextSymbol == Keyword.SUPERSY)\r\n {\r\n matchKeyword(Keyword.SUPERSY);\r\n root.left = arguments(scope, null, queue);\r\n }\r\n else\r\n {\r\n matchKeyword(Keyword.NEWSY);\r\n root.left = innerCreator(scope, queue);\r\n }\r\n }\r\n else\r\n {\r\n root.operator = nextSymbol;\r\n matchKeyword(Keyword.LBRACKETSY);\r\n follower.add(Keyword.RBRACKETSY);\r\n unresolved.add(\"JavaArray\");\r\n root.left = expression(scope, queue);\r\n follower.remove(follower.size() - 1);\r\n matchKeyword(Keyword.RBRACKETSY);\r\n }\r\n\r\n return root;\r\n }", "@Override\n\tpublic Class[] getTak(String arg) {\n\t\treturn null;\n\t}", "@Override\n public String visit(ClassExpr n, Object arg) {\n return null;\n }", "@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elementType.pushStack();\r\n }", "private void consumeConstructor() throws UiSelectorSyntaxException {\n if (text.charAt(0) != '(') {\n throw new UiSelectorSyntaxException(\"Was expecting \\\"\" + \")\" + \"\\\" but instead saw \\\"\" + text.charAt(0) + \"\\\"\" );\n }\n StringBuilder argument = new StringBuilder();\n\n int index = 1;\n int parenCount = 1;\n while (parenCount > 0) {\n try {\n switch (text.charAt(index)) {\n case ')':\n parenCount--;\n if (parenCount > 0) {\n argument.append(text.charAt(index));\n }\n break;\n case '(':\n parenCount++;\n argument.append(text.charAt(index));\n break;\n default:\n argument.append(text.charAt(index));\n }\n } catch (StringIndexOutOfBoundsException e) {\n throw new UiSelectorSyntaxException(\"unclosed paren in expression\");\n }\n index++;\n }\n if (argument.length() < 1) {\n throw new UiSelectorSyntaxException(\"UiScrollable constructor expects an argument\");\n }\n\n UiSelector selector = new UiSelectorParser().parse(argument.toString());\n scrollable = new UiScrollable(selector);\n\n // add two for parentheses surrounding arg\n text = text.substring(argument.length() + 2);\n }", "private Options() {\n }", "public ClassOperator(Class type) {\n this(new StaticArgument(simplify(type.getName())));\n }", "go.micro.runtime.RuntimeOuterClass.ListOptions getOptions();", "public interface ComponentBuilder {\n interface CommonComponent {\n\n /**\n * The name of the component\n *\n * @return the name of the component\n */\n ComponentBuilder named(String label);\n }\n\n interface Command extends CommonComponent {\n\n /**\n * Used to handle the execution of the command\n * @param commandExecute execution handler\n */\n Command handleExecute(CommandExecute commandExecute);\n\n Command addCommand(Consumer<Command> commandBuilder);\n\n <T extends Argument> Command addArg(T argument, Consumer<T> argumentBuilderConsumer);\n\n Command addArg(Consumer<Argument> consumer);\n }\n\n interface Argument<T> extends CommonComponent {\n\n /**\n * Handle tab completion at the place of the argument\n *\n * @param complete handler for the completion\n */\n Argument<T> handleTabComplete(@NonNull TabComplete complete);\n\n /**\n * Parse input into object\n *\n * @param parser function which parses string into object\n */\n Argument<T> parse(Function<String, ParseResult<T>> parser);\n\n /**\n * Should the argument be optional? Remember that optional arguments should be last\n *\n * @param optional if the argument should be optional\n */\n Argument<T> optional(boolean optional);\n }\n}", "public interface Option {\n\n String DEFAULT_PREFIX = \"<span style='color:red;'>\";\n\n String DEFAULT_SUFFIX = \"</span>\";\n\n String DEFAULT_REPLACEMENT = \"*\";\n\n Option DECORATE = new DecorateOption(DEFAULT_PREFIX, DEFAULT_SUFFIX);\n\n Option REPLACE = new ReplaceOption(DEFAULT_REPLACEMENT);\n\n Option REMOVE = new RemoveOption();\n\n String getPrefix();\n\n String getReplacement();\n\n String getSuffix();\n\n Option prefix(String prefix);\n\n Option replacement(String replacement);\n\n Option suffix(String suffix);\n\n Option cloneOption();\n}", "Object[] args();", "Object getClass_();", "Object getClass_();", "static ClassRefTypeSignature parse(final Parser parser, final String definingClassName) throws ParseException {\n if (parser.peek() == 'L') {\n parser.next();\n final int startParserPosition = parser.getPosition();\n if (!TypeUtils.getIdentifierToken(parser, /* stopAtDollarSign = */ true)) {\n throw new ParseException(parser, \"Could not parse identifier token\");\n }\n String className = parser.currToken();\n final List<TypeArgument> typeArguments = TypeArgument.parseList(parser, definingClassName);\n List<String> suffixes;\n List<List<TypeArgument>> suffixTypeArguments;\n boolean dropSuffixes = false;\n if (parser.peek() == '.' || parser.peek() == '$') {\n suffixes = new ArrayList<>();\n suffixTypeArguments = new ArrayList<>();\n while (parser.peek() == '.' || parser.peek() == '$') {\n parser.advance(1);\n if (!TypeUtils.getIdentifierToken(parser, /* stopAtDollarSign = */ true)) {\n // Got the empty string as the next token after '$', i.e. found an empty suffix.\n suffixes.add(\"\");\n suffixTypeArguments.add(Collections.<TypeArgument> emptyList());\n dropSuffixes = true;\n } else {\n suffixes.add(parser.currToken());\n suffixTypeArguments.add(TypeArgument.parseList(parser, definingClassName));\n }\n }\n if (dropSuffixes) {\n // Got an empty suffix -- either \"$$\", or a class name ending in a '$' (which Scala uses).\n // In this case, take the whole class reference as a single class name without suffixes.\n className = parser.getSubstring(startParserPosition, parser.getPosition()).replace('/', '.');\n suffixes = Collections.emptyList();\n suffixTypeArguments = Collections.emptyList();\n }\n } else {\n suffixes = Collections.emptyList();\n suffixTypeArguments = Collections.emptyList();\n }\n parser.expect(';');\n return new ClassRefTypeSignature(className, typeArguments, suffixes, suffixTypeArguments);\n } else {\n return null;\n }\n }", "public interface ClassBody extends Term\n{\n /**\n * List of the class's members.\n * @return A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n List<ClassMember> members();\n\n /**\n * Set the class's members.\n * @param members A list of {@link polyglot.ast.ClassMember ClassMember}.\n */\n ClassBody members(List<ClassMember> members);\n\n /**\n * Add a member to the class, returning a new node.\n */\n ClassBody addMember(ClassMember member);\n}", "public static MethodCallExpression call(Class clazz, String methodName, Class[] typeArguments, Expression[] arguments) { throw Extensions.todo(); }", "interface Optionage {\n\n /**\n * Gets the set of supported options.\n * @return the set of supported options\n * @see Doclet#getSupportedOptions()\n */\n Set<? extends Doclet.Option> getSupportedOptions();\n\n /**\n * Gets a single parameter value for the given option or returns a default value. Use this\n * method only for options that take exactly one parameter value, because only the first\n * value will be returned for options accepting multiple parameter values. For options\n * that do not accept parameter values, this method will always return the default value,\n * whether or not the option is present. To check whether an option that does not accept\n * parameter values is present, use {@link #isPresent(String)}.\n *\n * @param name the option name\n * @param defaultValue the default value; if null, this method may return null\n * @return the parameter value for the given option, or\n */\n default String getOptionString(String name, String defaultValue) {\n List<String> paramValues = getOptionStrings(name);\n if (paramValues != null && !paramValues.isEmpty()) {\n return paramValues.get(0);\n }\n return defaultValue;\n }\n\n /**\n * Gets the list of parameter values specified for the given option if it is present.\n * @param name the option name\n * @return the list of parameter values specified for the given option, or null if the option was not present\n */\n @Nullable\n List<String> getOptionStrings(String name);\n\n /**\n * Checks whether this option is present, meaning it was present on the command line that was parsed.\n * @param name the option name\n * @return true iff option is present\n */\n default boolean isPresent(String name) {\n return getOptionStrings(name) != null;\n }\n\n /**\n * Creates a composite instance that implements this interface by querying multiple other instances.\n * @param priority the first instance to query\n * @param lessers the other instances to query, in order of priority\n * @return a new instance representing a composite\n */\n static Optionage compose(Optionage priority, Optionage...lessers) {\n requireNonNull(priority, \"priority\");\n List<Optionage> optionages = Stream.concat(Stream.of(priority), Stream.of(lessers)).collect(Collectors.toList());\n return new Optionage() {\n @Override\n public Set<? extends Doclet.Option> getSupportedOptions() {\n return optionages.stream()\n .flatMap(optionage -> optionage.getSupportedOptions().stream())\n .collect(Collectors.toSet());\n }\n\n @Nullable\n @Override\n public List<String> getOptionStrings(String name) {\n for (Optionage optionage : optionages) {\n @Nullable List<String> paramValues = optionage.getOptionStrings(name);\n if (paramValues != null) {\n return paramValues;\n }\n }\n return null;\n }\n\n @Override\n public String getOptionString(String name, String defaultValue) {\n for (Optionage optionage : optionages) {\n String value = optionage.getOptionString(name, null);\n if (value != null) {\n return value;\n }\n }\n return defaultValue;\n }\n\n @Override\n public boolean isPresent(String name) {\n return optionages.stream().anyMatch(optionage -> optionage.isPresent(name));\n }\n };\n }\n}", "go.micro.runtime.RuntimeOuterClass.ListOptionsOrBuilder getOptionsOrBuilder();", "public Class<? extends DataType>[] getRequiredArgs();", "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "List method_111(class_922 var1, int var2, int var3, int var4);", "public void doClass(String callerName) throws LexemeException {\n\t\tlogMessage(\"<class>--> class ID [extends ID]{{<member>}}\");\n\t\tfunctionStack.push(\"<class>\");\n\t\tconsumeToken(); // consume class token\n\t\t// check ID token\n\t\tif (ifPeekThenConsume(\"ID_\")) {\n\t\t\t// check for optional EXTENDS_ token\n\t\t\tif (ifPeek(\"EXTENDS_\")) {\n\t\t\t\tconsumeToken();\n\t\t\t\tifPeekThenConsume(\"ID_\");\n\t\t\t}\n\t\t\t// check for left curly\n\t\t\tif (ifPeekThenConsume(\"L_CURLY_\")) {\n\n\t\t\t\twhile (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\") || ifPeekIsType()) {\n\t\t\t\t\t// check for optional PUBLIC_ & STATIC_ tokens\n\t\t\t\t\tif (ifPeek(\"PUBLIC_\") || ifPeek(\"STATIC_\")) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t} else if (ifPeekIsType()) {\n\t\t\t\t\t\tdoMember(\"<class>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// TODO check for arraytype!!\n\t\t\t\t// CHECK ClOSING CURLY\n\n\t\t\t\t// TODO uncomment line\n\t\t\t\tifPeekThenConsume(\"R_CURLY_\");\n\t\t\t}\n\n\t\t}\n\t\tlogVerboseMessage(callerName);\n\t\tfunctionStack.pop();\n\t}", "@Test\n public void parse_validArgs_returnsListItemCommand() throws ParseException {\n assertEquals(parser.parse(\" \").getClass(), ListItemCommand.class);\n }", "public void createOptionsList() {\r\n int j;\r\n int i;\r\n String tempClassOptionsString = this.classOptionsString;\r\n while (tempClassOptionsString.length() > 0) {\r\n char cliChar = ' ';\r\n String optionValue = \"\";\r\n String str = \"\";\r\n tempClassOptionsString = tempClassOptionsString.trim();\r\n\r\n i = tempClassOptionsString.indexOf(\"-\");\r\n if (i >= 0) {\r\n cliChar = tempClassOptionsString.charAt(i + 1);\r\n tempClassOptionsString = tempClassOptionsString.substring(i + 2).trim();\r\n if (tempClassOptionsString.length() == 0) {\r\n optionValue = \"true\";\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n } else {\r\n if (tempClassOptionsString.charAt(0) == '-') {\r\n optionValue = \"true\";\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n } else if (tempClassOptionsString.charAt(0) == '(') {\r\n int openBracket = 0;\r\n int closeBracket = 0;\r\n StringBuffer temp = new StringBuffer(\"\");\r\n for (int k = 0; k < tempClassOptionsString.length(); k++) {\r\n char cTemp = tempClassOptionsString.charAt(k);\r\n temp.append(cTemp);\r\n switch (cTemp) {\r\n case '(': {\r\n openBracket += 1;\r\n break;\r\n }\r\n case ')': {\r\n closeBracket += 1;\r\n if (closeBracket == openBracket) {\r\n tempClassOptionsString = tempClassOptionsString.substring(k + 1).trim();\r\n optionValue = temp.toString().trim();\r\n optionValue = optionValue.substring(1, optionValue.length() - 1);\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassObjectOptions.add(optionPair);\r\n optionsString subObject = new optionsString(optionValue);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n\r\n } else {\r\n j = tempClassOptionsString.indexOf(\" \");\r\n if (j > 0) {\r\n optionValue = tempClassOptionsString.substring(0, j);\r\n tempClassOptionsString = tempClassOptionsString.substring(j + 1).trim();\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n } else {\r\n optionValue = tempClassOptionsString;\r\n tempClassOptionsString = \"\";\r\n Pair<String, String> optionPair = new Pair<String, String>(String.valueOf(cliChar), optionValue);\r\n this.outputClassOptions.add(optionPair);\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n i = this.classFullName.lastIndexOf('.');\r\n if (i > 0) {\r\n this.classShortName = this.classFullName.substring(i + 1);\r\n } else\r\n this.classShortName = this.classFullName;\r\n }", "@Override\n\tpublic Object visit(ASTPCGenBracket node, Object data)\n\t{\n\t\t//Should be stripped by the function\n\t\tFormulaSemantics semantics = (FormulaSemantics) data;\n\t\tFormulaSemanticsUtilities.setInvalid(semantics,\n\t\t\t\"Parse Error: Invalid Class: \" + node.getClass().getName()\n\t\t\t\t+ \" found in operable location (class cannot be evaluated)\");\n\t\treturn semantics;\n\t}", "void selectClass(final IArenaPlayer player, final Sign sign, final String className);", "public interface Option {\n\n /**\n * Processes String arguments into a CommandLine.\n *\n * The iterator will initially point at the first argument to be processed\n * and at the end of the method should point to the first argument not\n * processed. This method MUST process at least one argument from the\n * ListIterator.\n *\n * @param commandLine\n * The CommandLine object to store results in\n * @param args\n * The arguments to process\n * @throws OptionException\n * if any problems occur\n */\n void process(\n final WriteableCommandLine commandLine,\n final ListIterator args)\n throws OptionException;\n\n /**\n * Adds defaults to a CommandLine.\n *\n * Any defaults for this option are applied as well as the defaults for\n * any contained options\n *\n * @param commandLine\n * The CommandLine object to store defaults in\n */\n void defaults(final WriteableCommandLine commandLine);\n\n /**\n * Indicates whether this Option will be able to process the particular\n * argument.\n *\n * @param argument\n * The argument to be tested\n * @return true if the argument can be processed by this Option\n */\n boolean canProcess(final WriteableCommandLine commandLine, final String argument);\n\n /**\n * Indicates whether this Option will be able to process the particular\n * argument. The ListIterator must be restored to the initial state before\n * returning the boolean.\n *\n * @see #canProcess(WriteableCommandLine,String)\n * @param arguments\n * the ListIterator over String arguments\n * @return true if the argument can be processed by this Option\n */\n boolean canProcess(final WriteableCommandLine commandLine, final ListIterator arguments);\n\n /**\n * Identifies the argument prefixes that should trigger this option. This\n * is used to decide which of many Options should be tried when processing\n * a given argument string.\n *\n * The returned Set must not be null.\n *\n * @return The set of triggers for this Option\n */\n Set getTriggers();\n\n /**\n * Identifies the argument prefixes that should be considered options. This\n * is used to identify whether a given string looks like an option or an\n * argument value. Typically an option would return the set [--,-] while\n * switches might offer [-,+].\n *\n * The returned Set must not be null.\n *\n * @return The set of prefixes for this Option\n */\n Set getPrefixes();\n\n /**\n * Checks that the supplied CommandLine is valid with respect to this\n * option.\n *\n * @param commandLine\n * The CommandLine to check.\n * @throws OptionException\n * if the CommandLine is not valid.\n */\n void validate(final WriteableCommandLine commandLine)\n throws OptionException;\n\n /**\n * Builds up a list of HelpLineImpl instances to be presented by HelpFormatter.\n *\n * @see HelpLine\n * @see org.apache.commons.cli2.util.HelpFormatter\n * @param depth\n * the initial indent depth\n * @param helpSettings\n * the HelpSettings that should be applied\n * @param comp\n * a comparator used to sort options when applicable.\n * @return a List of HelpLineImpl objects\n */\n List helpLines(\n final int depth,\n final Set helpSettings,\n final Comparator comp);\n\n /**\n * Appends usage information to the specified StringBuffer\n *\n * @param buffer the buffer to append to\n * @param helpSettings a set of display settings @see DisplaySetting\n * @param comp a comparator used to sort the Options\n */\n void appendUsage(\n final StringBuffer buffer,\n final Set helpSettings,\n final Comparator comp);\n\n /**\n * The preferred name of an option is used for generating help and usage\n * information.\n *\n * @return The preferred name of the option\n */\n String getPreferredName();\n\n /**\n * Returns a description of the option. This string is used to build help\n * messages as in the HelpFormatter.\n *\n * @see org.apache.commons.cli2.util.HelpFormatter\n * @return a description of the option.\n */\n String getDescription();\n\n /**\n * Returns the id of the option. This can be used in a loop and switch\n * construct:\n *\n * <code>\n * for(Option o : cmd.getOptions()){\n * switch(o.getId()){\n * case POTENTIAL_OPTION:\n * ...\n * }\n * }\n * </code>\n *\n * The returned value is not guarenteed to be unique.\n *\n * @return the id of the option.\n */\n int getId();\n\n /**\n * Recursively searches for an option with the supplied trigger.\n *\n * @param trigger the trigger to search for.\n * @return the matching option or null.\n */\n Option findOption(final String trigger);\n\n /**\n * Indicates whether this option is required to be present.\n * @return true iff the CommandLine will be invalid without this Option\n */\n boolean isRequired();\n\n /**\n * Returns the parent of this option. Options can be organized in a\n * hierarchical manner if they are added to groups. This method can be used\n * for obtaining the parent option of this option. The result may be\n * <b>null</b> if this option does not have a parent.\n *\n * @return the parent of this option\n */\n\n /**\n * Sets the parent of this option. This method is called when the option is\n * added to a group. Storing the parent of an option makes it possible to\n * keep track of hierarchical relations between options. For instance, if an\n * option is identified while parsing a command line, the group this option\n * belongs to can also be added to the command line.\n *\n * @param parent the parent option\n */\n}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "public interface CommandLineParser {\n\n CommandLine parse(Options options, String[] arguments) throws ParseException;\n CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException;\n\n}", "T addJavaOptions(String... javaOptions);", "public interface CmdLineOption {\n \n /**\n * Checks if this option parser recognizes the specified\n * option name.\n */\n boolean accepts(String optionName);\n\n /**\n * Called if the option that this parser recognizes is found.\n * \n * @param parser\n * The parser that's using this option object.\n * \n * For example, if the option \"-quiet\" is simply an alias to\n * \"-verbose 5\", then the implementation can just call the\n * {@link CmdLineParser#parse(String[])} method recursively. \n * \n * @param params\n * The rest of the arguments. This method can use this\n * object to access the arguments of the option if necessary.\n * \n * @return\n * The number of arguments consumed. For example, return 0\n * if this option doesn't take any parameter.\n */\n int parseArguments( CmdLineParser parser, Parameters params ) throws CmdLineException;\n \n// /**\n// * Adds the usage message for this option. \n// * <p>\n// * This method is used to build usage message for the parser.\n// * \n// * @param buf\n// * Messages should be appended to this buffer.\n// * If you add something, make sure you add '\\n' at the end. \n// */\n// void appendUsage( StringBuffer buf );\n \n \n /**\n * SPI for {@link CmdLineOption}.\n * \n * Object of this interface is passed to\n * {@link CmdLineOption}s to make it easy/safe to parse\n * additional parameters for options.\n */\n public interface Parameters {\n /**\n * Gets the recognized option name.\n * \n * @return\n * This option name has been passed to the\n * {@link CmdLineOption#accepts(String)} method and\n * the method has returned <code>true</code>.\n */\n String getOptionName();\n \n /**\n * Gets the additional parameter to this option.\n * \n * @param idx\n * specifying 0 will retrieve the token next to the option.\n * For example, if the command line looks like \"-o abc -d x\",\n * then <code>getParameter(0)</code> for \"-o\" returns \"abc\"\n * and <code>getParameter(1)</code> will return \"-d\".\n * \n * @return\n * Always return non-null valid String. If an attempt is\n * made to access a non-existent index, this method throws\n * appropriate {@link CmdLineException}.\n */\n String getParameter( int idx ) throws CmdLineException;\n \n /**\n * The convenience method of\n * <code>Integer.parseInt(getParameter(idx))</code>\n * with proper error handling.\n * \n * @exception CmdLineException\n * If the parameter is not an integer, it throws an\n * approrpiate {@link CmdLineException}.\n */\n int getIntParameter( int idx ) throws CmdLineException;\n }\n \n}", "Optional<String[]> arguments();", "go.micro.runtime.RuntimeOuterClass.CreateOptions getOptions();", "public ThisKeyword(){\n this(1.0);\n }", "ParameterizedWithThisOp(int a , double d, char c, String str )\n {\n this.a = a;\n this.d = d;\n this.c = c;\n this.str = str;\n }", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "SomeClass someClass();", "public interface CommandParser {\n String[] splitStringIntoCommands(String string);\n String[] splitCommandIntoParams(String string);\n String convertArrayToString(String... stringArray);\n}", "Argument metavar(String... metavar);", "public T parseArguments(String[] args) {\r\n try {\r\n //Load annotated methods into a Map keyed by the option name\r\n final T targetInstance = targetClass.newInstance();\r\n\r\n final Map<String, String> argsMap = getOptionsMap(args);\r\n\r\n for (Entry<String, Method> annotatedMethodEntry : annotatedMethods.entrySet()) {\r\n final String optionName = annotatedMethodEntry.getKey();\r\n if (argsMap.containsKey(optionName)) {\r\n final String value = argsMap.get(optionName);\r\n invokeAnnotatedMethod(optionName, targetInstance, value);\r\n } else if (!hasDefault(optionName)) {\r\n invokeAnnotationDefault(optionName, targetInstance);\r\n }\r\n }\r\n\r\n return targetInstance;\r\n } catch (ReflectiveOperationException ex) {\r\n throw new IllegalArgumentException(Arrays.toString(args), ex);\r\n }\r\n }", "public Snippet visit(DotIdentifier n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t String object = n.identifier.accept(this, argu).expType.getTypeName();\n\t Symbol sym1 = getIdentifier(object, currentBlock, currentClassName);\n\t\t\tString refClass = \"\";\n\t\t\tif(sym1 == null)\n\t\t\t\trefClass = object; // Static reference\n\t\t\telse\n\t\t\t\trefClass = sym1.symbolType.getTypeName(); // Object reference\n\t n.nodeToken.accept(this, argu);\n\t String identifier = n.identifier1.accept(this, argu).expType.getTypeName();\n\t \n\t\t\tSymbol sym2 = getIdentifier(identifier, 0, refClass); \n\t\t\tString toAdd;\n\t\t\t\n\t\t\tif( !classes.containsKey(object)){\n\t\t\tif(!inAsync ){\n\t\t\t\ttPlasmaCode += generateTabs(blockDepth)+generatePlaceCheckCode( \"myUniquePlacePoint\", object);\n\t\t\t}else{\n\t\t\t\ttPlasmaCode += generateTabs(blockDepth)+generatePlaceCheckCode(asyncPoint , object);\n\t\t\t}\n\t\t\t}\n\t\t\treturn new Snippet(\"\", \"\"+object + \".\" + identifier, sym2.symbolType /* Not needed, but kept only as a cross check */, false);\n\t }", "public bwq(String paramString1, String paramString2)\r\n/* 10: */ {\r\n/* 11: 9 */ this.a = paramString1;\r\n/* 12:10 */ this.f = paramString2;\r\n/* 13: */ }", "@Override\n\tpublic Void visit(ClassDef classDef) {\n\t\tprintIndent(\"class\");\n\t\tindent++;\n\t\tclassDef.self_type.accept(this);\n\t\tclassDef.base_type.accept(this);\n\t\tfor (var v : classDef.body)\n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "private void insertThis(ClassType object, MethodType x)\r\n {\r\n if ((x.modify & Keyword.STATICSY.value) == 0)\r\n {\r\n Parameter p = new Parameter();\r\n p.name = new Token();\r\n p.name.string = \"§this\";\r\n p.type = new Type();\r\n p.type.version = object.version;\r\n p.type.ident.string = object.name.string;\r\n p.type.type = Keyword.NONESY;\r\n\r\n Parameter [] q = new Parameter[x.parameter.length + 1];\r\n\r\n q[0] = p;\r\n for(int i = 1; i < q.length; i++)\r\n q[i] = x.parameter[i - 1];\r\n\r\n x.parameter = q;\r\n }\r\n\r\n if (x.throwing.length > 0)\r\n {\r\n Parameter p = new Parameter();\r\n p.name = new Token();\r\n p.name.string = \"§exception\";\r\n p.name.kind = Keyword.IDENTSY;\r\n p.type = new Type();\r\n p.type.type = Keyword.VOIDSY;\r\n\r\n Parameter[] q = new Parameter[x.parameter.length + 1];\r\n for (int i = 0; i < x.parameter.length; i++)\r\n q[i] = x.parameter[i];\r\n\r\n q[q.length - 1] = p;\r\n x.parameter = q;\r\n }\r\n }", "@Test\n\tpublic void test_ClassDeclarationAnonymousInMethod_Dec_0_Ref_1() {\n\t\tconfigureParser(\"public class Other { public void method() { Bar bar = new Bar(); bar.accept(new Foo() {public void fooMethod(){}} ); } } \", \"Foo\", 0, 1);\n\t}", "public static ParameterExpression parameter(Class type) { throw Extensions.todo(); }", "public interface GosuTypeArgumentList extends IGosuPsiElement\n{\n GosuTypeElement[] getTypeArgumentElements();\n}", "@Override\n\tpublic IKeyword option() { return option; }", "public static void main(String[] args)\n {\n new Bar().bar(class); // bad param list\n }", "public static void main(String[] args) {\n System.out.println((SubClass) (args.length == 42 ? new Object() : null));\n }", "void compileClass() throws IOException {\n tagBracketPrinter(CLASS_TAG, OPEN_TAG_BRACKET);\n try {\n compileClassHelper();\n } catch (IOException e) {\n e.printStackTrace();\n }\n tagBracketPrinter(CLASS_TAG, CLOSE_TAG_BRACKET);\n\n }", "public MakeClass(String classAccessSp,String className,String listOfAttributes,int tabSize )\n {\n this(\"\",classAccessSp,className,listOfAttributes,tabSize);\n }", "final public IASTLiteralTextNode Argument() throws ParseException {\r\n IASTLiteralTextNode node = null;\r\n Token lastToken = null;\r\n Token equalToken = null;\r\n Token firstToken = null;\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case INT:\r\n firstToken = jj_consume_token(INT);\r\n if (jj_2_3(2147483647)) {\r\n equalToken = jj_consume_token(EQUAL);\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case MINUS:\r\n jj_consume_token(MINUS);\r\n break;\r\n default:\r\n jj_la1[16] = jj_gen;\r\n ;\r\n }\r\n lastToken = jj_consume_token(INT);\r\n } else {\r\n ;\r\n }\r\n if (equalToken == null) {\r\n lastToken = firstToken;\r\n }\r\n break;\r\n case ASTERISK:\r\n case WORD:\r\n case STRING:\r\n case PACKAGE_OPTION:\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case ASTERISK:\r\n firstToken = jj_consume_token(ASTERISK);\r\n break;\r\n case PACKAGE_OPTION:\r\n firstToken = jj_consume_token(PACKAGE_OPTION);\r\n break;\r\n case WORD:\r\n firstToken = jj_consume_token(WORD);\r\n break;\r\n case STRING:\r\n firstToken = jj_consume_token(STRING);\r\n break;\r\n default:\r\n jj_la1[17] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n lastToken = firstToken;\r\n break;\r\n default:\r\n jj_la1[18] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n node = getRawLiteralTextNodeSpanning(firstToken, lastToken);\r\n {if (true) return node;}\r\n throw new Error(\"Missing return statement in function\");\r\n }", "public static void main(String[] args) {\n\t\tString []syntaxClasses= {\"SDLC\",\"Manual Testing\", \"Java\", \"GIT\"};\r\n\t\t// today we have java class\r\n\t\tSystem.out.println(\"Today we have \"+syntaxClasses[2]+\" class\");\r\n\t\t\r\n\t\t\r\n\t\tdouble [] numbers= {10.45, 12.89, 5.99};\r\n\t\tSystem.out.println(numbers[0]+\" \"+numbers[1]);\r\n\t\t\r\n\t\t// int [] num; compiler will give an error\r\n\t\t// num ={} \r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public Arginfo visit(BracketExpression n, Arginfo argu) {\n Arginfo _ret=null;\n n.f0.accept(this, argu);\n Arginfo temp = n.f1.accept(this, argu);\n n.f2.accept(this, argu);\n \n //System.err.println(argu.classname+\" \"+argu.methodname+\" \");\n if(temp==null){\n \t //System.err.println(\"noo\");\n }\n \n return temp;\n }", "ClassInstanceCreationExpression getClass_();", "final public void ClassName() throws ParseException {\n jj_consume_token(IDENTIFIER);\n label_24:\n while (true) {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n case 98:\n ;\n break;\n default:\n jj_la1[104] = jj_gen;\n break label_24;\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case 88:\n jj_consume_token(88);\n jj_consume_token(IDENTIFIER);\n break;\n case 98:\n jj_consume_token(98);\n jj_consume_token(IDENTIFIER);\n break;\n default:\n jj_la1[105] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n }", "protected P parse(String options, String[] args){\n HashMap cmdFlags = new HashMap();\n String flag;\n String nextFlag=null;\n StringBuffer errors=new StringBuffer();\n /**\n First go through options to see what should be in args\n */\n for(int which=0;which<options.length();which++){\n flag = \"-\"+options.substring(which,which+1);\n if(which+1<options.length()){\n nextFlag=options.substring(which+1,which+2);\n if (nextFlag.equals(\"-\")){\n cmdFlags.put(flag,nextFlag);\n } else\n if (nextFlag.equals(\"+\")){\n cmdFlags.put(flag,nextFlag);\n /*\n mark that it is required\n if found this will be overwritten by -\n */\n this.put(flag,nextFlag);\n } else\n //JDH changed to \"_\" from \";\" because too many cmdlines mess up ;\n if (nextFlag.equals(\"_\")){\n cmdFlags.put(flag,nextFlag);\n } else\n //JDH changed to \".\" from \":\" because too many cmdlines mess up ;\n if (nextFlag.equals(\".\")){\n cmdFlags.put(flag,\" \"); //JDH changed this from \":\"\n /*\n mark that it is required\n if found this will be overwritten by value\n JDH should use \" \" so it cannot be the same as a value\n */\n this.put(flag,\" \"); // mark that it is required\n } else {\n System.out.println(\"Bad symbol \"+nextFlag+\"in option string\");\n }\n which++;\n } else {\n System.out.println(\"Missing symbol in option string at \"+which);\n }\n }\n\n int arg=0;\n for(;arg<args.length;arg++){\n if (!args[arg].startsWith(\"-\")){\n break;\n }\n flag = args[arg];\n /*\n This should tell it to quit looking for flags or options\n */\n if (flag.equals(\"--\")){\n arg++;\n break;\n }\n if (!(cmdFlags.containsKey(flag))){\n errors.append(\"\\nbad flag \"+flag);\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"-\")){\n this.put(flag,\"-\");\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"+\")){\n this.put(flag,\"-\");// turns off the + because it was found\n continue;\n }\n if (!(arg+1<args.length)){\n errors.append(\"\\nMissing value for \"+flag);\n continue;\n }\n arg++;\n this.put(flag,args[arg]);\n }\n String[] params=null;\n params = new String[args.length - arg];\n\n int n=0;\n // reverse these so they come back in the right order!\n for(;arg<args.length;arg++){\n params[n++] = args[arg];\n }\n Iterator k = null;\n Map.Entry e = null;\n if (this.containsValue(\"+\")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\"+\".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required flag \"+(String)e.getKey()+\" was not supplied.\");\n };\n }\n } \n /*\n Should change this to \" \" in accordance with remark above\n */\n //JDH changed to \" \" from \":\" in both spots below\n if (this.containsValue(\" \")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\" \".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required option \"+(String)e.getKey()+\" was not supplied.\");\n }\n }\n }\n this.put(\" \",params);\n this.put(\"*\",errors.toString());\n return this;\n }", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodNoParameters_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method() { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "void addClasses(String... classNames) throws InvocationTargetException, IllegalAccessException, NoSuchMethodException;", "private static String optionsListing() {\n\t\tString result = \"\\nUsage: java -jar comtor.jar -dir dirname\\n\\n\";\n\t\tresult += \"Options:\\n\";\n\t\t\n\t\tresult += \"-dir dirname\\t\\tSpecified the pathname of the directory in which COMTOR will \"; \n\t\tresult += \"search for Java source code\\n\\t\\t\\tfiles (packaged and non-packaged).\\n\\n\";\n\t\t\n\t\tresult += \"-help | --help\\t\\tThis help message\\n\";\n\t\tresult += \"\\n\\n\";\n\t\treturn result;\n\t}", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "@Override\n\tpublic Command parse(String[] s) {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"HELP\"))\n\t\t\treturn new Help(); \n\t\telse return null;\n\t}", "void method_106(class_25 var1, int var2, int var3);", "public ClassDoc classNamed(String arg0) {\n // System.out.println(\"RootDoc.classNamed(\" + arg0 + \") called.\");\n if (specClasses.containsKey(arg0)) {\n return specClasses.get(arg0);\n }\n if (otherClasses.containsKey(arg0)) {\n return otherClasses.get(arg0);\n }\n return null;\n }", "@Override\n\tpublic String visitMethodCall(MethodCallContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tParseTree lastChild=ctx.children.get(childrenNo-1);\n\t\tString returnType;\n\t\tString methodName;\n\t\tif(lastChild instanceof TerminalNode){\n\t\t\tList<String> argTypes=new ArrayList<>();\n\t\t\tStack<String> ids=new Stack<>();\n\t\t\tParseTree n=ctx.children.get(childrenNo-2);\n\t\t\tif (childrenNo<=4){\n\t\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t\tMethodRecord mRec=(MethodRecord) table.lookup(methodName);\n\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\tList<VarRecord> paramList=(List<VarRecord>) mRec.getParameters();\n\t\t\t\t\tList<ParseTree> arguments= new ArrayList<>();\n\t\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\t\targuments.add(n.getChild(i));\n\t\t\t\t\t}\n\t\t\t\t\tif(paramList.size()!=arguments.size())throw new RuntimeException(\"Incorrect number of arguments\");\n\t\t\t\t\telse for(int i=0;i<=paramList.size()-1;i++){\n\t\t\t\t\t\tString actualType=visit(arguments.get(i));\n\t\t\t\t\t\tString declaredType=paramList.get(i).getReturnType();\n\t\t\t\t\t\tif(!actualType.equals(declaredType)) throw new RuntimeException(\"Incorrect argument type\");\n\t\t\t\t\t}//checking arguments complete\n\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tClassRecord cRec;\n\t\t\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\t\t\tcRec=(ClassRecord) table.lookup(methodName);\n\t\t\t\t\t\tMethodRecord mRec=cRec.getMethod(methodName);\n\t\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t}\n\t\t\t}else \n\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t//checking charAt(i) \n\t\t\t\tif(methodName.equals(\"charAt\")){\n\t\t\t\t\tif(n.getChildCount()!=1) throw new RuntimeException(\"Incorrect number of arguments on charAt()function\");\n\t\t\t\t\telse {\n\t\t\t\t\t\tString charArgType=visit(n);\t\t//check argument type is int\n\t\t\t\t\t\tif (!charArgType.equals(\"int\")) throw new RuntimeException(\"ARgument i on function charAt(i) must be of type int\");\n\t\t\t\t\t}\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-6).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".charAt(i) is applicable only to Strings\");\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\targTypes.add(visit(n.getChild(i)));\n\t\t\t\t}\n\t\t\tfor(int i=childrenNo-4;i>=0;i-=2){\n\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t}\n\t\t\t}else{ \n\t\t\t\t//checking .length()\n\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\tif(methodName.equals(\"length\")){\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-5).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".length() is applicale only to Strings\");\n\t\t\t\t}\n\t\t\t\targTypes=null;\n\t\t\t\tfor(int i=childrenNo-3;i>=0;i-=2){\n\t\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count=ids.size();\n\t\t\tClassRecord cRec=null;\n\t\t\tRecord r;\n\t\t\tfor(int i=0;i<=count-2;i++){\n\t\t\t\tString key=ids.pop();\n\t\t\t\tr= table.lookup(key);\t\t\t\t\n\t\t\t\tcRec=(ClassRecord)table.lookup(r.Type);\n\t\t\t\tif (cRec==null) throw new RuntimeException(\"Class \"+key+\" is not declared\");\t\t\t\t\n\t\t\t}\n\t\t\t//last item in stack is the method Identifier\n\t\t\tMethodRecord mRec=cRec.getMethod(ids.pop());\n\t\t\tif (mRec==null)throw new RuntimeException(\"Method not declared in class \"+cRec.getName());\n\t\t\treturnType=mRec.getReturnType();\n\t\t\tif(methodName.equals(\"charAt\")) returnType=\"char\";\n\t\t\tif(methodName.equals(\"length\"))returnType=\"int\";\n\t\t\t//checking arguments \n\t\t\tif(argTypes==null) return returnType;\n\t\t\telse {\t\t\t\t\n\t\t\t\tList<VarRecord> parameters=(List<VarRecord>) mRec.getParameters();\n\t\t\t\tif(parameters.size()!=argTypes.size()) throw new RuntimeException(\"Incorect number of arguments on method call\");\n\t\t\t\telse{\n\t\t\t\t\tfor(int i=0;i<argTypes.size();i++){\n\t\t\t\t\t\tif(!argTypes.get(i).equals((parameters.get(i).getReturnType()))) throw new RuntimeException (\"incorrect argument type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} return returnType;\n\t\t}\telse \t\t\t\t\t\t// last node is a RuleNode\n\t\t\t{\n\t\t\t\tif (childrenNo==3){\t\t\t\t\t\n\t\t\t\tString leftType=visit(ctx.getChild(0)); //also checks the first method for undeclared ids\n\t\t\t\t//ClassRecord cRec=(ClassRecord) table.lookup(ctx.getChild(0).getText());\n\t\t\t\tParseTree node=ctx.getChild(2);\n\t\t\t\t//checking charAt function\n\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\tString argType=visit(node.getChild(2));\n\t\t\t\t\t\tif (!argType.equals(\"int\")) throw new RuntimeException(\"Incorrect argument in charAt()\");\n\t\t\t\t\t\treturn \"char\";\n\t\t\t\t\t}\n\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\telse return \"int\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t{String mName=ctx.getChild(2).getChild(0).getText();\n\t\t\t\tClassRecord tempCR=(ClassRecord) table.lookup(ctx.getChild(0).getChild(0).getText());\n\t\t\t\tMethodRecord mRec=tempCR.getMethod(mName);\n\t\t\t\tif(mRec==null)throw new RuntimeException(\"method \"+mName+\" is not declared in class \"+tempCR.getName());\n\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (childrenNo==5){\n\t\t\t\t\tString leftType=visit(ctx.getChild(1)); //also checks the first method for undeclared ids\n\t\t\t\t\tParseTree node=ctx.getChild(4);\n\t\t\t\t\t//checking charAt function\n\t\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tClassRecord cR=(ClassRecord)table.lookup(leftType);\n\t\t\t\t\tMethodRecord mRec=cR.getMethod(node.getChild(0).getText());\n\t\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t}\n\t\treturn null; //debuggin purposes. should be unreachable\n\t}", "west.twouse.language.sparqlas.Class getClass_();", "public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters2Package_Dec_1_Ref_0() {\n\t\tconfigureParser(\"package bar; public class Other { public void method(int x, long y) { class Foo{} } }\", \"Foo\", 1, 0);\n\t}", "ClassType memberClassNamed(String name);", "public Object[] getConstructorArgs ();", "@Override\n public int getNumberArguments() {\n return 1;\n }", "@Override\n public String[] getOptions() {\n\n Vector<String> result = new Vector<String>();\n\n Collections.addAll(result, super.getOptions());\n\n result.add(\"-a\");\n result.add(\"\" + getNumAttributes());\n\n if (getClassFlag()) {\n result.add(\"-c\");\n }\n\n return result.toArray(new String[result.size()]);\n }", "public CommandInfo(String verb, String className) {\n\tthis.verb = verb;\n\tthis.className = className;\n }", "<T> Argument type(Class<T> type);", "String getResultClass();", "@Test\n\tpublic void test_ClassDeclarationLocalToMethodWithParameters1_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public void method(int x) { class Foo{} }\", \"Foo\", 1, 0);\n\t}", "@Test\n\tpublic void test_ClassDeclarationAnonymousInMethodPackage_Dec_0_Ref_1() {\n\t\tconfigureParser(\"package bar; public class Other { public void method() { Bar bar = new Bar(); bar.accept(new Foo() {public void fooMethod(){}} ); } } \", \"bar.Foo\", 0, 1);\n\t}", "ClassType outer();", "@Override\n\tpublic Void visit(MethodCall method) {\n\t\tprintIndent(\".\");\n\t\tindent++;\n\t\tmethod.caller.accept(this);\n\t\tmethod.type.accept(this);\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public static ParameterExpression variable(Class type) { throw Extensions.todo(); }", "ArgList createArgList();", "public void compileMutants() {\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Compiling class mutants into bytecode\");\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t super.compileMutants();\n\t}\n }", "private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}", "@Override\n\tpublic String visitClassDeclaration(ClassDeclarationContext ctx){\n\t\ttable.enterScope();\t\t\n\t\tvisit(ctx.getChild(4)); //visit methodList. \n\t\ttable.exitScope();\n\t\treturn null;\n\t}", "public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }", "public Option() {\n }", "private static String getMethodDescShort(String desc) {\n if (desc == null || desc.length() == 0) {\n return desc;\n }\n int bracketIndex = desc.indexOf(\"(\");\n if (bracketIndex < 0) {\n return desc;\n }\n int startIndex = desc.lastIndexOf(' ', bracketIndex - 2);\n if (startIndex < 0) {\n return desc;\n }\n return desc.substring(startIndex + 1);\n }", "public interface UrlArgumentBuilder {\n\n /**\n * Sets next element of a chain.\n *\n * @param next next element of a chain\n */\n void setNext(final UrlArgumentBuilder next);\n\n /**\n * Builds URL argument that is used by Yandex static API.\n *\n * @param yandexMap yandex map\n * @return URL part\n */\n String build(final YandexMap yandexMap);\n\n}", "public String visit(FormalParameterList n, String ourclass) {\n n.f0.accept(this, ourclass);\n n.f1.accept(this, ourclass);\n return null; \n }", "go.micro.runtime.RuntimeOuterClass.CreateOptionsOrBuilder getOptionsOrBuilder();", "private ParseTree parseNewDotSomething() {\n SourcePosition start = getTreeStartLocation();\n eat(TokenType.NEW);\n eat(TokenType.PERIOD);\n eatPredefinedString(\"target\");\n return new NewTargetExpressionTree(getTreeLocation(start));\n }", "@Test\n\tpublic void test_ClassDeclarationNested2_Dec_1_Ref_0() {\n\t\tconfigureParser(\"public class Other { public class Bar { public class Foo{} } }\", \"Other.Bar.Foo\", 1, 0);\n\t}" ]
[ "0.5584652", "0.5063738", "0.5030421", "0.49930885", "0.4976345", "0.49393883", "0.48815188", "0.48562983", "0.48518264", "0.48267272", "0.48143008", "0.47946846", "0.478832", "0.47635964", "0.47463697", "0.47378266", "0.47152674", "0.47152674", "0.47139385", "0.47137874", "0.47095114", "0.47030333", "0.46986696", "0.4690702", "0.46890157", "0.46844676", "0.46812674", "0.46439388", "0.4636414", "0.46296015", "0.46148553", "0.4614795", "0.46137932", "0.46085882", "0.46062085", "0.46001115", "0.45942038", "0.4590506", "0.45749766", "0.45680442", "0.45674968", "0.45672354", "0.45658275", "0.45653945", "0.4565385", "0.45645237", "0.45640263", "0.45576143", "0.45563447", "0.45454642", "0.45439023", "0.45399687", "0.452409", "0.45168367", "0.45051816", "0.45049104", "0.45016015", "0.44994426", "0.44986042", "0.44940984", "0.4493738", "0.44924453", "0.44922897", "0.4486885", "0.44716057", "0.44708055", "0.44703367", "0.44665745", "0.44665745", "0.44602138", "0.44599766", "0.4455466", "0.44366384", "0.4434288", "0.44305408", "0.44286355", "0.44269794", "0.44260925", "0.44211772", "0.44124684", "0.44081083", "0.44019115", "0.4398448", "0.43964508", "0.43914765", "0.43893817", "0.4387795", "0.43844196", "0.43819633", "0.43817443", "0.43788597", "0.4377856", "0.4377833", "0.4374497", "0.43738925", "0.43736982", "0.4373638", "0.43719357", "0.4368136", "0.43663302" ]
0.44142374
79
'.' ( ident ArgumentsOpt | "super" Arguments | "new" InnerCreator ) | '[' Expression ']'
private Operation selector(Scope scope, Vector queue) { Operation root; root = new Operation(); if (nextSymbol == Keyword.DOTSY) { lookAhead(); root.operator = nextSymbol; if (nextSymbol == Keyword.IDENTSY) { root.name = nextToken; lookAhead(); root.left = argumentsOpt(scope, null, queue); } else if (nextSymbol == Keyword.SUPERSY) { matchKeyword(Keyword.SUPERSY); root.left = arguments(scope, null, queue); } else { matchKeyword(Keyword.NEWSY); root.left = innerCreator(scope, queue); } } else { root.operator = nextSymbol; matchKeyword(Keyword.LBRACKETSY); follower.add(Keyword.RBRACKETSY); unresolved.add("JavaArray"); root.left = expression(scope, queue); follower.remove(follower.size() - 1); matchKeyword(Keyword.RBRACKETSY); } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Expr newSuperCstrCall(String superClassName) {\n MethodSignature.Builder msb = MethodSignature.newBuilder();\n msb.setName(\"new\");\n msb.setOwner(toGlobalName(superClassName));\n msb.setReturnType(voidType());\n MethodCall.Builder mb = MethodCall.newBuilder();\n mb.setSignature(msb.build());\n return Expr.newBuilder().setType(ExprType.MethodCall)\n .setMethodCall(mb.build()).build();\n }", "private ParseTree parseNewDotSomething() {\n SourcePosition start = getTreeStartLocation();\n eat(TokenType.NEW);\n eat(TokenType.PERIOD);\n eatPredefinedString(\"target\");\n return new NewTargetExpressionTree(getTreeLocation(start));\n }", "private Operation classCreatorRest(Token t, Scope scope, Vector queue)\r\n {\r\n Vector v = new Vector();\r\n String s = \"super\";\r\n Operation root = new Operation();\r\n\r\n root.type.type = Keyword.NONESY;\r\n root.type.ident = t;\r\n traceOn(v);\r\n root.left = arguments(scope, v, queue);\r\n traceOff(v);\r\n\r\n for(int i = 0; i < v.size(); i++)\r\n {\r\n Token pt = (Token)v.get(i);\r\n\r\n if (pt.kind == Keyword.NUMBERSY)\r\n s += pt.val;\r\n else if (pt.kind == Keyword.LNUMBERSY)\r\n s += pt.val + \"L\";\r\n else if (pt.kind == Keyword.DNUMBERSY)\r\n s += pt.fval;\r\n else if (pt.kind == Keyword.IDENTSY)\r\n s += pt.string;\r\n else\r\n s += pt.kind.string;\r\n }\r\n if (s.endsWith(\"()\"))\r\n s = \"\";\r\n else\r\n s += ';';\r\n\r\n if (nextSymbol == Keyword.LBRACESY)\r\n {\r\n ClassType x = new ClassType();\r\n x.name = new Token();\r\n x.name.kind = Keyword.IDENTSY;\r\n x.name.string = \"Anonymous\" + anonymous++;\r\n x.scope = new Scope(scope, Scope.classed, x.name.string);\r\n x.extend = new ClassType(t.string.substring(t.string.lastIndexOf('.') + 1));\r\n x.implement = new ClassType[1];\r\n x.implement[0] = x.extend;\r\n declMember(scope, x);\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n root.type.ident = x.name;\r\n root.type.type = Keyword.NONESY;\r\n root.left.left = null;\r\n Vector old = queue;\r\n queue = new Vector();\r\n HashSet dummy = unresolved;\r\n unresolved = x.unresolved;\r\n unresolved.add(t.string);\r\n classBody(x, new Modifier(), s, queue);\r\n addToConstructor(x, queue);\r\n queue = old;\r\n unresolved = dummy;\r\n writeList(x);\r\n }\r\n\r\n return root;\r\n }", "private void superSuffix(Operation base, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.LPARSY)\r\n base.left.left = arguments(scope, null, queue);\r\n else\r\n {\r\n matchKeyword(Keyword.DOTSY);\r\n\r\n base = base.right = new Operation();\r\n base.left = new Operation();\r\n base.left.name = nextToken;\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n base.left.left = argumentsOpt(scope, null, queue);\r\n }\r\n }", "OperationCallExp createOperationCallExp();", "private Term[] parseArgumentList() throws ParseException {\n \n final Term[] args = parseTermList();\n final int tt = _tokenizer.next();\n if (tt != ')') {\n _tokenizer.pushBack();\n reportError(\"Missing ')' or ','.\"); /*I18N*/\n }\n \n return args;\n }", "public static void main(String args[]){\n\tOuter.createInner();\r\n\t//new Outer.Inner();\r\n\t//new Outer.new Inner();\r\n}", "AExpArgs createAExpArgs();", "private Operand parseFactor() {\n Operand operand = new Operand(SymbolTable.OBJECT_NONE);\n switch (nextToken.kind) {\n case Token.IDENT:\n operand = parseDesignator();\n\n if (nextToken.kind == Token.LPAR) {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Illegal method call\");\n }\n parseActPars(operand.object);\n if (operand.object == SymbolTable.OBJECT_LEN) {\n code.put(Code.OP_ARRAYLENGTH);\n } else if(operand.object != SymbolTable.OBJECT_CHR\n && operand.object != SymbolTable.OBJECT_ORD) {\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n }\n } else {\n code.load(operand);\n }\n\n break;\n case Token.NUMBER:\n check(Token.NUMBER);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_INT;\n code.load(new Operand(token.value));\n break;\n case Token.CHAR_CONST:\n check(Token.CHAR_CONST);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_CHAR;\n code.load(new Operand(token.value));\n break;\n case Token.NEW:\n check(Token.NEW);\n check(Token.IDENT);\n SymObject object = find(token.string);\n assertIsType(object);\n Struct type = object.type;\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n Struct sizeType = parseExpr().type;\n if (sizeType != SymbolTable.STRUCT_INT) {\n error(\"Array size must be an int\");\n }\n check(Token.RBRACK);\n type = new Struct(Struct.KIND_ARRAY, type);\n\n code.put(Code.OP_NEWARRAY);\n if (type.elementsType == SymbolTable.STRUCT_CHAR) {\n code.put(0);\n } else {\n code.put(1);\n }\n } else {\n if (type.kind != Struct.KIND_CLASS) {\n error(\"Illegal instantiation: type isn't a class\");\n }\n\n code.put(Code.OP_NEW);\n code.put2(type.fields.size());\n }\n operand = new Operand(Operand.KIND_EXPR, -1, type);\n break;\n case Token.LPAR:\n check(Token.LPAR);\n operand = parseExpr();\n check(Token.RPAR);\n break;\n }\n\n return operand;\n }", "JannotTreeJCBinary(InfixExpression n) \n{\n super(n);\n}", "public Dot() {\n super(SOME, NONE); // a deliberate lie\n }", "ArgList createArgList();", "public List<Expression> newArguments() {\r\n\t\treturn this.newArguments;\r\n\t}", "Expression createExpression();", "SomeMinus createSomeMinus();", "FullExpression createFullExpression();", "SomePlus createSomePlus();", "public Rule incDotCall()\n \t{\n \t\treturn DOT;\n \t}", "Expression() { }", "@Override\n\tpublic void outAMethodCallExpr(AMethodCallExpr node){\n\t\tString methodName = node.getId().getText();\n\t\tType targetType = nodeTypes.get(node.getTarget());\n\t\tboxIt(targetType); \n\t\tClassAttributes targetClass = topLevelSymbolTable.get(targetType.getTypeName());\n\t\tMethodAttributes methodAttributes = targetClass.getMethod(methodName);\n\t\tif (!(node.getTarget() instanceof ASuperExpr)){\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()) , Constants.INVOKEVIRTUAL));\n\t\t}\n\t\telse {\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()), Constants.INVOKESPECIAL)); \n\t\t}\n\t\tunboxIt(methodAttributes.getReturnType()); \n\t}", "JavaExpression createJavaExpression();", "OpFunctionArgAgregate createOpFunctionArgAgregate();", "public String getCppMangledArgumentList() {\n\t\tif (this.sig.size() == 0)\n\t\t\treturn \"\";\n\t\n\t\tString ret = \"_\";\n\t\tfor (TypeContainer c : this.sig)\n\t\t\tret += c.type.getName() + \"_\";\n\t\t\n\t\treturn ret.substring(0, ret.length() - 1).replace(\".\", \"_\");\n\t}", "Expr createExpr();", "ParenthesisExpr createParenthesisExpr();", "final public IASTLiteralTextNode Argument() throws ParseException {\r\n IASTLiteralTextNode node = null;\r\n Token lastToken = null;\r\n Token equalToken = null;\r\n Token firstToken = null;\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case INT:\r\n firstToken = jj_consume_token(INT);\r\n if (jj_2_3(2147483647)) {\r\n equalToken = jj_consume_token(EQUAL);\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case MINUS:\r\n jj_consume_token(MINUS);\r\n break;\r\n default:\r\n jj_la1[16] = jj_gen;\r\n ;\r\n }\r\n lastToken = jj_consume_token(INT);\r\n } else {\r\n ;\r\n }\r\n if (equalToken == null) {\r\n lastToken = firstToken;\r\n }\r\n break;\r\n case ASTERISK:\r\n case WORD:\r\n case STRING:\r\n case PACKAGE_OPTION:\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case ASTERISK:\r\n firstToken = jj_consume_token(ASTERISK);\r\n break;\r\n case PACKAGE_OPTION:\r\n firstToken = jj_consume_token(PACKAGE_OPTION);\r\n break;\r\n case WORD:\r\n firstToken = jj_consume_token(WORD);\r\n break;\r\n case STRING:\r\n firstToken = jj_consume_token(STRING);\r\n break;\r\n default:\r\n jj_la1[17] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n lastToken = firstToken;\r\n break;\r\n default:\r\n jj_la1[18] = jj_gen;\r\n jj_consume_token(-1);\r\n throw new ParseException();\r\n }\r\n node = getRawLiteralTextNodeSpanning(firstToken, lastToken);\r\n {if (true) return node;}\r\n throw new Error(\"Missing return statement in function\");\r\n }", "PropertyCallExp createPropertyCallExp();", "StackManipulation virtual(TypeDescription invocationTarget);", "private Operation identifierSuffix(Operation root, Operation next, Scope scope, Vector queue)\r\n {\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n lookAhead();\r\n lookAhead();\r\n unresolved.add(\"JavaArray\");\r\n\r\n bracketsOpt();\r\n\r\n matchKeyword(Keyword.DOTSY);\r\n\r\n matchKeyword(Keyword.CLASSSY);\r\n\r\n next.left.operator = Keyword.CLASSSY;\r\n }\r\n else if (nextSymbol == Keyword.DOTSY)\r\n {\r\n lookAhead();\r\n\r\n if (nextSymbol == Keyword.CLASSSY)\r\n {\r\n lookAhead();\r\n next.left.operator = Keyword.CLASSSY;\r\n }\r\n else\r\n {\r\n next = (next.right = new Operation());\r\n next.left = new Operation();\r\n next.left.operator = nextSymbol;\r\n matchKeyword(Keyword.THISSY);\r\n }\r\n }\r\n else\r\n {\r\n next.left.left = argumentsOpt(scope, null, queue);\r\n }\r\n\r\n return root;\r\n }", "@Override\n public String visit(ArrayCreationExpr n, Object arg) {\n return null;\n }", "public final void selector() throws RecognitionException {\n int selector_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"selector\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(890, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 133) ) { return ; }\n // Java.g:891:5: ( '.' Identifier ( arguments )? | '.' 'this' | '.' 'super' superSuffix | '.' 'new' innerCreator | '[' expression ']' )\n int alt167=5;\n try { dbg.enterDecision(167);\n\n int LA167_0 = input.LA(1);\n\n if ( (LA167_0==29) ) {\n switch ( input.LA(2) ) {\n case Identifier:\n {\n alt167=1;\n }\n break;\n case 69:\n {\n alt167=2;\n }\n break;\n case 65:\n {\n alt167=3;\n }\n break;\n case 113:\n {\n alt167=4;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 167, 1, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n }\n else if ( (LA167_0==48) ) {\n alt167=5;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 167, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(167);}\n\n switch (alt167) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:891:9: '.' Identifier ( arguments )?\n {\n dbg.location(891,9);\n match(input,29,FOLLOW_29_in_selector5603); if (state.failed) return ;\n dbg.location(891,13);\n match(input,Identifier,FOLLOW_Identifier_in_selector5605); if (state.failed) return ;\n dbg.location(891,24);\n // Java.g:891:24: ( arguments )?\n int alt166=2;\n try { dbg.enterSubRule(166);\n try { dbg.enterDecision(166);\n\n int LA166_0 = input.LA(1);\n\n if ( (LA166_0==66) ) {\n alt166=1;\n }\n } finally {dbg.exitDecision(166);}\n\n switch (alt166) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: arguments\n {\n dbg.location(891,24);\n pushFollow(FOLLOW_arguments_in_selector5607);\n arguments();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(166);}\n\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:892:9: '.' 'this'\n {\n dbg.location(892,9);\n match(input,29,FOLLOW_29_in_selector5618); if (state.failed) return ;\n dbg.location(892,13);\n match(input,69,FOLLOW_69_in_selector5620); if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:893:9: '.' 'super' superSuffix\n {\n dbg.location(893,9);\n match(input,29,FOLLOW_29_in_selector5630); if (state.failed) return ;\n dbg.location(893,13);\n match(input,65,FOLLOW_65_in_selector5632); if (state.failed) return ;\n dbg.location(893,21);\n pushFollow(FOLLOW_superSuffix_in_selector5634);\n superSuffix();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:894:9: '.' 'new' innerCreator\n {\n dbg.location(894,9);\n match(input,29,FOLLOW_29_in_selector5644); if (state.failed) return ;\n dbg.location(894,13);\n match(input,113,FOLLOW_113_in_selector5646); if (state.failed) return ;\n dbg.location(894,19);\n pushFollow(FOLLOW_innerCreator_in_selector5648);\n innerCreator();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:895:9: '[' expression ']'\n {\n dbg.location(895,9);\n match(input,48,FOLLOW_48_in_selector5658); if (state.failed) return ;\n dbg.location(895,13);\n pushFollow(FOLLOW_expression_in_selector5660);\n expression();\n\n state._fsp--;\n if (state.failed) return ;\n dbg.location(895,24);\n match(input,49,FOLLOW_49_in_selector5662); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 133, selector_StartIndex); }\n }\n dbg.location(896, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"selector\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "public Snippet visit(MethodCallInConstructor n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t String className = \"NEED TO PUT CLASS NAME\";\n\t n.nodeToken.accept(this, argu);\n\t String methodName = n.identifier.accept(this, argu).expType.getTypeName();\n\t this.identifierList = new ArrayList<String>(0);\n\t\t\tidentifierList.add(\"this\");\n\t n.nodeToken1.accept(this, argu);\n\t n.nodeToken2.accept(this, argu);\n\t n.nodeOptional.accept(this, argu);\n\t n.nodeToken3.accept(this, argu);\n\t SymbolTableClassEntry stce = classSymbolTable.get(className);\n\t\t\tSymbolTableMethodEntry stme = stce.methods.get(methodName);\n\t\t\tSnippet retExp = new Snippet(\"\", \"\", stme.returnType, false);\n\t\t\tretExp.returnTemp = className + \".\" + methodName + \"(\";\n\t\t\tint i = 0;\n\t\t\tfor(String str : identifierList)\n\t\t\t{\n\t\t\t\tif(i==0)\n\t\t\t\t\tretExp.returnTemp += str;\n\t\t\t\telse\n\t\t\t\t\tretExp.returnTemp += \", \" + str;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tString toAdd =\"\";\n\t\t\t//if(!classes.containsKey(className)){\n\t\t\tif(!inAsync){\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=\"myUniquePlacePoint\";\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(i>0){\n\t\t\t\t\ttoAdd+=\",\";\n\t\t\t\t}\n\t\t\t\ttoAdd+=asyncPoint+\"\";\n\t\t\t}\n\t\t\t//}\n\t\t\tretExp.returnTemp +=toAdd+ \")\";\n\t return retExp;\n\t }", "@Override\n\t\tprotected ParenExpression constructParenExp(\n\t\t\t\tList<Expression> subExpressions) {\n\t\t\treturn new CosineExpression(subExpressions);\n\t\t}", "NewAnonymousClassExpression(AST ast) {\r\n\t\tsuper(ast);\r\n\t}", "public ArgumentsParser() {\n this(new String[0]);\n }", "@Override\n public String toString() {\n \treturn \"()\";\n }", "public Lexicon lex(Options.LexOptions op)\n/* */ {\n/* 514 */ return new BaseLexicon(op);\n/* */ }", "public final void superSuffix() throws RecognitionException {\n int superSuffix_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"superSuffix\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(898, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 134) ) { return ; }\n // Java.g:899:5: ( arguments | '.' Identifier ( arguments )? )\n int alt169=2;\n try { dbg.enterDecision(169);\n\n int LA169_0 = input.LA(1);\n\n if ( (LA169_0==66) ) {\n alt169=1;\n }\n else if ( (LA169_0==29) ) {\n alt169=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 169, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n } finally {dbg.exitDecision(169);}\n\n switch (alt169) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:899:9: arguments\n {\n dbg.location(899,9);\n pushFollow(FOLLOW_arguments_in_superSuffix5685);\n arguments();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:900:9: '.' Identifier ( arguments )?\n {\n dbg.location(900,9);\n match(input,29,FOLLOW_29_in_superSuffix5695); if (state.failed) return ;\n dbg.location(900,13);\n match(input,Identifier,FOLLOW_Identifier_in_superSuffix5697); if (state.failed) return ;\n dbg.location(900,24);\n // Java.g:900:24: ( arguments )?\n int alt168=2;\n try { dbg.enterSubRule(168);\n try { dbg.enterDecision(168);\n\n int LA168_0 = input.LA(1);\n\n if ( (LA168_0==66) ) {\n alt168=1;\n }\n } finally {dbg.exitDecision(168);}\n\n switch (alt168) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:0:0: arguments\n {\n dbg.location(900,24);\n pushFollow(FOLLOW_arguments_in_superSuffix5699);\n arguments();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n } finally {dbg.exitSubRule(168);}\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 134, superSuffix_StartIndex); }\n }\n dbg.location(901, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"superSuffix\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public CALL(Exp f, ExpList a) {func=f; args=a;}", "public static InvocationExpression invoke(Expression expression, Expression arguments[]) { throw Extensions.todo(); }", "StackManipulation special(TypeDescription invocationTarget);", "public GradleDslMethodCall(@NotNull GradleDslElement parent, @NotNull GradleNameElement name, @NotNull String methodName) {\n super(parent, null, name, null);\n myMethodName = methodName;\n myArguments = new GradleDslExpressionList(this, GradleNameElement.empty(), false);\n myIsConstructor = false;\n }", "public ProcedureCall(String n, List<Expression> a)\n {\n name = n;\n args = a;\n }", "protected Pair<JilExpr,List<JilStmt>> doNew(Expr.New e) {\n \t\tArrayList<JilStmt> r = new ArrayList();\t\r\n \t\tType.Reference type = (Type.Reference) e.type().attribute(Type.class);\r\n \t\t\r\n \t\tMethodInfo mi = (MethodInfo) e\r\n \t\t\t\t.attribute(MethodInfo.class);\t\t\t\r\n \t\t\r\n \t\tPair<JilExpr,List<JilStmt>> context = doExpression(e.context());\r\n \t\tPair<List<JilExpr>,List<JilStmt>> params = doExpressionList(e.parameters());\r\n \t\t\t\t\t\t\t\t\r\n \t\tif(context != null) {\r\n \t\t\tr.addAll(context.second());\r\n \t\t}\r\n \t\t\r\n \t\tr.addAll(params.second());\t\t\t\t\t\r\n \t\t\r\n \t\tif(mi != null) {\t\t\t\r\n \t\t\treturn new Pair<JilExpr, List<JilStmt>>(new JilExpr.New(type, params\r\n \t\t\t\t\t.first(), mi.type, e.attributes()), r);\r\n \t\t} else if(type instanceof Type.Array){\r\n \t\t\treturn new Pair<JilExpr, List<JilStmt>>(new JilExpr.New(type, params\r\n \t\t\t\t\t.first(), null, e.attributes()), r);\r\n \t\t} else {\r\n \t\t\tsyntax_error(\"internal failure --- unable to find method information\",e);\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }", "Operands createOperands();", "public InstantiateExpression(String name, CallArgument... arguments) throws VilException {\n super(null, false, name, arguments);\n }", "public Snippet visit(MethodCallStatementInConstructor n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\", \"\", null, false);;\n\t\t\tSnippet f0 = n.methodCallInConstructor.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp + \";\";\n\t\t\ttPlasmaCode+=generateTabs(blockDepth)+_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "SubQueryOperand createSubQueryOperand();", "Literal createLiteral();", "Literal createLiteral();", "private Argument(Builder builder) {\n super(builder);\n }", "public static MethodBuilder constructor(String name) {\n\t\treturn new MethodBuilder().returnType(\"\").name(name);\n\t}", "Minus createMinus();", "Minus createMinus();", "Minus createMinus();", "public static void main(String[] args) {\n\t\tSuperStatement2 ref=new SuperStatement2();\n\t\tSystem.out.println(ref.a);\n\t\tSystem.out.println(ref.b);\n\n\t}", "ASTBinOp parse_impl(Exec E) {\n AST l = E.parse();\n AST r = E.parse();\n E.eatEnd(); // eat ending ')'\n ASTBinOp res = (ASTBinOp) clone();\n res._asts = new AST[]{l,r};\n return res;\n }", "private void jetInvokeExpr(){\n\t\tInvokeExpr invokeExpr = (InvokeExpr) rExpr;\n\t\tSootMethodRef methodRef = invokeExpr.getMethodRef();\n\t\tif(StringModeling.stringMethods.contains(methodRef.getSignature())){\n\t\t\tjetStringOperation(invokeExpr);\n\t\t}else{\n\t\t\tValue thisBase = null;\n\t\t\tif(invokeExpr instanceof InterfaceInvokeExpr){\n\t\t\t\tthisBase = ((InterfaceInvokeExpr) invokeExpr).getBase();\n\t\t\t}else if(invokeExpr instanceof SpecialInvokeExpr){\n\t\t\t\tthisBase = ((SpecialInvokeExpr) invokeExpr).getBase();\n\t\t\t}else if(invokeExpr instanceof VirtualInvokeExpr){\n\t\t\t\tthisBase = ((VirtualInvokeExpr) invokeExpr).getBase();\n\t\t\t}\n\t\t\tString funStr = constructFunStr(invokeExpr);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"(\");\n\t\t\tsb.append(funStr);\n\t\t\tsb.append(\" \");\n\t\t\t\n\t\t\tif(thisBase != null){\n\t\t\t\tString thisBaseName = fileGenerator.getRenameOf(thisBase, false, this.stmtIdx);\n\t\t\t\tsb.append(thisBaseName);\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\t\n\t\t\tfor(Value param : invokeExpr.getArgs()){\n\t\t\t\tif(param instanceof Constant){\n\t\t\t\t\tsb.append(param.toString());\n\t\t\t\t}else{\n\t\t\t\t\tString paramName = fileGenerator.getRenameOf(param, false, this.stmtIdx);\n\t\t\t\t\tif(param instanceof NumericConstant && paramName.startsWith(\"-\")){\n\t\t\t\t\t\t//-1 --> (- 0 1)\n\t\t\t\t\t\tsb.append(\"(- 0 \");\n\t\t\t\t\t\tsb.append(paramName.substring(1));\n\t\t\t\t\t\tsb.append(\")\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsb.append(paramName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\t\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t}\n\t}", "private Expr primary() {\n if(match(FALSE)) return new Expr.Literal(false);\n if(match(TRUE)) return new Expr.Literal(true);\n if(match(NIL)) return new Expr.Literal(null);\n\n if(match(NUMBER, STRING)) {\n // These values have already been parsed into Java values by the scanner\n return new Expr.Literal(previous().literal);\n }\n\n if(match(SUPER)) { // We hit super! Treat this much like \"get\".\n Token keyword = previous();\n consume(DOT, \"Expect '.' after 'super'.\");\n Token method = consume(IDENTIFIER, \"Expect superclass method name.\");\n return new Expr.Super(keyword, method);\n }\n\n if(match(THIS)) return new Expr.This(previous());\n\n if(match(IDENTIFIER)) {\n return new Expr.Variable(previous()); // This is what allows the use of variables\n }\n\n if(match(LEFT_PAREN)) {\n Expr expr = expression();\n consume(RIGHT_PAREN, \"Expect ')' after expression.\");\n return new Expr.Grouping(expr);\n }\n\n throw error(peek(), \"Expected expression.\");\n }", "Plus createPlus();", "Plus createPlus();", "Plus createPlus();", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }", "private ArrayOps() {\r\n }", "private static class <init> extends <init>\n{\n\n public void a(Object obj, StringBuilder stringbuilder)\n {\n au au1 = (au)obj;\n y y1 = new y();\n y1.a(\"$ts\", Integer.valueOf(au1.a()));\n y1.a(\"$inc\", Integer.valueOf(au1.b()));\n a.a(y1, stringbuilder);\n }", "private void consumeConstructor() throws UiSelectorSyntaxException {\n if (text.charAt(0) != '(') {\n throw new UiSelectorSyntaxException(\"Was expecting \\\"\" + \")\" + \"\\\" but instead saw \\\"\" + text.charAt(0) + \"\\\"\" );\n }\n StringBuilder argument = new StringBuilder();\n\n int index = 1;\n int parenCount = 1;\n while (parenCount > 0) {\n try {\n switch (text.charAt(index)) {\n case ')':\n parenCount--;\n if (parenCount > 0) {\n argument.append(text.charAt(index));\n }\n break;\n case '(':\n parenCount++;\n argument.append(text.charAt(index));\n break;\n default:\n argument.append(text.charAt(index));\n }\n } catch (StringIndexOutOfBoundsException e) {\n throw new UiSelectorSyntaxException(\"unclosed paren in expression\");\n }\n index++;\n }\n if (argument.length() < 1) {\n throw new UiSelectorSyntaxException(\"UiScrollable constructor expects an argument\");\n }\n\n UiSelector selector = new UiSelectorParser().parse(argument.toString());\n scrollable = new UiScrollable(selector);\n\n // add two for parentheses surrounding arg\n text = text.substring(argument.length() + 2);\n }", "public interface AstFactory\n{\n\tIdNode IdNode(Token t, String text);\n\tExtIdNode ExtIdNode(Token t, String text);\n\n\tAmbigNameNode AmbigNameNode(Token t, String text);\t // Deprecate? Never need to make ambigname \"manually\" via af? (constructed only by ScribbleParser)\n\tDataParamNode DataParamNode(Token t, String text);\n\tOpNode OpNode(Token t, String text);\n\tRecVarNode RecVarNode(Token t, String text);\n\tRoleNode RoleNode(Token t, String text);\n\tSigParamNode SigParamNode(Token t, String text);\n\n\tDataNameNode DataNameNode(Token t, List<IdNode> elems);\n\tGProtoNameNode GProtoNameNode(Token t, List<IdNode> elems);\n\tLProtoNameNode LProtoNameNode(Token t, List<IdNode> elems);\n\tModuleNameNode ModuleNameNode(Token t, List<IdNode> elems);\n\tSigNameNode SigNameNode(Token t, List<IdNode> elems);\n\t\n\tModule Module(Token t, ModuleDecl mdecl,\n\t\t\tList<? extends ImportDecl<?>> imports,\n\t\t\tList<? extends NonProtoDecl<?>> nonprotos,\n\t\t\tList<? extends ProtoDecl<?>> protos);\n\n\tModuleDecl ModuleDecl(Token t, ModuleNameNode fullname);\n\tImportModule ImportModule(Token t, ModuleNameNode modname,\n\t\t\tModuleNameNode alias); // alias == null for no alias (child not added)\n\n\tDataDecl DataDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, DataNameNode name);\n\tSigDecl SigDecl(Token t, IdNode schema, ExtIdNode extName,\n\t\t\tExtIdNode extSource, SigNameNode name);\n\tGProtoDecl GProtoDecl(Token t, ProtoModList mods, GProtoHeader header,\n\t\t\tGProtoDef def);\n\n\t// TODO: refactor to use ProtoModList, etc.\n\tProtoModList ProtoModList(Token t, List<ProtoModNode> mods);\n\tAuxMod AuxMod(Token t);\n\tExplicitMod ExplicitMod(Token t);\n\n\tGProtoHeader GProtocolHeader(Token t, GProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tRoleDeclList RoleDeclList(Token t, List<RoleDecl> ds);\n\tRoleDecl RoleDecl(Token t, RoleNode r);\n\tNonRoleParamDeclList NonRoleParamDeclList(Token t, \n\t\t\tList<NonRoleParamDecl<? extends NonRoleParamKind>> ds);\n\tDataParamDecl DataParamDecl(Token t, DataParamNode p);\n\tSigParamDecl SigParamDecl(Token t, SigParamNode p);\n\n\tGProtoDef GProtoDef(Token t, GProtoBlock block);\n\tGProtoBlock GProtoBlock(Token t, GInteractionSeq seq);\n\tGInteractionSeq GInteractionSeq(Token t, List<GSessionNode> elems); // CHECKME: ? extends GSessionNode ? -- and similar others?\n\n\tSigLitNode SigLitNode(Token t, OpNode op, PayElemList pay);\n\tPayElemList PayElemList(Token t, List<PayElem<?>> elems);\n\t<K extends PayElemKind> UnaryPayElem<K> UnaryPayElem(Token t, \n\t\t\tPayElemNameNode<K> name);\n\tGDelegPayElem GDelegPayElem(Token t, GProtoNameNode name, RoleNode r);\n\n\tGMsgTransfer GMsgTransfer(Token t, RoleNode src, MsgNode msg,\n\t\t\tList<RoleNode> dsts);\n\tGConnect GConnect(Token t, RoleNode src, MsgNode msg, RoleNode dst);\n\tGDisconnect GDisconnect(Token t, RoleNode left, RoleNode right);\n\tGWrap GWrap(Token t, RoleNode client, RoleNode server);\n\n\tGContinue GContinue(Token t, RecVarNode rv);\n\tGDo GDo(Token t, GProtoNameNode proto, NonRoleArgList args, RoleArgList rs);\n\n\tRoleArgList RoleArgList(Token t, List<RoleArg> rs);\n\tRoleArg RoleArg(Token t, RoleNode r);\n\tNonRoleArgList NonRoleArgList(Token t, List<NonRoleArg> args);\n\tNonRoleArg NonRoleArg(Token t, NonRoleArgNode arg);\n\n\tGChoice GChoice(Token t, RoleNode subj, List<GProtoBlock> blocks);\n\tGRecursion GRecursion(Token t, RecVarNode rv, GProtoBlock block);\n\n\t/*LProtoDecl LProtoDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def); // Not currently used -- local protos not yet parsed, only projected*/\n\n\tLProjectionDecl LProjectionDecl(Token t, ProtoModList mods,\n\t\t\tLProtoHeader header, LProtoDef def, GProtoNameNode fullname,\n\t\t\tRoleNode self); // del extends that of LProtoDecl\n\n\tLProtoHeader LProtoHeader(Token t, LProtoNameNode name, RoleDeclList rs,\n\t\t\tNonRoleParamDeclList ps);\n\tLSelfDecl LSelfDecl(Token t, RoleNode r);\n\n\tLProtoDef LProtoDef(Token t, LProtoBlock block);\n\tLProtoBlock LProtoBlock(Token t, LInteractionSeq seq);\n\tLInteractionSeq LInteractionSeq(Token t, List<LSessionNode> elems);\n\n\t// Following take \"self\" param in case of parsed Token (not actually supported yet)\n\tLSend LSend(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLRecv LRecv(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLAcc LAcc(Token t, RoleNode src, MsgNode msg, RoleNode self);\n\tLReq LReq(Token t, RoleNode self, MsgNode msg, RoleNode dst);\n\tLDisconnect LDisconnect(Token t, RoleNode self, RoleNode peer); \n\tLClientWrap LClientWrap(Token t, RoleNode client, RoleNode server);\n\tLServerWrap LServerWrap(Token t, RoleNode client, RoleNode server);\n\n\tLContinue LContinue(Token t, RecVarNode rv); \n\tLDo LDo(Token t, LProtoNameNode proto, NonRoleArgList as, RoleArgList rs);\n\n\tLChoice LChoice(Token t, RoleNode subj, List<LProtoBlock> blocks);\n\tLRecursion LRecursion(Token t, RecVarNode rv, LProtoBlock block);\n}", "public static void main(String [] args) {\n List<Ast.Param> pl = new ArrayList<Ast.Param>(); // empty param list\n List<Ast.VarDecl> vl = new ArrayList<Ast.VarDecl>(); // empty var list\n List<Ast.Stmt> sl = new ArrayList<Ast.Stmt>(); // empty stmt list\n\n // Construct a print stmt and add it to stmt list\n Ast.Exp arg = new Ast.StrLit(\"Hello World!\"); // create an arg\n Ast.Stmt s = new Ast.Print(arg); // create a print stmt\n sl.add(s); // add stmt to list\n \n // Construct a MethodDecl ---\n // Ast.MethodDecl(Ast.Type rt, String m, List<Ast.Param> pl, \n // List<Ast.VarDecl> vl, List<Ast.Stmt> sl)\n Ast.MethodDecl md = new Ast.MethodDecl(null, \t// null represents 'void'\n\t\t\t\t\t \"main\",\t// method's name\n\t\t\t\t\t pl, \t\t// formal params\n\t\t\t\t\t vl, \t\t// local var decls\n\t\t\t\t\t sl); \t// method body\n List<Ast.MethodDecl> ml = new ArrayList<Ast.MethodDecl>();\n ml.add(md);\n\n // Construct a ClassDecl ---\n // Ast.ClassDecl(String nm, String pnm, \n // List<Ast.VarDecl> vl, List<Ast.MethodDecl> ml)\n Ast.ClassDecl cd = new Ast.ClassDecl(\"Hello\",\t// class name\n\t\t\t\t\t null, \t\t// parent's name\n\t\t\t\t\t vl, \t\t// field decls \n\t\t\t\t\t ml); \t\t// method decls\n List<Ast.ClassDecl> cl = new ArrayList<Ast.ClassDecl>();\n cl.add(cd);\n\n // Construct a Program ---\n // Ast.Program(List<Ast.ClassDecl> cl)\n Ast.Program p = new Ast.Program(cl); \t// create the whole AST\n System.out.print(p); \t\t\t// dump out the AST\n }", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }", "@Override\r\n public DSCP opBrackets() {\r\n /*put codegen here.*/\r\n return elementType.pushStack();\r\n }", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "ExpOperand createExpOperand();", "<C, P> PropertyCallExp<C, P> createPropertyCallExp();", "EolChainedFeatureCallPostfixExpression getChainedFeatureCallPostfixExpression();", "public bcm a(World paramaqu, int paramInt)\r\n/* 41: */ {\r\n/* 42:56 */ return new bdj();\r\n/* 43: */ }", "public String[] getConcreteSyntaxNodes ();", "public String getOperation() {\n if(isConstructor()) {\n return \"new\";\n }\n return getName();\n }", "public List<Expression> getSubExpressions();", "@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }", "@Override\n public String visit(ObjectCreationExpr n, Object arg) {\n return null;\n }", "private Operation creator(Scope scope, Vector queue)\r\n {\r\n Operation root = null;\r\n Type t = new Type();\r\n\r\n if ((t.type = basicType()) != Keyword.NONESY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n Token x = nextToken;\r\n\r\n t.ident = new Token(nextToken);\r\n t.ident.string = x.string = qualident();\r\n unresolved.add(x.string);\r\n\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n root = classCreatorRest(x, scope, queue);\r\n }\r\n }\r\n\r\n return root;\r\n }", "AnalyticExprArg createAnalyticExprArg();", "public ATExpression base_indexExpression();", "Argument createArgument();", "ASTNode clone0(AST target) {\n ExpressionMethodReference result = new ExpressionMethodReference(target);\n result.setSourceRange(getStartPosition(), getLength());\n result.setExpression((Expression) ASTNode.copySubtree(target, getExpression()));\n result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));\n result.setName((SimpleName) getName().clone(target));\n return result;\n }", "@Override\n public JminBaseNode xlate(\n Translator xlator,\n J8BaseNode n8, Supplier<ImmutableList<JminBaseNode>> children) {\n com.mikesamuel.cil.ast.jmin.ExplicitConstructorInvocationNode inv\n = null;\n com.mikesamuel.cil.ast.jmin.BlockStatementsNode stmts = null;\n for (JminBaseNode child : children.get()) {\n switch (child.getNodeType()) {\n case ExplicitConstructorInvocation:\n inv = (com.mikesamuel.cil.ast.jmin\n .ExplicitConstructorInvocationNode) child;\n break;\n case BlockStatements:\n stmts = (com.mikesamuel.cil.ast.jmin\n .BlockStatementsNode) child;\n break;\n default:\n throw new AssertionError(child);\n }\n }\n if (inv == null) {\n inv = com.mikesamuel.cil.ast.jmin\n .ExplicitConstructorInvocationNode\n .Variant\n .TypeArgumentsSuperLpArgumentListRpSem\n .buildNode();\n }\n ImmutableList.Builder<JminBaseNode> b = ImmutableList.builder();\n b.add(inv);\n if (stmts != null) { b.add(stmts); }\n return com.mikesamuel.cil.ast.jmin.ConstructorBodyNode.Variant\n .LcExplicitConstructorInvocationBlockStatementsRc\n .buildNode(b.build());\n }", "@Override\n @Transient\n protected String getASTNodeName() {\n return ((SuperMethodInvocation) getASTNode()).getName().toString();\n }", "Lexpr createLexpr();", "public static void main(String[] args) throws Exception {\r\n\t\tInnerAnnomiousNestedClass n=new InnerAnnomiousNestedClass();\r\n\t BB b=new BB() {\r\n\t\t @Override\r\n\t\tpublic void show() {\r\n\t\t\tSystem.out.println(\"Hello How are you\");\r\n\t\t}\r\n\t};\r\n\t // AA a=new AA();\r\n\t}", "CallStatement createCallStatement();", "ASTNode clone0(AST target) {\r\n\t\tNewAnonymousClassExpression result = new NewAnonymousClassExpression(target);\r\n\t\tresult.setSourceRange(this.getStartPosition(), this.getLength());\r\n\tresult.setExpression((Expression) ASTNode.copySubtree(target, getExpression()));\r\n\t\tresult.newArguments.addAll(ASTNode.copySubtrees(target, newArguments()));\r\n\t\tresult.constructorArguments.addAll(ASTNode.copySubtrees(target, constructorArguments()));\r\n\t\tresult.baseClasses.addAll(ASTNode.copySubtrees(target, baseClasses()));\r\n\t\tresult.declarations.addAll(ASTNode.copySubtrees(target, declarations()));\r\n\t\treturn result;\r\n\t}", "private LiteralAnnotationTerm appendLiteralArgument(Node bme, Tree.Term literal) {\n if (spread) {\n bme.addError(\"Spread static arguments not supported\");\n }\n LiteralAnnotationTerm argument = new LiteralAnnotationTerm();\n argument.setTerm(literal);\n this.term = argument;\n return argument;\n }", "public static InvocationExpression invoke(Expression expression, Iterable<Expression> arguments) { throw Extensions.todo(); }", "public FunctionVariable (Object names[])\n {\n super(names);\n }", "private Invoke(Builder builder) {\n super(builder);\n }", "public ASTQuery subCreate(){\r\n\t\tASTQuery ast = create();\r\n\t\tast.setGlobalAST(this);\r\n\t\tast.setNSM(getNSM());\r\n\t\treturn ast;\r\n\t}" ]
[ "0.5825867", "0.5810994", "0.5793749", "0.5586077", "0.55407876", "0.54051656", "0.5376658", "0.5358889", "0.528302", "0.51446134", "0.51443315", "0.51125747", "0.5093253", "0.5073238", "0.5068527", "0.50632143", "0.5060805", "0.50061786", "0.49289072", "0.49260837", "0.4924706", "0.4914995", "0.49142888", "0.49129993", "0.48953483", "0.4891475", "0.48720643", "0.4865656", "0.48626083", "0.48607993", "0.48551196", "0.48544028", "0.48457196", "0.48270938", "0.48188505", "0.4813488", "0.48096603", "0.480565", "0.47980326", "0.47978887", "0.4779332", "0.47689486", "0.47647706", "0.47595793", "0.47533992", "0.47528118", "0.475268", "0.47410256", "0.47406203", "0.4740405", "0.47362536", "0.47362536", "0.4728185", "0.4728085", "0.47233826", "0.47233826", "0.47233826", "0.4722752", "0.47207004", "0.47194275", "0.47075644", "0.470529", "0.470529", "0.470529", "0.47032377", "0.46989843", "0.46939197", "0.46925342", "0.4683999", "0.46831077", "0.46789798", "0.46672273", "0.46661296", "0.46554598", "0.46463323", "0.46369386", "0.46292955", "0.46267945", "0.46265742", "0.46236145", "0.46235648", "0.4622891", "0.46219233", "0.46203816", "0.4619229", "0.46190342", "0.4608505", "0.46074632", "0.46063316", "0.46056306", "0.4603645", "0.46026298", "0.46007362", "0.45982748", "0.45975882", "0.45973712", "0.45875025", "0.45867637", "0.4585814", "0.45785812" ]
0.5367224
7
Construcctor del Objeto Signo.
public Signo(String nombreSigno) { this.nombreSigno = nombreSigno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Signo() {\n\n }", "public SignBean() {\n }", "SPX(Object obj) {\n super();\n\n this.obj = obj;\n\n }", "public BoletoPaymentRequest() {\n\n }", "public CuentaDeposito() {\n super();\n }", "public EnvioPersonaPK() {\r\n }", "public SignaturEater()\r\n {\r\n }", "public Caso_de_uso () {\n }", "public Corso() {\n\n }", "public Firma() {\n }", "protected Asignatura()\r\n\t{}", "public Signer(@NotNull EllipticCurve curve) {\n this.curve = curve;\n }", "public XxGamMaPaymentReqVOImpl() {\n }", "public VoucherPayment() {\r\n }", "public UpgradeSignatureRequest() {\n }", "public SiacTRecapitoSoggetto() {\n\t}", "public SignedMessagePart(){\n }", "@Generated\n public Secciones() {\n }", "public CorreoElectronico() {\n }", "public AntrianPasien() {\r\n\r\n }", "public SimOI() {\n super();\n }", "public InvoiceModel() {\n \n }", "public interface SignatureObject {\n}", "public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public CashPayment()\n {\n super();\n }", "O() { super(null); }", "public Contracts() {\r\n super();\r\n \r\n }", "public TCubico(){}", "public Owner() {\n }", "public PrnPrivitakVo() {\r\n\t\tsuper();\r\n\t}", "public Synchronizer(Scriptable obj) {\n super(obj);\n }", "public Troco() {\n }", "public CCuenta()\n {\n }", "public Vehiculo() {\r\n }", "protected Signer() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>():void\");\n }", "private SingleObject(){}", "public SlanjePoruke() {\n }", "public CSUB45SO() \r\n {\r\n super();\r\n }", "public StudentFee() {\n }", "public CloudServiceVaultCertificate() {\n }", "public Pasien() {\r\n }", "public Preventivo() {\n\n }", "public KaChingContract() {\n\t}", "public Producto() {\r\n }", "StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }", "public XObject(){\r\n }", "private StoneContract() {\n }", "private SingleObject()\r\n {\r\n }", "public Documento() {\n\n\t}", "public XObject(){\n }", "public ShopSign(Tribu plugin) {\r\n\t\tsuper(plugin);\r\n\t}", "public OmsUsuario() {\n\t}", "public TebakNusantara()\n {\n }", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public Producto (){\n\n }", "public PaymentRecordKey() {\n super();\n }", "public Promo(){\n}", "public JSFOla() {\n }", "protected SecurityObject() {\n\t\t// Used by JPA provider.\n\n\t\tLOGGER.debug(\"SecurityObject#co\");\n\t}", "public Sistema(){\r\n\t\t\r\n\t}", "public Simulador(){\n }", "public SysSkillConferpo()\n {\n }", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public StreetSign(StreetSign streetSign) {\n super(streetSign.getDeviceId(), streetSign.getBlockchainAddress(), streetSign.getEnabled(), streetSign.getLocation());\n this.text = streetSign.getText();\n }", "public CSSTidier() {\n\t}", "public ProtoVehicle() {\n super();\n }", "public Alojamiento() {\r\n\t}", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public Transportista() {\n }", "public InsulinType(){\n super();\n }", "public PersonaVO() {\n }", "public Notifica(){}", "public Odontologo() {\n }", "public SmsSendRequestDto() {\n super();\n }", "public Busca(){\n }", "public Kullanici() {}", "public SubscriptionId() {\n super();\n }", "public TurnoVOClient() {\r\n }", "private ObjectRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SingleObject(){\n }", "public NhanVien()\n {\n }", "public WeiXinVo() {\n\t\tsuper();\n\t}", "public Trabajador() {\n\t\tsuper();\n\t}", "public VotacaoSegundoDia() {\n\n\t}", "public Builder setSig(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n sig_ = value;\n onChanged();\n return this;\n }", "public Cgg_jur_anticipo(){}", "public VentaPrincipal() {\n initComponents();\n }", "public Contact() {\n super();\n }", "public Veiculo() {\r\n\r\n }", "public Silos(int id_usuario, int id_silo, String nome_silo, String produto_silo, Double tamanho_silo){\n //A variavel da classe Construtora vai receber a variavel que está vindo por parametro (This faz referencia a classe)\n this.id_usuario = id_usuario;\n this.id_silo = id_silo;\n this.nome_silo = nome_silo;\n this.produto_silo = produto_silo;\n this.tamanho_silo = tamanho_silo;\n }", "@Generated\n public Impuestos() {\n }", "public Student() {\n \n }", "public Candidatura (){\n \n }", "public ClaimBundle() {\n }", "protected Approche() {\n }", "private Contract() {\n }", "public Gasto() {\r\n\t}", "public DomainPK()\n {\n }", "public Plato(){\n\t\t\n\t}", "public RequestDatosUsuario(){\r\n\t\tsuper();\r\n\t}" ]
[ "0.76215166", "0.62421006", "0.57751954", "0.5760748", "0.5740004", "0.57356066", "0.5718838", "0.5676105", "0.5670853", "0.56630903", "0.56623036", "0.5651707", "0.56443065", "0.5635455", "0.5631608", "0.5621887", "0.5615272", "0.55905503", "0.55825984", "0.5556664", "0.55519915", "0.55225307", "0.5509395", "0.55035686", "0.5494783", "0.5487769", "0.5452362", "0.54478085", "0.544247", "0.54416496", "0.5441279", "0.5438617", "0.5433179", "0.54314846", "0.54314184", "0.5407312", "0.5404557", "0.5404372", "0.53959143", "0.5389594", "0.5389579", "0.5379995", "0.5377997", "0.53627497", "0.53592914", "0.5358812", "0.5341513", "0.5340863", "0.53384376", "0.53359985", "0.53332967", "0.5307816", "0.5303952", "0.5301724", "0.5300159", "0.52973086", "0.5296212", "0.529153", "0.5282223", "0.52816576", "0.5280785", "0.5277856", "0.52675223", "0.52591497", "0.52577454", "0.52513963", "0.5244673", "0.5236798", "0.5223008", "0.52188534", "0.52130234", "0.52024573", "0.51992786", "0.51981", "0.51940084", "0.5193791", "0.519193", "0.5184455", "0.5181464", "0.5179259", "0.5176641", "0.51725936", "0.5172566", "0.51718664", "0.5171356", "0.516973", "0.51692", "0.5167201", "0.5166221", "0.51603657", "0.51588166", "0.5158609", "0.5151426", "0.5150832", "0.51477665", "0.51469743", "0.51451457", "0.5142321", "0.5140796", "0.5138086" ]
0.66347754
1
Construcctor del Objeto Signo.
public Signo() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Signo(String nombreSigno) {\n this.nombreSigno = nombreSigno;\n }", "public SignBean() {\n }", "SPX(Object obj) {\n super();\n\n this.obj = obj;\n\n }", "public BoletoPaymentRequest() {\n\n }", "public CuentaDeposito() {\n super();\n }", "public EnvioPersonaPK() {\r\n }", "public SignaturEater()\r\n {\r\n }", "public Caso_de_uso () {\n }", "public Corso() {\n\n }", "public Firma() {\n }", "protected Asignatura()\r\n\t{}", "public Signer(@NotNull EllipticCurve curve) {\n this.curve = curve;\n }", "public XxGamMaPaymentReqVOImpl() {\n }", "public VoucherPayment() {\r\n }", "public UpgradeSignatureRequest() {\n }", "public SiacTRecapitoSoggetto() {\n\t}", "public SignedMessagePart(){\n }", "@Generated\n public Secciones() {\n }", "public CorreoElectronico() {\n }", "public AntrianPasien() {\r\n\r\n }", "public SimOI() {\n super();\n }", "public InvoiceModel() {\n \n }", "public interface SignatureObject {\n}", "public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public CashPayment()\n {\n super();\n }", "O() { super(null); }", "public Contracts() {\r\n super();\r\n \r\n }", "public TCubico(){}", "public Owner() {\n }", "public PrnPrivitakVo() {\r\n\t\tsuper();\r\n\t}", "public Synchronizer(Scriptable obj) {\n super(obj);\n }", "public Troco() {\n }", "public CCuenta()\n {\n }", "public Vehiculo() {\r\n }", "protected Signer() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>():void\");\n }", "private SingleObject(){}", "public SlanjePoruke() {\n }", "public CSUB45SO() \r\n {\r\n super();\r\n }", "public StudentFee() {\n }", "public CloudServiceVaultCertificate() {\n }", "public Pasien() {\r\n }", "public Preventivo() {\n\n }", "public KaChingContract() {\n\t}", "public Producto() {\r\n }", "StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }", "public XObject(){\r\n }", "private StoneContract() {\n }", "private SingleObject()\r\n {\r\n }", "public Documento() {\n\n\t}", "public XObject(){\n }", "public ShopSign(Tribu plugin) {\r\n\t\tsuper(plugin);\r\n\t}", "public OmsUsuario() {\n\t}", "public TebakNusantara()\n {\n }", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public Producto (){\n\n }", "public PaymentRecordKey() {\n super();\n }", "public Promo(){\n}", "public JSFOla() {\n }", "protected SecurityObject() {\n\t\t// Used by JPA provider.\n\n\t\tLOGGER.debug(\"SecurityObject#co\");\n\t}", "public Sistema(){\r\n\t\t\r\n\t}", "public Simulador(){\n }", "public SysSkillConferpo()\n {\n }", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public StreetSign(StreetSign streetSign) {\n super(streetSign.getDeviceId(), streetSign.getBlockchainAddress(), streetSign.getEnabled(), streetSign.getLocation());\n this.text = streetSign.getText();\n }", "public CSSTidier() {\n\t}", "public ProtoVehicle() {\n super();\n }", "public Alojamiento() {\r\n\t}", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "public Transportista() {\n }", "public InsulinType(){\n super();\n }", "public PersonaVO() {\n }", "public Notifica(){}", "public Odontologo() {\n }", "public SmsSendRequestDto() {\n super();\n }", "public Busca(){\n }", "public Kullanici() {}", "public SubscriptionId() {\n super();\n }", "public TurnoVOClient() {\r\n }", "private ObjectRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SingleObject(){\n }", "public NhanVien()\n {\n }", "public WeiXinVo() {\n\t\tsuper();\n\t}", "public Trabajador() {\n\t\tsuper();\n\t}", "public VotacaoSegundoDia() {\n\n\t}", "public Builder setSig(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n sig_ = value;\n onChanged();\n return this;\n }", "public Cgg_jur_anticipo(){}", "public VentaPrincipal() {\n initComponents();\n }", "public Contact() {\n super();\n }", "public Veiculo() {\r\n\r\n }", "public Silos(int id_usuario, int id_silo, String nome_silo, String produto_silo, Double tamanho_silo){\n //A variavel da classe Construtora vai receber a variavel que está vindo por parametro (This faz referencia a classe)\n this.id_usuario = id_usuario;\n this.id_silo = id_silo;\n this.nome_silo = nome_silo;\n this.produto_silo = produto_silo;\n this.tamanho_silo = tamanho_silo;\n }", "@Generated\n public Impuestos() {\n }", "public Student() {\n \n }", "public Candidatura (){\n \n }", "public ClaimBundle() {\n }", "protected Approche() {\n }", "private Contract() {\n }", "public Gasto() {\r\n\t}", "public DomainPK()\n {\n }", "public Plato(){\n\t\t\n\t}", "public RequestDatosUsuario(){\r\n\t\tsuper();\r\n\t}" ]
[ "0.66347754", "0.62421006", "0.57751954", "0.5760748", "0.5740004", "0.57356066", "0.5718838", "0.5676105", "0.5670853", "0.56630903", "0.56623036", "0.5651707", "0.56443065", "0.5635455", "0.5631608", "0.5621887", "0.5615272", "0.55905503", "0.55825984", "0.5556664", "0.55519915", "0.55225307", "0.5509395", "0.55035686", "0.5494783", "0.5487769", "0.5452362", "0.54478085", "0.544247", "0.54416496", "0.5441279", "0.5438617", "0.5433179", "0.54314846", "0.54314184", "0.5407312", "0.5404557", "0.5404372", "0.53959143", "0.5389594", "0.5389579", "0.5379995", "0.5377997", "0.53627497", "0.53592914", "0.5358812", "0.5341513", "0.5340863", "0.53384376", "0.53359985", "0.53332967", "0.5307816", "0.5303952", "0.5301724", "0.5300159", "0.52973086", "0.5296212", "0.529153", "0.5282223", "0.52816576", "0.5280785", "0.5277856", "0.52675223", "0.52591497", "0.52577454", "0.52513963", "0.5244673", "0.5236798", "0.5223008", "0.52188534", "0.52130234", "0.52024573", "0.51992786", "0.51981", "0.51940084", "0.5193791", "0.519193", "0.5184455", "0.5181464", "0.5179259", "0.5176641", "0.51725936", "0.5172566", "0.51718664", "0.5171356", "0.516973", "0.51692", "0.5167201", "0.5166221", "0.51603657", "0.51588166", "0.5158609", "0.5151426", "0.5150832", "0.51477665", "0.51469743", "0.51451457", "0.5142321", "0.5140796", "0.5138086" ]
0.76215166
0
Callback used when this service component is activating
@Activate protected synchronized void activate(final ComponentContext componentContext, final Map<String, Object> properties) { LOGGER.info("Activating MongoDB Component..."); super.setCloudService(this.m_cloudService); super.activate(componentContext); this.m_context = componentContext; this.doRegister(componentContext, properties); LOGGER.info("Activating MongoDB Component... Done."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onActivate() {\n }", "@Override\n public void activate() {\n \n }", "@Override\n public void activate() {\n\n }", "@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}", "public void onActivation() { }", "@Override\n\tpublic void activate() {\n\t}", "@Override\n\tpublic void activate() {\n\t}", "public void serviceActivated(String serviceID) {\r\n \t\teventIDFilter.serviceActivated(serviceID);\r\n \t}", "public void activate(){\n callback.action();\n }", "@Override\n\tpublic void activate() {\n\t\t\n\t}", "@Override\n\tpublic void onActivated() {\n\t\tinit();\n\t}", "@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}", "public void beginLoadingService(MVCCallback<MVCService> onServiceLoadedCallback);", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n TranscriptDownService.LocalBinder binder = (TranscriptDownService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tib = service;\n\t\t\tSystem.out.println(\"DEBUG>>>ServiceConnection.\");\n\t\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalBinder binder = (LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "public void activate()\n {\n }", "public void activate(){\r\n\r\n\t}", "public Object onActivate()\n {\n\n return null;\n }", "@Override\n\t\t\t\tpublic void onServiceConnected(ComponentName p1, IBinder p2)\n\t\t\t\t{\n\t\t\t\t}", "public void activate(ComponentContext cc) {\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n System.out.println(\"绑定成功\");\n }", "public void activate() {\n\n serviceTracker = new ServiceTracker<>(bundleContext, BlueprintContainer.class,\n new CustomBlueprintContainerServiceTrackerCustomizer());\n serviceTracker.open();\n\n CustomBlueprintListener blueprintListener = new CustomBlueprintListener();\n listenerSR = bundleContext.registerService(BlueprintListener.class, blueprintListener,\n new Hashtable<String, Object>());\n }", "public void activate() {\n\t\t// TODO Auto-generated method stub\n\t}", "@Override\n public void onServiceConnected(ComponentName classname, IBinder obj) {\n Log.i(this.getClass().getName(), \"ServiceConnection\");\n mService = IAisinoService.Stub.asInterface(obj);\n }", "void onServiceBegin(int taskCode);", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tLocalBinder binder = (LocalBinder)service;\n\t\t\tmService = binder.getService();\n\t\t\t//Toast.makeText(SyncServiceActivity.this, \"onServiceConnected=>\"+mService, Toast.LENGTH_SHORT).show();\n\t\t\t\n\t\t}", "public void onServiceConnected();", "public void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tmBoundService = ((LocalService.LocalBinder) service).getService();\r\n\r\n\t\t\t// Wenn während des Setups der Service noch nicht fertig geladen\r\n\t\t\t// ist, wird solange Warte-Overlay angezeigt\r\n\t\t\t// Wenn der Service fertig ist wird das Overlay ausgeblendet\r\n\r\n\t\t\t// if (OverlayActivity.isCreated) {\r\n\t\t\t// OverlayActivity.getInstance().dismiss();\r\n\t\t\t// }\r\n\t\t\tSetupSearchDevicesFragment fragment = (SetupSearchDevicesFragment) getFragmentById(\"SetupSearchDevicesFragment\");\r\n\t\t\tif (fragment.isVisible()) {\r\n\t\t\t\tfragment.initViewBluetooth();\r\n\t\t\t}\r\n\r\n\t\t\t// Tell the user about this for our demo.\r\n\t\t\tLog.i(TAG, \"Service connected with app...\");\r\n\t\t\t// Toast.makeText(MainActivity.this, \"Service connected.\", Toast.LENGTH_SHORT).show();\r\n\r\n\t\t\t// Verbinde mit gespeichertem Device (falls noch keine Verbindung\r\n\t\t\t// besteht)\r\n\t\t\tif (mSharedPrefs.getConnectivityType() == 1) { // BEI BT\r\n\r\n\t\t\t\tfinal ConnectionInterface connection = mBoundService.getConnection();\r\n\t\t\t\tif (connection != null) {\r\n\t\t\t\t\tif (!connection.isConnected()) {\r\n\r\n\t\t\t\t\t\t// OnConnectedListener\r\n\t\t\t\t\t\tconnection.setOnConnectedListener(new OnConnectedListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onConnectedListener(String deviceName) {\r\n\r\n\t\t\t\t\t\t\t\tconnection.registerDisconnectHandler();\r\n\r\n\t\t\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\t\t\t// HELLO Nachricht senden\r\n\t\t\t\t\t\t\t\t\tString msg = mContext.getString(R.string.BABYFON_MSG_CONNECTION_HELLO) + \";\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ mSharedPrefs.getHostAddress() + \";\" + mSharedPrefs.getPassword();\r\n\t\t\t\t\t\t\t\t\tconnection.sendMessage(msg);\r\n\r\n\t\t\t\t\t\t\t\t\tmSharedPrefs.setRemoteOnlineState(true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\tif (mSharedPrefs.getRemoteAddress() != null) { // Gespeichertes Gerät\r\n\t\t\t\t\t\t\t\t// Verbinde\r\n\t\t\t\t\t\t\t\tmBoundService.connectTo(mSharedPrefs.getRemoteAddress());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (mSharedPrefs.getDeviceMode() == 0) { // BABY\r\n\t\t\t\t\t\t\t// Warte auf Verbindung\r\n\t\t\t\t\t\t\tmBoundService.startServer();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalService.LocalBinder binder = (LocalService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalService.LocalBinder binder = (LocalService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n BinderService.LocalBinder binder = (BinderService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\r\n\t\tpublic void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\ttry {\r\n\t\t\t\tmSpiderX = SpiderX.Stub.asInterface(service);\r\n\t\t\t\tif(mSpiderX != null && spiderCallback != null){\r\n\t\t\t\t\tmSpiderX.setSpiderCallBack(spiderCallback);\r\n\t\t\t\t}\r\n\t\t\t\tfor(EventBus handler:mEventBus){\r\n\t\t\t\t\thandler.onEvent(TYPE_SERVICEBINDER_SUCESS,\"\",\"\");\r\n\t\t\t\t}\r\n\t\t\t} catch (RemoteException e) {\r\n\t\t\t\tLog.d(TAG, \" \"+e);\r\n\t\t\t}\r\n\t\t}", "public void onServiceConnected(ComponentName arg0, IBinder service) {\n\t\t\tLog.d(\"ShimmerService\", \"Service connected\");\n\t\t\tLocalBinder binder = (ShimmerService.LocalBinder) service;\n\t\t\tmService = binder.getService();\n\t\t\tmServiceBind = true;\n\t\t\tmService.setHandlerMain(mHandler);\n\t\t\t// update the view\n\t\t}", "public void onServiceConnected(ComponentName className, IBinder binder) {\n\t\tLog.i(this.getClass().getSimpleName(), \"onServiceConnected: \"\n\t\t\t\t+ className.toShortString());\n\n\t\tBtBinder b = (BtBinder) binder;\n\t\tbtService = b.getService();\n\t\tboolean is_set = btService.setListener(getBtListener());\n\n\t\tif (is_set) {\n\t\t\t// Get state if listener wasn't already attached.\n\t\t\tIntent serviceIntent = new Intent(this, BTService.class)\n\t\t\t\t\t.setAction(BTService.ACTION_GET_STATE);\n\t\t\tstartService(serviceIntent);\n\t\t}\n\n\t\tToast.makeText(BaseAct.this, R.string.btservice_connected,\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t}", "@Override\n public void activate() {\n init();\n }", "@Override\n public void onServiceActive(boolean active) {\n if (!active)\n refreshArticles();\n mArticlesView.setLoadingIndicator(active);\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n PositionService.PositionBinder binder = (PositionService.PositionBinder) service;\n positionService = binder.getService();\n positionService.setCallbacks(MainActivity.this);\n }", "@Override\r\n\tpublic boolean activate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean activate() {\n\t\treturn true;\r\n\t}", "@Override\r\n public void onCreate() {\r\n Log.d(TAG, \"on service create\");\r\n }", "public void onServiceConnected() {\r\n\t\tapiEnabled = true;\r\n\r\n\t\t// Display the list of calls\r\n\t\tupdateList();\r\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n imService = ((FriendLocationService.IMBinder)service).getService(); \r\n \r\n \r\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n\t mBoundAutopilotService = new Messenger(service);\n\t //mCallbackText.setText(\"Attached.\");\n\n\t // We want to monitor the service for as long as we are\n\t // connected to it.\n\t try {\n\t Message msg = Message.obtain(null, autopilotService.MSG_REGISTER_CLIENT);\n\t msg.replyTo = mMessenger;\n\t mBoundAutopilotService.send(msg);\n\n\t // Give it some value as an example.\n\t //msg = Message.obtain(null, autopilotService.MSG_ECHO, this.hashCode(), 0);\n\t //mBoundAutopilotService.send(msg);\n\t msg = Message.obtain(null, autopilotService.MSG_IS_SERVICE_RUNNING, 0, 0);\n\t mBoundAutopilotService.send(msg);\n\t Log.i(\"anemoi\", \"Here 0\");\n\t } catch (RemoteException e) {\n\t // In this case the service has crashed before we could even\n\t // do anything with it; we can count on soon being\n\t // disconnected (and then reconnected if it can be restarted)\n\t // so there is no need to do anything here.\n\t }\n\t Log.i(\"anemoi\", \"Buuu\");\n\t }", "@Override\n\tpublic boolean activate() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void componentActivated(AbstractComponent arg0) {\n\t\t\r\n\t}", "@Override\n public void onMachineActivated()\n {\n \n }", "public interface AutoServiceRunningCallBack {\n void call();\n}", "public void onServiceConnected() {\r\n \t// Display the list of sessions\r\n\t\tupdateList();\r\n }", "void doAccelBindService() {\n\t\tbindService(accelIntentDelay, accelConnection, Context.BIND_AUTO_CREATE);\n\t\taccelIsBound = true;\n\t}", "@Override\r\n\tpublic void componentActivated(AbstractComponent arg0) {\n\r\n\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MyService.LocalBinder binder = (MyService.LocalBinder) service;\n myService = binder.getService();\n isBound = true;\n\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"service on create\");\n\t\tsuper.onCreate();\n\t}", "public void activate() {\n\t\tactivated = true;\n\t}", "@Override\n public void onServiceConnected(ComponentName className, IBinder service) {\n StockInfoService.LocalBinder binder = (StockInfoService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n if(stockFile == null)\n throw new NullPointerException();\n mService.setStockFile(stockFile);\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n final CurrencyRatesService.LocalBinder binder = (CurrencyRatesService.LocalBinder) service;\n currencyRatesService = binder.getService();\n isServiceBound = true;\n }", "public void onServiceConnected(ComponentName className,\n\t\t\t\tIBinder service) {\n\t\t\tLocalBinder binder = (LocalBinder) service;\n\t\t\tconnService = binder.getService();\n\t\t\tconnServiceBound = true;\n\t\t}", "public void service_INIT(){\n }", "@Override\n public final void onActivation() {\n eventManager.addListener(strokeConfigListener);\n eventBus.addSubscriber(regenerateShapeSubscriber);\n }", "@Override\n\t\tpublic void onActive(AcStatusEvent event) {\n\n\t\t}", "public void onServiceConnected(ComponentName className, IBinder service) {\n mService = new Messenger(service);\n mBound = true;\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n mService = new Messenger(service);\n mBound = true;\n }", "public void onActive() {\n super.onActive();\n this.f5335l.registerOnSharedPreferenceChangeListener(this);\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\n\t\t\tYC_SERVICE_BINDER = IYCService.Stub.asInterface(service);\n\n\t\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service)\n {\n mEngagementService = IEngagementService.Stub.asInterface(service);\n\n /* We are not binding anymore */\n mBindingService = false;\n\n /* Send pending commands */\n for (Runnable cmd : mPendingCmds)\n cmd.run();\n mPendingCmds.clear();\n\n /* Schedule unbind (if not in session) */\n scheduleUnbind();\n }", "public void activated() \r\n\t{\r\n\t\t\r\n\t}", "protected void onServiceConnectedExtended(ComponentName className,\n IBinder service) {\n mAllowedToBind = true;\n\n }", "public void notifyServiceChanged() {\r\n\t\t\tgetLoaderManager().restartLoader(0, null, this);\t\r\n\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n ConnectionService.ConnectionBinder binder = (ConnectionService.ConnectionBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onStart() {\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n Log.d(\"service\", \"onServiceConnected() \" + name.getClassName());\n mMyServ = ((MyService.LocalBinder) service).getService();\n }", "@Override\n public void onStart()\n {\n }", "public void activate();", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MediaPlayerService.LocalBinder binder = (MediaPlayerService.LocalBinder) service;\n player = binder.getService();\n serviceBound = true;\n player.setCallbacks(MainActivity.this);\n\n //Toast.makeText(MainActivity.this, \"Service Bound\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tMediaPlayerService.LocalMPBinder binder = (MediaPlayerService.LocalMPBinder) service;\n\t\t\tmService = binder.getService();\n\t\t\tmBound = true;\n\t\t\tif (mService.isAutoPlayCase() && getBooleanPreference(getString(R.string.autoplay_switch), false) && mSavedStationDefinition != null)\n\t\t\t\tdoClickOnStopPlayButton(/*getPlayStopButton(), */false);\n\t\t\tsynchronizePlayPauseButton();\n\t\t\tFragmentManager fm = getSupportFragmentManager();\n\t\t\tif (fm != null) {\n\t\t\t\tList<Fragment> fragments = fm.getFragments();\n\t\t\t\tif(fragments != null) {\n\t\t\t\t\tfor (Fragment fragment : fragments) {\n\t\t\t\t\t\tif (fragment != null) {\n\t\t\t\t\t\t\tif (fragment instanceof FavoriteStationsFrame) {\n\t\t\t\t\t\t\t\t((FavoriteStationsFrame) fragment).synchronizeOnServiceConnected(mService);// do something\n\t\t\t\t\t\t\t\tLog.e(\"MTA:onServ.Conn.\", \"FSF:synchronizeOnServiceConnected\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tLog.e(\"MTA:onServ.Conn.\", className.toString());\n\t\t}", "@Override\r\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service)\r\n\t\t\t{\n\t\t\t\tSystem.out.println(\"connect\");\r\n\t\t\t\tService_DealCloseReport mService = ((myBinder)service).getService();\r\n\t\t\t}", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "public void onStart() {\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n HomeActivityWatcherService.MyBinder binder = (HomeActivityWatcherService.MyBinder) service;\n mWatcherService = binder.getService();\n mBound = true;\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n\n messengerService = new Messenger(service);\n messengerServiceBound = true;\n }", "public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tmBinder = (Stub) service;\n\t\t\tLog.d(TAG, \"mBinder init\");\n\t\t}", "public abstract void activate();", "public abstract void activate();", "@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t\t\t\t\n\t\t\t\tmyAIDLService = IMyAidlInterface.Stub.asInterface(service);\n\t\t\t}", "public void onServiceConnected(ComponentName className, IBinder service) {\n mBound = true;\n LocalBinder binder = (LocalBinder) service;\n sensorService = binder.getService();\n\n if(dni != null) {\n Log.d(\"TAG\", \"MBOUND 1\");\n if (mBound) {\n Log.d(\"TAG\", \"MBOUND 2\");\n if (sensorService == null) {\n Log.d(\"TAG\", \"sensorService es null\");\n }\n\n sensorValues = sensorService.getCurrentValues();\n if(sensorValues != null) {\n //Log.d(\"TAG\", sensorValues.getLocLat() + \"-\" + sensorValues.getLocLong());\n new UpdateUserStateTask().execute(dni, sensorValues.getLocLat(), sensorValues.getLocLong());\n }\n else {\n //Log.d(\"TAG\", \"Obteniendo localizacion de LocationManager\");\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE);\n // Sale error porque requiere minimo API 23 y nosotros tenemos minimo API 15\n // No falla al ejecutarse\n try {\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n //Log.d(\"TAG\", location.getLatitude() + \"-\" + location.getLongitude());\n new UpdateUserStateTask().execute(dni, location.getLatitude(), location.getLongitude());\n }\n catch (SecurityException e) {\n Log.e(\"PERMISSION_EXCEPTION\",\"PERMISSION_NOT_GRANTED\");\n }\n }\n }\n else {\n Log.d(\"TAG\", \"NO BOUND\");\n }\n }\n else {\n Log.d(\"TAG\", \"DNI nulo\");\n }\n\n }", "@Override\n\tpublic void serviceResolved(ServiceEvent arg0) {\n\n\t}", "public void service() {\n\t}", "public void onStartImpl() {\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tConfig.HisiSettingService = ServiceSettingsInfoAidl.Stub.asInterface(service);\n\t\t}" ]
[ "0.70359695", "0.69655627", "0.67814636", "0.6762563", "0.6703154", "0.6655462", "0.6655462", "0.66006845", "0.6597546", "0.65952057", "0.65696985", "0.6555636", "0.65208477", "0.6519615", "0.65171266", "0.6514596", "0.6436742", "0.6425872", "0.63952243", "0.63898", "0.6354974", "0.6348016", "0.6319342", "0.6314064", "0.62919444", "0.62905186", "0.6281512", "0.62660295", "0.626098", "0.6258679", "0.6251429", "0.6251429", "0.62493885", "0.6242902", "0.62418693", "0.6230635", "0.62081844", "0.6198126", "0.6197531", "0.61814487", "0.61814487", "0.6169177", "0.6136336", "0.6128207", "0.61183923", "0.6118243", "0.61153394", "0.6113305", "0.61042464", "0.60932124", "0.60901815", "0.6083798", "0.60527074", "0.6043735", "0.60386264", "0.6035459", "0.6033164", "0.6025468", "0.60166436", "0.6009937", "0.60030335", "0.6000553", "0.6000553", "0.5996129", "0.5990377", "0.59862703", "0.5971651", "0.59632576", "0.5962894", "0.5962192", "0.5957074", "0.59531534", "0.59531534", "0.59531534", "0.59531534", "0.59531534", "0.59531534", "0.59531534", "0.59531534", "0.59531534", "0.594942", "0.59479755", "0.59250796", "0.5923217", "0.59225464", "0.5919944", "0.5915041", "0.5915041", "0.59115696", "0.591024", "0.59082735", "0.5908149", "0.5891319", "0.5887083", "0.5887083", "0.5885102", "0.5883027", "0.5881215", "0.58781815", "0.5873687", "0.58568645" ]
0.0
-1
Callback used when this service component is deactivating
@Override @Deactivate protected void deactivate(final ComponentContext context) { LOGGER.debug("Deactivating MongoDB Component..."); LOGGER.info("Releasing CloudApplicationClient for {}...", APP_ID); super.deactivate(context); LOGGER.debug("Deactivating MongoDB Component... Done."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDeactivate() {\n }", "public void onDeactivation() { }", "@Override\n\tpublic void onDeactivated() {\n\t\t\n\t}", "@Override\n\tpublic void onDeactivate() {\n\t}", "public void deActivated() \r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tunbindService(serviceConnection);\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void deactivate() {\n \n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n releaseService();\n }", "public void deactivate() {\n serviceTracker.close();\n listenerSR.unregister();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tif (isServiceBinded) {\n\t\t\tunbindService(this);\n\t\t\tisServiceBinded = false;\n\t\t\tserviceMessenger = null;\n\t\t}\n\t\tsuper.onDestroy();\n\t}", "@Override\r\n\tpublic void deactivate() {\n\t\t\r\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n active = false;\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n active = false;\n }", "public void onServiceDisconnected(ComponentName className) {\n \timService = null;\r\n \r\n }", "@Override\n public void onDestroy() {\n stopService();\n }", "public void onServiceDisconnected(ComponentName className) {\n _boundService = null; \n Toast.makeText(TestServiceHolder.this, \"Service connected\", \n Toast.LENGTH_SHORT).show(); \n }", "@Override\n\tpublic void deactivate() {\n\t}", "public void onServiceDisconnected(ComponentName className) {\n mService = null;\n mBound = false;\n }", "public void onServiceDisconnected(ComponentName className) {\n mService = null;\n mBound = false;\n }", "public void onServiceDisconnected(ComponentName className) {\n\t mBoundAutopilotService = null;\n\t //mCallbackText.setText(\"Disconnected.\");\n\t }", "public void onServiceDisconnected(ComponentName className) {\n \t\t\tmService = null;\n \t\t}", "public void onServiceDisconnected(ComponentName className) {\n \tmServiceMessenger = null;\r\n setIsBound(false);\r\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tunbindService(mServiceConn);\n\t}", "public void onServiceDisconnected(ComponentName className) {\n\t\t\t\tservice = null;\n\t\t\t\tLog.d(\"OpenXC binding\", \"openXC service disconnected\");\n\t\t\t}", "@Override\n public void onDeactivated(int i) {\n }", "public void onServiceDisconnected(ComponentName className) {\n mBoundService = null;\n Log.i(TAG,\"Service DISconnected\");\n }", "@Override\n\tpublic void onDestroy() {\n\t\tLog.i(TAG, \"service on destory\");\n\t\tsuper.onDestroy();\n\t}", "public void onServiceDisconnected(ComponentName className) {\n\t\t\tmBoundService = null;\r\n\t\t\t// Toast.makeText(MainActivity.this, \"Service disconnected.\", Toast.LENGTH_SHORT).show();\r\n\t\t}", "@Override\n\tpublic void deactivate() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n @Deactivate\n private void deactivate() {\n\n this.bundleContext.removeServiceListener(this);\n\n final ServiceReference[] serviceReferences;\n synchronized (this.proxies) {\n serviceReferences = this.proxies.keySet().toArray(\n new ServiceReference[this.proxies.size()]);\n }\n\n for (ServiceReference serviceReference : serviceReferences) {\n unregister(serviceReference);\n }\n\n this.bundleContext = null;\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n \n }", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t\t\n\t\t}", "public void onServiceDisconnected(ComponentName arg0) {\n\t\t\tmServiceBind = false;\n\t\t}", "public void onDestroy() {\n if (isEnabled) {\n Activity activity = this.cordova.getActivity();\n\n unbindServiceFromWebview(activity, updateServiceIntent);\n }\n }", "@Override\n\t\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n if (service != null)\n service.setListener(null);\n service = null;\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tSystem.out.println(\"Service onDestory\");\r\n\t\tsuper.onDestroy();\r\n\t}", "@Override\n protected void onDestroy() {\n if (mServiceHelp != null) {\n mServiceHelp.removeOnServiceCallBack();\n }\n\n super.onDestroy();\n }", "public void onServiceUnregistered() {\r\n \t// Update the list of sessions\r\n\t\tupdateList();\r\n }", "@SuppressGaldrWarnings( \"Galdr:ProtectedLifecycleMethod\" )\n @OnDeactivate\n protected void onDeactivate()\n {\n }", "@Override\n public void onDestroy() {\n BusProvider.getInstance().unregister(this);\n super.onDestroy();\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n\n mBound = false;\n }", "@Override\r\n\t\tpublic void onServiceDisconnected(ComponentName arg0) {\n\r\n\t\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n\tpublic void onServiceDisconnected(ComponentName name)\n\t{\n\t\tmInterface = null;\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n unbindService(connection);\n }", "@Override\n\tpublic void onDestroy() {\n\t\tshutdown();\n\t\tLog.d(tag,\"service onDestroy\");\n\t\tsuper.onDestroy();\n\t}", "public void onDestroy() {\n LogUtil.d(DownloadService.class, \"Service onDestroy\");\n mNetReceiver.unRegist(this);\n\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n stopService(collectDataService);\n super.onDestroy();\n }", "@Override\r\n public void onServiceDisconnected(ComponentName className) {\r\n isObdServiceBound = false;\r\n }", "@Override\n public void onDestroy(){\n super.onDestroy();\n subscriptions.unsubscribe();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tunbindService(connection);\n\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n mAbleBLEService = null;\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n Toast.makeText(this, R.string.service_destoryed, Toast.LENGTH_LONG).show();\n\n // Disconnect Google Api to stop updating.\n mGoogleApiClient.disconnect();\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n messengerService = null;\n messengerServiceBound = false;\n }", "@Override\n\tpublic void onDeactivated(MainFrame main, ActionContextController nextContext) {\n\t}", "@Override\r\n public void onDestroy() {\n\tEventBus.getDefault().unregister(this);\r\n\tsuper.onDestroy();\r\n }", "public void onDestroy(){\n\t\tsuper.onDestroy();\n\t\tdoUnbind();\n\t}", "public void onServiceDisconnected(ComponentName className) {\n\t\t\tLog.i(LOG_TAG, \"onService connected......method\");\n\t\t\tmBoundService = null;\n\t\t\t// Toast.makeText(ChatActivity.this, \"Disconnected to service\",\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t}", "@Override\r\n public void onDestroy() {\r\n super.onDestroy();\r\n Log.d(TAG, \"on service destroy\");\r\n sendBroadcast(new Intent(Constants.INSTAG_SERVICE_DESTROYED));\r\n cancelTimer();\r\n }", "@Override\r\n protected void onDestroy() {\r\n GlobalBus.getBus().unregister(this);\r\n super.onDestroy();\r\n }", "public void serviceDeactivated(String serviceID) {\r\n \t\teventIDFilter.serviceDeactivated(serviceID);\r\n \t}", "@Override\n public void deactivate() {\n mListener = null;\n if (mLocationClient != null) {\n mLocationClient.stopLocation();\n mLocationClient.onDestroy();\n }\n mLocationClient = null;\n mLocationOption = null;\n }", "@Override\n protected void onDestroy() {\n mManager.clearLocalServices(mChannel, null);\n super.onDestroy();\n }", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t}", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\t\t}", "@Override\n protected void onDestroy() {\n stopService(trackerServiceIntent);\n Log.d(\"Service\", \"ondestroy of activity!\");\n super.onDestroy();\n }", "@Override\n public void onServiceDisconnected(ComponentName name) {\n serviceBound = false; // Indicates that the service is no longer bound.\n }", "@Override\n protected void onDestroy() {\n EventBus.getDefault().unregister(this);\n\n super.onDestroy();\n }", "protected void onServiceDisconnectedExtended(ComponentName className) {\n mAllowedToBind = false;\n\n }", "@Override\r\npublic void onDestroy() {\n\tsuper.onDestroy();\r\n\tif(mIntent!=null){\r\n\t\tgetActivity().stopService(mIntent);\t\r\n\t}\r\n\t\r\n}", "@Override\n public void onServiceDisconnected(ComponentName componentName) {\n //Log.e(\"SERVICE_DISCONNECTED\", \"Disconnecting service\");\n boundNewsService = null;\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tstartService(new Intent(getApplicationContext(), FlowService.class));\r\n\r\n\t\tsuper.onDestroy();\r\n\t}", "public void onServiceDisconnected(ComponentName className) {\n Log.e(\"Activity\", \"Service has unexpectedly disconnected\");\n wsService = null;\n }", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\n\t\t\tYC_SERVICE_BINDER = null;\n\n\t\t\tbindService();\n\n\t\t}", "public void onServiceDisconnected(ComponentName className) {\n\t\t// Log.i(this.getClass().getSimpleName(), \"onServiceDisconnected\"\n\t\t// + className.toShortString());\n\t\tbtService = null;\n\t\tToast.makeText(BaseAct.this, R.string.btservice_disconnected,\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t}", "@Override\n\t\tpublic void onServiceDisconnected(ComponentName name) {\n\n\t\t}", "@Override\n\tpublic void onDestroy() {\n\t\tLog.i(\"dservice\", \"stop!\");\n\t\tstopSelf();\n\t\tam.cancel(sender);\t\t// 알람 취소\n\t\tsuper.onDestroy();\n\t}", "@Override\n public void onServiceDisconnected(ComponentName name) {\n bleService.disconnect();\n bleService = null;\n }", "@Override\n public void onDestroy() {\n unregisterReceiver(mBLEUpdateReceiver);\n unregisterReceiver(mMqttUpdateReceiver);\n unbindService(mBleServiceConnection);\n unbindService(mMqttServiceConnection);\n\n Log.d(TAG,\"Manager Service Destroyed\");\n\n super.onDestroy();\n }", "public void DeActivate() {\n\t\t\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t\ttry {\n\t\t\tstopService(mServiceIntent);\n\t\t} catch (Exception er) {\n\t\t\ter.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onServiceDisconnected(ComponentName name)\n {\n mEngagementService = null;\n\n /*\n * Simulate disconnected intent targeting the current package name since the engagement\n * process has been killed.\n */\n Intent disconnectedIntent = new Intent(\n \"com.microsoft.azure.engagement.intent.action.DISCONNECTED\");\n disconnectedIntent.setPackage(mContext.getPackageName());\n mContext.sendBroadcast(disconnectedIntent);\n\n /* Mark we are auto re-binding to it */\n mBindingService = true;\n }", "@Override\n public void onBindingDied(ComponentName name) {\n mService = null;\n hostConnection = null;\n }", "@Override\n\tpublic void onDestroy() {\n\t\tLog.d(\"MyService\", \"onDestroy() get called\");\n\t\tsuper.onDestroy();\n\t}", "@Override\n protected void onStop() {\n if(scheduler != null)\n scheduler.doUnbindService();\n super.onStop();\n }", "@Override\n public void onDetach() {\n if (callbackManager != null) callbackManager.setActivity(null);\n super.onDetach();\n }", "@Override\n public void onDestroy() {\n sensorManager.unregisterListener(SensorService.this, accelerometerSensor);\n unregisterReceiver(powerConnectionReceiver);\n notificationManager.cancel(1);\n super.onDestroy();\n }", "public void deactivate() {\n log.info(\"Stopped\");\n }", "@Override\n public void onServiceDisconnected(ComponentName className) {\n Log.d(TAG, className.toString() + \" service is unbound\");\n }", "@Override\n\tpublic void onStop() {\n\t\tsuper.onStop();\n\t\tlock = true;\n\t\tgetActivity().unbindService(mServiceConnection);\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n EventBus.getDefault().unregister(this);\n }", "public void deactivate();", "@Override\n\t\t\t\tpublic void onServiceDisconnected(ComponentName p1)\n\t\t\t\t{\n\t\t\t\t}", "@Override\n\tpublic void onDestroy() {\n\t\tthis.unregisterReceiver(notifyServiceReceiver);\n\t\tsuper.onDestroy();\n\t}" ]
[ "0.76919997", "0.7530798", "0.75143176", "0.74980015", "0.7164491", "0.71528757", "0.71251726", "0.71150094", "0.71035653", "0.7002748", "0.69868314", "0.69779134", "0.69779134", "0.6974324", "0.6942236", "0.6942002", "0.6941421", "0.6935349", "0.6935349", "0.6933779", "0.6920546", "0.6917857", "0.6916755", "0.6899207", "0.6873825", "0.6852352", "0.68472457", "0.68384427", "0.6826236", "0.68080324", "0.6787976", "0.6785262", "0.6785262", "0.6775081", "0.67660695", "0.6763345", "0.6756561", "0.67437524", "0.67423224", "0.67335945", "0.6730784", "0.6716987", "0.67163295", "0.6715419", "0.6698033", "0.6698033", "0.6697092", "0.6690099", "0.66892874", "0.66880774", "0.66855615", "0.6678809", "0.66649175", "0.66584975", "0.66551477", "0.6648738", "0.6645885", "0.6645885", "0.66379416", "0.6626927", "0.6618365", "0.6614266", "0.66083497", "0.6607792", "0.66023856", "0.6600575", "0.6589227", "0.65884435", "0.65846884", "0.6582005", "0.6582005", "0.6580863", "0.65692526", "0.65691483", "0.6565594", "0.6564694", "0.6560873", "0.65526456", "0.6549217", "0.65326244", "0.6523941", "0.6517753", "0.65113306", "0.65107876", "0.6508292", "0.6508269", "0.64947116", "0.6494685", "0.6489975", "0.64826894", "0.6479734", "0.6477526", "0.6474187", "0.64717454", "0.647091", "0.6449507", "0.6447213", "0.64444834", "0.64440453", "0.64420193" ]
0.65193874
81
Used to be called when configurations will get updated
public void updated(final Map<String, Object> properties) { LOGGER.info("Updating MongoDB Component..."); this.m_properties = properties; properties.keySet().forEach(s -> LOGGER.info("Update - " + s + ": " + properties.get(s))); this.doRegister(this.m_context, properties); LOGGER.info("Updating MongoDB Component... Done."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void configurationUpdated();", "@Override\n\tpublic void onConfigurationUpdate() {\n\t}", "public void notifyConfigChange() {\n }", "void onConfigChanged(ConfigUpdate update);", "public abstract void updatePendingConfiguration(Configuration config);", "private void config() {\n\t}", "private void fireConfigChanged()\n {\n ScmEventBus.getInstance().post(\n new RepositoryHandlerConfigChangedEvent<C>(config));\n }", "protected void fireConfigUpdated()\r\n {\r\n List executeListeners = new ArrayList(listeners);\r\n \r\n for (int i=0; i < executeListeners.size(); i++)\r\n {\r\n IConfigurationListener listener = (IConfigurationListener) executeListeners.get(i);\r\n listener.configUpdated();\r\n }\r\n }", "public abstract void handleConfigurationChanged(Configuration config);", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "public abstract boolean updateConfig();", "@Override\n\tpublic boolean hasConfigChanged() {\n\t\treturn false;\n\t}", "private void updateConfig(){\n try {\n BeanUtils.copyProperties(config_,newConfig_);//copy the properties of newConfig_ into config_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n }\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n }", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t super.onConfigurationChanged(newConfig);\n\t}", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n Log.d(\"TheKing-->\", \"configuration changed super called\");\n }", "@Override\n public void reconfigure()\n {\n }", "@Override\r\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\r\n\t}", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n \tsuper.onConfigurationChanged(newConfig);\n \t\n \tLog.e(\"LIFECYCLE = \", this.getClass().toString() + \".onConfigurationChanged\");\n \treturn;\n }", "@Override\r\n public void doUpdateConfig(GameConfig game)\r\n {\n \r\n }", "public void updateConfig() {\n conf.set(\"racetype\", raceType.name());\n conf.set(\"perkpoints\", perkpoints);\n conf.set(\"health\", getHealth());\n\n if (conf.isSet(\"binds\")) {\n conf.set(\"binds\", null);\n }\n\n if (!binds.getBinds().isEmpty()) {\n for (Bind b : binds.getBinds()) {\n String key = b.getItem().name().toLowerCase() + b.getData();\n conf.set(\"binds.\" + key + \".item\", b.getItem().name());\n conf.set(\"binds.\" + key + \".data\", b.getData());\n List<String> abilities = Lists.newArrayList();\n b.getAbilityTypes().stream().forEach(a -> abilities.add(a.name()));\n conf.set(\"binds.\" + key + \".abilities\", abilities);\n }\n }\n\n\n AbilityFileManager.saveAbilities(this);\n }", "public void updateConfig() {\n String[] config = getConfiguration();\n Config.MEASUREMENT_INTERVAL = (int)Double.parseDouble(config[2]);\n Config.MAX_INJECTION = Double.parseDouble(config[3]);\n Config.MIN_INJECTION = Double.parseDouble(config[4]);\n Config.MAX_CUMULATIVE_DOSE = Double.parseDouble(config[5]);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n\n helpPopulate(defaultIndex);\n }", "@Override\n public void configurationChanged(Map<String, ConfiguredVariableItem> changed) {\n LOG.debug(\"External configuration changes are received '{}'\", changed);\n // updating heart-beat-delay parameter\n updateParameter(changed, HB_DELAY_FULL_NAME, i -> setHeartbeatDelay(i.get(Integer.class)));\n config.putAll(changed);\n }", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\n\t}", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\n\t}", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\n\t}", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\n\t}", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\n\t}", "public void changed() {\n // from ChangeHandler\n configSave.enable();\n }", "public void onConfigurationChanged(Configuration newConfig) {\n\t\t super.onConfigurationChanged(newConfig);\n\t}", "public void reload() {\n reloadConfig();\n loadConfiguration();\n }", "public void reConfigure();", "private void preSyncConfiguration() {\n customPreSyncConfiguration.accept(caller, listener);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n Log.d(TAG, TAG + \" onConfigurationChanged\");\n }", "public void refresh() {\n List<ConfigPath> configPaths = getConfigFiles();\n\n // Delete configs from cache which don't exist on disk anymore\n Iterator<String> currentEntriesIt = confs.keySet().iterator();\n while (currentEntriesIt.hasNext()) {\n String path = currentEntriesIt.next();\n boolean found = false;\n for (ConfigPath configPath : configPaths) {\n if (configPath.path.equals(path)) {\n found = true;\n break;\n }\n }\n if (!found) {\n currentEntriesIt.remove();\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected removed config \" + path + \" in \" + location);\n }\n }\n }\n\n // Add/update configs\n for (ConfigPath configPath : configPaths) {\n CachedConfig cachedConfig = confs.get(configPath.path);\n if (cachedConfig == null || cachedConfig.lastModified != configPath.file.lastModified()) {\n if (log.isDebugEnabled()) {\n log.debug(\"Configuration: detected updated or added config \" + configPath.path + \" in \" + location);\n }\n long lastModified = configPath.file.lastModified();\n ConfImpl conf = parseConfiguration(configPath.file);\n cachedConfig = new CachedConfig();\n cachedConfig.lastModified = lastModified;\n cachedConfig.conf = conf;\n cachedConfig.state = conf == null ? ConfigState.ERROR : ConfigState.OK;\n confs.put(configPath.path, cachedConfig);\n }\n }\n }", "@Override\r\n public void onConfigurationChanged(Configuration newConfig){\r\n super.onConfigurationChanged(newConfig);\r\n ExamManager.activateTicket();\r\n }", "@Override\n\tpublic void setConfigChanged(boolean changed) {\n\t\t//do nothing\n\t}", "public void preOnConfigurationChanged() {\n if (getDockedDividerController() != null) {\n getDockedDividerController().onConfigurationChanged();\n }\n if (getPinnedStackController() != null) {\n getPinnedStackController().onConfigurationChanged();\n }\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n setLayout();\n }", "protected final void reloadAllConfigs() {\r\n reloadNonIngameConfigs();\r\n reloadIngameConfigs();\r\n }", "public void preUpdate(Configuration configuration) {\r\n preUpdate();\r\n }", "@Override\r\n\tpublic void config() {\n\t\tinter.setState(inter.getConfig());\r\n\t}", "public void initialConfig() {\n }", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "public void reload() {\n try {\n this.configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(this.getConfigurationFile());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void notifyChange(Path path) {\n if (path.toString().equals(JOSSO_GATEWAY_CONFIGURATION.getName())) {\n configureAccessTokens();\n log.debug(\"AuthService reloaded configuration on change to \"+JOSSO_GATEWAY_CONFIGURATION);\n } else if (path.toString().equals(FOUNDATION_CONFIGURATION.getName())) {\n configure();\n log.debug(\"AuthService reloaded configuration on change to \"+FOUNDATION_CONFIGURATION);\n }\n }", "static void updateConfig(FileConfiguration config)\n\t{\n\t\tProfessionListener.config = config;\n\t}", "@Scheduled (fixedDelay = 10000)\n\tpublic void refreshConfiguration() {\n\t\tLOGGER.warn(\"***** REFRESHING\");\n\t\tthis.refresh.refresh(\"refreshableCredentials\");\n\n\t}", "@Override\n public void update(Map conf) {\n LOG.info(\"Receive configuration {}\", conf);\n this.conf.putAll(conf);\n \n isSlowdown = JStormUtils.parseBoolean(conf.get(BOLT_SLOW_DOWN), true);\n }", "private void saveConfiguration() {\n }", "@SuppressWarnings(\"unchecked\")\n \tpublic void updated(Dictionary properties) throws ConfigurationException {\n \t\t\n \t}", "@Override\n public void update(Map conf) {\n LOG.info(\"Receive configuration {}\", conf);\n this.conf.putAll(conf);\n \n isBoltSlowdown = JStormUtils.parseBoolean(conf.get(BOLT_SLOW_DOWN), true);\n }", "@Override\r\n\tprotected void configure() {\n\t\t\r\n\t}", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n\n // After configuration change has occurred\n mDrawerToggle.onConfigurationChanged(newConfig);\n }", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n this.drawerToggle.onConfigurationChanged(newConfig);\n }", "public void loadConfig() {\n\t}", "void setConfiguration();", "public void willbeUpdated() {\n\t\t\n\t}", "public void updateSettings(){\n\n // load in configuration variables\n layout = plugin.getConfig().getString(\"layout\");\n enabled = plugin.getConfig().getBoolean(\"enabled\");\n minTemp = plugin.getConfig().getInt(\"min-temperature\");\n maxTemp = plugin.getConfig().getInt(\"max-temperature\");\n peakTime = plugin.getConfig().getInt(\"peak-time\");\n tickrate = plugin.getConfig().getLong(\"tickrate\");\n worldName = plugin.getConfig().getString(\"world-name\");\n\n }", "public void reload() {\n FileConfiguration config = plugin.getConfig();\n\n // Set up answers\n answers = new HashMap<>();\n if(config.contains(\"answers\")) {\n Map<String, Object> answersConfig = config.getConfigurationSection(\"answers\").getValues(true);\n for (Map.Entry<String, Object> entry : answersConfig.entrySet()) {\n if(entry.getValue() instanceof String) {\n answers.put(entry.getKey(), (String) entry.getValue());\n } else {\n logger.info(\"Invalid value for answer ID \" + entry.getKey());\n }\n }\n } else {\n logger.info(\"The config does not have answers! Not even for your existence!\");\n }\n\n // Set up questions\n questions = new HashMap<>();\n if(config.contains(\"questions\")) {\n Map<String, Object> questionsConfig = config.getConfigurationSection(\"questions\").getValues(true);\n for (Map.Entry<String, Object> entry : questionsConfig.entrySet()) {\n String answerID = \"\";\n if(entry.getValue() instanceof Integer) {\n answerID = entry.getValue().toString();\n } else if(entry.getValue() instanceof String) {\n answerID = (String) entry.getValue();\n } else if(answerID.isEmpty()) {\n logger.info(\"Invalid value for question regex \" + entry.getKey());\n continue;\n }\n\n if(questions.containsKey(entry.getKey()) && !answers.containsKey(answerID)) {\n logger.warning(\"Answer ID \" + entry.getValue() + \" not found\");\n } else {\n questions.put(entry.getKey(), answerID);\n }\n }\n\n logger.info(\"Registered \" + questions.size() + \" questions\");\n } else {\n logger.info(\"The config does not have questions!\");\n }\n\n commands = new HashMap<>();\n if(config.contains(\"listen-commands\")) {\n Map<String, Object> cmdsConfig = config.getConfigurationSection(\"listen-commands\").getValues(false);\n for (Map.Entry<String, Object> entry : cmdsConfig.entrySet()) {\n String cmdName = entry.getKey().toLowerCase();\n if(commands.containsKey(cmdName)) continue;\n\n CommandConfig newCmd = new CommandConfig(cmdName);\n ConfigurationSection ms = config.getConfigurationSection(\"listen-commands\").getConfigurationSection(cmdName);\n if(ms == null) continue;\n\n if(ms.contains(\"cancel\")) newCmd.cancel = ms.getBoolean(\"cancel\");\n if(ms.contains(\"tell-staff\")) newCmd.tellStaff = ms.getBoolean(\"tell-staff\");\n if(ms.contains(\"args-offset\")) newCmd.offset = ms.getInt(\"args-offset\");\n commands.put(cmdName, newCmd);\n logger.info(\"Listening to command '\" + cmdName + \"'\");\n }\n }\n }", "@Override\n protected void updateProperties() {\n }", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "@Override\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\n\t\t// setContentView(R.layout.main);\n\n\t\t// InitializeUI();\n\t}", "@Override\n public void configure() {\n }", "protected void additionalConfig(ConfigType config){}", "public void reload(){\n\t\tplugin_configuration.load();\n\t\tflarf_configuration.load();\n\t\tmessages_configuration.load();\n\t\tstadiumlisting.load();\n\t}", "public void configChanged ()\n {\n// log.info(\"Config changed \" + _tree.getSelectedNode().getConfig(),\n// \"lastValue\", _lastValue);\n ManagedConfig oldLastValue = _lastValue;\n _lastValue = (ManagedConfig)\n ((ManagedConfig)_tree.getSelectedNode().getConfig()).clone();\n maybePostUndo(\n new ConfigEdit(ConfigEdit.Type.CHANGE, group, _lastValue, oldLastValue));\n\n DirtyGroupManager.setDirty(group, true);\n _tree.selectedConfigChanged();\n }", "@Override\r\n\tpublic void ConfigurationUpdated(Configuration configuration) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateConfiguration(configuration);\r\n\t}", "private void configurateSensor()\n\t{\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"CONFIGURING\", \"state1\");\n\t\tcheckFirmwareVersion();\n\t\t// Write configuration file to sensor\n\t\tsetAndWriteFiles();\n\n\t\t// push comment to RestApi\n\t\ttry\n\t\t{\n\t\t\trestApiUpdate(ConnectionManager.getInstance().currentSensor(0).getSerialNumber(), \"comment\");\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// change state of measurement in RestApi\n\t\trestApiUpdate(\"SENSOR_OUTBOX\", \"state2\");\n\n\t\t// print address\n\t\tint index2 = customerList.getSelectionIndex();\n\t\tfor (Measurement element : mCollect.getList())\n\t\t{\n\t\t\tif (mCollect.getList().get(index2).getLinkId() == element.getLinkId())\n\t\t\t{\n\t\t\t\taData = new AddressData(element.getId());\n\t\t\t\tprintLabel(aData.getCustomerData(), element.getLinkId());\n\t\t\t}\n\n\t\t}\n\n\t\t// set configuration success message\n\t\tstatusBar.setText(\"Sensor is configurated.Please connect another sensor.\");\n\n\t\t// writing date to sensor for synchronization\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).synchronize();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t\t// resetData();\n\t\t try\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).disconnect();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\n\t}", "@Override\r\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\r\n\t\tmDrawerToggle.onConfigurationChanged(newConfig);\r\n\t}", "@Override\n protected void configure() {\n }", "public void reloadConfig () {\n if (config == null) {\n if (datafolder == null)\n throw new IllegalStateException();\n config = new File(datafolder, configName);\n }\n this.fileConfiguration = YamlConfiguration.loadConfiguration(config);\n }", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "@Override\n\tpublic void configure() {\n\n\t}", "@Override\n\tpublic void configure() {\n\t\t\n\t}", "public abstract void changeConfiguration(Configuration configuration);", "@Override\n public void onConfigurationChanged(Configuration newConfig) {\n super.onConfigurationChanged(newConfig);\n mDrawerToggle.onConfigurationChanged(newConfig);\n }", "@Override\n\tprotected void configure() {\n\n\t}", "@Override\n\tpublic void onApplicationEvent(ApplicationReadyEvent event) \n\t{\n\n\t\tHystrixCommandProperties.Setter().withExecutionTimeoutInMilliseconds(20000);\n\t\tConfigurationManager.getConfigInstance().setProperty(\"execution.isolation.thread.timeoutInMilliseconds\", \"20000\");\n\n\t\tSystem.out.println(\"1 value>>>>>>>>>>>>>>>>>>>>>>>>>>>> \");\n\t\t/*\t\tAbstractConfiguration manager = ConfigurationManager.getConfigInstance();\n\t\tfor (String key : event.getKeys())\n\t\t{\n\t\t\tfor (ConfigurationListener listener : manager.getConfigurationListeners()) \n\t\t\t{\n\t\t\t\tObject source = event.getSource();\n\t\t\t\t// TODO: Handle add vs set vs delete?\n\t\t\t\tint type = AbstractConfiguration.EVENT_SET_PROPERTY;\n\t\t\t\tString value = env.getProperty(key);\n\n\t\t\t\tSystem.out.println(\"value>>>>>>>>>>>>>>>>>>>>>>>>>>>> \"+value);\n\n\t\t\t\tboolean beforeUpdate = false;\n\t\t\t\tlistener.configurationChanged(new ConfigurationEvent(source, type, key, value, beforeUpdate));\n\t\t\t}\n\t\t}*/\n\t}", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "@Override\r\n public void onConfigurationChanged(Configuration config) {\r\n Log.d(LOGTAG, \"onConfigurationChanged\");\r\n super.onConfigurationChanged(config);\r\n\r\n vuforiaAppSession.onConfigurationChanged();\r\n }", "private void override() {\n AppSettings.setInstance(\n ConfigFactory.parseMap(newSettingsMap).withFallback(AppSettings.getInstance()));\n }", "private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}", "public void getConfiguration(final long lastupdate) {\n Logger.log(Logger.Level.DEBUG, TAG, \"getConfiguration\");\n\n configurationApi.getConfiguration(lastupdate)\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n p -> onConfigurationRequestSucess(p),\n this::onConfigurationRequestFailed\n );\n }", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "@Override\n\tpublic void onConfigurationSuccess(ITestResult itr) {\n\t\t\n\t}", "@Override\n public void updateProperties() {\n // unneeded\n }", "private void configureNode() {\n\t\twaitConfigData();\n\t\tpropagateConfigData();\n\n\t\tisConfigured = true;\n\t}", "@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}", "@Override\n public void setConf(Configuration conf) {\n }", "interface ConfigWatcher {\n\n /**\n * Called when receiving an update on virtual host configurations.\n */\n void onConfigChanged(ConfigUpdate update);\n\n void onError(Status error);\n }", "public default void reloadAll() {\n\t\tBukkit.getConsoleSender().sendMessage(\"Reloading \" + getClass().getSimpleName() + \"'s Configs!\");\n\t\treload();\n\t\tBukkit.getConsoleSender().sendMessage(\"Finished \" + getClass().getSimpleName() + \"'s Configs!\");\n\t}", "private void updPrevRunningConfigUpdates() {\n\t\tList<FilterCondition> cond = new ArrayList<>();\n\t\tList<ConfiguredValuesMO> prevConfigList = null;\n\t\tConfiguredValuesMO prevConfig = null;\n\t\tsetFilterConditions(cond); \n\t\ttry {\n\t\t\tprevConfigList = (List<ConfiguredValuesMO>) genDao.getGenericObjects(ConfiguredValuesMO.class, cond, Boolean.TRUE);\n\t\t} catch (DAOException e) {\n\t\t\tlogger.error(\"Exception while retrieving Config updates for the device.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tprevConfig = prevConfigList.get(0); // Ideally this should give only one item.\n\t\tprevConfig.setStatus(ConfigUpdateStatus.INACTIVE);\n\t\ttry {\n\t\t\tgenDao.saveGenericObject(prevConfig);\n\t\t} catch (DAOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic void onConfigurationChanged(Configuration newConfig) {\n\t\tsuper.onConfigurationChanged(newConfig);\r\n\t\tthis.setContentView(root);\r\n\t}" ]
[ "0.8578289", "0.80986", "0.77703315", "0.7487825", "0.7440951", "0.72692937", "0.72169024", "0.71941584", "0.71539813", "0.71333915", "0.70943147", "0.7086141", "0.7034697", "0.69955367", "0.69955367", "0.69955367", "0.69955367", "0.69955367", "0.69955367", "0.698126", "0.69684553", "0.69607085", "0.6952623", "0.6943161", "0.6922906", "0.69119954", "0.6892767", "0.68702215", "0.6867528", "0.6849071", "0.6849071", "0.6849071", "0.6849071", "0.6849071", "0.6822172", "0.6809105", "0.67743117", "0.6729266", "0.6715461", "0.6703772", "0.6681887", "0.6679868", "0.66639787", "0.65678954", "0.65352726", "0.65340537", "0.65245366", "0.65068406", "0.65026635", "0.6499971", "0.64543736", "0.6453471", "0.6441464", "0.6437303", "0.64361113", "0.6434803", "0.64346266", "0.63582623", "0.6357904", "0.6341097", "0.63399065", "0.6339812", "0.63171107", "0.6313821", "0.63105994", "0.62998396", "0.62873507", "0.62858474", "0.62736154", "0.6270206", "0.62656915", "0.62516993", "0.6244178", "0.62308085", "0.62256014", "0.62218475", "0.6210569", "0.6202206", "0.61961925", "0.619597", "0.61814886", "0.6177722", "0.61679137", "0.6165038", "0.61620474", "0.6156161", "0.6148178", "0.6139409", "0.61301875", "0.61210823", "0.6120535", "0.6114341", "0.6113894", "0.60974056", "0.6085435", "0.60746515", "0.60668266", "0.60662764", "0.6057159", "0.6055905", "0.6037623" ]
0.0
-1
Initialize the editor by specifying the attribute to edit and the editor type to use.
public void init(final EAttribute eAttribute, final String javaClassTypeName) { this.eAttribute = eAttribute; this.propsEditor = EAttrPropsEditorPlugin.getStructuralFeatureEditor(eAttribute, javaClassTypeName, this, getStyle()); if (this.currentComponent != null) { this.currentComponent.dispose(); } if (this.propsEditor != null) { this.currentComponent = this.propsEditor.getEditor(); this.currentComponent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); this.layout(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ConfmlEditor() {\r\n\t\tsuper();\r\n\t\tinitializeEditingDomain();\r\n\t}", "protected void initializeEditors() {\n\t}", "public void setEditor(Editor editor)\n {\n this.editor = editor;\n }", "public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}", "public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}", "private void initEditorComponent () {\n // Overriding the 'setJawbDocument' method to handle logging too.\n final AnnotationPopupListener popupListener =\n new AnnotationPopupListener(this);\n \n JTabbedPane tp = new DetachableTabsJawbComponent (task.getName()) {\n public void setJawbDocument (JawbDocument doc) {\n\t JawbDocument old = getJawbDocument();\n super.setJawbDocument (doc); // this is a must!!!\n\t if (old != null) \n\t old.getAnnotationMouseModel().\n\t removeAnnotationMouseListener(popupListener);\n\t if (doc != null)\n\t doc.getAnnotationMouseModel().\n\t addAnnotationMouseListener(popupListener);\n }\n };\n\n // add a simple editor for each\n Iterator iter = task.getMaiaScheme().iteratorOverAnnotationTypes();\n while (iter.hasNext()) {\n AnnotationType type = (AnnotationType) iter.next();\n Component editor = new SimpleAnnotEditor(this, type);\n tp.add (type.getName(), editor);\n }\n\n editorComponent = (JawbComponent)tp;\n }", "private void initComponent() {\n\n mEdit = (EditText) findViewById(R.id.edit_key);\n }", "@Override\n\tpublic void setEditorType(java.lang.String editorType) {\n\t\t_scienceApp.setEditorType(editorType);\n\t}", "public EditorTxt() {\n initComponents();\n }", "public void setEditor(String value) {\n setAttributeInternal(EDITOR, value);\n }", "public void setEditor(String value) {\n setAttributeInternal(EDITOR, value);\n }", "@Override\n\tprotected void initForEdit(AWRequestContext requestContext) {\n\n\t}", "public void setEditor(Editor editor) {\n this.currentEditor = editor;\n refreshView();\n }", "public InitialValueEditor getInitEditor() {\n return initEditor;\n }", "public NullStringEditor () {\n super();\n editable = true;\n }", "public AttributeEditPart(Attribute model) {\n\t\tsuper(model);\n\t}", "Builder addEditor(String value);", "public void setupEditor(MapUIController controller, GUIEditorGrid editor) {\n editor.addLabel(\"Type\", getType().name());\n editor.addLabel(\"Vertices\", Arrays.toString(getVertices()));\n }", "public Edit() {\n initComponents();\n }", "public ImageEditor() {\r\n initComponents(); \r\n }", "public TextComposeBasePopup(CodeEditor editor) {\n if (editor == null) {\n throw new IllegalArgumentException();\n }\n mLocation = new int[2];\n mEditor = editor;\n super.setTouchable(true);\n textSizePx = mEditor.getTextSizePx();\n }", "public EditorDriver() {\r\n\t\tgui = new GUI(this);\r\n\t\treadingInputPath = true;\r\n\t\tinputFileFound = false;\r\n\t\teditor = new Editor();\r\n\t\tgui.println(IN_FILE_PROMPT);\r\n\t}", "public Editor(CatalogManager cm, String str, PetalEditor petalEditor, Model model)\n {\n this(cm, str, model, petalEditor,\n new Toolbarspace(petalEditor, model),\n new Toolboxspace(petalEditor, model),\n new Workspace(petalEditor, model),\n new Messagespace(petalEditor, model));\n }", "public ScriptEditor() { \n }", "public DQLEditorInput()\n\t{\n\n\t\tsuper();\n\t\tsetStorage(new DQLStorage(this));\n\t}", "public MyEditView(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n findViewById(R.id.myEditView).setOnTouchListener(this);\n }", "public void correcto( Editor<Tipo> editor );", "public edit() {\n initComponents();\n }", "public Editor(CatalogManager cm, String str, Editor otherEditor)\n {\n\n this(cm, str, otherEditor.getModel(), new PetalEditor(otherEditor.getModel()),\n otherEditor.getToolbarspace(), otherEditor.getToolboxspace(),\n otherEditor.getWorkspace(), otherEditor.getMessagespace());\n }", "Builder addEditor(Person value);", "public EditorFactoryImpl() {\n\t\tsuper();\n\t}", "public illumPanelEdit1() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Editor getEditor() { return editor; }", "@Override\r\n public void initializeComponents() {\r\n nameTf = new ITextField(\"name\");\r\n nameTf.addEditedListener(this, \"name\");\r\n\r\n separatorTf = new ITextField(\"Separator\");\r\n separatorTf.addEditedListener(this, \"separator\");\r\n }", "public RoseEditor(Context context) {\n super(context);\n prepare();\n }", "private void initialize(){\r\n \t\taddPositionCategory(EclipseEditorTag.CHAMELEON_CATEGORY);\r\n \t\taddPositionUpdater(new DefaultPositionUpdater(EclipseEditorTag.CHAMELEON_CATEGORY));\r\n \t}", "private TextField initTextField(Pane container, String initText, boolean editable) {\n TextField tf = new TextField();\n tf.setText(initText);\n tf.setEditable(editable);\n container.getChildren().add(tf);\n return tf;\n }", "public ActionManager(Editor editor) {\n\t\tthis.editor = editor;\n\t}", "public ChangeTypeAction(JavaEditor editor) {\n this(editor.getEditorSite());\n fEditor = editor;\n setEnabled(SelectionConverter.getInputAsCompilationUnit(fEditor) != null);\n }", "public FormFieldComponentCellEditor() {\n this(new StringFormField());\n }", "public IntegerEditor() {\r\n\t super();\r\n\t}", "void init(RichTextArea textArea, Config config);", "public Editor() {\n initComponents();\n this.setTitle(\"Diario “La Otra Perspectiva”\");\n this.setLocationRelativeTo(null);\n }", "IInputType getEditableInputType(IInputType base);", "protected void initializeEditMenu() {\n\t\tfinal JMenu editMenu = new JMenu(\"Edit\");\n\t\tthis.add(editMenu);\n\t\t// History Mouse Mode\n\t\tfinal JMenu mouseModeSubMenu = new JMenu(\"History Mouse Mode\");\n\t\teditMenu.add(mouseModeSubMenu);\n\t\t// Transforming\n\t\tfinal JMenuItem transformingItem = new JMenuItem(\n\t\t\t\tthis.commands.findById(\"GUICmdGraphMouseMode.Transforming\"));\n\t\ttransformingItem.setAccelerator(KeyStroke.getKeyStroke('T',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tmouseModeSubMenu.add(transformingItem);\n\t\t// Picking\n\t\tfinal JMenuItem pickingItem = new JMenuItem(\n\t\t\t\tthis.commands.findById(\"GUICmdGraphMouseMode.Picking\"));\n\t\tpickingItem.setAccelerator(KeyStroke.getKeyStroke('P',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tmouseModeSubMenu.add(pickingItem);\n\t}", "void setEditore(String editore);", "public void setAttributeType(final String attributeType);", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "public EAEditorView(ReadOnlyEAOperations model) {\n\n super();\n setTitle(\"The Easy Animator\");\n\n // check for null\n if (model == null) {\n throw new IllegalArgumentException(\"Model can't be null\");\n }\n this.model = model;\n\n // initialize the main panel\n constructMainPanel();\n constructAnimationPanel();\n generateLabelPanel();\n generateButtonPanel();\n constructPopup();\n createOKButtons();\n\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.pack();\n }", "public EditInfo() {\n initComponents();\n }", "public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }", "public interface ACSUIEditor {\n\n ACSUIEditable getEditable(SimpleRequestContext src);\n\n ACSUIEditable getEditable();\n\n ACSUIEditable updatetEditable(SimpleRequestContext src);\n\n ACSUIEditable insertEditable(SimpleRequestContext src);\n\n ACSUIEditable deleteEditable(SimpleRequestContext src);\n\n ACSUIEditable[] getEditables(SimpleRequestContext src);\n\n String[] getColNames();\n\n String getType();\n\n boolean[] checkInputData(ACSRequestContext ctx);\n\n String getManagmentLabel();\n\n String getAddLabel();\n\n String getUpdateLabel();\n\n}", "@Override\n\tpublic void initializeView() {\n\t\tsuper.initializeView();\n\t\tet = (EditText)findViewById(R.id.edit_name);\n\t\tsave=(TextView)findViewById(R.id.save);\n\t\tsave.setOnClickListener(this);\n\t}", "public EditInlineChoicePanel(Composite parent, \n\t\t\tInlineChoiceInteraction aInlineChoiceInteraction, \n\t\t\tEditInlineChoiceBlockPanel aEditInlineChoiceBlockPanel, \n\t\t\tAssessmentTestEditor editor) {\n\t\tsuper(parent, editor);\n\t\tfChoiceInteraction = aInlineChoiceInteraction;\n\t\tfEditInlineChoiceBlockPanel = aEditInlineChoiceBlockPanel;\n\t\tinit();\n\t\tAssessmentTestEditor.changeToContentColour(this);\n\t}", "@Override\n\tpublic java.lang.String getEditorType() {\n\t\treturn _scienceApp.getEditorType();\n\t}", "public Editor(String file) {\n\t\tinit();\n\t\tloadFile(file);\n\t}", "public static EditorFactory init() {\n\t\ttry {\n\t\t\tEditorFactory theEditorFactory = (EditorFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://opaeum.org/uimetamodel/editor/1.0\"); \n\t\t\tif (theEditorFactory != null) {\n\t\t\t\treturn theEditorFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new EditorFactoryImpl();\n\t}", "void setEditorController(EditorViewController gameEditorViewController);", "public PtWikiTextEditorBase(GWikiElement element, String sectionName, String editor, String hint)\n {\n super(element, sectionName, editor, hint);\n extractContent();\n }", "public EditorialBean() {\r\n editorialDAOImp = new EditorialDAOImp();\r\n editorial = new Editorial();\r\n }", "public InteractionTarget(Element _element, int _type) {\n element = _element;\n type = _type;\n }", "public void setChiefEditor(String value) {\n setAttributeInternal(CHIEFEDITOR, value);\n }", "@Override\n\tpublic void onEditorCreate()\n\t{\n\t\tsetPath(t().getComponent(LttlPath.class, true));\n\t}", "private void init(final AttributeSet set) {\n }", "public InputFieldEditingSupport(TableViewer viewer) {\n\t\tsuper(viewer);\n\t\tthis.viewer = viewer;\n\t\t//cellEditor = new TextCellEditor(viewer.getTable(), SWT.MULTI | SWT.WRAP | SWT.BORDER);\n\t\tcellEditor = new TextCellEditor(viewer.getTable());\n\t\t\n\t\tfinal Text aaa = (Text)cellEditor.getControl();\n\t}", "private void initialize() {\n\ttry {\n\t\t// user code begin {1}\n\t\t// user code end\n\t\tsetName(\"PnlInterlisSyntax\");\n\t\tsetBorder(new javax.swing.border.EtchedBorder());\n\t\tsetLayout(new java.awt.BorderLayout());\n\t\tsetSize(382, 165);\n\t\tadd(getPnlEditor(), \"Center\");\n\t\tadd(getPnlDataSelector(), \"South\");\n\t\tadd(getPnlUsage(), \"North\");\n\t} catch (java.lang.Throwable ivjExc) {\n\t\thandleException(ivjExc);\n\t}\n\t// user code begin {2}\n\tgetPnlEditor().setToolTipText(getResourceString(\"PnlEditor_toolTipText\"));\n\tsetCurrentObject(null);\n\tgetPnlDataSelector().setListener(this);\n\tgetPnlUsage().setVisible(false);\n\t// user code end\n}", "private void initWidgets() {\n\t\tthis.spelling = (EditText) this.findViewById(R.id.EditWord_spelling);\n\t\tthis.cancel = (Button) this.findViewById(R.id.attention_cancel_button);\n\t\tthis.confirm = (Button) this.findViewById(R.id.attention_confirm_button);\n\t\tthis.meanning = (EditText) this.findViewById(R.id.EditWord_meanning);\n\t\tcancel.setOnClickListener(this);\n\t\tconfirm.setOnClickListener(this);\n\t\tif (action.equals(\"edit\")){\n\t\t\tBundle bundle = this.getIntent().getExtras();\n\t\t\tDataAccess data = new DataAccess(this);\n\t\t\tWord word =data.QueryAttention(\"ID ='\"+bundle.getString(\"id\")+\"'\", null).get(0);\n\t\t\tspelling.setText(word.getSpelling());\n\t\t\tmeanning.setText(word.getMeanning());\n\t\t}\n\t}", "public Modify() {\n initComponents();\n }", "public final MWC.GUI.Editable.EditorType getInfo()\r\n\t{\r\n\t\tif (_myEditor == null)\r\n\t\t\t_myEditor = new FieldInfo(this, this.getName());\r\n\r\n\t\treturn _myEditor;\r\n\t}", "public ActionEditorTest(String name) {\n super(name);\n }", "public\n EvinceEditor()\n {\n super(\"Evince\", new VersionID(\"2.0.9\"), \"Temerity\", \n\t \"A multiple format document viewer.\",\n\t \"evince\");\n }", "public GUI_Edit_Tour(){\n init();\n }", "public Submission_Edit() {\n initComponents();\n }", "private void initEditorPanel() {\n\t\t\n\t\t//Remove all components from panel\n\t\tthis.editor.removeAll();\n\t\t\n\t\t//Redraw which feature\n\t\tthis.whichFeature.validate();\n\t\tthis.whichFeature.repaint();\n\t\t\n\t\t//Setting icon values\n\t\tpartL.setIcon(myParent.editor.profileImage);\n\t\tendTypeLTL.setIcon(myParent.editor.ltImage);\n\t\tendTypeRBL.setIcon(myParent.editor.rbImage);\n\t\tpfFormLL.setIcon(myParent.profileshapeImage);\n\t\tsetGo.setIcon(myParent.setImage);\n\t\tcancel.setIcon(myParent.cancelImage);\n\t\t\n\t\t//Setting values visibility\n\t\tpart.setVisible(false);\n\t\tpartL.setVisible(false);\n\t\tparts.setVisible(false);\n\t\t\n\t\tendTypeLT.setVisible(false);\n\t\tendTypeLTL.setVisible(false);\n\t\tlCut.setVisible(false);\n\t\tendTypeRB.setVisible(false);\n\t\tendTypeRBL.setVisible(false);\n\t\trCut.setVisible(false);\n\t\tpfFormL.setVisible(false);\n\t\tpfFormLL.setVisible(false);\n\t\tpfCombo.setVisible(false);\n\t\t\n\t\toffsetL.setVisible(false);\n\t\toffsetR.setVisible(false);\n\t\toffsetLT.setVisible(false);\n\t\toffsetRB.setVisible(false);\n\t\t\n\t\tbL.setVisible(false);\n\t\tbR.setVisible(false);\n\t\tdeltaL.setVisible(false);\n\t\tdeltaR.setVisible(false);\n\t\t\n\t\tsetGo.setVisible(false);\n\t\tcancel.setVisible(false);\n\t\t\n\t\tmyParent.dim.masterSelected.setEnabled(false);\n\t\tmyParent.dim.slaveSelected.setEnabled(false);\n\t\tmyParent.dim.masterSelected.setVisible(false);\n\t\tmyParent.dim.slaveSelected.setVisible(false);\n\t\tmyParent.dim.doAlign.setVisible(false);\n\t\tmyParent.dim.changeAlign.setVisible(false);\n\t\tmyParent.dim.cancelAlign.setVisible(false);\n\t\tmyParent.dim.doAlign.setEnabled(false);\n\t\tmyParent.dim.changeAlign.setEnabled(false);\n\t\t\n\t\tmyParent.alignSeq = 0;\n\t\t\n\t\t//Adding components to editor panel\n\t\teditor.add(part, new XYConstraints(1, 1, 20, 19));\n\t\teditor.add(partL, new XYConstraints(22, 1, 20, 19));\n\t\teditor.add(parts, new XYConstraints(42, 1, 140, 19));\n\t\t\n\t\teditor.add(endTypeLT, new XYConstraints(1, 23, 20, 19));\n\t\teditor.add(endTypeLTL, new XYConstraints(22, 23, 20, 19));\n\t\teditor.add(lCut, new XYConstraints(81, 23, 100, 19));\n\t\t\n\t\teditor.add(endTypeRB, new XYConstraints(1, 44, 20, 19));\n\t\teditor.add(endTypeRBL, new XYConstraints(22, 44, 20, 19));\n\t\teditor.add(rCut, new XYConstraints(81, 44, 100, 19));\n\t\t\n\t\teditor.add(pfFormL, new XYConstraints(1, 65, 20, 19));\n\t\teditor.add(pfFormLL, new XYConstraints(22, 65, 20, 19));\n\t\teditor.add(pfCombo, new XYConstraints(81, 65, 100, 19));\n\t\t\n\t\teditor.add(offsetL, new XYConstraints(1, 86, 50, 19));\n\t\teditor.add(offsetR, new XYConstraints(1, 107, 50, 19));\n\t\teditor.add(bL, new XYConstraints(1, 128, 50, 19));\n\t\teditor.add(bR, new XYConstraints(1, 149, 50, 19));\n\t\t\n\t\teditor.add(offsetLT, new XYConstraints(60, 86, 118, 19));\n\t\teditor.add(offsetRB, new XYConstraints(60, 107, 118, 19));\n\t\t\n\t\teditor.add(deltaL, new XYConstraints(60, 127, 118, 19));\n\t\teditor.add(deltaR, new XYConstraints(60, 147, 118, 19));\n\t\t\n\t\teditor.add(setGo, new XYConstraints(56, 168, 60, 19));\n\t\teditor.add(cancel, new XYConstraints(118, 168, 60, 19));\n\t\t\n\t\teditor.add(myParent.dim.masterSelected, new XYConstraints(1, 3, 120, 19));\n\t\teditor.add(myParent.dim.slaveSelected, new XYConstraints(1, 24,120, 19));\n\t\t\n\t\teditor.add(myParent.dim.doAlign, new XYConstraints(1, 50, 59, 19));\n\t\teditor.add(myParent.dim.changeAlign, new XYConstraints(61, 50, 59, 19));\n\t\teditor.add(myParent.dim.cancelAlign, new XYConstraints(121, 50, 59, 19));\n\t}", "@Override\n public void testCreateAsEditor() {}", "protected EditDialog(Shell parentShell, AdapterFactory adapterFactory,\n IItemPropertyDescriptor itemPropertyDescriptor, EObject eObject) {\n super(parentShell);\n this.adapterFactory = adapterFactory;\n this.itemPropertyDescriptor = itemPropertyDescriptor;\n this.eObject = eObject;\n\n }", "public static void designTextEditor() {\n\t\t\n\t}", "public EditorPanel() {\n encodingModel = new DefaultComboBoxModel(); \n for (String charSet : Charset.availableCharsets().keySet()) {\n encodingModel.addElement(charSet);\n }\n initComponents();\n }", "@Override\r\n\tpublic CellEditor createPropertyEditor(Composite parent) {\n\t\tMenuCellEditor editor = new MenuCellEditor(parent);\r\n\t\teditor.setListenerModel(flistenermodel);\r\n if (getValidator() != null) {\r\n\t\t\teditor.setValidator(getValidator());\r\n\t\t}\t\t\r\n\t\t return editor;\r\n\t}", "public UsuarioEditor() {\n initComponents();\n setLocationRelativeTo(null);\n// control = new PaisControlEditor();\n// control.registrarVentana(this);\n\n }", "public void createFieldEditors()\n\t{\n\t}", "void onNewTextSet(CodeEditor editor);", "public PlacesAutocompleteTextView(final Context context, final AttributeSet attrs, final int defAttr) {\n super(context, attrs, defAttr);\n\n init(context, attrs, defAttr, R.style.PACV_Widget_PlacesAutoCompleteTextView, null, context.getString(R.string.pacv_default_history_file_name));\n }", "private TextField initHBoxTextField(HBox container, String initText, boolean editable) {\n TextField tf = new TextField();\n tf.setText(initText);\n tf.setEditable(editable);\n container.getChildren().add(tf);\n return tf;\n }", "public RTextField() {\r\n }", "protected void initializeEditingDomain() {\r\n\t\t// Create an adapter factory that yields item providers.\r\n\t\t//\r\n\t\tadapterFactory = new ComposedAdapterFactory(\r\n\t\t\t\tComposedAdapterFactory.Descriptor.Registry.INSTANCE);\r\n\r\n\t\tadapterFactory\r\n\t\t\t\t.addAdapterFactory(new ResourceItemProviderAdapterFactory());\r\n//\t\tadapterFactory\r\n//\t\t\t\t.addAdapterFactory(new ConfmlItemProviderAdapterFactory());\r\n\t\tadapterFactory\r\n\t\t\t\t.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());\r\n\r\n\t\t// Create the command stack that will notify this editor as commands are\r\n\t\t// executed.\r\n\t\t//\r\n\t\tBasicCommandStack commandStack = new BasicCommandStack();\r\n\r\n\t\t// Add a listener to set the most recent command's affected objects to\r\n\t\t// be the selection of the viewer with focus.\r\n\t\t//\r\n\t\tcommandStack.addCommandStackListener\r\n\t\t(new CommandStackListener() {\r\n\t\t\tpublic void commandStackChanged(final EventObject event) {\r\n\t\t\t\tgetContainer().getDisplay().asyncExec\r\n\t\t\t\t(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);\r\n\r\n\t\t\t\t\t\t// Try to select the affected objects.\r\n\t\t\t\t\t\t//\r\n\t\t\t\t\t\tCommand mostRecentCommand =\r\n\t\t\t\t\t\t\t((CommandStack)event.getSource()).getMostRecentCommand();\r\n\t\t\t\t\t\tif (mostRecentCommand != null) {\r\n\t\t\t\t\t\t\tsetSelectionToViewer(mostRecentCommand.getAffectedObjects());\r\n\t\t\t\t\t\t}\r\n//\t\t\t\t\t\tif (propertySheetPage != null &&\r\n//\t\t\t\t\t\t\t\t!propertySheetPage.getControl().isDisposed()) {\r\n//\t\t\t\t\t\t\tpropertySheetPage.refresh();\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Create the editing domain with a special command stack.\r\n\t\t//\r\n\t\teditingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack,\r\n\t\t\t\tnew HashMap<Resource, Boolean>());\r\n\t}", "public Modification() {\n initComponents();\n }", "void init ( String awtOrSwt) {\n this.gui.wdgInputText.setText(\"any text input\");\n this.gui.gralMng.createGraphic(awtOrSwt, 'E', this.log);\n }", "public void prepareEditor(){\n System.out.println(\"Prepare editor to be used !\");\r\n ((EditorScene)map.getScene()).initScene(20,20,map);\r\n ((EditorScene)map.getScene()).setController(this);\r\n builder.registerBasicEffect();\r\n ((EditorScene)map.getScene()).initListView(builder.getEffects(),selectEffects);\r\n\r\n\r\n\r\n }", "public FocusListener(String console, String instructionText, String type, GUIUpdater updater, MainInterpreter interpreter){\r\n consoleText = console;\r\n instruction = instructionText;\r\n uiType = type;\r\n guiUpdater = updater;\r\n mainInterpreter = interpreter;\r\n }", "public OSDarkLAFComboBoxEditor()\r\n {\r\n super();\r\n editor.setBorder(OSDarkLAFBorders.getComboEditorBorder());\r\n }", "private void init(String text)\n\t{\n\t\tthis.text = text;\n\n\t\tsetColor(ClassEntityView.getBasicColor());\n\t\tpopupMenu.addSeparator();\n\t\tfinal JMenuItem item = new JMenuItem(\"Delete commentary\", PersonalizedIcon.createImageIcon(Slyum.ICON_PATH + \"delete16.png\"));\n\t\titem.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tdelete();\n\t\t\t}\n\t\t});\n\t\t\n\t\tparent.selectOnly(this);\n\t\tpopupMenu.add(item);\n\t}", "public void initializeEditingBox() {\r\n //editing mode elements\r\n editBox.setWidth(200);\r\n editBox.setHeight(380);\r\n editBox.setArcHeight(10);\r\n editBox.setArcWidth(10);\r\n editBox.setFill(Color.WHITESMOKE);\r\n editBox.setStroke(Color.BLACK);\r\n editBox.setOpacity(0.98);\r\n\r\n DiverseUtils.initializeTextField(nameField, editBox, 10, 30, nameText, 0, -5, state.getName());\r\n nameField.textProperty().addListener(nameChangeListener);\r\n nameField.setOnAction(nameChangeEventHandler);\r\n nameField.focusedProperty().addListener(nameFocusChangeListener);\r\n\r\n DiverseUtils.initializeTextField(commentField, editBox, 10, 90, commentText, 0, -5, state.getComment(), state.commentProperty());\r\n\r\n DiverseUtils.initializeTextField(enterField, editBox, 10, 150, enterText, 0, -5, state.getEnter(), state.enterProperty());\r\n\r\n DiverseUtils.initializeTextField(leaveField, editBox, 10, 210, leaveText, 0, -5, state.getLeave(), state.leaveProperty());\r\n\r\n //TODO use the mousewheel for changing elements in comboboxes\r\n typeComboBox.getItems().addAll(\"Normal\", \"Final\", \"Initial\");\r\n typeComboBox.setValue(\"Normal\");\r\n DiverseUtils.initializeComboBox(typeComboBox, editBox, 50, 330, typeText, 0, -5);\r\n typeComboBox.valueProperty().addListener(typeChangeListener);\r\n\r\n colorComboBox.getItems().addAll(\"Blue\", \"Green\", \"Red\", \"Yellow\", \"Orange\", \"Brown\");\r\n colorComboBox.setValue(\"Blue\");\r\n DiverseUtils.initializeComboBox(colorComboBox, editBox, 10, 270, colorText, 0, -5);\r\n colorComboBox.valueProperty().addListener(colorChangeListener);\r\n\r\n sizeComboBox.getItems().addAll(40, 50, 60, 75, 90, 120);\r\n sizeComboBox.setValue((int) state.getSize());\r\n DiverseUtils.initializeComboBox(sizeComboBox, editBox, 120, 270, sizeText, 0, -5);\r\n sizeComboBox.valueProperty().addListener(sizeChangeListener);\r\n\r\n editingPane.getChildren().add(editBox);\r\n editingPane.getChildren().add(nameField);\r\n editingPane.getChildren().add(nameText);\r\n editingPane.getChildren().add(commentField);\r\n editingPane.getChildren().add(commentText);\r\n editingPane.getChildren().add(enterField);\r\n editingPane.getChildren().add(enterText);\r\n editingPane.getChildren().add(leaveField);\r\n editingPane.getChildren().add(leaveText);\r\n editingPane.getChildren().add(colorComboBox);\r\n editingPane.getChildren().add(colorText);\r\n editingPane.getChildren().add(sizeComboBox);\r\n editingPane.getChildren().add(sizeText);\r\n editingPane.getChildren().add(typeComboBox);\r\n editingPane.getChildren().add(typeText);\r\n }", "@Override\r\n\tpublic void init(IEditorSite site, IEditorInput editorInput) {\r\n\t\tsetSite(site);\r\n\t\t\r\n/*\t\t\r\n\t\tstack = new CommandStack();\r\n\t\t// actionRegistry = new ActionRegistry();\r\n\r\n\t\tstack.addCommandStackListener(commandStackListener);\r\n\t\tstack.addCommandStackEventListener(commandStackEventListener);\r\n*/\t\t\r\n\t\tsetInputWithNotify(editorInput);\r\n\t\tsetPartName(editorInput.getName());\r\n\t\tsite.setSelectionProvider(this);\r\n\t\tsite.getPage().addPartListener(partListener);\r\n\t\t\r\n\t\tResourcesPlugin.getWorkspace().addResourceChangeListener(\r\n\t\t\t\tresourceChangeListener, IResourceChangeEvent.POST_BUILD);\r\n\t\t\r\n\t\t\r\n\t}", "@Override public void onStartInput(EditorInfo attribute, boolean restarting) {\n super.onStartInput(attribute, restarting);\n \n // Reset our state. We want to do this even if restarting, because\n // the underlying state of the text editor could have changed in any way.\n mComposing.clear();\n mCandidatesAdapter.clear();\n updateCandidatesView(EMPTYLIST);\n\n mJapaneseInputMode = false;\n \n // どのキーボードを初期表示にするか、エディタのattributeから判断する\n // @todo すべてのattributeを網羅していない\n switch (attribute.inputType & InputType.TYPE_MASK_CLASS) {\n case InputType.TYPE_CLASS_NUMBER:\n case InputType.TYPE_CLASS_DATETIME:\n mCurKeyboard = mSymbolsKeyboard;\n break;\n \n case InputType.TYPE_CLASS_PHONE:\n mCurKeyboard = mSymbolsKeyboard;\n break;\n \n case InputType.TYPE_CLASS_TEXT:\n mCurKeyboard = mQwertyKeyboard;\n mJapaneseInputMode = true;\n\n int variation = attribute.inputType & InputType.TYPE_MASK_VARIATION;\n if (variation == InputType.TYPE_TEXT_VARIATION_PASSWORD ||\n variation == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {\n mJapaneseInputMode = false;\n }\n \n if (variation == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS\n || variation == InputType.TYPE_TEXT_VARIATION_URI\n || variation == InputType.TYPE_TEXT_VARIATION_FILTER) {\n mJapaneseInputMode = false;\n }\n \n if ((attribute.inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {\n mJapaneseInputMode = true;\n }\n\n break;\n \n default:\n // For all unknown input_view types, default to the alphabetic\n // keyboard with no special features.\n mCurKeyboard = mQwertyKeyboard;\n }\n\n setCandidatesViewShown(mJapaneseInputMode);\n\n if(mJapaneseInputMode){\n prediction(new CandidateWord(\"\",0)); // @note 0=文頭\n }\n }", "public static void registerEditor (ConfigEditor editor)\n {\n _editors.add(editor);\n }", "protected abstract void createFieldEditors();", "public TextFieldExt() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "public void setEditorParser( GosuParser parser )\n {\n _parser = parser;\n }", "public XMLEditor(MultiPageEditor editor) {\n colorManager = new ColorManager();\n setSourceViewerConfiguration(new XMLConfiguration(colorManager));\n setDocumentProvider(new XMLDocumentProvider());\n this.editor = editor;\n }" ]
[ "0.6051455", "0.5918607", "0.58683497", "0.57546645", "0.5721572", "0.5697665", "0.56835777", "0.5668366", "0.55596834", "0.5548008", "0.5548008", "0.5474536", "0.54548836", "0.5454007", "0.5441319", "0.54326487", "0.5429812", "0.54006827", "0.539092", "0.53588724", "0.5356289", "0.5351278", "0.52648133", "0.5230281", "0.5225795", "0.5195319", "0.51869726", "0.5186285", "0.5146267", "0.50605696", "0.50593036", "0.5057706", "0.505534", "0.5045171", "0.5030789", "0.50287837", "0.5015576", "0.5012868", "0.5002285", "0.49968734", "0.49802625", "0.49785015", "0.4965823", "0.49537048", "0.4941571", "0.49343693", "0.4917518", "0.49113292", "0.49109128", "0.49063563", "0.4892196", "0.4887005", "0.4886937", "0.4882325", "0.48676622", "0.48661324", "0.48546445", "0.4852523", "0.48520294", "0.48518518", "0.48433283", "0.48378643", "0.4829302", "0.48184916", "0.48164934", "0.47866666", "0.47738415", "0.47705498", "0.47699165", "0.47659633", "0.47558156", "0.47520262", "0.47480938", "0.4743505", "0.47366905", "0.47366095", "0.4725602", "0.4717033", "0.4714552", "0.47094488", "0.4706414", "0.47034088", "0.47016314", "0.4700807", "0.46973586", "0.46942422", "0.46862343", "0.46835104", "0.4680653", "0.46799308", "0.4676126", "0.46746644", "0.46722916", "0.46680978", "0.46647915", "0.46608964", "0.46572554", "0.46506462", "0.4650187", "0.4649344" ]
0.6126361
0
Default constructor that will generate a default loan.
public Loan() { this(2.5, 1, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Loan(){\n\t\tthis(\"\", 0, 0, 0, 0);\n\t\tstart_date = null;\n\t}", "public Loan(int s) {\r\n\t\tstockId = s;\r\n\t\tloanId = nextLoanId;\r\n\t\tnextLoanId++;\r\n\t\tloanFine = new Fine();\t\t\r\n\t\tloanDate = LocalDate.now();\r\n\t}", "public Lanceur() {\n\t}", "public Loan(int loanId, book book, member member, Date dueDate) { // class name should be start with upper case.\r\n\t\tthis.id = loanId; //chage from ID to id,naming convention\r\n\t\tthis.b = book;\t//chage from B to b,naming convention\r\n\t\tthis.m = member; //chage from M to m,naming convention\r\n\t\tthis.d = dueDate; //chage from D to d,naming convention\r\n\t\tthis.state = LoanState.CURRENT;\t//Changes from LOAN_STATE to LoanState, enum naming convention\r\n\t}", "public Loyalty() {}", "public Loan(int loanId, Book bOoK, Member mEmBeR, Date dueDate) { ////changed 'BoOk' to 'book' and changed 'MeMbEr' to 'member' and DuE_dAtE to dueDate\r\n\t\tthis.LoAn_Id = loanId; //changed 'LoAn_Id' to 'loanId'\r\n\t\tthis.BoOk = book; //changed 'BoOk' to 'book'\r\n\t\tthis.MeMbEr = member; //changed 'MeMbEr' to 'member'\r\n\t\tthis.DaTe = dueDate; //changed DuE_dAtE to dueDate\r\n\t\tthis.state = loanState.current; //changed 'StAtE' to 'state' and lOaN_sTaTe.CURRENT to loanState.current\r\n\r\n\t}", "public Loyalty(int l)\r\n\t{\r\n\t\tvalue = l;\r\n\t}", "public lo() {}", "private Ognl() {\n }", "public Loan (String cId, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.start_date = date;\n\t}", "public Kanban() {\r\n\t}", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount)\n {\n setAnnualInterestRate(annualInterestRate);\n setNumberOfYears(numberOfYears);\n setLoanAmount(loanAmount);\n loanDate = new Date();\n }", "@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }", "private Default()\n {}", "public Lotto2(){\n\t\t\n\t}", "public Loan(String cId, double pA, double iR, int nY, int nPy, String date){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\tstart_date = date;\n\t}", "private Ognl(){\n }", "public Loan(String cId, double pAmount, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.principal_amount = pAmount;\n\t\tthis.start_date = date;\n\t}", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {\n this.annualInterestRate = annualInterestRate;\n this.numberOfYears = numberOfYears;\n this.loanAmount = loanAmount;\n loanDate = new java.util.Date();\n }", "public LaundryCard() {\n\t}", "public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }", "public Pitonyak_09_02() {\r\n }", "public Goal() {\n super(ItemType.GOAL);\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic LoanEligibility getNewWithDefaults() {\n\t\treturn null;\n\t}", "public Bank(){\n this(\"Seneca@York\", 0);\n }", "public CampLease( ) {}", "public Lightning() {\n super(\"Death Lightning\", 2);\n }", "public SnakesAndLadders()\n {\n this(2);\n }", "public LyricAnswer() {\n }", "public Rental() {\n\t\tthis(\"rental\", null);\n\t}", "public Loyalty(String l)\r\n\t{\r\n\t\tint loyal;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tloyal = Integer.valueOf(l);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\tloyal = 0;\r\n\t\t}\r\n\t\tvalue = loyal;\r\n\t}", "public TebakNusantara()\n {\n }", "public Potencial() {\r\n }", "protected Settlement() {\n // empty constructor\n }", "public SavingsAccount()\n {\n super();\n this.interestRate = DEFAULT_RATE;\n System.out.println(\"Constructor is called.\");\n }", "private Tweet() {\n this(\"\", -1, \"\", false);\n }", "public SHrsLoan(SDbLoan loan) {\n moLoan = loan;\n maPayrollReceiptEarnings = new ArrayList<>();\n maPayrollReceiptDeductions = new ArrayList<>();\n }", "public Orbiter() {\n }", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "private ProfitPerTariffType ()\n {\n super();\n }", "public TBasicSalary() {\n\t\tthis(\"t_basic_salary\", null);\n\t}", "private TMCourse() {\n\t}", "public Loan(String cId, double pA, double iR, int nY, int nPy){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\t\n\t\tDate current_time = new Date();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t// Adapt the java data format to the mysql one\n\t\tstart_date = sdf.format(current_time);\n\t}", "public Candy() {\n\t\tthis(\"\");\n\t}", "public LOAN() {\n initComponents();\n }", "public Naive() {\n\n }", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "public FinanceEventListener(Loan loan){\n super();\n this.loan = loan;\n }", "public RptPotonganGaji() {\n }", "public BoletoPaymentRequest() {\n\n }", "public Vaccine() {\n\t}", "public Checkout() {}", "private Approche(String identifiantRunway, ArrayList<LatitudeLongitude> balises) {\n super(\"APPR\", identifiantRunway, balises);\n }", "public AnnualLease(AnnualLeaseModel model)\t\t{ super(model);\t\t}", "public GoldCoin(){\n \tinit();\n }", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "public Payroll()\r\n\t{\r\n\t\t\r\n\t}", "public TennisCoach () {\n\t\tSystem.out.println(\">> inside default constructor.\");\n\t}", "public Dealer() {\n this(1);\n }", "public Laboratorio() {}", "public Livro() {\n\n\t}", "public Phl() {\n }", "public AntrianPasien() {\r\n\r\n }", "public AirAndPollen() {\n\n\t}", "private UsineJoueur() {}", "public Rol() {}", "protected Approche() {\n }", "public Webinar() {\n\t\t\n\t}", "public Alojamiento() {\r\n\t}", "public Investment() {\r\n\t\t\r\n\t}", "protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}", "public Merchant() {\n\n\t}", "public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }", "public MealRecord() {\n\t\tsuper(Meal.MEAL);\n\t}", "private Instantiation(){}", "public Trening() {\n }", "public Leagues() {\n }", "public LateComingRecord() {\n\t\t}", "public Aanbieder() {\r\n\t\t}", "public Mannschaft() {\n }", "public Pasien() {\r\n }", "Petunia() {\r\n\t\t}", "public Supermarket() {\n }", "public Boleto() {\n this(3.0);\n }", "public LED()\n {\n this(defaultPin);\n }", "public CuentaDeposito() {\n super();\n }", "public Gasto() {\r\n\t}", "public Account() {\n // special case of the word \"this\"\n this(\"01234\", 0.00, \"Default Name\", \"Default Email\", \"Default Phone\");\n System.out.println(\"Empty constructor called\"); // only called once when instantiated.\n }", "public AppliedHoldInfo() {\n }", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Lemur(){\r\n //Call to super class\r\n super();\r\n //Set variables\r\n location = \"Madagascar\";\r\n classification = \"Prosimians\";\r\n coat = \"Fur\";\r\n dominantRole = \"Female\";\r\n grooming = \"Use their teeth as a comb\";\r\n age = rand.nextInt((20-1)+1)+1;\r\n weight = Math.random()*((7-1)+1)+1;\r\n }", "public Account() {\n this(null, 0);\n }", "public BankRekening() {\n setSaldo(0);\n }", "private Rekenhulp()\n\t{\n\t}", "void newLoans(List<Loan> loans);", "public BankAccount() {\n\t\tthis.money = 0;\n\t}", "public PassCost() {\r\n\r\n }", "public Libro() {\r\n }", "public Household() {\n }" ]
[ "0.8042531", "0.7103456", "0.70114994", "0.6977064", "0.6858182", "0.6770535", "0.66889286", "0.6589517", "0.64766026", "0.6460452", "0.6453653", "0.6425949", "0.641147", "0.64051586", "0.63499165", "0.63404876", "0.6311535", "0.6256017", "0.6251142", "0.6232726", "0.62145257", "0.6204435", "0.6196441", "0.6188234", "0.61826026", "0.6163299", "0.6142453", "0.613008", "0.612219", "0.6096167", "0.6079435", "0.60776633", "0.60744363", "0.60687816", "0.60349107", "0.6019704", "0.6005665", "0.59815645", "0.5979346", "0.5956778", "0.5950853", "0.5940115", "0.5939814", "0.5936725", "0.59324276", "0.5931971", "0.59314024", "0.5915822", "0.59110445", "0.59101045", "0.59084606", "0.5902383", "0.5895689", "0.58940685", "0.58722544", "0.5870683", "0.58705235", "0.58685035", "0.58652556", "0.58596915", "0.5856741", "0.5856379", "0.58541846", "0.58475536", "0.5844026", "0.5839201", "0.5830132", "0.58289975", "0.5822479", "0.58224326", "0.5805601", "0.58003384", "0.5795939", "0.57955855", "0.57846856", "0.57838273", "0.5779208", "0.57715213", "0.5769739", "0.57689863", "0.57668644", "0.57648134", "0.576253", "0.57608247", "0.575664", "0.5753191", "0.574709", "0.57456684", "0.5739763", "0.57395464", "0.5739283", "0.572085", "0.57178384", "0.5715655", "0.571454", "0.5714391", "0.5705974", "0.57046396", "0.5699964", "0.5699921" ]
0.8163442
0
Construct a loan with specified annual interest rate, number of years, and loan amount.
public Loan(double annualInterestRate, int numberOfYears, double loanAmount) { this.annualInterestRate = annualInterestRate; this.numberOfYears = numberOfYears; this.loanAmount = loanAmount; loanDate = new java.util.Date(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Loan(double annualInterestRate, int numberOfYears, double loanAmount)\n {\n setAnnualInterestRate(annualInterestRate);\n setNumberOfYears(numberOfYears);\n setLoanAmount(loanAmount);\n loanDate = new Date();\n }", "public Loan(String cId, double pA, double iR, int nY, int nPy, String date){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\tstart_date = date;\n\t}", "public Loan() {\n this(2.5, 1, 1000);\n }", "private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }", "public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}", "public Loan(String cId, double pA, double iR, int nY, int nPy){\n\t\tclient_id = cId;\n\t\tprincipal_amount = pA;\n\t\tinterest_rate = iR;\n\t\tno_years = nY;\n\t\tno_payments_yearly = nPy;\n\t\t\n\t\tDate current_time = new Date();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t// Adapt the java data format to the mysql one\n\t\tstart_date = sdf.format(current_time);\n\t}", "public Loan(){\n\t\tthis(\"\", 0, 0, 0, 0);\n\t\tstart_date = null;\n\t}", "public abstract double calculateLoanPayment(double principalAmount, double annualPrimeIntRate, int monthsAmort);", "public Loan(String cId, double pAmount, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.principal_amount = pAmount;\n\t\tthis.start_date = date;\n\t}", "public Loan(int s) {\r\n\t\tstockId = s;\r\n\t\tloanId = nextLoanId;\r\n\t\tnextLoanId++;\r\n\t\tloanFine = new Fine();\t\t\r\n\t\tloanDate = LocalDate.now();\r\n\t}", "public Loan(int loanId, Book bOoK, Member mEmBeR, Date dueDate) { ////changed 'BoOk' to 'book' and changed 'MeMbEr' to 'member' and DuE_dAtE to dueDate\r\n\t\tthis.LoAn_Id = loanId; //changed 'LoAn_Id' to 'loanId'\r\n\t\tthis.BoOk = book; //changed 'BoOk' to 'book'\r\n\t\tthis.MeMbEr = member; //changed 'MeMbEr' to 'member'\r\n\t\tthis.DaTe = dueDate; //changed DuE_dAtE to dueDate\r\n\t\tthis.state = loanState.current; //changed 'StAtE' to 'state' and lOaN_sTaTe.CURRENT to loanState.current\r\n\r\n\t}", "public Loan(int loanId, book book, member member, Date dueDate) { // class name should be start with upper case.\r\n\t\tthis.id = loanId; //chage from ID to id,naming convention\r\n\t\tthis.b = book;\t//chage from B to b,naming convention\r\n\t\tthis.m = member; //chage from M to m,naming convention\r\n\t\tthis.d = dueDate; //chage from D to d,naming convention\r\n\t\tthis.state = LoanState.CURRENT;\t//Changes from LOAN_STATE to LoanState, enum naming convention\r\n\t}", "public void setLoanAmount(double loanAmount) {\n this.loanAmount = loanAmount;\n }", "public void setLoan(int loan) {\n\t\tthis.loan = loan;\n\t}", "private void parseLoan(String[] info, Account account) {\n Loan l = new Loan(Float.parseFloat(info[1]), info[2],\n LocalDate.parse(info[3], dateTimeFormatter),\n Loan.Type.ALL);\n l.updateExistingLoan(info[4], info[5], Integer.parseInt(info[6]), Float.parseFloat(info[7]));\n account.getLoans().add(l);\n }", "public Loan (String cId, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.start_date = date;\n\t}", "public SHrsLoan(SDbLoan loan) {\n moLoan = loan;\n maPayrollReceiptEarnings = new ArrayList<>();\n maPayrollReceiptDeductions = new ArrayList<>();\n }", "@Ignore\n @Test\n public void testLoanWithOneOverduePayment() throws Exception {\n LoanBO loan = setUpLoan(dateTime, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING);\n\n LoanArrearsAgingEntity loanArrearsAgingEntity = ageLoanTenDaysAndGetLoanArrearsAgingEntity(loan);\n\n Assert.assertEquals(new Money(getCurrency(), \"\" + loanAmount), loanArrearsAgingEntity.getUnpaidPrincipal());\n Assert.assertEquals(new Money(getCurrency(), \"\" + totalInterest), loanArrearsAgingEntity.getUnpaidInterest());\n Assert.assertEquals(new Money(getCurrency(), \"\" + principalForOneInstallment), loanArrearsAgingEntity\n .getOverduePrincipal());\n Assert.assertEquals(new Money(getCurrency(), \"\" + interestForOneInstallment), loanArrearsAgingEntity\n .getOverdueInterest());\n Assert.assertEquals(new Money(getCurrency(), \"\" + (principalForOneInstallment + interestForOneInstallment)),\n loanArrearsAgingEntity.getOverdueBalance());\n\n Assert.assertEquals(Short.valueOf(\"3\"), loanArrearsAgingEntity.getDaysInArrears());\n\n assertForLoanArrearsAgingEntity(loan);\n\n }", "public Loyalty(int l)\r\n\t{\r\n\t\tvalue = l;\r\n\t}", "public static double processSomething(double loanAmt, double intRateAnnual, int termYears) {\n double intRateMonthly = (intRateAnnual/ 100) / 12;\n double base = (1 + intRateMonthly);\n double termMonths = termYears * 12;\n double minMonthlyPaymt = 0.0;\n minMonthlyPaymt = ((intRateMonthly * loanAmt) / (1 - Math.pow(base, -termMonths)));\n\n return minMonthlyPaymt;\n }", "@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}", "void newLoans(List<Loan> loans);", "public void calculateLoan(View view){\n Intent intent = new Intent(this, ResultActivity.class);\n\n //TODO: calculate monthly payment and determine\n double carPrice;\n double downPayment;\n double loadPeriod;\n double interestRate;\n\n \n\n //loan application status; approve or reject\n double monthlyPayment;\n String status;\n\n //Passing data using putExtra method\n //putExtra(TAG, value)\n intent.putExtra(MONTHLY_PAYMENT, monthlyPayment);\n intent.putExtra(LOAN_STATUS, status);\n startActivity(intent);\n }", "public LoanMonthlyPayment calculateMonthlyPayment() {\n double monthlyInterest = loanRequest.getApr() / MONTHLY_INTEREST_DIVISOR;\n double tmp = Math.pow(1d + monthlyInterest, -1);\n tmp = Math.pow(tmp, loanRequest.getTermInMonths());\n tmp = Math.pow(1d - tmp, -1);\n return new LoanMonthlyPayment(\n monthlyInterest, loanRequest.getAmountBorrowed() * monthlyInterest * tmp\n );\n }", "public static void main(String [] args)\r\n {\r\n //--------------------------------------------------------------\r\n // CCONSTANT DECLARATIONS\r\n //--------------------------------------------------------------\r\n\r\n //--------------------------------------------------------------\r\n // VARIABLE DECLARATIONS\r\n //--------------------------------------------------------------\r\n double loanAmount,\r\n annualInterestRate;\r\n int loanPeriod;\r\n\r\n String inputStr; //Used to hold the users input\r\n //--------------------------------------------------------------\r\n // Gets the inputted values\r\n //--------------------------------------------------------------\r\n Scanner scanner = new Scanner(System.in);\r\n String lineSeparator = System.getProperty(\"line.separator\");\r\n scanner.useDelimiter(lineSeparator);\r\n\r\n System.out.print(\"Loan Amount (Dollars + Cents): \");\r\n inputStr = scanner.next();\r\n loanAmount = Double.parseDouble(inputStr);\r\n\r\n System.out.print(\"Annual Interest Rate(e.g. 9.5): \");\r\n inputStr = scanner.next();\r\n annualInterestRate = Double.parseDouble(inputStr);\r\n\r\n System.out.print(\"Loan Period - # of Years: \");\r\n inputStr = scanner.next();\r\n loanPeriod = Integer.parseInt(inputStr);\r\n\r\n\r\n //--------------------------------------------------------------\r\n // Echo print the input values\r\n //--------------------------------------------------------------\r\n System.out.println(\"Loan Amount: $\" + loanAmount);\r\n System.out.println(\"Annual Interest Rate: \" + annualInterestRate + \"%\");\r\n System.out.println(\"Loan Period(Years): \" + loanPeriod);\r\n // System.Exit(0);\r\n }", "Loan getLoanById(String clientCode, String loanId);", "public void writeLoan(Loan l, BufferedWriter bufferedWriter) throws IOException {\n bufferedWriter.write(\"LOA @ \" + l.getPrice() + \" @ \" + l.getDescription()\n + \" @ \" + l.getStartDate() + \" @ \" + l.getType().toString() + \" @ \"\n + l.getEndDate() + \" @ \" + l.getStatusInt() + \" @ \" + l.getOutstandingLoan() + \"\\n\");\n }", "private void CalculateJButtonActionPerformed(java.awt.event.ActionEvent evt) { \n // read the inputs and calculate payment of loan\n //constants for max values, and number of comoundings per year\n final double MAX_AMOUNT = 100000000;\n final double MAX_INTEREST_RATE = 100;\n final int COUMPOUNDINGS = 12;\n final double MAX_YEARS = 50;\n final double PERIOD_INTEREST = COUMPOUNDINGS * 100;\n String errorMessage = \"Please enter a positive number for all required fields\"\n + \"\\nLoan amount must be in reange (0, \" + MAX_AMOUNT + \"]\"\n + \"\\nInterest rate must be in range [0, \" + MAX_INTEREST_RATE + \"]\"\n + \"\\nYears must be in range [0, \" + MAX_INTEREST_RATE + \"]\";\n \n counter++;\n CounterJTextField.setText(String.valueOf(counter));\n \n //get inputs\n double amount = Double.parseDouble(PrincipalJTextField.getText());\n double rate = Double.parseDouble(RateJTextField.getText());\n double years = Double.parseDouble(YearsJTextField.getText());\n \n //calculate paymets using formula\n double payment = (amount * rate/PERIOD_INTEREST)/\n (1 - Math.pow((1 + rate/PERIOD_INTEREST),\n years * (-COUMPOUNDINGS)));\n double interest = years * COUMPOUNDINGS * payment - amount;\n \n //displays results\n DecimalFormat dollars = new DecimalFormat(\"$#,##0.00\");\n\n PaymentJTextField.setText(dollars.format(payment));\n InterestJTextField.setText(dollars.format(interest));\n \n }", "public LoanItems(String title, int libraryID, boolean lent, int date) { // <2>\n this.title = title;\n this.libraryID = libraryID;\n this.lent = lent;\n this.date = date;\n }", "public void saveLoan (Loan loan) throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\t\n\t\ttry{\n\t\t\tString query = \"INSERT INTO loan (client_id, principal_amount, interest_rate, no_years, no_payments_yearly, start_date)\"\n\t\t\t\t\t\t+ \" VALUES ('\"+this.client_id+\"', \"+this.principal_amount+\", \"+this.interest_rate+\", \"+this.no_years+\", \"\n\t\t\t\t\t\t\t\t+ \"\"+this.no_payments_yearly+\", '\"+this.start_date+\"')\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tstat.execute(query);\n\t\t\t\n\t\t\t// Deposit the money in the client's account\n\t\t\tClient client = Client.getClient(client_id);\n\t\t\tClient.deposit(client, principal_amount);\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "public void setLoanAmount(double loanAmount)\n {\n if (loanAmount <= 0)\n {\n throw new IllegalArgumentException(\"The loan amount has to be greater than 0.\");\n }\n\n this.loanAmount = loanAmount;\n }", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public static void enterDetails(int num, double interest){\r\n Scanner s = new Scanner(System.in);\r\n String name;\r\n double amm=0;\r\n int term=-1;\r\n \r\n int loanType;\r\n \r\n do{\r\n System.out.println(\"Press 1: Business Loan\\n\"\r\n + \"Press 2: Personal Loan\");\r\n loanType = parseInt(s.next());\r\n }while(!(loanType == 1 || loanType == 2));\r\n \r\n while(amm <= 0 || amm > 100000){\r\n System.out.print(\"Enter loan ammount: \");\r\n amm = parseDouble(s.next());\r\n if(amm > 100000){\r\n System.out.println(\"Loan exceeds limit\");\r\n }\r\n }\r\n System.out.print(\"Enter the term in years: \");\r\n term = parseInt(s.next());\r\n if(!(term==3 || term==5)){\r\n System.out.println(\"Loan term set to 1 year\");\r\n }\r\n \r\n System.out.print(\"Enter last name: \");\r\n name = s.next();\r\n \r\n switch (loanType) {\r\n case 1:\r\n BusinessLoan b = new BusinessLoan(num, name, amm, term, interest);\r\n if(b.loanNum!=-1){\r\n loan.add(b);\r\n System.out.println(\"Loan approved\");\r\n } \r\n break;\r\n case 2:\r\n PersonalLoan p = new PersonalLoan(num, name, amm, term, interest);\r\n if(p.loanNum!=-1){\r\n loan.add(p);\r\n System.out.println(\"Loan approved\");\r\n }\r\n break;\r\n }\r\n System.out.println(\"---------------------------------------------\");\r\n }", "public Loyalty(String l)\r\n\t{\r\n\t\tint loyal;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tloyal = Integer.valueOf(l);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\tloyal = 0;\r\n\t\t}\r\n\t\tvalue = loyal;\r\n\t}", "public static double calculateMonthlyPaymentInsuranceOnly(double amountLoan, double annualRateInsurance){\n return amountLoan * (annualRateInsurance / 12);\n }", "public Savings_Account (int account_num, double initial_balance, double interest_rate) \r\n {\r\n\r\n super (account_num, initial_balance);\r\n\r\n rate = interest_rate;\r\n\r\n }", "public double getLoan()\r\n {\r\n return loan;\r\n }", "public static AnnualLease create(String number,\n\t\t\t\t\t\t\t\t\t\t\tDate startdate,\n\t\t\t\t\t\t\t\t\t\t\tdouble amountdue,\n\t\t\t\t\t\t\t\t\t\t\tboolean paymonthly)\n\t\t\t\t\t\t\t\tthrows CreateException\t\t\t\t{\n\t\tif (_debug) System.out.println(\"AL:create:\" + number);\n\n\t\tAnnualLeaseModel model = new AnnualLeaseModel(number, amountdue, startdate, null, null, null, 0, paymonthly);\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tdao.dbInsert(model);\n\t\t\t/* Initially this AnnualLease has no boats or leases\t\t\t*/\n\n\t\t} catch (Exception sqlex)\t{\n\t\t\tthrow new CreateException(sqlex.getMessage());\n\t\t}\n\n\t\treturn\tnew AnnualLease(model);\n\t}", "public double getMonthlyPayment() {\n double monthlyInterestRate = annualInterestRate / 1200;\n double monthlyPayment = loanAmount * monthlyInterestRate / (1 - (1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12)));\n \n return monthlyPayment;\n }", "Years createYears();", "public static void monthlyPayment()\n\t{\n\t\tSystem.out.println(\"enter principal loan amount, years , and rate of interest\");\n\t\tfloat principal = scanner.nextFloat();\n\t\tfloat years = scanner.nextFloat();\n\t\tfloat rate = scanner.nextFloat();\n\t\t\n\t\tfloat n = 12 * years;\n\t\tfloat r = rate / (12*100);\n\t\tdouble x = Math.pow(1+rate,(-n));\t\n\t\t\n\t\tdouble payment = (principal*r) / (1-x);\n\t\tSystem.out.println(\"monthly payment is: \" + payment);\n\t}", "public double getLoanAmount() {\n return loanAmount;\n }", "public static int calculateYears ( double principal, double interest, double tax, double desired){\n\n int y = 0;\n while (principal < desired) {\n principal = (principal * (interest + 1)) - ((principal * interest) * tax);\n y++;\n }\n return y;\n }", "static int loanHelper(int principle,double interest,int payment,int month) {\n\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Month \" + month + \": $\" + principle); \n\t\tmonth++;\n\t\treturn 1+ loanHelper((int) (((principle)*(1+interest/12))-payment), interest, payment,month);\n\n\n\n\t}", "static int loanLength(int principle, double interest, int payment) {\n\t\tif (principle<=payment){ \n\t\t\tif (principle<=0) return 0;\n\t\t\telse { \n\t\t\t\tSystem.out.println(\"Month 0: $\" + principle); \n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\n\n\t\t\tint month=0;\n\t\t\tint loandate= loanHelper(principle,interest,payment,month)-1; // Subtract one because it counts month 0 as a month\n\t\t\treturn loandate;\n\t\t}\n\n\t}", "@Ignore\n @Test\n public void testLoanWithOnePaymentMadeAndOneOverduePayments() throws Exception {\n LoanBO loan = setUpLoan(dateTime, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING);\n\n Assert.assertNull(loan.getLoanArrearsAgingEntity());\n\n short daysOverdue = 3;\n // advance time daysOverdue past the second repayment interval\n dateTime = dateTime.plusDays(2 * repaymentInterval + daysOverdue);\n new DateTimeService().setCurrentDateTimeFixed(dateTime);\n\n // make one payment, so we should still be one payment behind after that\n PaymentData paymentData = PaymentData.createPaymentData(new Money(Configuration.getInstance().getSystemConfig()\n .getCurrency(), \"\" + onePayment), loan.getPersonnel(), Short.valueOf(\"1\"), dateTime.toDate());\n IntegrationTestObjectMother.applyAccountPayment(loan, paymentData);\n runLoanArrearsThenLoanArrearsAging();\n StaticHibernateUtil.flushAndClearSession();\n\n loan = legacyLoanDao.getAccount(loan.getAccountId());\n\n Assert.assertNotNull(loan.getLoanArrearsAgingEntity());\n LoanArrearsAgingEntity loanArrearsAgingEntity = loan.getLoanArrearsAgingEntity();\n\n Assert.assertEquals(new Money(getCurrency(), \"\" + (loanAmount - principalForOneInstallment)),\n loanArrearsAgingEntity.getUnpaidPrincipal());\n Assert.assertEquals(new Money(getCurrency(), \"\" + (totalInterest - interestForOneInstallment)),\n loanArrearsAgingEntity.getUnpaidInterest());\n Assert.assertEquals(new Money(getCurrency(), \"\" + principalForOneInstallment), loanArrearsAgingEntity\n .getOverduePrincipal());\n Assert.assertEquals(new Money(getCurrency(), \"\" + interestForOneInstallment), loanArrearsAgingEntity\n .getOverdueInterest());\n Assert.assertEquals(new Money(getCurrency(), \"\" + (principalForOneInstallment + interestForOneInstallment)),\n loanArrearsAgingEntity.getOverdueBalance());\n\n Assert.assertEquals(Short.valueOf(daysOverdue), loanArrearsAgingEntity.getDaysInArrears());\n }", "public static final Function<Date,Date> addYears(final int amount) {\r\n return new Add(Calendar.YEAR, amount);\r\n }", "private double calculateYearlyLoyaltyPoints(int year){\n \tLoyalty txnLoyalty = compositePOSTransaction.getLoyaltyCard();\n\t\tif (txnLoyalty == null){\n\t\t\treturn 0.0;\n\t\t}else if(!txnLoyalty.isYearlyComputed()){\n\t\t\treturn 0.0;\n\t\t}\n\t\t\n\t\tif(com.chelseasystems.cr.swing.CMSApplet.theAppMgr!=null &&\n \t\t\tcom.chelseasystems.cr.swing.CMSApplet.theAppMgr.getStateObject(\"THE_TXN\") != null){\n \t\t// this is an inquiry\n\t\t\tif (year == 0) {\n\t\t\t\treturn txnLoyalty.getCurrYearBalance();\n\t\t\t} else {\n\t\t\t\treturn txnLoyalty.getLastYearBalance();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble loyaltyUsed = compositePOSTransaction.getUsedLoyaltyPoints();\n\t\tdouble points = compositePOSTransaction.getLoyaltyPoints();\n\n\t\tdouble currBal = txnLoyalty.getCurrBalance();\n\t\tdouble currYearBal = txnLoyalty.getCurrYearBalance();\n\t\tdouble lastYearBal = txnLoyalty.getLastYearBalance();\n\t\tif (loyaltyUsed > 0) {\n\t\t\tif (txnLoyalty.getLastYearBalance() < loyaltyUsed) {\n\t\t\t\tcurrYearBal = currYearBal - (loyaltyUsed - lastYearBal);\n\t\t\t\tlastYearBal = 0.0;\n\t\t\t} else {\n\t\t\t\tlastYearBal -= loyaltyUsed;\n\t\t\t}\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t} else {\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t\tcurrYearBal -= loyaltyUsed;\n\t\t}\n\n\t\tif (txnLoyalty.isYearlyComputed()) {\n\t\t\tcurrYearBal += points;\n\t\t} else {\n\t\t\tcurrYearBal = 0.0;\n\t\t\tlastYearBal = 0.0;\n\t\t}\n\n\t\tif (year == 0) {\n\t\t\treturn currYearBal;\n\t\t} else {\n\t\t\treturn lastYearBal;\n\t\t}\n }", "public BookLoanPK(int customerId, String isbn, int bookLoanId) {\n this.customerId = customerId;\n this.isbn = isbn;\n this.bookLoanId = bookLoanId;\n }", "@Test\n public void testHomeLoanCalculator() {\n LoanTerms loanTerms = new LoanTerms(10, 50000, LoanType.ING, 28, 1000, 8000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$2,771.81\"));\n }", "private int adjustLoan(PreparedStatement updateLoan, int loanNumber, float adjustedLoanAmount) throws SQLException {\n updateLoan.setFloat(1, adjustedLoanAmount);\n updateLoan.setInt(2, loanNumber);\n return updateLoan.executeUpdate(); // TODO: call to executeUpdate on a PreparedStatement\n }", "public GmfCustomerSchema loans(List<GmfcustomerSchemaLoans> loans) {\n this.loans = loans;\n return this;\n }", "public FinanceEventListener(Loan loan){\n super();\n this.loan = loan;\n }", "public Boolean startLoan(Loan loan) {\n\t\tif (canBorrowBook()) {\n\t\t\tloan.getBook().incrementCopiesTakenCount();\n\t\t\tloans.add(loan);\n\t\t\t\n\t\t\tSystem.out.println(name.toUpperCase() + \" must return this book by \" + loan.getFormattedDueDate());\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static double calculateMonthlyPaymentWithNotRate(double amountLoan, int nbOfMonthlyPayment){\n return amountLoan / nbOfMonthlyPayment;\n }", "@Test\n public void testDecimalAutoLoan() {\n LoanTerms loanTerms = new LoanTerms(30, 500000, LoanType.SCB, 40, 3000, 21000);\n\n /* Get Loan Details */\n LoanDetails details = new HomeLoanCalculator(loanTerms).calculateLoanDetails();\n\n /* Check Values */\n assertThat(details.getMonthlyPayment(), is(\"$466.15\"));\n }", "public static ArrayList<Loan> getAllLoans() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\tArrayList<Loan> result = null;\n\t\ttry{\n\t\t\t\n\t\t\tresult = new ArrayList<Loan>();\n\t\t\tString query = \"SELECT * FROM loan;\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\twhile (rs.next()){\n\t\t\t\tresult.add((new Loan(rs.getString(\"client_id\"), rs.getDouble(\"principal_amount\"), rs.getDouble(\"interest_rate\"), rs.getInt(\"no_years\"), \n\t\t\t\t\t\trs.getInt(\"no_payments_yearly\"), rs.getString(\"start_date\"))));\n\t\t\t}\n\t\t\treturn result;\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "public RetirementYears(int year, double preTB, double postTB, double Total){\n \n this.year = year;\n this.preTB = preTB;\n this.postTB = postTB;\n this.Total = Total;\n }", "private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}", "public int getLoan() {\n\t\treturn loan;\n\t}", "@FXML\r\n\tprivate void btnCalcLoan(ActionEvent event) {\r\n\r\n\t\tSystem.out.println(\"Amount: \" + LoanAmount.getText());\r\n\t\tdouble dLoanAmount = Double.parseDouble(LoanAmount.getText());\r\n\t\tSystem.out.println(\"Amount: \" + dLoanAmount);\t\r\n\t\t\r\n\t\tlblTotalPayemnts.setText(\"123\");\r\n\t\t\r\n\t\tLocalDate localDate = PaymentStartDate.getValue();\r\n\t\tSystem.out.println(localDate);\r\n\t\t\r\n\t\tdouble dInterestRate = Double.parseDouble(InterestRate.getText());\r\n\t\tSystem.out.println(\"Interest Rate: \" + dInterestRate);\r\n\t\t\r\n\t\tint dNbrOfYears = Integer.parseInt(NbrOfYears.getText());\r\n\t\tSystem.out.println(\"Number of Years: \" + dNbrOfYears);\r\n\t\t\r\n\t\tdouble dAdditionalPayment = Double.parseDouble(AdditionalPayment.getText());\r\n\t\t\r\n\t\t\r\n\t\tLoan dLoan = new Loan(dLoanAmount,dInterestRate,dNbrOfYears,dAdditionalPayment,localDate,false,0);\r\n\t\t\r\n\t\tdouble totalInterest = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < dLoan.LoanPayments.size();i++) {\r\n\t\t\tPayment payment = dLoan.LoanPayments.get(i);\r\n\t\t\tloanTable.getItems().add((payment.getPaymentID(),payment.getDueDate(),dAdditionalPayment,payment.getIMPT(),\r\n\t\t\t\t\tpayment.getPPMT(),payment.getTotalPrinciple());\r\n\t\t\ttotalInterest += payment.getIMPT();\r\n\t\t}\r\n\t\t\r\n\t\tTotalPayments.setText(String.valueOf(dLoan.LoanPayments.size()));\r\n\t\tTotalInterest.setText(String.valueOf(totalInterest));\r\n\t\t\r\n\t}", "public double getloanAmount( double loanAmount) {\nreturn loanAmount;\n}", "public static void main(String[] args) {\n\t\tString input = \"30000~10~6~5000\";\r\n\t\t\r\n\t\tString[] values = input.split(\"~\");\r\n\t\t\r\n\t\tint loan = Integer.parseInt(values[0]);\r\n\t\tint year = Integer.parseInt(values[1]);\r\n\t\tint annualRate = Integer.parseInt(values[2]);\r\n\t\tint downpayment = Integer.parseInt(values[3]);\r\n\t\t\r\n\t\tint interestLoan = loan - downpayment;\r\n\t\t\r\n\t\tdouble month = year * 12;\r\n\t\tdouble montlyRate = (double)annualRate / 1200;\r\n\t\tDecimalFormat format = new DecimalFormat(\"#.00\");\r\n\t\tdouble interest = ((interestLoan * montlyRate)/ (1 - Math.pow((1 + montlyRate),-month)));\r\n\t\t\r\n\t\tSystem.out.println(format.format(interest));\r\n\t}", "public YearProfit(){}", "public Ledger(int nB) {\r\n\t\tnumberOfBills = nB;\r\n\t\tcounter = nB;\r\n\t\tinvoiceInfo = new Invoice[numberOfBills];\r\n\t}", "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "private static void currentLoan() {\n\t\toutput(\"\");\r\n\t\tfor (loan loan : library.currentLoan()) {// method name changes CURRENT_LOANS to currentLoan() , variable name LIB to library\r\n\t\t\toutput(loan + \"\\n\");\r\n\t\t}\t\t\r\n\t}", "public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}", "public Loan loanDtoToLoan(LoanDTO loanDto) {\n\n\t\tLoan loan = new Loan();\n\n\t\t// get loandto field data and set to loanfield\n\t\tloan.setActive(loanDto.isActive());\n\t\tloan.setCreatedOn(loanDto.getCreatedOn());\n\t\tloan.setId(loanDto.getId());\n\t\tloan.setInterestAmount(loanDto.getInterestAmount());\n\t\tloan.setLoanAmount(loanDto.getLoanAmount());\n\t\tloan.setLoanReason(loanDto.getLoanReason());\n\t\tloan.setModifiedOn(loanDto.getModifiedOn());\n\t\tloan.setPaidAmount(loanDto.getPaidAmount());\n\t\tloan.setPassbook(loanDto.getPassbook());\n\t\tloan.setStudentId(loanDto.getStudentId());\n\t\tloan.setTotalPaybackAmount(loanDto.getTotalPaybackAmount());\n\n\t\treturn loan;\n\n\t}", "@Ignore\n @Test\n public void testLoanWithOnePartialPayment() throws Exception {\n LoanBO loan = setUpLoan(dateTime, AccountState.LOAN_ACTIVE_IN_GOOD_STANDING);\n\n Assert.assertNull(loan.getLoanArrearsAgingEntity());\n\n short daysOverdue = 3;\n dateTime = dateTime.plusDays(repaymentInterval + daysOverdue);\n new DateTimeService().setCurrentDateTimeFixed(dateTime);\n\n // make one payment of 8. Interest is paid off first, so 2 goes to interest and 6 to principal\n int principalPayment = 6;\n int interestPayment = 2;\n int paymentAmount = interestPayment + principalPayment; // paymentAmount == 8\n PaymentData paymentData = PaymentData.createPaymentData(new Money(Configuration.getInstance().getSystemConfig()\n .getCurrency(), \"\" + paymentAmount), loan.getPersonnel(), Short.valueOf(\"1\"), dateTime.toDate());\n IntegrationTestObjectMother.applyAccountPayment(loan, paymentData);\n\n runLoanArrearsThenLoanArrearsAging();\n StaticHibernateUtil.flushAndClearSession();\n loan = legacyLoanDao.getAccount(loan.getAccountId());\n\n Assert.assertNotNull(loan.getLoanArrearsAgingEntity());\n LoanArrearsAgingEntity loanArrearsAgingEntity = loan.getLoanArrearsAgingEntity();\n\n Assert.assertEquals(new Money(getCurrency(), \"\" + (loanAmount - principalPayment)), loanArrearsAgingEntity\n .getUnpaidPrincipal());\n Assert.assertEquals(new Money(getCurrency(), \"\" + (totalInterest - interestPayment)), loanArrearsAgingEntity\n .getUnpaidInterest());\n Assert.assertEquals(new Money(getCurrency(), \"\" + (principalForOneInstallment - principalPayment)),\n loanArrearsAgingEntity.getOverduePrincipal());\n Assert.assertEquals(new Money(getCurrency(), \"0\"), loanArrearsAgingEntity.getOverdueInterest());\n Assert.assertEquals(new Money(getCurrency(), \"\" + (principalForOneInstallment - principalPayment)),\n loanArrearsAgingEntity.getOverdueBalance());\n\n Assert.assertEquals(Short.valueOf(daysOverdue), loanArrearsAgingEntity.getDaysInArrears());\n\n }", "@Test\n public void retrieveLoanTest() throws ApiException {\n Long loanId = null;\n GetSelfLoansLoanIdResponse response = api.retrieveLoan(loanId);\n\n // TODO: test validations\n }", "@NotNull\n public Money monthlyRate(@NotNull BigDecimal yearlyRateInPercent) {\n return new Money(percentage(yearlyRateInPercent), currency);\n }", "private static double priceWithInterest(double price_tax, double dwnpymnt, double interest, int year) {\n \tdouble pwi = price_tax - dwnpymnt;\n \t\n \tif(year > 0) {\n \t\tpwi = pwi * (1 + (interest / 100));\n \t}\n \t\n \treturn pwi;\n }", "public void earnMonthlyInterest(){\r\n\t\tbalance += balance * getYearlyInterestRate() / 12 ;\r\n\t}", "public void setAmount(double amount) {\nloanAmount = amount;\n}", "public int getLoanId() {\r\n\t\treturn loanId;\r\n\t}", "public AnnualLease(AnnualLeaseModel model)\t\t{ super(model);\t\t}", "List<Loan> listLoanByRequest(String clientCode, String requestId);", "public LoanApplicationResponse approveLoanRequest() {\n return new LoanApplicationResponse(this, true);\n }", "public void setCurrentLoan(Loan currentLoan) {\n\t\tthis.currentLoan = currentLoan;\n\t}", "public static int calculateYears(double principal, double interest, double tax, double desired) {\n double profit = 0;\n int years = 0;\n while (principal < desired) {\n profit = principal * interest;\n principal = profit - profit * tax + principal;\n years++;\n }\n return years;\n }", "public Bank(long bankleitzahl) {\n if (bankleitzahl < 0) {\n throw new IllegalArgumentException(\"Bankleitzahl kann nicht negativ sein.\");\n }\n this.bankleitzahl = bankleitzahl;\n this.kontoMap = new TreeMap<Long, Konto>();\n this.nextKontoNummer = MIN_KONTONUMMER;\n }", "Year createYear();", "public List<Loan> getLoan();", "public interface OrdinaryCreditBank {\n\n\t/**\n\t * Limit for maximal credit.\n\t */\n\tint LIMIT = 10000;\n\n\t/**\n\t * An example of interface implementation.\n\t */\n\tOrdinaryCreditBank EXAMPLE = new OrdinaryCreditBank() {\n\n\t\t/**\n\t\t * {@inheritDoc}\n\t\t *\n\t\t * @throws IllegalArgumentException if {@code amount} is negative.\n\t\t */\n\t\t@Override public Loan getLoan(final int amount) {\n\t\t\tif (amount < 0) {\n\t\t\t\tthrow new IllegalArgumentException(String.valueOf(amount));\n\t\t\t}\n\t\t\tif (amount <= LIMIT) {\n\t\t\t\treturn new Loan(amount >> 1);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t};\n\n\t/**\n\t * Returns a new loan or {@code null} if a request is withheld.\n\t *\n\t * @param amount requested amount.\n\t *\n\t * @return a new loan or {@code null} if a request is withheld.\n\t */\n\tLoan getLoan(int amount);\n\n}", "public YearPanel(CalendarEx calendar) {\n initComponents();\n cal = calendar;\n year = CalendarEx.getCurrentYear();\n \n ListAppointMents();\n }", "public SavingsAccount(double balance, String id, double interestRate) {\r\n\t\tsuper(balance, id);\r\n\t\tif(interestRate < 0){\r\n\t\t\tValidation.reportError(\"Invalid Interest Rate\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tYearlyInterestRate = interestRate;\r\n\t\t}\r\n\t\t\r\n\t}", "public Computus(int x){\n year = x;\n }", "static LoanType assignLoanType(String loan) {\n String name = loan.substring(0, 1).toUpperCase() + loan.substring(1).toLowerCase() + \"Loan\";\n try {\n Class clazz = Class.forName(name);\n return (LoanType) clazz.getConstructor().newInstance();\n } catch (Exception e) {\n return new UnidentifiedLoan();\n }\n }", "public void setYearlyBonus(int yearlyBonus){\n this.yearlyBonus = yearlyBonus;\n }", "public TimeDepositAccount(double interestRate, double balance, int maturityPeriods, double interestPenaltyRate) // constructor\n {\n super(interestRate,balance);\n this.elapsedPeriods=0;\n this.maturityPeriods=maturityPeriods;\n this.interestPenaltyRate = interestPenaltyRate;\n \n \n }", "static BigDecimal worthAtCompoundInterest(final BigDecimal principal, final BigDecimal annualRate, final int periodsPerYear, final int years) {\n return compound(principal, annualRate, periodsPerYear, years);\n }", "public Loan getCurrentLoan() {\n\t\treturn currentLoan;\n\t}", "@Test\n public void testLoanRefundByCashAccrualBasedAccounting() {\n Calendar fourMonthsfromNowCalendar = Calendar.getInstance(Utils.getTimeZoneOfTenant());\n fourMonthsfromNowCalendar.add(Calendar.MONTH, -4);\n\n // FINERACT-885: If the loan starts on day 27-31th of month and not all months have that\n // many days, then loan payment will get reset to a day of month less than today's day\n // and 4th payment will be in the past. In such case, start the loan a few days later,\n // so that 4th payment is guaranteed to be in the future.\n if (fourMonthsfromNowCalendar.get(Calendar.DAY_OF_MONTH) > 27) {\n fourMonthsfromNowCalendar.add(Calendar.DAY_OF_MONTH, 4);\n }\n\n String fourMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n final Integer clientID = ClientHelper.createClient(REQUEST_SPEC, RESPONSE_SPEC);\n ClientHelper.verifyClientCreatedOnServer(REQUEST_SPEC, RESPONSE_SPEC, clientID);\n\n /***\n * Create loan product with Default STYLE strategy\n */\n\n final Account assetAccount = ACCOUNT_HELPER.createAssetAccount();\n final Account incomeAccount = ACCOUNT_HELPER.createIncomeAccount();\n final Account expenseAccount = ACCOUNT_HELPER.createExpenseAccount();\n final Account overpaymentAccount = ACCOUNT_HELPER.createLiabilityAccount();\n\n final Integer loanProductID = createLoanProduct(\"0\", \"0\", LoanProductTestBuilder.DEFAULT_STRATEGY, ACCRUAL_UPFRONT, assetAccount,\n incomeAccount, expenseAccount, overpaymentAccount);// ,\n // LoanProductTestBuilder.EQUAL_INSTALLMENTS,\n // LoanProductTestBuilder.FLAT_BALANCE);\n Assertions.assertNotNull(loanProductID);\n\n /***\n * Apply for loan application and verify loan status\n */\n final String savingsId = null;\n final String principal = \"12,000.00\";\n\n // Add charges with payment mode regular\n List<HashMap> charges = new ArrayList<>();\n\n Integer flatInstallmentFee = ChargesHelper.createCharges(REQUEST_SPEC, RESPONSE_SPEC,\n ChargesHelper.getLoanInstallmentJSON(ChargesHelper.CHARGE_CALCULATION_TYPE_FLAT, \"50\", false));\n addCharges(charges, flatInstallmentFee, \"50\", null);\n\n List<HashMap> collaterals = new ArrayList<>();\n\n final Integer collateralId = CollateralManagementHelper.createCollateralProduct(REQUEST_SPEC, RESPONSE_SPEC);\n Assertions.assertNotNull(collateralId);\n final Integer clientCollateralId = CollateralManagementHelper.createClientCollateral(REQUEST_SPEC, RESPONSE_SPEC,\n String.valueOf(clientID), collateralId);\n Assertions.assertNotNull(clientCollateralId);\n addCollaterals(collaterals, clientCollateralId, BigDecimal.valueOf(1));\n\n final Integer loanID = applyForLoanApplicationWithPaymentStrategyAndPastMonth(clientID, loanProductID, charges, savingsId,\n principal, LoanApplicationTestBuilder.DEFAULT_STRATEGY, -4, collaterals);\n Assertions.assertNotNull(loanID);\n HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);\n\n LOG.info(\"-----------------------------------APPROVE LOAN-----------------------------------------\");\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.approveLoan(fourMonthsfromNow, loanID);\n LoanStatusChecker.verifyLoanIsApproved(loanStatusHashMap);\n LoanStatusChecker.verifyLoanIsWaitingForDisbursal(loanStatusHashMap);\n\n LOG.info(\"-------------------------------DISBURSE LOAN-------------------------------------------\");\n String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n loanStatusHashMap = LOAN_TRANSACTION_HELPER.disburseLoanWithNetDisbursalAmount(fourMonthsfromNow, loanID,\n JsonPath.from(loanDetails).get(\"netDisbursalAmount\").toString());\n LoanStatusChecker.verifyLoanIsActive(loanStatusHashMap);\n\n final JournalEntry[] assetAccountInitialEntry = { new JournalEntry(Float.parseFloat(\"1440\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"300.00\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"12000.00\"), JournalEntry.TransactionType.DEBIT) };\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, fourMonthsfromNow, assetAccountInitialEntry);\n\n ArrayList<HashMap> loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"2290\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #1\n\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String threeMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(threeMonthsfromNow, Float.parseFloat(\"2290\"), loanID);\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n firstInstallment = loanSchedule.get(1);\n validateNumberForEqual(\"0.00\", String.valueOf(firstInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #2\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String twoMonthsfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(twoMonthsfromNow, Float.parseFloat(\"2290\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, twoMonthsfromNow,\n new JournalEntry(Float.parseFloat(\"2290\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"2290\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n Map secondInstallment = loanSchedule.get(2);\n validateNumberForEqual(\"0.00\", String.valueOf(secondInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make payment for installment #3\n // Pay 2290 more than expected\n fourMonthsfromNowCalendar.add(Calendar.MONTH, 1);\n\n final String oneMonthfromNow = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRepayment(oneMonthfromNow, Float.parseFloat(\"4580\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, oneMonthfromNow,\n new JournalEntry(Float.parseFloat(\"4580\"), JournalEntry.TransactionType.DEBIT),\n new JournalEntry(Float.parseFloat(\"4580\"), JournalEntry.TransactionType.CREDIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap thirdInstallment = loanSchedule.get(3);\n validateNumberForEqual(\"0.00\", String.valueOf(thirdInstallment.get(\"totalOutstandingForPeriod\")));\n\n // Make refund of 20\n // max 2290 to refund. Pay 20 means only principal\n // Default style refund order(principal, interest, fees and penalties\n // paid: principal 2000, interest 240, fees 50, penalty 0\n // refund 20 means paid: principal 1980, interest 240, fees 50, penalty\n // 0\n\n // FINERACT-885: As loan may not have started exactly four months ago,\n // make final payment today and not four months from start (as that may be in the future)\n fourMonthsfromNowCalendar.setTime(Date.from(Utils.getLocalDateOfTenant().atStartOfDay(Utils.getZoneIdOfTenant()).toInstant()));\n final String now = Utils.convertDateToURLFormat(fourMonthsfromNowCalendar);\n\n LOAN_TRANSACTION_HELPER.makeRefundByCash(now, Float.parseFloat(\"20\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, now,\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.DEBIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n HashMap fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"feeChargesOutstanding\")));\n\n // Make refund of 2000\n // max 2270 to refund. Pay 2000 means only principal\n // paid: principal 1980, interest 240, fees 50, penalty 0\n // refund 2000 means paid: principal 0, interest 220, fees 50, penalty 0\n\n LOAN_TRANSACTION_HELPER.makeRefundByCash(now, Float.parseFloat(\"2000\"), loanID);\n JOURNAL_ENTRY_HELPER.checkJournalEntryForAssetAccount(assetAccount, now,\n new JournalEntry(Float.parseFloat(\"2000\"), JournalEntry.TransactionType.CREDIT),\n new JournalEntry(Float.parseFloat(\"1980\"), JournalEntry.TransactionType.DEBIT));\n\n JOURNAL_ENTRY_HELPER.checkJournalEntryForIncomeAccount(incomeAccount, now,\n new JournalEntry(Float.parseFloat(\"20\"), JournalEntry.TransactionType.DEBIT));\n\n loanSchedule.clear();\n loanSchedule = LOAN_TRANSACTION_HELPER.getLoanRepaymentSchedule(REQUEST_SPEC, RESPONSE_SPEC, loanID);\n fourthInstallment = loanSchedule.get(4);\n validateNumberForEqual(\"2020.00\", String.valueOf(fourthInstallment.get(\"totalOutstandingForPeriod\")));\n validateNumberForEqual(\"2000.00\", String.valueOf(fourthInstallment.get(\"principalOutstanding\")));\n validateNumberForEqual(\"20.00\", String.valueOf(fourthInstallment.get(\"interestOutstanding\")));\n validateNumberForEqual(\"0.00\", String.valueOf(fourthInstallment.get(\"feeChargesOutstanding\")));\n\n }", "public BigDecimal getLoanAmont() {\n return loanAmount == null ? BigDecimal.ZERO : loanAmount;\n }", "public void setAnnualIncome(int value) {\n this.annualIncome = value;\n }", "public Bank(double cash, double interest)\r\n {\r\n super(cash);\r\n this.interest = interest;\r\n }", "public LoanCompany(String str, CurrentBankAccount currBankAccount, ThreadGroup group) {\n \n super(group, str);\n \n this.currBankAccount = currBankAccount;\n this.companyGroup = group; \n \n c1[0] = new Transaction(university_names, 2550);\n c1[1] = new Transaction(university_names, 500);\n c1[2] = new Transaction(university_names, 1500);\n \n \n }", "public HISDate addYears(int numberOfYears) {\r\n GregorianCalendar gc = new GregorianCalendar(this.getYear(), this.getMonth() - 1, this.getDay());\r\n gc.add(Calendar.YEAR, numberOfYears);\r\n return new HISDate(gc.getTime());\r\n }", "public void setPeriod(int periodInYears) {\nnumberOfPayments = periodInYears * MONTHS;\n}" ]
[ "0.83322054", "0.68652654", "0.67955536", "0.6713729", "0.66644216", "0.64895993", "0.6460563", "0.614797", "0.6016528", "0.58425885", "0.5812335", "0.5800136", "0.579399", "0.5749996", "0.559929", "0.55849487", "0.5573042", "0.55505896", "0.5542063", "0.5538756", "0.5480698", "0.54729414", "0.54434144", "0.54275614", "0.5410568", "0.5364117", "0.5318752", "0.53069925", "0.5274153", "0.52550477", "0.52455723", "0.5237557", "0.52290213", "0.51989174", "0.51379347", "0.5135366", "0.50886106", "0.50880337", "0.50808346", "0.50778234", "0.507364", "0.5056088", "0.503141", "0.5024128", "0.5022999", "0.50161725", "0.49885833", "0.4969145", "0.4958643", "0.49448594", "0.4944297", "0.4944078", "0.49315593", "0.49205202", "0.49019727", "0.48938355", "0.48882896", "0.4882056", "0.48815238", "0.48759374", "0.48606956", "0.4848752", "0.4844089", "0.48426804", "0.4842079", "0.48392153", "0.48325774", "0.48313802", "0.48033407", "0.48020327", "0.47885177", "0.47843617", "0.4767373", "0.47450486", "0.4744231", "0.47374818", "0.47250122", "0.47202647", "0.47092044", "0.47050104", "0.46881166", "0.46684712", "0.46630654", "0.46537343", "0.46410102", "0.46392205", "0.46240076", "0.46217352", "0.461682", "0.46119922", "0.4611437", "0.46034133", "0.46028495", "0.4600443", "0.45972502", "0.45900026", "0.45894346", "0.45826995", "0.45736924", "0.45696807" ]
0.8419995
0
Provides the annual interest rate.
public double getAnnualInterestRate() { return annualInterestRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getAnnualInterestRate() {\n\t\treturn annualInterestRate;\n\t}", "public double getInterestRate(){\n return annualInterestRate;\n }", "public static double getInterestRate(){\n\t\t return interest_rate;\r\n\t }", "public double getMonthlyInterestRate() {\n return (annualInterestRate / 100) / 12 ;\n }", "public double getMonthlyInterestRate(){\n return annualInterestRate / 12;\n }", "public double getInterestRate() {\n return interestRate;\n }", "public double getMonthlyInterestRate() {\n return ((annualInterestRate / 100)/12);\n }", "double getMonthlyInterestRate(){\r\n\t\treturn annualInterestRate/12;\r\n\t}", "public static double getInterestRate() {\n return DEFAULT_INTEREST_RATE ;\n }", "public double getInterestRate(){\n return interestRate;\n }", "public double getInterest()\n {\n return interestRate;\n }", "public double getMonthlyInterestRate(){\n\t\tdouble monthlyInterestRate = (annualInterestRate/100) / 12;\n\t\treturn monthlyInterestRate;\n\t}", "public double getEarnedInterest()\n {\n return startingBalance * (interestRate / 12);\n }", "public double getInterestRate()\n {\n return this.interestRate;\n }", "public double calcInterest(){\n double interest = (interestRate + 1) * balance;\n return interest;\n }", "public double calcAnnualIncome()\r\n {\r\n return ((hourlyWage * hoursPerWeek * weeksPerYear) * (1 - deductionsRate));\r\n }", "public double getRate( ) {\nreturn monthlyInterestRate * 100.0 * MONTHS;\n}", "public double getBalancePlusInterest()\n {\n return startingBalance * (1 + (interestRate / 12));\n }", "public double getMonthlyInterest(){\n return balance * (getMonthlyInterestRate() / 100);\n }", "public double getInterest(){return this.interest_rate;}", "public double getMonthlyInterest() {\n return balance * getMonthlyInterestRate();\n }", "public void calcInterest() {\n double monthlyInterestRate = annualInterestRate / 12;\n double monthlyInterest = balance * monthlyInterestRate;\n balance += monthlyInterest;\n }", "public double getAccruedInterest() {\n return _accruedInterest;\n }", "public double getAccruedInterest() {\n return _accruedInterest;\n }", "public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}", "public double getInterest()\r\n {\r\n return interest;\r\n }", "public void GetInterest() {\n\t\tSystem.out.println(\"balance=\"+bal);\r\n\t\tinterest_rate=((bal/100)*10);\r\n\t\t\r\n\t\tSystem.out.println(\"Interest :- \"+ interest_rate);\r\n\t\tbal=(int) (bal+interest_rate);\r\n\t\tSystem.out.println(\"Balance after interest:- \"+bal );\r\n\t}", "public double getMonthlyInterest()\n\t\t {\n\t\t\t return balance * monthlyInterestRate;\n\t\t }", "public double getTotalAmountOfInterest(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly - principal_amount;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public double getInterest ()\n {\n return interest;\n }", "public void setAnnualInterestRate(double annualInterestRate) {\n this.annualInterestRate = annualInterestRate;\n }", "public void setAnnualInterestRate(double annualInterestRate) {\n this.annualInterestRate = annualInterestRate;\n }", "float getVacationAccrualRate();", "public BigDecimal getInterestAmount() {\n return interestAmount;\n }", "public static double calculateInterest(double amount, double interestRate) {\n\n return(amount * (interestRate / 100));\n\n }", "public String getAccountInterestRate(){\n if (currentAccount instanceof SavingAccount){\n Float myFloat;\n myFloat = ((SavingAccount)currentAccount).getInterestRate();\n return myFloat.toString();\n }\n else if (currentAccount instanceof NetSavingAccount){\n Float myFloat;\n myFloat = ((NetSavingAccount)currentAccount).getInterestRate();\n return myFloat.toString();\n }\n else if (currentAccount instanceof ChequeAccount){\n Float myFloat;\n myFloat = ((ChequeAccount)currentAccount).getInterestRate();\n return myFloat.toString();\n }\n else if (currentAccount instanceof FixedAccount){\n Float myFloat;\n myFloat = ((FixedAccount)currentAccount).getInterestRate();\n return myFloat.toString();\n }\n else{\n System.out.println(\"Get Account interestRate not found\");\n return \"error\";\n }\n }", "public double getMonthlyInterest(){\n\t\tdouble monthlyInterest = balance * getMonthlyInterestRate();\n\t\treturn monthlyInterest;\n\t}", "public double getRate() {\r\n\t\treturn (getRate(0)+getRate(1))/2.0;\r\n\t}", "@Override\r\n\tpublic double monthlyInterest() {\r\n\t\tdouble interest;\r\n \tif(isLoyal){\r\n \t//0.35%/12\r\n \t\tinterest = 0.35 / 100.0;\r\n \treturn interest / 12;\r\n \t} \r\n \telse //0.25%/12\r\n \t\tinterest = 0.25 / 100.0;\r\n \t\treturn interest / 12; \r\n\t}", "public int getAnnualIncome() {\n return annualIncome;\n }", "public double monthlyInterest() {\r\n\t\treturn (getBalance() * 0.0005) / 12;\r\n\t}", "public String getInterestAmount() {\r\n return interestAmount;\r\n }", "public static void modifyInterestRate(double interestRate){\n annualInterestRate = interestRate;\n }", "public int annualSalary(){\r\n int aSalary = monthlySalary * MONTHS;\r\n return aSalary;\r\n }", "public void setAnnualInterestRate(double annualInterestRate) {\n\t\tthis.annualInterestRate = annualInterestRate;\n\t}", "double getRate();", "public void add_interest ()\r\n {\r\n\r\n balance += balance * (rate + BONUS_RATE);\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public void setInterest(double rate)\n {\n interestRate = rate;\n }", "public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }", "public void add_interest () \r\n {\r\n balance += balance * rate;\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public void calcInterest() {\n\t\tbalance = balance + (interestPct*balance);\n\t\t}", "@Override\n public double interestEarned(double amount, Date dateOfLastWithdrawal) {\n double result;\n\n if (amount <= 1000) {\n result = amount * 0.02;\n } else if (amount <= 2000) {\n result = 20 + (amount - 1000) * 0.05;\n } else {\n result = 70 + (amount - 2000) * 0.1;\n }\n\n Date currentDateBefore10Days = DateProvider.getInstance().getCurrentDateBefore10Days();\n if (dateOfLastWithdrawal != null && dateOfLastWithdrawal.before(currentDateBefore10Days)) {\n result = result * 1.05;\n }\n\n return result;\n }", "@Override\n public double annualSalary(){\n double bonus = 0.00;\n\n if(currentStockPrice > 50){\n bonus = 30000;\n }\n\n return (super.annualSalary() + bonus);\n }", "public double getAverageRate() {\n return (leftEnc.getRate() + rightEnc.getRate()) / 2;\n }", "public double impurity();", "@Override\r\n\tpublic double annualSalary() {\r\n\t\tdouble baseSalary;\r\n\t\tdouble annualSalary;\r\n\t\tdouble annualCommissionMax = Math.min((annualSales * .02), 20000.0);\r\n\t\tbaseSalary = (getSalaryMonth() * 12);\r\n\t\tannualSalary = baseSalary + annualCommissionMax;\r\n\t\r\n\t\treturn annualSalary;\r\n\t}", "@Override\n\tint getRateOfInterest() {\n\t\treturn 7;\n\t}", "@Override\n public double getAnnualSalary() {\n return super.getAnnualSalary() + 10000;\n }", "public double cal_SimpleInterest(double principleAmt,double rateofInterest,double timePeriod )\r\n\t{\r\n\t\treturn(((principleAmt* rateofInterest*timePeriod)/100));\r\n\t}", "public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }", "public void earnMonthlyInterest(){\r\n\t\tbalance += balance * getYearlyInterestRate() / 12 ;\r\n\t}", "public Rate rate() {\n _initialize();\n return rate;\n }", "public static final double annualSavingsNeeded (\n double f,\n double r,\n double t )\n //////////////////////////////////////////////////////////////////////\n {\n return f * r / ( Math.pow ( 1.0 + r, t ) - 1.0 );\n }", "public void InterestRate() {\n\t\t\tSystem.out.println(\"9 percent\");\n\t\t}", "public double getMarketValueTaxRate(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).MarketValueTax();\r\n }", "public BigDecimal getEntrustPaidRate() {\n return entrustPaidRate;\n }", "public String interestRate_AftrLogin() {\n\t\treturn helper.getText(interestRate);\n\t}", "public float getAnnualSalary()\n {\n return annualSalary;\n }", "public double calculateRate() {\n\t\tdouble rate = 0;\n\t\tfor (int i = 0; i < upgrades.size(); i++) {\n\t\t\trate += upgrades.get(i).getProduction();\n\t\t}\n\t\tbrain.setRate(rate);\n\t\treturn rate;\n\t}", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public double getRate() {\n return rate;\n }", "public double getRate() {\n return rate;\n }", "public void setInterestRate(double interestRate) {\n this.interestRate = interestRate;\n }", "public void increaseInterest() {\n\t\tthis.balance *= (1 + interestRate);\n\t}", "public java.math.BigDecimal getIndicativeExchangeRate() {\r\n return indicativeExchangeRate;\r\n }", "public double getRate() {\n\t\treturn rate;\n\t}", "@Override\n public double calculateInterest(double amount) {\n\t\treturn ( hasWithdrawalInPast10Days() ? 0.001 : 0.05 ) * amount;\n }", "public Integer getRate() {\r\n return rate;\r\n }", "public double getHourlyRate()\n\t{\n\t\treturn hourlyRate;\n\t}", "public double getHourlyRate () {\n\t\treturn this.hourlyRate;\n\t}", "@Override\n\tpublic double calRate() {\n\t\treturn 0.9f;\n\t}", "public double getReturnRate() {\n return returnRate;\n }", "public Money getInterestDue();", "public BigDecimal getINSURANCE_AMOUNT() {\r\n return INSURANCE_AMOUNT;\r\n }", "public String getInterest() {\n return interest;\n }", "@Override\n public int annualSalary() {\n int commission;\n if (getAnnualSales() * getCommissionAmount() > getMaximumCommission()) { //Checks if the commission would be over the max\n commission = (int) getMaximumCommission();\n } else {\n commission = (int) (getAnnualSales() * getCommissionAmount());\n }\n return (this.getSalary() * getMonthInYear()) + commission;\n }", "public double getPayRate()\r\n\t{\r\n\treturn payRate;\r\n\t}", "public double getIntAnual() {\n return intAnual;\n }", "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public double earnings() {\n\t\treturn getCommissionRate()+getGrossSales();\r\n\t}", "double getLearningRate();", "@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }", "@java.lang.Override\n public float getVacationAccrualRate() {\n return vacationAccrualRate_;\n }", "public double taxRate () {\n return taxRate;\n }", "@java.lang.Override\n public float getVacationAccrualRate() {\n return vacationAccrualRate_;\n }", "public BigDecimal getTaxRate() {\n\n\t\tBigDecimal totalTaxRate = getBasicTaxRate().add(getImportTaxRate());\n\n\t\treturn totalTaxRate;\n\t}", "public double getLearningRate() {\r\n\t\treturn learningRate;\r\n\t}", "public int getYearlyBonus(){\n return this.yearlyBonus;\n }", "public int getRate() {\n return rate_;\n }" ]
[ "0.827151", "0.8058885", "0.7826095", "0.7743423", "0.7721606", "0.7680758", "0.7631817", "0.7590641", "0.7493326", "0.7460857", "0.7443071", "0.73960066", "0.73174304", "0.72795504", "0.7242775", "0.7225746", "0.7205338", "0.70692825", "0.69836116", "0.69655776", "0.6886179", "0.6876077", "0.6810333", "0.6810333", "0.680718", "0.6746569", "0.66987014", "0.6680438", "0.6630703", "0.65918946", "0.65651697", "0.65651697", "0.6546633", "0.6544446", "0.6513135", "0.64928657", "0.64883465", "0.648547", "0.64625835", "0.64369845", "0.6429156", "0.6386531", "0.63604856", "0.63246864", "0.63188076", "0.6302412", "0.62722355", "0.6248423", "0.6248331", "0.6201271", "0.61836755", "0.61772406", "0.6141045", "0.6136511", "0.6129434", "0.6123829", "0.61217767", "0.6104292", "0.61005294", "0.61001", "0.60850626", "0.6076668", "0.6071164", "0.6070494", "0.6063398", "0.59993297", "0.5983225", "0.5982488", "0.5976175", "0.59759456", "0.59606904", "0.59606904", "0.5948696", "0.5948628", "0.59365594", "0.5933207", "0.5924579", "0.5915308", "0.5905499", "0.5897354", "0.5887034", "0.58853805", "0.5873356", "0.58721554", "0.5865415", "0.585962", "0.58589864", "0.58577657", "0.58571863", "0.58552104", "0.5852965", "0.58499265", "0.5847828", "0.58392286", "0.58389825", "0.5837313", "0.58367306", "0.58367044", "0.5826268" ]
0.84106857
1
Sets the annual interest rate.
public void setAnnualInterestRate(double annualInterestRate) { this.annualInterestRate = annualInterestRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void modifyInterestRate(double interestRate){\n annualInterestRate = interestRate;\n }", "public void setInterest(double rate)\n {\n interestRate = rate;\n }", "public void setAnnualInterestRate(double annualInterestRate) {\n\t\tthis.annualInterestRate = annualInterestRate;\n\t}", "public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}", "public void setInterestRate(double interestRate) {\n this.interestRate = interestRate;\n }", "public void setInterestRate(double newInterestRate)\n {\n if (!(newInterestRate >= 0.0))\n {\n System.err.println(\"Interest rate must be positive.\");\n }\n else\n {\n this.interestRate = newInterestRate;\n }\n }", "public void setInterestRate(double newInterestRate) \n\t{\n\t\tinterestRate = newInterestRate;\n\t}", "public void setAnnualIncome(int value) {\n this.annualIncome = value;\n }", "public double getAnnualInterestRate() {\n return annualInterestRate;\n }", "public double getAnnualInterestRate() {\n return annualInterestRate;\n }", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public double getAnnualInterestRate() {\n\t\treturn annualInterestRate;\n\t}", "public void increaseInterest() {\n\t\tthis.balance *= (1 + interestRate);\n\t}", "public Saving interestRate(String interestRate) {\n this.interestRate = interestRate;\n return this;\n }", "public double getInterestRate(){\n return annualInterestRate;\n }", "public void setAAALethalityRate(int value) {\n this.aaaLethalityRate = value;\n }", "public void earnMonthlyInterest(){\r\n\t\tbalance += balance * getYearlyInterestRate() / 12 ;\r\n\t}", "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public void setRate();", "public void setLearningRate(double rate);", "public void changeTaxRate (double value) {\n this.taxRate = value;\n }", "public static void setTaxRate(double taxRateIn) {\n taxRate = taxRateIn;\n }", "public Object setintrate(double rate)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setintrate : \" + \"Agent\");\r\n/* 67 */ \tthis.intrate = rate;\r\n/* 68 */ \tthis.intratep1 = (this.intrate + 1.0D);\r\n/* 69 */ \treturn this;\r\n/* */ }", "public static void setInfectionRate(double newRate) {\n infectionRate = newRate;\n }", "public static double getInterestRate(){\n\t\t return interest_rate;\r\n\t }", "public abstract void setRate();", "public void add_interest ()\r\n {\r\n\r\n balance += balance * (rate + BONUS_RATE);\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public Savings_Account (int account_num, double initial_balance, double interest_rate) \r\n {\r\n\r\n super (account_num, initial_balance);\r\n\r\n rate = interest_rate;\r\n\r\n }", "public double getInterestRate() {\n return interestRate;\n }", "public void add_interest () \r\n {\r\n balance += balance * rate;\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public double getMonthlyInterestRate(){\n return annualInterestRate / 12;\n }", "public void calcInterest() {\n double monthlyInterestRate = annualInterestRate / 12;\n double monthlyInterest = balance * monthlyInterestRate;\n balance += monthlyInterest;\n }", "public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }", "public void setRate(Integer rate) {\r\n this.rate = rate;\r\n }", "public void setLearningRate(final double rate) {\n\t\tthis.learningRate = rate;\n\t}", "public void setRate(int rate) { this.rate = rate; }", "double getMonthlyInterestRate(){\r\n\t\treturn annualInterestRate/12;\r\n\t}", "public double getInterestRate(){\n return interestRate;\n }", "protected void onChange_EncounterRate() {\n onChange_EncounterRate_xjal( EncounterRate );\n }", "void setIncome(double amount);", "public void setInterestAmount(BigDecimal interestAmount) {\n this.interestAmount = interestAmount;\n }", "public void applyInterest(double rate) {\n if ((rate > 0) && (balance < 0)) {\n withdraw((int) (-balance*rate));\n } \n if ((rate > 0) && (balance > 0)) {\n deposit((int) (balance*rate));\n }\n }", "public SavingsAccount(double balance, String id, double interestRate) {\r\n\t\tsuper(balance, id);\r\n\t\tif(interestRate < 0){\r\n\t\t\tValidation.reportError(\"Invalid Interest Rate\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\tYearlyInterestRate = interestRate;\r\n\t\t}\r\n\t\t\r\n\t}", "public void setRate(double newRate) {\n this.rate = newRate;\n }", "public Bonus_Saver_Account (int account_num,double initial_balance, double interest_rate)\r\n {\r\n\r\n super (account_num, initial_balance, interest_rate);\r\n\r\n }", "public Saving bonusTotalInterestRate(String bonusTotalInterestRate) {\n this.bonusTotalInterestRate = bonusTotalInterestRate;\n return this;\n }", "public static double getInterestRate() {\n return DEFAULT_INTEREST_RATE ;\n }", "public double getMonthlyInterestRate() {\n return (annualInterestRate / 100) / 12 ;\n }", "public boolean setInterest( int days ) {\n\n\t\t// Interest is disabled by setting the rate to 0\n\t\tif (days == 0) {\n\t\t\trate = 0;\n\t\t\tBankMaster.plugin.getLogger().info(\"interest is disabled.\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Double-up days can't be negative or more than a year\n\t\tif (days < 0 || days > 365)\n\t\t\treturn false;\n\t\trate = Math.pow(2, 1.0/days);\n\t\tBukkit.getLogger().info(\"BankMaster interest rate = \" + rate);\n\t\treturn true;\n\t}", "public void setEntrenchmentRate(int value) {\n this.entrenchmentRate = value;\n }", "public double getMonthlyInterestRate() {\n return ((annualInterestRate / 100)/12);\n }", "public Builder setRate(int value) {\n \n rate_ = value;\n onChanged();\n return this;\n }", "public void updateRate(double r){\r\n rate *= r;\r\n }", "public void setLearningRate(double learningRate) {\n this.learningRate = Math.max(0.0, Math.min(1.0, learningRate));\n }", "public void setLearningRate(double learningRate) {\r\n\t\tthis.learningRate = learningRate;\r\n\t}", "public SavingsAccount(String accNumber, String accName, double rate) {\n\t\tsuper(accNumber, accName);\n\t\tinterestRate = rate;\n\t}", "public void setYearlyBonus(int yearlyBonus){\n this.yearlyBonus = yearlyBonus;\n }", "public void applyInterest()\n {\n deposit( (getBalance()* getInterestRate()) /12);\n }", "public double getMonthlyInterestRate(){\n\t\tdouble monthlyInterestRate = (annualInterestRate/100) / 12;\n\t\treturn monthlyInterestRate;\n\t}", "public void setHourlyRate (double hourlyRate) {\r\n // if hourlyRate is negative, hourlyRate is 0\r\n if (hourlyRate < 0) {\r\n this.hourlyRate = 0;\r\n }\r\n else {\r\n this.hourlyRate = hourlyRate;\r\n }\r\n // calls calculateSalary to update the salary once hourlyRate is changed\r\n calculateSalary();\r\n }", "public double getInterest()\n {\n return interestRate;\n }", "public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }", "public void calcInterest() {\n\t\tbalance = balance + (interestPct*balance);\n\t\t}", "public double getRate( ) {\nreturn monthlyInterestRate * 100.0 * MONTHS;\n}", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {\n this.annualInterestRate = annualInterestRate;\n this.numberOfYears = numberOfYears;\n this.loanAmount = loanAmount;\n loanDate = new java.util.Date();\n }", "public void setCurrentYear(BigDecimal currentYear) {\n this.currentYear = currentYear;\n }", "public double getInterest(){return this.interest_rate;}", "public void setEngineeringRate(int value) {\n this.engineeringRate = value;\n }", "public Saving interestToYearUltimo(String interestToYearUltimo) {\n this.interestToYearUltimo = interestToYearUltimo;\n return this;\n }", "void setIncome(double newIncome) throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "public abstract void setDiscountRate(double discountRate);", "public void setHourlyRate(double hr)\n\t{\n\t\thourlyRate = hr;\n\t}", "public void interestIncrease(){\r\n for (SavingsAccount account : saving){\r\n if (account == null){\r\n break;\r\n }\r\n account.addInterest();\r\n }\r\n }", "public double getInterestRate()\n {\n return this.interestRate;\n }", "public void setHourlyRate(double newPayRate){\r\n if(newPayRate>=MINIMUMWAGE)\r\n hourlyRate = newPayRate;\r\n else\r\n throw new IllegalArgumentException(\"The hourly rate must be greater than or equal to\"+MINIMUMWAGE);\r\n }", "public void setHourlyRate(double rate) {\n\t\tthis.hourlyRate = rate;\n\t}", "public void updateInterest(){\n //Caculate when all fields are available\n String amountStr = amountInput.getText().toString();\n String yieldStr = annualizedYieldInput.getText().toString();\n String bankStr = bankInput.getText().toString();\n\n if (mStartDate!=null && mEndDate!=null\n && !Utils.isNullOrEmpty(amountStr)\n && !Utils.isNullOrEmpty(yieldStr)\n && !Utils.isNullOrEmpty(bankStr)){\n\n float days = Utils.getDiffDays(mStartDate,mEndDate);\n mAmount = Float.valueOf(amountStr);\n mYield = Float.valueOf(yieldStr);\n\n //Caculate the value\n mInterest = mAmount * (mYield/100)*(days/ Constants.DAYS_OF_ONE_YEAR);\n mInterest = Utils.roundFloat(mInterest);\n //Update the interest in UI\n expectedInterestInput.setText(Utils.formatFloat(mInterest));\n Log.d(Constants.LOG_TAG, \"start = \" + mStartDate.toString() + \"\\nend = \" + mEndDate.toString()\n + \"\\ndays = \" + days + \"\\namount = \" + mAmount + \"\\nyield = \" + mYield + \"\\ninterest = \" + mInterest);\n }\n }", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount)\n {\n setAnnualInterestRate(annualInterestRate);\n setNumberOfYears(numberOfYears);\n setLoanAmount(loanAmount);\n loanDate = new Date();\n }", "void setAngle(double angle);", "public void changeDiscountRate (double value) {\n this.discountRate = value;\n }", "public void setTaxRate(double taxRate) {\n this.taxRate = taxRate;\n }", "public void InterestRate() {\n\t\t\tSystem.out.println(\"9 percent\");\n\t\t}", "public void setDefaultOvertimeRate(Rate rate)\r\n {\r\n m_defaultOvertimeRate = rate;\r\n }", "public static void updateCalorieRate(Person person) {\n\n double calorieRate = person.getCalorieRate();\n updatePerson(person, \"usercaloryrate\", calorieRate);\n }", "public BondInterestIndexedSecurity(final Annuity<N> nominal, final Annuity<C> coupon, final double settlementTime, final double accruedInterest,\n final double factorToNextCoupon,\n final YieldConvention yieldConvention, final int couponPerYear, final PaymentFixed settlement, final String issuer, final IndexPrice priceIndex) {\n this(nominal, coupon, settlementTime, accruedInterest, factorToNextCoupon, yieldConvention, couponPerYear, settlement,\n new LegalEntity(null, issuer, null, null, null), priceIndex);\n }", "public void SetLearnRate (double alpha) { this.alpha = alpha; }", "protected InterestRate() {\n\t}", "public static double calculateInterest(double amount, double interestRate) {\n\n return(amount * (interestRate / 100));\n\n }", "public double calcInterest(){\n double interest = (interestRate + 1) * balance;\n return interest;\n }", "public static void setRatings (double irating){\n\t\t\t//ratings = irating;\n\t\t\tr = irating;\n\t}", "public void setLBR_TaxRate (BigDecimal LBR_TaxRate);", "public BondInterestIndexedSecurity(final Annuity<N> nominal, final Annuity<C> coupon, final double settlementTime, final double accruedInterest,\n final double factorToNextCoupon,\n final YieldConvention yieldConvention, final int couponPerYear, final PaymentFixed settlement, final LegalEntity issuer, final IndexPrice priceIndex) {\n super(nominal, coupon, settlementTime, issuer);\n ArgumentChecker.notNull(yieldConvention, \"Yield convention\");\n ArgumentChecker.notNull(settlement, \"Settlement\");\n ArgumentChecker.notNull(priceIndex, \"Price Index\");\n _yieldConvention = yieldConvention;\n _accruedInterest = accruedInterest;\n _couponPerYear = couponPerYear;\n _factorToNextCoupon = factorToNextCoupon;\n _settlement = settlement;\n _priceIndex = priceIndex;\n\n }", "public void setInterest(String interest) {\n this.interest = interest;\n }", "public void setLBR_ICMSST_TaxRate (BigDecimal LBR_ICMSST_TaxRate);", "public void setRate(String rate) {\r\n for (int index = 0; index < RATES.length; ++index){\r\n if (RATES[index].equals(rate)) {\r\n Rate = index;\r\n }\r\n }\r\n }", "public void setAmount(double amount) {\nloanAmount = amount;\n}", "public void setNetTotalIncurred(gw.api.financials.CurrencyAmount value);", "void setIVA(float iva);", "public void setRate(float rate) {\n\t\tthis.rate = rate;\n\t}" ]
[ "0.7652004", "0.7614111", "0.7332631", "0.7179029", "0.70576936", "0.6760844", "0.6619691", "0.63155144", "0.628289", "0.628289", "0.6276923", "0.6217384", "0.61651635", "0.60440266", "0.59668154", "0.5896842", "0.58729935", "0.5846255", "0.57928956", "0.5772212", "0.5747549", "0.57272243", "0.5727151", "0.572694", "0.5724844", "0.5712647", "0.5702046", "0.5698824", "0.562578", "0.56163114", "0.5606495", "0.56047696", "0.55980283", "0.55887157", "0.5579025", "0.55581063", "0.5551833", "0.5539653", "0.55363595", "0.5512429", "0.54883665", "0.54643404", "0.5456888", "0.54431397", "0.54394734", "0.54256546", "0.54256403", "0.542422", "0.540719", "0.5405095", "0.53935134", "0.53578585", "0.53564495", "0.5349713", "0.5346245", "0.53402746", "0.5328209", "0.53205884", "0.5317448", "0.5312381", "0.5301636", "0.5295851", "0.5285976", "0.5261313", "0.52489483", "0.52387726", "0.5221688", "0.5219269", "0.52165306", "0.52073115", "0.5201216", "0.5196488", "0.51789373", "0.5173915", "0.5170382", "0.5165033", "0.5151819", "0.5151277", "0.5148999", "0.5144419", "0.514064", "0.5108317", "0.5105344", "0.50687045", "0.50630254", "0.50534403", "0.5038863", "0.5038066", "0.50359", "0.50304645", "0.5026693", "0.5025393", "0.50158906", "0.49924853", "0.4989477", "0.4974721", "0.49746168", "0.49561095", "0.49544737" ]
0.75483996
3
Provides the number of years a loan is active for.
public int getNumberOfYears() { return numberOfYears; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getYears();", "public int getYearsUntilTenure(){\n return m_yearsUntilTenure;\n }", "private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}", "public int getYears() {\n return this.years;\n }", "public int getYears() {\r\n\t\treturn years;\r\n\t}", "public int getNoYears(){return this.no_years;}", "@Override\r\n\tpublic int yearsTillRetirement() //calculate years until retirement\r\n\t{\n\t\tint retire = (int)Math.round((35 - (super.getYears() + (double)(usedUnpaidVacation + usedVacation* 2 + usedSickDays)/260)));\r\n\t\t\r\n\t\treturn retire;\r\n\t\t\r\n\t\t\r\n\t}", "public int getLoan() {\n\t\treturn loan;\n\t}", "public int getNumberOfYears() {\r\n return yearLabels.length;\r\n }", "int getAgeInYears(Person p);", "public int getYearlyBonus(){\n return this.yearlyBonus;\n }", "@SuppressWarnings(\"static-access\")\r\n\tprivate int calculateAge()\r\n\t{\r\n\t\tGregorianCalendar now = new GregorianCalendar();\r\n\t\tnow = new GregorianCalendar(now.YEAR, now.MONTH, now.DATE);//simplifys the date so there is no problem with times\r\n\t\tGregorianCalendar birthDay = new GregorianCalendar(now.YEAR, bDate.MONTH, bDate.DATE);\r\n\t\tint age = 0;\r\n\t\tif(now.before(birthDay) || now.equals(birthDay))\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tage = now.YEAR - bDate.YEAR;\r\n\t\t\tage--;\r\n\t\t}\r\n\t\treturn age;\r\n\t}", "public int getTotalYearToDate() {\n\n LocalDate endOfPeriod = this.getCancelDate();\n if (null == endOfPeriod) {\n endOfPeriod = LocalDate.now();\n }\n\n Period periodBetween = Period.between(this.getPeriodStartDate(), endOfPeriod);\n if (periodBetween.isNegative()) {\n return 0;\n }\n int monthsBetween = (int)periodBetween.toTotalMonths();\n\n /*Round any additional days into an entire month*/\n if (periodBetween.getDays() > 0) {\n monthsBetween++;\n }\n\n return monthsBetween * this.getMonthlyAmount();\n\n }", "public static long howManyYearsFromNow(LocalDateTime date){\n LocalDateTime now = LocalDateTime.now();\n return now.until(date, ChronoUnit.YEARS);\n }", "public int lengthOfYear() {\n\n return this.isLeapYear() ? 366 : 365;\n\n }", "public static int getAge(int yearBorn)\n {\n return 2016-yearBorn;\n }", "public int getAge() {\n Period period = Period.between(this.birthday, LocalDate.now());\n int age = period.getYears();\n int months = period.getMonths();\n int days = period.getDays();\n\n // Compensate for part-thereof of a year\n if (months > 0 || days > 0) {\n age += 1;\n } else if (months < 0 || days < 0) {\n age -= 1;\n }\n return age < 0\n ? 0 // Set age to zero if value is negative\n : age;\n }", "public int age() {\n int age = 0;\n /*MyDate currentDate = new MyDate(\n (Calendar.getInstance().get(Calendar.DATE)),\n (Calendar.getInstance().get(Calendar.MONTH) + 1),\n (Calendar.getInstance().get(Calendar.YEAR))\n );*/\n \n age = this.birthday.differenceInYears(currentDate);\n \n return age;\n }", "Integer getTenYear();", "public ArrayList<Integer> getYears() \r\n\t{\r\n\t\tint statingYear = 2000;\r\n\t\tint maxYear = 2050;\r\n\t\tArrayList <Integer>years = new ArrayList<Integer>(maxYear);\r\n\t\tfor (int year = statingYear; year <= maxYear; year++)\r\n\t\t\tyears.add(year);\r\n\t\treturn years;\r\n\t}", "public static int getAge(int yearBorn)\r\n {\r\n return LocalDate.now().getYear()-yearBorn;\r\n }", "public double getLoan()\r\n {\r\n return loan;\r\n }", "private double calculateYearlyLoyaltyPoints(int year){\n \tLoyalty txnLoyalty = compositePOSTransaction.getLoyaltyCard();\n\t\tif (txnLoyalty == null){\n\t\t\treturn 0.0;\n\t\t}else if(!txnLoyalty.isYearlyComputed()){\n\t\t\treturn 0.0;\n\t\t}\n\t\t\n\t\tif(com.chelseasystems.cr.swing.CMSApplet.theAppMgr!=null &&\n \t\t\tcom.chelseasystems.cr.swing.CMSApplet.theAppMgr.getStateObject(\"THE_TXN\") != null){\n \t\t// this is an inquiry\n\t\t\tif (year == 0) {\n\t\t\t\treturn txnLoyalty.getCurrYearBalance();\n\t\t\t} else {\n\t\t\t\treturn txnLoyalty.getLastYearBalance();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdouble loyaltyUsed = compositePOSTransaction.getUsedLoyaltyPoints();\n\t\tdouble points = compositePOSTransaction.getLoyaltyPoints();\n\n\t\tdouble currBal = txnLoyalty.getCurrBalance();\n\t\tdouble currYearBal = txnLoyalty.getCurrYearBalance();\n\t\tdouble lastYearBal = txnLoyalty.getLastYearBalance();\n\t\tif (loyaltyUsed > 0) {\n\t\t\tif (txnLoyalty.getLastYearBalance() < loyaltyUsed) {\n\t\t\t\tcurrYearBal = currYearBal - (loyaltyUsed - lastYearBal);\n\t\t\t\tlastYearBal = 0.0;\n\t\t\t} else {\n\t\t\t\tlastYearBal -= loyaltyUsed;\n\t\t\t}\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t} else {\n\t\t\tcurrBal -= loyaltyUsed;\n\t\t\tcurrYearBal -= loyaltyUsed;\n\t\t}\n\n\t\tif (txnLoyalty.isYearlyComputed()) {\n\t\t\tcurrYearBal += points;\n\t\t} else {\n\t\t\tcurrYearBal = 0.0;\n\t\t\tlastYearBal = 0.0;\n\t\t}\n\n\t\tif (year == 0) {\n\t\t\treturn currYearBal;\n\t\t} else {\n\t\t\treturn lastYearBal;\n\t\t}\n }", "public BigDecimal getCurrentYear() {\n return currentYear;\n }", "int getExpYear(String bookingRef);", "public static String calcAge(ArrayList<Lap> laptimes, LocalDate date) {\n\t\tint age = -1;\n\t\tLocalDate currentDate = LocalDate.now();\n\t\tage = Period.between(date, currentDate).getYears();\n\t\treturn Integer.toString(age);\n\t}", "public int getAgeInYears (Date today) {\n int maxAgeInYears = today.year - this.year;\n\n if (today.month > this.month || (today.month == this.month && today.day >= this.day)){\n return maxAgeInYears;\n }\n\n return maxAgeInYears - 1;\n }", "public static void calculateTheAge (int birthYear){\n int age = 2021 - birthYear;\n System.out.println(\"The person is \" + age + \" years old\");\n }", "public int getYearmade()\n {\n return yearmade;\n }", "public int getNoPaymentsYearly(){return this.no_payments_yearly;}", "public int getCycleYearsForComponent(Record record);", "public static long differenceInYears(LocalDateTime from, LocalDateTime to){\n return to.until(from, ChronoUnit.YEARS);\n }", "public int getYear()\n {\n return yr;\n }", "public int getYear() {\r\n\t\treturn (this.year);\r\n\t}", "private String getAge(Calendar born){\n Calendar today = Calendar.getInstance();\n\n\n int age = today.get(Calendar.YEAR) - born.get(Calendar.YEAR);\n\n if (today.get(Calendar.DAY_OF_YEAR) < born.get(Calendar.DAY_OF_YEAR)){\n age--;\n }\n\n Integer ageInt = new Integer(age);\n String ageS = ageInt.toString();\n\n return ageS;\n }", "public int getYear() {\n return year;\n }", "public int getYear() {\r\n return year;\r\n }", "public int getYear() {\r\n return year;\r\n }", "public int getYear() {\n return year;\n }", "public int getYear()\n {\n return year;\n }", "public static int getTodaysYear() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.year;\t\r\n\t\t\r\n\t}", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public int getUpperYear()\r\n {\r\n return getInt(UpperYear_, 0);\r\n }", "public int getYear(){\r\n\t\treturn year;\r\n\t}", "public Integer getYear() {\r\n return year;\r\n }", "public Integer getYear() {\r\n return year;\r\n }", "public int getYear() {\n return year;\n }", "private static int returnsCurrentYear() {\n\t\treturn Calendar.getInstance().get(Calendar.YEAR);\n\t}", "public int getYear () {\n return year;\n }", "public int getYear() {\r\n return this.year;\r\n }", "public int getYear(){\n\t\treturn year;\n\t}", "public int getYear(){\n\t\treturn year; \n\t}", "public static int calculateYears ( double principal, double interest, double tax, double desired){\n\n int y = 0;\n while (principal < desired) {\n principal = (principal * (interest + 1)) - ((principal * interest) * tax);\n y++;\n }\n return y;\n }", "public int getYearReleased(){\n\t\treturn this.YEAR_RELEASED;\n\t}", "public List<Integer> getListYears() {\n return listYears;\n }", "public int getYear() {\n\n return this.cyear;\n\n }", "public String asYear() {\n \treturn new SimpleDateFormat(\"yyyy\").format(expiredAfter);\n }", "public int getYearLevel(){\r\n return yearLevel;\r\n }", "public int getYear() {\n return DateUtil.YearFromString(rel);\n }", "public int getYear() {\n return endDate.getYear();\n }", "private int NumberLeapyearsSince1900 (int YearNumber) {\n int i = 1900;\n int countLeapyears = 0;\n for (i = 1900; i < YearNumber; i = i+4); {\n if (daysInYear(i) == 366) {\n countLeapyears ++;\n }\n } return countLeapyears;\n\n }", "int getAgeYearsRelativeToReferencePoint(Calendar anchorTime, Calendar testTime);", "public double getYear() {\n return year;\n }", "public Integer getLastYearAttended() {\n return lastYearAttended;\n }", "public double getLoanAmount() {\n return loanAmount;\n }", "public int getYear() {\n\t return year;\n\t}", "public static int getYearsBetween(Date dateOfBirth, Date date) {\n\t\treturn 0;\r\n\t}", "public int getYear() {\r\n\t\treturn year;\r\n\t}", "public int getYear() {\n\treturn year;\n }", "public int getYear() \n\t{\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn this.year;\n\t}", "public int getYear() { return year; }", "public int getYear() { return year; }", "public static void main(String[] args) {\n\n\t\tLocalDate current =LocalDate.now();\n\tLocalDate ld =\tLocalDate.of(1989, 11, 30);\n\t\t\n\tPeriod pd =\tPeriod.between(current, ld);\n\tSystem.out.println(pd.getYears());\n\t}", "public int getYearsOffice()\n {\n return yearsOffice;\n}", "public static int getYears(Date fechaNacimiento) {\n\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tint hoyDia = fechaActual.get(Calendar.DAY_OF_YEAR);\n\n\t\tCalendar nacimiento = Calendar.getInstance();\n\n\t\tnacimiento.setTime(fechaNacimiento);\n\t\tint nacimientoDia = nacimiento.get(Calendar.DAY_OF_YEAR);\n\n\t\t// Todavía no ha cumplido los años\n\t\tif (nacimientoDia - hoyDia < 0)\n\t\t\treturn fechaActual.get(Calendar.YEAR)\n\t\t\t\t\t- nacimiento.get(Calendar.YEAR) - 1;\n\t\telse\n\t\t\t// Ya ha cumplido los años\n\t\t\treturn fechaActual.get(Calendar.YEAR)\n\t\t\t\t\t- nacimiento.get(Calendar.YEAR);\n\n\t}", "int getYear();", "public int getYear() {\n\t\treturn year; \n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "static int countLeapYears(DaysBetween d) \n {\n int years = d.y;\n \n // Check if the current year needs to be considered\n // for the count of leap years or not\n if (d.m <= 2) \n {\n years--;\n }\n \n // An year is a leap year if it is a multiple of 4,\n // multiple of 400 and not a multiple of 100.\n return years / 4 - years / 100 + years / 400;\n }", "public static int getCurrentYear()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.YEAR);\n\t}", "public int getTravelsInYear(String year) {\n EntityManager em = getEntityManager();\n Calendar initDate = Calendar.getInstance();\n initDate.set(Calendar.DAY_OF_MONTH, 31);\n initDate.set(Calendar.MONTH, 11);\n initDate.set(Calendar.YEAR, Integer.parseInt(year)-1);\n Calendar endDate = Calendar.getInstance();\n endDate.set(Calendar.DAY_OF_MONTH, 1);\n endDate.set(Calendar.MONTH, 0);\n endDate.set(Calendar.YEAR, Integer.parseInt(year)+1);\n return ((Number) em.createNamedQuery(\"Viaje.getYearTravels\")\n .setParameter(\"initDate\", initDate.getTime())\n .setParameter(\"endDate\", endDate.getTime()).getSingleResult()).intValue();\n }", "public int getCurrentNumberOfPaymentsOtherLoans() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString query = \"SELECT current_payment_counter FROM loan \"\n\t\t\t\t\t\t+ \" WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\tif (rs.next())\n\t\t\t\treturn rs.getInt(1);\n\t\t\treturn 0;\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "public int getAge()\r\n\t{\r\n\t\tint age = calculateAge();\r\n\t\treturn age;\r\n\t}", "public int age(){\r\n\t\t//1000 ms = 1s, 60s = 1 min, 60 min = 1h, 24h = 1 day\r\n\t\t//1 Day = 1000 * 60 * 60 * 24\r\n\t\tlong divide = 1000 * 60 * 60 * 24;\r\n\t\tDate d = new Date();\r\n\t\tlong timeNow = d.getTime();\r\n\t\tlong pubDate = dateOfPublication.getTime();\r\n\t\t\r\n\t\tlong between = timeNow - pubDate;\r\n\t\t\r\n\t\tlong daysSincePub = between / divide;\r\n\t\treturn (int) daysSincePub;\r\n\t}", "public int getCouponPerYear() {\n return _couponPerYear;\n }", "public int getYear() {\n\t\treturn year;\n\t}", "public int getAnnualIncome() {\n return annualIncome;\n }", "public int getYearFounded() {\n\t\treturn yearFounded;\n\t}", "public int annualSalary(){\r\n int aSalary = monthlySalary * MONTHS;\r\n return aSalary;\r\n }", "@Override\n\tpublic int getYear() {\n\t\treturn _esfShooterAffiliationChrono.getYear();\n\t}", "public int getMaxYearAmount() {\r\n return maxYearAmount;\r\n }", "public int getLowerYear()\r\n {\r\n return getInt(LowerYear_, 0);\r\n }", "public int getYear() {\n\treturn year;\n}", "public double getTotalHrsForYear() {\n return totalHrsForYear;\n }", "public int getNumCreationYears() {\n\t\treturn numCreationYears;\n\t}" ]
[ "0.71602774", "0.70549023", "0.7027702", "0.7015681", "0.6903264", "0.6845713", "0.6702648", "0.6653057", "0.6636656", "0.6621055", "0.662064", "0.66160345", "0.65606123", "0.6560458", "0.64637136", "0.64496326", "0.644379", "0.6441581", "0.6404241", "0.6396017", "0.6380072", "0.6357663", "0.6347361", "0.63449806", "0.6331387", "0.63108057", "0.6290432", "0.6286132", "0.62724113", "0.6242234", "0.61846316", "0.6184249", "0.61835986", "0.61776185", "0.61731124", "0.61664855", "0.61632395", "0.61558515", "0.6154608", "0.6132996", "0.6130991", "0.6130613", "0.6130613", "0.6130613", "0.6123114", "0.61224914", "0.6120402", "0.6120402", "0.6117164", "0.6110821", "0.6109317", "0.61061615", "0.6103784", "0.61020505", "0.6086461", "0.60811377", "0.6073741", "0.60714775", "0.6066142", "0.60624945", "0.6060249", "0.60596985", "0.6058759", "0.6056061", "0.6052646", "0.6048795", "0.6048692", "0.60445935", "0.60444057", "0.6040118", "0.6035133", "0.60300094", "0.60236746", "0.6023196", "0.6023196", "0.60122734", "0.6005527", "0.600258", "0.5993898", "0.59934443", "0.59874797", "0.59874797", "0.59874797", "0.5986932", "0.5986225", "0.597122", "0.5970708", "0.59641075", "0.59627", "0.5956992", "0.5953216", "0.5946306", "0.59448075", "0.5934522", "0.59193325", "0.5916561", "0.5913321", "0.5910482", "0.59055394", "0.59038556" ]
0.74527234
0
Sets the number of years a loan is active for.
public void setNumberOfYears(int numberOfYears) { this.numberOfYears = numberOfYears; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setYears(int years) {\n this.years = years;\n }", "public void setYear(int value) {\n\tthis.year = value;\n }", "public void setYear(int _year) { year = _year; }", "public void setYear(int value) {\r\n this.year = value;\r\n }", "public void setYear (int yr) {\n year = yr;\n }", "public void setYearLevel(int newYearLevel){\r\n yearLevel = newYearLevel;\r\n }", "public void setPeriod(int periodInYears) {\nnumberOfPayments = periodInYears * MONTHS;\n}", "public void setYear(int y){\n\t\tyear = y ; \n\t}", "public void setYearlyBonus(int yearlyBonus){\n this.yearlyBonus = yearlyBonus;\n }", "@Override\n\tpublic void setYear(int year) {\n\t\t_esfShooterAffiliationChrono.setYear(year);\n\t}", "public void setYearsUntilTenure(int yearsUntilTenure){\n m_yearsUntilTenure = yearsUntilTenure;\n }", "public void setYear(int year) {\n\tthis.year = year;\n}", "public int getNumberOfYears() {\n return numberOfYears;\n }", "public void setYear(int year) {\r\n this.year = year;\r\n }", "public void setYear(int year)\n {\n this.year = year;\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(int year)\r\n\t{\r\n\t\tthis.year = year;\r\n\t}", "public void setYear(int year) {\n this.year = year;\n }", "public void yearEndNotification() {\n\t\tif ((this.isActive()) && (!this.hasInfiniteAge())) {\n\t\t\tage++;\n\n\t\t\tif (age >= maximum_age)\n\t\t\t\tactive_status = false;\n\t\t}\n\t}", "public void addYear(){\n\t\tyearAdd++;\n\t}", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public int getNoYears(){return this.no_years;}", "public void setAnnualIncome(int value) {\n this.annualIncome = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setYear(short value) {\n this.year = value;\n }", "public void setRecordingYear(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGYEAR, value);\r\n\t}", "public void setYear(int year) \n\t{\n\t\tthis.year = year;\n\t}", "public void setCurrentYear(BigDecimal currentYear) {\n this.currentYear = currentYear;\n }", "public void setYear(short value) {\r\n this.year = value;\r\n }", "public void setYear(short value) {\n this.year = value;\n }", "public int getYearsUntilTenure(){\n return m_yearsUntilTenure;\n }", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount) {\n this.annualInterestRate = annualInterestRate;\n this.numberOfYears = numberOfYears;\n this.loanAmount = loanAmount;\n loanDate = new java.util.Date();\n }", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public void increaseYearsWorked() {\n ++yearsWorked;\n }", "public void setYear(final int year) {\n\t\tthis.year = year;\n\t}", "int getYears();", "public Loan(double annualInterestRate, int numberOfYears, double loanAmount)\n {\n setAnnualInterestRate(annualInterestRate);\n setNumberOfYears(numberOfYears);\n setLoanAmount(loanAmount);\n loanDate = new Date();\n }", "public void setYear(int Year) {\n\t this.year= Year;\n\t}", "public int getYears() {\n return this.years;\n }", "public void setOriginalReleaseYear(java.lang.Integer value) {\r\n\t\tBase.set(this.model, this.getResource(), ORIGINALRELEASEYEAR, value);\r\n\t}", "@Override\r\n\tpublic int yearsTillRetirement() //calculate years until retirement\r\n\t{\n\t\tint retire = (int)Math.round((35 - (super.getYears() + (double)(usedUnpaidVacation + usedVacation* 2 + usedSickDays)/260)));\r\n\t\t\r\n\t\treturn retire;\r\n\t\t\r\n\t\t\r\n\t}", "public void setYear(int year) {\n\t\tthis.date.setYear(year);\n\t}", "public Loyalty(int l)\r\n\t{\r\n\t\tvalue = l;\r\n\t}", "public void setDocumentYear(int documentYear);", "public int getYears() {\r\n\t\treturn years;\r\n\t}", "@Override\n\tpublic void setYear(int year) throws RARException {\n\t\tthis.year = year;\n\t}", "public void setSelectedYear(int selectedYear) {\n this.selectedYear = selectedYear;\n }", "public void setYear(int year){\r\n\t\ttry{\r\n\t\t\tif(year>=1900)\r\n\t\t\tthis.year = year;\r\n\t\t\telse\r\n\t\t\t\tthrow new cardYearException();\r\n\t\t}catch(cardYearException ex){\r\n\t\t\tSystem.out.println(\"Baseball Cards weren't invented \"\r\n\t\t\t\t\t+ \"before 1900!\");\r\n\t\t\tSystem.out.print(\"Please enter a valid year: \");\r\n\t\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\tint retry = input.nextInt();\r\n\t\t\t\tsetYear(retry);\r\n\t\t}\r\n\t}", "Years createYears();", "public ConcreteYear(int year) {\r\n if (year > 0) {\r\n this.year = year;\r\n }\r\n }", "public void setPrevYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()-1);\n\n\t}", "public void setYear(String year)\r\n {\r\n this.year = year; \r\n }", "@JsonSetter(\"exp_year\")\r\n public void setExpYear (int value) { \r\n this.expYear = value;\r\n }", "public Builder setAge(int value) {\n bitField0_ |= 0x00000004;\n age_ = value;\n onChanged();\n return this;\n }", "public void setLastYearAttended(Integer lastYearAttended) {\n this.lastYearAttended = lastYearAttended;\n }", "@Override\n\tpublic void oneYearAgo(int year) {\n\n\t}", "public void setNextYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()+1);\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\n\t}", "public static void setRecordingYear(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.set(model, instanceResource, RECORDINGYEAR, value);\r\n\t}", "public void setYear(String value) {\n setAttributeInternal(YEAR, value);\n }", "public void setListYears(List<Integer> listYears) {\n this.listYears = listYears;\n }", "public void addYear(int amount) {\r\n int oldValue = getYear();\r\n calendarTable.getCalendarModel().addYear(amount);\r\n yearChanged(oldValue);\r\n }", "public int getYearlyBonus(){\n return this.yearlyBonus;\n }", "public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }", "public void setLoan(int loan) {\n\t\tthis.loan = loan;\n\t}", "public boolean setYear(int newYear) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\treturn true;\n\t}", "public int getYear(){\r\n\t\treturn year;\r\n\t}", "public void setExpirationYear(java.math.BigInteger expirationYear) {\r\n this.expirationYear = expirationYear;\r\n }", "Builder addCopyrightYear(Number value);", "@Test\n\tpublic void testYears() {\n\t\tint birthYear = 2000;\n\t\tint deathYear = 2019;\n\t\tPlot plot = new Plot();\n\t\t\n\t\tplot.setBirthYear(2000);\n\t\tassertEquals(plot.getBirthYear(), birthYear);\n\t\tplot.setDeathYear(2019);\n\t\tassertEquals(plot.getDeathYear(), deathYear);\n\t\t\n\t\tSystem.out.println(\"Birth and Death Years were successful.\");\n\t}", "public void addYear(int year) {\n if (month < 0) {\n subtractYear(year);\n return;\n }\n\n this.year += year;\n }", "public void setSelectedYear(int year) {\n this.selectedYear = year;\n }", "public void setMinYearAmount(int minYearAmount) {\r\n this.minYearAmount = minYearAmount;\r\n updateYearMenu();\r\n }", "public void setYearmade(int yearmade)\n {\n if(checker.acceptYearmade(Integer.toString(yearmade)))\n this.yearmade = yearmade;\n else\n this.yearmade = 0;\n }", "public void setCreditCardExpYY(int newCreditCardExpYY) {\n int CreditCardExpYY = newCreditCardExpYY;\n if (newCreditCardExpYY > 1999) {\n CreditCardExpYY = newCreditCardExpYY - 2000;\n }\n super.setCreditCardExpYY(CreditCardExpYY);\n }", "public static final Function<Date,Date> setYear(final int value) {\r\n return new Set(Calendar.YEAR, value);\r\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public YearToCentury(int year) // defining method YearToCentury with int value year\r\n\t{\r\n\t\tthis.year = year; // value of year = this.year\r\n\t}", "public void setYear (jkt.hms.masters.business.MasStoreFinancial year) {\n\t\tthis.year = year;\n\t}", "public void setMaxYearAmount(int maxYearAmount) {\r\n this.maxYearAmount = maxYearAmount;\r\n updateYearMenu();\r\n }", "public void setRecordingYear( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGYEAR, value);\r\n\t}", "public static void setOriginalReleaseYear(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.Integer value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALRELEASEYEAR, value);\r\n\t}", "public int getYear(){\n\t\treturn year;\n\t}", "public int getYear(){\n\t\treturn year; \n\t}", "private void configYears(){\n List<Integer> years = new ArrayList<>();\n for (int i = 1980; i <= 2019 ; i++)\n years.add(i);\n\n ArrayAdapter<Integer> adapter;\n adapter = new ArrayAdapter<Integer>(this, android.R.layout.simple_spinner_item, years);\n spYearMoto.setAdapter(adapter);\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public Builder setAge(int value) {\n \n age_ = value;\n onChanged();\n return this;\n }", "public BigDecimal getCurrentYear() {\n return currentYear;\n }", "public boolean setYear(int newYear, boolean check) {\n\t\tthis.year = newYear;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\tif (check) {\n\t\t\tdouble oldMonth = this.month;\n\t\t\tdouble oldDay = this.day;\n\t\t\tIDate dt = swe_revjul(this.jd, this.calType); // -> erzeugt neues\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Datum\n\t\t\tthis.year = dt.year;\n\t\t\tthis.month = dt.month;\n\t\t\tthis.day = dt.day;\n\t\t\tthis.hour = dt.hour;\n\t\t\treturn (this.year == newYear && this.month == oldMonth && this.day == oldDay);\n\t\t}\n\t\treturn true;\n\t}", "public void setAge(final int a) {\n this.age = a;\n }", "public int getYear() {\r\n return year;\r\n }", "public YearPanel(CalendarEx calendar) {\n initComponents();\n cal = calendar;\n year = CalendarEx.getCurrentYear();\n \n ListAppointMents();\n }", "public void setDiscYearly(Number value) {\n setAttributeInternal(DISCYEARLY, value);\n }", "public void setYear(int year) throws InvalidDateException {\r\n\t\tif (year <= 2100 & year >= 2000) {\r\n\t\t\tthis.year = year;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic year for the date (between 2000 and 2100) !\");\r\n\t\t}\r\n\t}" ]
[ "0.7002271", "0.66871", "0.6657304", "0.66516453", "0.66091126", "0.65313977", "0.65059614", "0.6505056", "0.64795744", "0.6416219", "0.63810617", "0.6305222", "0.6293492", "0.6287165", "0.6285803", "0.6258377", "0.6258377", "0.6228325", "0.62260705", "0.6208222", "0.62081724", "0.6202147", "0.6202147", "0.6202147", "0.6195348", "0.6180029", "0.6129103", "0.6117579", "0.6101713", "0.6101713", "0.6101713", "0.61000824", "0.60989565", "0.60950786", "0.6078571", "0.6072611", "0.60652846", "0.60506296", "0.60461396", "0.60461396", "0.60335696", "0.6032599", "0.5999663", "0.5968571", "0.5965869", "0.5922056", "0.5921628", "0.5901948", "0.5892678", "0.584534", "0.5839954", "0.58325434", "0.5820925", "0.5804323", "0.5803327", "0.5801867", "0.5789226", "0.57847285", "0.57655907", "0.5748484", "0.57449925", "0.57447135", "0.5741072", "0.5730425", "0.57258314", "0.5718952", "0.5687992", "0.5680235", "0.5675551", "0.5652992", "0.563323", "0.5632628", "0.56305385", "0.5622312", "0.5620723", "0.5618116", "0.56159776", "0.5614739", "0.56102586", "0.56061286", "0.56057686", "0.5590929", "0.5585191", "0.55799484", "0.5579211", "0.55745614", "0.55742997", "0.55693007", "0.55675685", "0.5566037", "0.55657", "0.5562999", "0.5562999", "0.5560894", "0.55605644", "0.55577046", "0.5546314", "0.5541331", "0.55411154", "0.5538" ]
0.70768213
0
Provides size of loan.
public double getLoanAmount() { return loanAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final long getSize() { return size; }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\r\n return size;\r\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public long getSize() {\n\t\treturn size;\n\t}", "public long getSize();", "public long getSize() {\n return size.get();\n }", "public int getTotalSize();", "public int getSize(){\n //To be written by student\n return localSize;\n }", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public String getSize() {\r\n return size;\r\n }", "public int getLength() {\n return mySize.getLength();\n }", "public long getTotalSize() {\n return totalSize;\n }", "public long getSize() {\n return mSize;\n }", "long getSize();", "public int getLocalSize();", "public double getSize() {\n return size_;\n }", "public double getSize() {\n return size_;\n }", "public int getSize()\n {\n return ll.getSize();\n }", "@Override\n\tpublic long size() {\n\t\t\n\t\treturn mySize;\n\t}", "int getTotalSize();", "public int getSize( )\n {\n return size;\n }", "public final int getSize() {\n return size;\n }", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "public Size getSize() {\n return size;\n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public double getSize() \n {\n return size;\n }", "int getLocalSize();", "public int getSize() {\n\n return size;\n }", "public int getSize() {\r\n return _size;\r\n }", "public int getSize() {\n return size;\n }", "public int getSize() { return size; }", "public int getSize() {\n return size;\n }", "public int getTotalSize() {\n return totalSize_;\n }", "public int getSize() {\r\n \treturn size;\r\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\r\n return size;\r\n }", "int getSize() {\n return size;\n }", "public long size() {\n\t\treturn size;\n\t}", "public int getSize() { \n return size;\n }", "private int getSize() {\n\t\t\treturn size;\n\t\t}", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int Size(){\n \treturn size;\n\t}", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize() {\n\treturn size;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize() {\r\n\t\treturn size;\r\n\t}", "public int getSize() {return size;}", "int getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn _size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public int getSize(){\n\t\treturn size;\n\t}", "public abstract long getSize();", "public int get_size();", "public int get_size();", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public Integer getSize() {\n return size;\n }", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "@ApiModelProperty(required = true, value = \"Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\\\"local\\\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\\\"not available\\\")\")\n\n public Long getSize() {\n return size;\n }", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "public int getSize() {\n return size;\n }", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();" ]
[ "0.7315282", "0.7248679", "0.7218554", "0.71969384", "0.71827996", "0.71827996", "0.71827996", "0.71827996", "0.71806216", "0.7150316", "0.71306187", "0.70788294", "0.70519936", "0.70395875", "0.7029868", "0.7029868", "0.7024958", "0.7010591", "0.69981295", "0.69937277", "0.6966434", "0.69658965", "0.69224155", "0.68798745", "0.6854916", "0.68543965", "0.6847547", "0.6833325", "0.6824279", "0.68235594", "0.6811962", "0.6811942", "0.6811657", "0.6809848", "0.68093294", "0.67772686", "0.6776738", "0.6769057", "0.6766043", "0.6758273", "0.6753932", "0.6752582", "0.6752582", "0.6752582", "0.6752582", "0.6752582", "0.6752582", "0.6752582", "0.6752582", "0.67403644", "0.6738374", "0.67322105", "0.67258704", "0.67216706", "0.6719952", "0.6719952", "0.6719952", "0.67198426", "0.67153513", "0.67131054", "0.67061883", "0.6705424", "0.670487", "0.670416", "0.6703049", "0.6700492", "0.66957134", "0.66957134", "0.66957134", "0.66957134", "0.6694748", "0.66869026", "0.66869026", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.66837823", "0.6671069", "0.66646546", "0.66646546", "0.66543", "0.6654251", "0.6651855", "0.6647288", "0.6647288", "0.6647288", "0.6647288", "0.6647288", "0.6647288", "0.6647288", "0.6647288", "0.6647288" ]
0.0
-1
Sets the size of loan.
public void setLoanAmount(double loanAmount) { this.loanAmount = loanAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(long value) {\n this.size = value;\n }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "public void setSize(int size){\n this.size = size;\n }", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "public void setSize(int size) {\r\n this.size = size;\r\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(Integer size) {\n this.size = size;\n }", "public com.autodesk.ws.avro.Call.Builder setObjectSize(java.lang.Long value) {\n validate(fields()[6], value);\n this.object_size = value;\n fieldSetFlags()[6] = true;\n return this; \n }", "public void setLocalSize(int size);", "public void set_size(int s);", "public void setSize(int size){\n\t\tthis.shipSize = size;\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final Builder size(long size) {\n this.size = size;\n return this;\n }", "public void setSize(double size) \n {\n this.size = size;\n }", "public void setSize(int value) {\n\t\tthis.size = value;\n\t}", "public void setSize(int size) {\n\tthis.sizeNumber = sizeNumber;\r\n}", "public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }", "public void setLength(long length);", "public void setLength(long length);", "void setLength( long length );", "public void setSize(TSizeInBytes size) {\n\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t members = size;\n\t}", "public static void setHotelSize(int size) {\r\n\t\tfor(int count = 0;count< size; count++) {\r\n\t\t\thotel_size.add(count + 1);\r\n\t\t}\r\n\t}", "public void setSize(int size);", "public void setSize(RMSize aSize) { setSize(aSize.width, aSize.height); }", "public void setSize(String size) {\n this.size = size;\n }", "public void setValue(int size) {\n s.setValue(-size);\n }", "public abstract void adjustSize(long size);", "private void setSize(int s){\n\t\tsize = s;\n\t}", "public Builder setSize(int value) {\n\n size_ = value;\n onChanged();\n return this;\n }", "public Builder setSize(int value) {\n\n size_ = value;\n onChanged();\n return this;\n }", "void setLength(int length);", "public void setLength( int length ) { setCapacity( length ); this.length = length; }", "public void setSize(int newSize);", "public void setSize(int newSize);", "public void setLength(double newLength) {\n length = newLength;\n }", "@Override\n\tpublic void SetLength(long value)\n\t{\n\t\tthrow new UnsupportedOperationException(\"TarInputStream SetLength not supported\");\n\t}", "protected void setArraySize(int arraySize){\r\n\t \tthis.arraySize = arraySize;\r\n\t }", "public void setSize(String size) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "public void setLength(long length) { \n this.length = length; \n }", "public void setListSize(int value) {\n this.listSize = value;\n }", "public void setStructureSize(int size) {\n\t\tmStructureSize = size;\n\t\tvalidateSize();\n\t\trepaint();\n\t\t}", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setHeight(int l){\n \theight = l;\n }", "public void setLength(int length)\n {\n this.length = length;\n }", "protected void setMaxSize(int size) {\n maxSize = size;\n }", "public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}", "public void setCurrentLength(long currentLength) { \n this.currentLength = currentLength; \n }", "synchronized void setLength(int length) {\n this.length = length;\n }", "public void setSizeType(int type) {\n\t\tif (sizeType == type)\n\t\t\treturn;\n\t\tif (type != LMOptions.SMALL && type != LMOptions.LARGE && type != LMOptions.VARY)\n\t\t\treturn;\n\t\t\n\t\tdouble scale = parentLattice.getScale();\n\t\tdouble dotSize = DOT_NODE_SIZE * scale;\n\t\tdouble smallSize = SMALL_NODE_SIZE * scale;\n\t\tdouble largeSize = LARGE_NODE_SIZE * scale;\n\t\t\n\t\tif (type == LMOptions.SMALL && sizeType == LMOptions.LARGE) {\n\t\t\tsizeType = LMOptions.SMALL;\n\t\t\tdouble x = shape.getX() + ((largeSize - smallSize) / 2.0);\n\t\t\tdouble y = shape.getY() + ((largeSize - smallSize) / 2.0);\n\t\t\tshape.setFrame(x, y, smallSize, smallSize);\n\t\t}\n\n\t\telse if (type == LMOptions.SMALL && sizeType == LMOptions.VARY) {\n\t\t\tsizeType = LMOptions.SMALL;\n\t\t\tif (ownObject) {\n\t\t\t\tdouble x = shape.getX() + ((largeSize - smallSize) / 2.0);\n\t\t\t\tdouble y = shape.getY() + ((largeSize - smallSize) / 2.0);\n\t\t\t\tshape.setFrame(x, y, smallSize, smallSize);\n\t\t\t} else {\n\t\t\t\tdouble x = shape.getX() - ((smallSize - dotSize) / 2.0);\n\t\t\t\tdouble y = shape.getY() - ((smallSize - dotSize) / 2.0);\n\t\t\t\tshape.setFrame(x, y, smallSize, smallSize);\n\t\t\t}\n\t\t}\n\n\t\telse if (type == LMOptions.LARGE && sizeType == LMOptions.SMALL) {\n\t\t\tsizeType = LMOptions.LARGE;\n\t\t\tdouble x = shape.getX() - ((largeSize - smallSize) / 2.0);\n\t\t\tdouble y = shape.getY() - ((largeSize - smallSize) / 2.0);\n\t\t\tshape.setFrame(x, y, largeSize, largeSize);\n\t\t}\n\n\t\telse if (type == LMOptions.LARGE && sizeType == LMOptions.VARY) {\n\t\t\tsizeType = LMOptions.LARGE;\n\t\t\tif (!ownObject) {\n\t\t\t\tdouble x = shape.getX() - ((largeSize - dotSize) / 2.0);\n\t\t\t\tdouble y = shape.getY() - ((largeSize - dotSize) / 2.0);\n\t\t\t\tshape.setFrame(x, y, largeSize, largeSize);\n\t\t\t}\n\t\t}\n\n\t\telse if (type == LMOptions.VARY && sizeType == LMOptions.LARGE) {\n\t\t\tsizeType = LMOptions.VARY;\n\t\t\tif (!ownObject) {\n\t\t\t\tdouble x = shape.getX() + ((largeSize - dotSize) / 2.0);\n\t\t\t\tdouble y = shape.getY() + ((largeSize - dotSize) / 2.0);\n\t\t\t\tshape.setFrame(x, y, dotSize, dotSize);\n\t\t\t}\n\t\t}\n\n\t\telse if (type == LMOptions.VARY && sizeType == LMOptions.SMALL) {\n\t\t\tsizeType = LMOptions.VARY;\n\t\t\tif (ownObject) {\n\t\t\t\tdouble x = shape.getX() - ((largeSize - smallSize) / 2.0);\n\t\t\t\tdouble y = shape.getY() - ((largeSize - smallSize) / 2.0);\n\t\t\t\tshape.setFrame(x, y, largeSize, largeSize);\n\t\t\t} else {\n\t\t\t\tdouble x = shape.getX() + ((smallSize - dotSize) / 2.0);\n\t\t\t\tdouble y = shape.getY() + ((smallSize - dotSize) / 2.0);\n\t\t\t\tshape.setFrame(x, y, dotSize, dotSize);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (internalLattice != null)\n\t\t\tinternalLattice.refreshConceptsShape();\n\t\t\n\t\tlabel.refreshShape();\n\t}", "public void setLength(long length) {\r\n\t\tthis.length = length;\r\n\t}", "public void setSize(Dimension size) {\r\n this.size = size;\r\n }", "@Element \n public void setSize(String size) {\n this.size = size;\n }", "public void setSizeInBits(final int size) {\n\t\tthis.sizeinbits = size;\n\t}", "public void setLength(Double newlength)\n {\n length = newlength;\n }", "public void setLengthOfStay(int len) {\n this.length_of_stay=len;\n }", "public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}", "public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }", "default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }", "@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}", "public void setSize(String size) {\r\n this.size = size == null ? null : size.trim();\r\n }", "public void initialize(int size) {\n setMaxSize(size);\n }", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "public void setLength(double length)\r\n {\r\n this.length = length;\r\n }", "public Builder setTotalSize(int value) {\n bitField0_ |= 0x00000008;\n totalSize_ = value;\n onChanged();\n return this;\n }", "public void setSize(double s)\n\t{\n\t\tsize = s;\n\t}", "public void setPackageSize(int size){\r\n }", "public void setLabelSize(int labelSize)\n {\n myLabelSize = labelSize;\n }", "public void setSizeState(SizeState size) {\n this.sizeState = size;\n }", "public void setSize(@Nullable String size) {\n this.size = size;\n }", "public Builder setFileSize(long value) {\n \n fileSize_ = value;\n onChanged();\n return this;\n }", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int n){ // Setter method\n \n length = n; // set the class attribute (variable) radius equal to num\n }", "public void setObjectSize(java.lang.Long value) {\n this.object_size = value;\n }", "public void setSizeV(long s){\n\t\tthis.sizeV = s;\n\t}", "public void setLength(double length) {\r\n this.length = length;\r\n }", "public void setSize(int size) {\n\t\tdist = new double[size];\n\t\tprev = new Node[size];\n\t\tready = new boolean[size];\n\t}", "@Override\n\tpublic void setSize(float size) {\n\t\tthis.size = size;\n\t\trxs = new int [ Math.max(Math.round(size/calibration[0]), Math.round(size/calibration[1])) + 1 ];\t\t\n\t\treset();\n\t}", "public void setLength(double length) {\n this.length = length;\n }", "@Test\n public final void testSetSize() {\n int expRes = 5;\n int falseEnter = -4;\n ship.setSize(falseEnter);\n int result = this.ship.getSize();\n assertEquals(expRes, result);\n falseEnter = -1;\n ship.setSize(falseEnter);\n result = this.ship.getSize();\n assertEquals(expRes, result);\n }", "public void setObjectSize(short size) { this.objectSize=size; }", "public void setTreeSize(Double newtreesize)\n {\n treesize = newtreesize; \n }", "@Test\n public void testSetSize() {\n System.out.println(\"setSize\");\n int size = 5;\n Library instance = new Library();\n instance.setSize(size);\n instance.setSize(5);\n }", "@Override\n\tpublic void setSize(String sizeOfTheBeverage) {\n\t\tthis.sizeOfTheBeverage = sizeOfTheBeverage;\n\t}", "public void setLength(double length){this.length=length;}", "public void setPizzaSize(String size) {\n pizzaSize = size;\n }", "public void setSizeOfDeck(int newSize, int burnCards)\n\t{\n\t\tsizeOfDeck = newSize;\n\t\tsizeOfBurnDeck = burnCards;\n\t}", "public void setCvpOperationLobsLength(long value)\n {\n if(__cvpOperationLobsLength != value)\n {\n _isDirty = true;\n }\n __cvpOperationLobsLength = value;\n }", "protected final void multiplySize(float size)\n {\n super.setSize(this.bokoblinWidth * size, this.bokoblinHeight * size);\n }", "public void setSize(int size){\n n = size;\n //makes new array and changes the toSort array\n randomArray(n);\n toSort = origArray.clone();\n }" ]
[ "0.7289109", "0.7223777", "0.7137515", "0.7036867", "0.70244354", "0.69549847", "0.69265205", "0.69090414", "0.6883894", "0.6883894", "0.68453664", "0.6806442", "0.6806442", "0.6806442", "0.6806442", "0.6728248", "0.66165984", "0.66056836", "0.65963274", "0.65949184", "0.65798336", "0.65358526", "0.6532556", "0.651684", "0.6500749", "0.6483032", "0.6483032", "0.64830095", "0.64637715", "0.64622945", "0.6451714", "0.63939947", "0.6379357", "0.63663095", "0.63637817", "0.6363417", "0.63189316", "0.62871724", "0.62871724", "0.6277209", "0.6261438", "0.62474334", "0.62474334", "0.62228733", "0.6175913", "0.6149132", "0.61178094", "0.6087892", "0.60743666", "0.60731363", "0.6044916", "0.6044916", "0.6044762", "0.6028653", "0.6025344", "0.60037714", "0.60013473", "0.59983176", "0.5990087", "0.59892285", "0.5984738", "0.5959692", "0.5955516", "0.59548116", "0.5949248", "0.5942773", "0.59051543", "0.58986247", "0.58966714", "0.58837247", "0.5880807", "0.5874821", "0.5859398", "0.58576554", "0.5857564", "0.58565253", "0.58556813", "0.5840789", "0.5837893", "0.58369195", "0.5831127", "0.5831127", "0.5831127", "0.58182865", "0.58154166", "0.58024204", "0.5798996", "0.5793957", "0.5793096", "0.577864", "0.5773743", "0.5773612", "0.57572657", "0.57566327", "0.57542604", "0.57435113", "0.5742171", "0.57327515", "0.5730428", "0.5719761", "0.57195395" ]
0.0
-1
Provides the required monthly payment amount.
public double getMonthlyPayment() { double monthlyInterestRate = annualInterestRate / 1200; double monthlyPayment = loanAmount * monthlyInterestRate / (1 - (1 / Math.pow(1 + monthlyInterestRate, numberOfYears * 12))); return monthlyPayment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LoanMonthlyPayment calculateMonthlyPayment() {\n double monthlyInterest = loanRequest.getApr() / MONTHLY_INTEREST_DIVISOR;\n double tmp = Math.pow(1d + monthlyInterest, -1);\n tmp = Math.pow(tmp, loanRequest.getTermInMonths());\n tmp = Math.pow(1d - tmp, -1);\n return new LoanMonthlyPayment(\n monthlyInterest, loanRequest.getAmountBorrowed() * monthlyInterest * tmp\n );\n }", "public double monthlyFee() {\r\n\r\n\t\tdouble fee = 0;\r\n\r\n\t\tif (directDeposit == true) {\r\n\t\t\treturn 0;\r\n\t\t} else if (getBalance() >= 1500) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t\tfee = 25;\r\n\t\t}\r\n\t\treturn fee;\r\n\t}", "public static void monthlyPayment()\n\t{\n\t\tSystem.out.println(\"enter principal loan amount, years , and rate of interest\");\n\t\tfloat principal = scanner.nextFloat();\n\t\tfloat years = scanner.nextFloat();\n\t\tfloat rate = scanner.nextFloat();\n\t\t\n\t\tfloat n = 12 * years;\n\t\tfloat r = rate / (12*100);\n\t\tdouble x = Math.pow(1+rate,(-n));\t\n\t\t\n\t\tdouble payment = (principal*r) / (1-x);\n\t\tSystem.out.println(\"monthly payment is: \" + payment);\n\t}", "public double getTotalPayment() {\n double totalPayment = getMonthlyPayment() * numberOfYears * 12;\n \n return totalPayment;\n }", "public double getMonthlyAmount()\n\t{\n\t\treturn amountGoal%timeFrame;\n\t}", "public void getMonthlyPayment(View view) {\n //Get all the EditText ids\n EditText principal = findViewById(R.id.principal);\n EditText interestRate = findViewById(R.id.interestRate);\n EditText loanTerm = findViewById(R.id.loanTerm);\n\n //Get the values for principal, MIR and the term of the loan\n double p = Double.parseDouble(principal.getText().toString());\n double r = Double.parseDouble(interestRate.getText().toString());\n double n = Double.parseDouble(loanTerm.getText().toString());\n\n\n //Calculate the monthly payment and round the number to 2 decimal points\n TextView display = findViewById(R.id.display);\n double monthlyPayment;\n DecimalFormat df = new DecimalFormat(\"#.##\");\n monthlyPayment = (p*r/1200.0)/(1-Math.pow((1.0+r/1200.0),(-12*n)));\n\n //Display the number in TextView\n display.setText(String.valueOf(df.format(monthlyPayment)));\n\n\n }", "double getPaidAmount();", "public double getMonthlyCost() {\n\t\treturn 0;\n\t}", "public BigDecimal getmPaid() {\n return mPaid;\n }", "public abstract double calculateLoanPayment(double principalAmount, double annualPrimeIntRate, int monthsAmort);", "public double getPer_month(){\n\t\tdouble amount=this.num_of_commits/12;\n\t\treturn amount;\n\t}", "double getUnpaidAmount();", "public double getPaymentAmount() {\n\t\tdouble amount = 0.0;\n\t\tString content = \"\";\n\t\t\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t.until(ExpectedConditions.presenceOfElementLocated(By.id(\"totalAmt\")));\t\t\n\t\tcontent = temp.findElement(By.xpath(\"span[2]\")).getAttribute(\"innerHTML\");\n\t\tamount = Double.parseDouble(content);\n\t\treturn amount;\n\t}", "public BigDecimal getMonthFee() {\r\n return monthFee;\r\n }", "@Override\n public BigDecimal calculateMonthlyPayment(double principal, double interestRate, int termYears) {\n // System.out.println(getClass().getName() + \".calculateMonthlyPayment() call chain:\");\n // for (StackTraceElement e : Thread.currentThread().getStackTrace())\n // {\n // if (!e.getClassName().equals(getClass().getName()) &&\n // !e.getMethodName().equals(\"getStackTrace\") &&\n // !(e.getLineNumber() < -1)) {\n // System.out.println(\" L \" + e.getClassName() + \".\" + e.getMethodName() + \"(line: \" + e.getLineNumber() + \")\");\n // }\n // }\n BigDecimal p = new BigDecimal(principal);\n int divisionScale = p.precision() + CURRENCY_DECIMALS;\n BigDecimal r = new BigDecimal(interestRate).divide(ONE_HUNDRED, MathContext.UNLIMITED).divide(TWELVE, divisionScale,\n RoundingMode.HALF_EVEN);\n BigDecimal z = r.add(BigDecimal.ONE);\n BigDecimal tr = new BigDecimal(Math.pow(z.doubleValue(), termYears * 12));\n return p.multiply(tr).multiply(r).divide(tr.subtract(BigDecimal.ONE), divisionScale, RoundingMode.HALF_EVEN)\n .setScale(CURRENCY_DECIMALS, RoundingMode.HALF_EVEN);\n }", "public static double calculateMonthlyPaymentBank(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n // Source : https://www.younited-credit.com/projets/pret-personnel/calculs/calculer-remboursement-pret\n double J = annualRateBank / 12; // Taux d'interet effectif = taux annuel / 12\n\n return amountLoan * (J / (1 - Math.pow(1 + J, - nbOfMonthlyPayment))); // Mensualité\n }", "public void monthlyPayment_Validation() {\n\t\thelper.assertString(monthlyPayment_AftrLogin(), payOffOffer.monthlyPayment_BfrLogin());\n\t\tSystem.out.print(\"The Monthly Payment is: \" + monthlyPayment_AftrLogin());\n\t}", "public static double calcMonthlyPayment(int term, double amount, double rate)\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n rate = rate / 100;\r\n double num1 = rate * (Math.pow((1 + rate), (term * 12)));\r\n double num2 = Math.pow((1 + rate), (term * 12)) - 1;\r\n double monthlyPayment = amount * (num1 / num2);\r\n return monthlyPayment;\r\n }", "float getMonthlySalary();", "@Override\r\n\tpublic double monthlyFee(double balance) {\r\n \tif(balance >= 300){\r\n \treturn 0;\r\n \t}\r\n \telse\r\n \treturn 5;\r\n \t}", "public double monthlyEarning()\n\t{\n\t\treturn hourlyRate * STAFF_MONTHLY_HOURS_WORKED;\n\t}", "public BigDecimal getLastmonthFee() {\r\n return lastmonthFee;\r\n }", "public double monthlyEarning() {\n\t\tdouble me = 0.0;\r\n\t\tString input = getLevel();\r\n\t\tif ( input == \"GRAD\")\r\n\t\t\tme = Faculty_Monthly_Salary; // interface variable\r\n\t\telse if ( input == \"ASSOC\")\r\n\t\t\tme = Faculty_Monthly_Salary * 1.2;\r\n\t\telse if ( input == \"PROF\")\r\n\t\t\tme = Faculty_Monthly_Salary * 1.4;\r\n\t\treturn me;\r\n\t\t// if i put these in reverse, i wouldve had to intialize at 1\r\n\t\t//so month earning wouldnt be at 0, and then 0 * 1.2 would equal 0 instead of 1.2\r\n\t}", "public String getTotalPayment() {\n return totalPayment;\n }", "@org.junit.Test\r\n public void testGetFixedMonthlyPayment() {\r\n Prospect p = new Prospect(\"Börje\", 2500, 7, 1);\r\n MortgageCalculation m = new MortgageCalculation(p);\r\n double result = m.getFixedMonthlyPayment();\r\n Double expResult = 216.32;\r\n\r\n assertEquals(expResult, result, 0.01);\r\n }", "public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}", "public double getRemainingMonthlyBudget() {\n\t\treturn 0;\n\t}", "public double getPaymentAmount() {\n\t\treturn baseSalary+this.grossSales*this.commissionRate;\r\n\t}", "@Override\n public void calculatePayment()\n {\n this.paymentAmount = annualSalary / SALARY_PERIOD;\n }", "public BigDecimal getCmPaid() {\n return cmPaid;\n }", "public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }", "public double getTotalPayments(){return this.total;}", "double getPaid();", "public String calculateMonths(double princ, double interest, double payment)\r\n {\r\n interest /= 100.0;\r\n interest += 1.0;\r\n interest = Math.pow(interest, (1.0/12.0));\r\n\r\n double months = 0.0;\r\n\r\n while (princ > 0.0)\r\n {\r\n princ *= interest;\r\n princ -= payment;\r\n months++;\r\n\r\n if (months > 1200.0)\r\n {\r\n return \">100 years. Try a higher monthly payment.\";\r\n }\r\n }\r\n\r\n return String.valueOf(Math.round(months));\r\n }", "public static double calculateMonthlyPaymentWithNotRate(double amountLoan, int nbOfMonthlyPayment){\n return amountLoan / nbOfMonthlyPayment;\n }", "public BigDecimal getPayAmt();", "public double monthlyEarnings() {\n\t\tif(level == \"AS\") {\n\t\t\treturn FACULTY_MONTH_SALARY;\n\t\t}\n\t\telse if(level == \"AO\") {\n\t\t\treturn FACULTY_MONTH_SALARY*1.5;\n\t\t}\n\t\telse {\n\t\t\treturn FACULTY_MONTH_SALARY*2;\n\t\t}\n\t}", "@Override \n public double getPaymentAmount() \n { \n return getWeeklySalary(); \n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "@Override\n\tpublic double calcGrossPay(int month, int year) {\n\t\tdouble sum=0;\n\t\tmonth--;\n\t\tfor (Order order:orderList)\n\t\t{\n\t\t\tDate date=order.orderDate;\n\t\t\tif (date.getYear()==year && date.getMonth()==month)\n\t\t\t\tsum+=order.orderAmount;\n\t\t}\n\t\treturn baseSalary+commission*sum;\n\t}", "double getMonthTask(){\n\t\treturn this.monthTax = (super.getAvailableMoney()+(super.getAvailableMoney()*super.getYearInterest()))/this.period;\n\t}", "public double calculateMonthlyTotal(ExpenseRetrievalResponse expenseRetrievalResponse){\n LinkedList<Expense> expenses = expenseRetrievalResponse.getExpenses();\n\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }", "public double getMonthlyInterest(){\n return balance * (getMonthlyInterestRate() / 100);\n }", "private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }", "double getMonthlyInterestRate(){\r\n\t\treturn annualInterestRate/12;\r\n\t}", "public int annualSalary(){\r\n int aSalary = monthlySalary * MONTHS;\r\n return aSalary;\r\n }", "public static double calculateMonthlyPaymentTotal(double amountLoan, double annualRateBank, double annualRateInsurance, int nbOfMonthlyPayment){\n double monthlyPaymentBank = calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment);\n double monthlyPaymentInsurance = calculateMonthlyPaymentInsuranceOnly(amountLoan, annualRateInsurance);\n\n return monthlyPaymentBank + monthlyPaymentInsurance;\n }", "public int getReceivalMonth(){\n\t\treturn this.receivalMonth;\n\t}", "public double getMonthlySalary() {\n\t\treturn monthlySalary;\n\t}", "@Override\r\n\tpublic Bill getMonthlyBill(int customerID, long mobileNo, String billMonth) {\n\t\treturn null;\r\n\t}", "public BigDecimal numberPayments()\r\n {\r\n BigDecimal monthlyInterestRate = theApr.divide(new BigDecimal(12), 12, BigDecimal.ROUND_HALF_DOWN);\r\n BigDecimal pvMonth = thePresentValue.divide(theMonthlyPayment, 2, BigDecimal.ROUND_HALF_DOWN);\r\n double part1 = Math.log(1.0 -(pvMonth.doubleValue()) * monthlyInterestRate.doubleValue());\r\n double part2 = Math.log(1.0 + monthlyInterestRate.doubleValue());\r\n \r\n return new BigDecimal(part1).divide(new BigDecimal(part2), 2, BigDecimal.ROUND_HALF_UP);\r\n }", "public float getMonthlySalary() {\n return monthlySalary_;\n }", "@Override\n\tpublic double getPayment() {\n\t\treturn baseSalary + (this.getGrossSales() * this.getCommissionRate());\n\t}", "public void calculateMonthlyInterest(){\n double currentMonth;\n currentMonth = (double)(this.savingsBalance*annualInterestRate/12);\n this.savingsBalance += currentMonth;\n }", "public double monthlyInterest() {\r\n\t\treturn (getBalance() * 0.0005) / 12;\r\n\t}", "public double getMonthlyInterestRate(){\n return annualInterestRate / 12;\n }", "public float getMonthlySalary() {\n return monthlySalary_;\n }", "public double calculateApprovedMonthlyTotal(ExpenseRetrievalResponse expenseRetrievalResponse){\n LinkedList<Expense> expenses = expenseRetrievalResponse.getExpenses();\n\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(expense.isApproved() && dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }", "public double getPaid() {\n return paid_;\n }", "public BigDecimal getCpmPaid() {\n return cpmPaid;\n }", "public void calculatePayment() {}", "public double getPaid() {\n return paid_;\n }", "public String monthlyPaymentFinishInYear(double princ, double interest)\r\n {\r\n interest /= 100.0;\r\n interest += 1.0;\r\n\r\n double amount = princ;\r\n amount *= interest;\r\n amount /= 12.0;\r\n\r\n String amountAsString;\r\n amountAsString = String.format(\"%.2f\", amount);\r\n return (\"$\" + amountAsString);\r\n }", "public double getMonthlyInterest()\n\t\t {\n\t\t\t return balance * monthlyInterestRate;\n\t\t }", "public void calculatePayment() {\n\t\tdouble pay = this.annualSalary / NUM_PAY_PERIODS;\n\t\tsuper.setPayment(pay);\n\t}", "public double makeAPayment(double annualLeaseAmount){\n double paymentMade = 0.0;//\n return paymentMade;\n /*Now it's 0.0. There must be a place somewhere\n that has a 'make a payment'\n button or text field or whatever...\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ \n }", "public double calculateApprovedMonthlyTotal(LinkedList<Expense> expenses){\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(expense.isApproved() && dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }", "public BigDecimal getfMcashoutAmount() {\r\n return fMcashoutAmount;\r\n }", "public double getPayment() {\n\t\treturn getNumHours() * getHourlyRates();\n\t}", "public double calculateMonthlyTotal(LinkedList<Expense> expenses){\n double monthlyTotal = 0.0;\n\n for(Expense expense : expenses){\n if(dateService.withinMonth(expense.getDate()))\n monthlyTotal = monthlyTotal + expense.getPrice();\n }\n\n return round(monthlyTotal, 2);\n }", "public BigDecimal futureValue(Integer paymentsInMonths)\r\n {\r\n List<Payment> schedule = amortizationSchedule();\r\n \r\n BigDecimal totalPayed = BigDecimal.ZERO;\r\n for (int paymentNumber = 0; paymentNumber < paymentsInMonths; paymentNumber++)\r\n {\r\n Payment payment = schedule.get(paymentNumber);\r\n totalPayed = totalPayed.add(payment.getPrinciple());\r\n }\r\n BigDecimal fv = getBalance().add(totalPayed);\r\n return fv.setScale(2, BigDecimal.ROUND_HALF_DOWN);\r\n }", "public Double amountDueForPayment() {\n DecimalFormat df = new DecimalFormat(\"#.##\");\n int numGroupMembers = AppVariables.currentUser.getGroup().getGroupMembers().size();\n\n // if payment made by current user, should be amount owed\n // which is the payment amount - (payment amount) / #groupmembers\n if (username.equals(AppVariables.currentUser.getUsername())) {\n return Double.valueOf(df.format(amountSpent- amountSpent/numGroupMembers));\n }\n\n return Double.valueOf(df.format(amountSpent/numGroupMembers));\n\n\n }", "public double getMonthlyInterestRate(){\n\t\tdouble monthlyInterestRate = (annualInterestRate/100) / 12;\n\t\treturn monthlyInterestRate;\n\t}", "BigDecimal getAmount();", "public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }", "@Override\n\tpublic double computeMonthlyPremium(double salary) {\n\t\treturn salary*0.08;\n\t}", "public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}", "TotalInvoiceAmountType getTotalInvoiceAmount();", "public double getTotalAmountPaid(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public BigDecimal getMcashoutAmount() {\r\n return mcashoutAmount;\r\n }", "public double getMonthlyInterest(){\n\t\tdouble monthlyInterest = balance * getMonthlyInterestRate();\n\t\treturn monthlyInterest;\n\t}", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public double getMonthlyInterestRate() {\n return ((annualInterestRate / 100)/12);\n }", "public double getMonthlyInterestRate() {\n return (annualInterestRate / 100) / 12 ;\n }", "public _179._6._235._119.cebwebservice.Bill billing_CalculateDetailMonthlyBill(java.lang.String accessToken, int tariff, int kwh) throws java.rmi.RemoteException;", "public java.math.BigDecimal getAmountPaid () {\n\t\treturn amountPaid;\n\t}", "private static double totalPricePerMonth(double price_interest, int months) {\n \treturn price_interest / months;\n }", "public java.math.BigInteger getExpirationMonth() {\r\n return expirationMonth;\r\n }", "public double getBillAmt() {\n\t\treturn billAmt;\n\t}", "@Override\r\n\tpublic double annualSalary() {\r\n\t\tdouble baseSalary;\r\n\t\tdouble annualSalary;\r\n\t\tdouble annualCommissionMax = Math.min((annualSales * .02), 20000.0);\r\n\t\tbaseSalary = (getSalaryMonth() * 12);\r\n\t\tannualSalary = baseSalary + annualCommissionMax;\r\n\t\r\n\t\treturn annualSalary;\r\n\t}", "public double getMonthlyInterest() {\n return balance * getMonthlyInterestRate();\n }", "public BigDecimal getLoanAmont() {\n return loanAmount == null ? BigDecimal.ZERO : loanAmount;\n }", "public BigDecimal getPayAmt() {\n\t\treturn payAmt;\n\t}", "public String getAccountPayment() {\r\n return accountPayment;\r\n }", "public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}", "public BigDecimal getPaidNum() {\n return paidNum;\n }", "public void calculateMonthlyInterest() {\r\n addSavingsBalance(getSavingsBalance().\r\n multiply(annualInterestRate.divide(\r\n BigDecimal.valueOf(12.0), 10, RoundingMode.HALF_UP)));\r\n }", "@Override\n\tpublic double calculatPayment(Student student) {\n\t\tdouble s = 0;\n\t\treturn s;\n\n\t}", "private double requestCashPayment(double total) {\n double paid = 0;\n while (paid < total) {\n double entered = ScannerHelper.getDoubleInput(\"Enter amount paid: \", 0);\n paid += entered;\n System.out.printf(\"Accepted $%.2f in cash, Remaining amount to pay: $%.2f\\n\", entered, (total - paid >= 0) ? total - paid : 0);\n }\n return paid;\n }", "public java.math.BigDecimal getQtyPeriod12() \r\n {\r\n return get_ValueAsBigDecimal(\"QtyPeriod12\");\r\n \r\n }" ]
[ "0.7260527", "0.72044027", "0.718239", "0.7122574", "0.69955546", "0.6949449", "0.6706348", "0.6580219", "0.6577091", "0.6561213", "0.6501366", "0.6499962", "0.6475233", "0.6465791", "0.6456828", "0.6443561", "0.64252883", "0.6418953", "0.64074343", "0.63946676", "0.6382841", "0.6366838", "0.6261754", "0.6254603", "0.6251328", "0.62217355", "0.62092394", "0.6204008", "0.61804837", "0.61762005", "0.6175494", "0.616897", "0.61672664", "0.61666065", "0.6135643", "0.6132793", "0.6105275", "0.60907346", "0.6082112", "0.60669607", "0.60469025", "0.60432374", "0.60340625", "0.60303336", "0.6026609", "0.59978694", "0.5984045", "0.59808373", "0.5962851", "0.5959855", "0.59573025", "0.59490854", "0.59431297", "0.59425825", "0.5931777", "0.59308875", "0.59307957", "0.59297365", "0.59245765", "0.5911382", "0.58938324", "0.5883787", "0.5882424", "0.587495", "0.5861967", "0.5861496", "0.5854647", "0.58413655", "0.58354115", "0.5832598", "0.58314294", "0.58256066", "0.58158404", "0.5809307", "0.5808677", "0.5794078", "0.578854", "0.57772475", "0.5774063", "0.5773224", "0.57720107", "0.5755967", "0.57523686", "0.5748276", "0.5729393", "0.57255447", "0.5717245", "0.57163763", "0.57029974", "0.5701557", "0.5697406", "0.5695904", "0.5691348", "0.56909835", "0.56862134", "0.5681881", "0.56762314", "0.56751573", "0.5672724", "0.56674904" ]
0.79301673
0
Provides the total number of payments required.
public double getTotalPayment() { double totalPayment = getMonthlyPayment() * numberOfYears * 12; return totalPayment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int minimumNumberOfPayments() {\n return 0;\n }", "public double getTotalPayments(){return this.total;}", "public double getTotalAmountPaid(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public String getTotalPayment() {\n return totalPayment;\n }", "public int getMinimumPaymentSum() {\n return model.getMinimumPaymentSum();\n }", "public int getTotalEarnings() {\r\n\t\tint total = 0;\r\n\t\tfor (int i = 0; i < this.receiptissued.size(); i++) {\r\n\t\t\ttotal = total + this.receiptissued.get(i).getPrice();\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t}", "public int totalAllocatedOrders();", "public int precioTotalRepuestos() {\n int sumaTotal = 0;\n for (Dispositivo dispositivo : dispositivos) {\n sumaTotal += dispositivo.getPrecioRepuesto();\n }\n return sumaTotal;\n }", "int getTotalDepositCount();", "public int getTotalAmount();", "public long calcRemaining(){\n return getGrandTotal() - getTotalPaid();\n }", "public static int count() {\n return postEncryptedPaymentRequestCount;\n }", "public int totalOrdersTaken();", "Double getTotalSpent();", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getNoPaymentsUpToDate(){\n\t\t// payment_ratio will check how many payments the client needs to do on average\n\t\tdouble payment_ratio = no_payments_yearly * 1.0 / 12;\n\t\t\n\t\t// Calculate no. of Payments up to date\n\t\tint counter = (int)Math.floor((getMonthsPast()) * payment_ratio);\n\t\treturn counter;\n\t}", "public int getTotal() {\n return total;\n }", "public int getTotal() {\n return total;\n }", "public int getTotal()\n\t{\n\t\treturn total;\n\t\t\n\t}", "public int getTotal () {\n return total;\n }", "int getActAmountCount();", "public int getTotal () {\n\t\treturn total;\n\t}", "public static int totalSupply() {\n return totalSupplyGet();\n }", "public int getTotal() {\r\n\r\n\t\treturn getAmount() + getPrice();\r\n\r\n\t}", "public int getTotal() {\n\t\treturn total;\n\t}", "public int getTotal() {\n return total;\n }", "public int getTotal() {\n\t\t\treturn total;\n\t\t}", "public BigDecimal numberPayments()\r\n {\r\n BigDecimal monthlyInterestRate = theApr.divide(new BigDecimal(12), 12, BigDecimal.ROUND_HALF_DOWN);\r\n BigDecimal pvMonth = thePresentValue.divide(theMonthlyPayment, 2, BigDecimal.ROUND_HALF_DOWN);\r\n double part1 = Math.log(1.0 -(pvMonth.doubleValue()) * monthlyInterestRate.doubleValue());\r\n double part2 = Math.log(1.0 + monthlyInterestRate.doubleValue());\r\n \r\n return new BigDecimal(part1).divide(new BigDecimal(part2), 2, BigDecimal.ROUND_HALF_UP);\r\n }", "public double getPayment() {\n\t\treturn getNumHours() * getHourlyRates();\n\t}", "public int getNumberOfIrregularPayments() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString query = \"SELECT no_irregular_payments FROM loan \"\n\t\t\t\t\t+ \"WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\trs.next();\n\t\t\tint irPayments = rs.getInt(1);\n\t\t\treturn irPayments;\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "TotalInvoiceAmountType getTotalInvoiceAmount();", "public int getCurrentNumberOfPayments() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString query = \"SELECT current_payment_counter FROM loan \"\n\t\t\t\t\t\t+ \" WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\trs.next();\n\t\t\treturn rs.getInt(1);\n\t\t\t\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "public double getAmountOfFixedPayments(){\n\t\tdouble amount = (principal_amount * (interest_rate / 100)) / (no_payments_yearly * (1 - Math.pow((1+(interest_rate/100)/no_payments_yearly), -no_years*no_payments_yearly)));\n\t\tdouble result = Math.round(amount * 100.0) / 100.0;\n\t\treturn result;\n\t}", "public String countPayments() throws IOException{\r\n try{\r\n Integer.parseInt(getActualSheet().getName());\r\n }catch(NumberFormatException ex){\r\n return \"ERROR\";\r\n }\r\n return \"Balance: \" + getActualSheet().getCellAt(\"B3\").getTextValue() + \"\\n\";\r\n }", "double getPaidAmount();", "protected double getNumWithdrawals() {\n return numWithdrawals;\n }", "public synchronized int getNumberOfItems(){\n int totalItems=0;\n \n for(ShoppingCartItem item : getItems()){\n //we sum the quantity of products for each item\n totalItems += item.getQuantity();\n }\n \n return totalItems;\n }", "public int getTotalProfit() {\n\t\tif (game.countProfit() >= 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn game.countProfit();\n\t\t}\n\t}", "public int getTotalPrice() {\n int total = 0;\n for (Scholar s : this.scholars) {\n Calendar start = (Calendar) s.getStartDate().clone();\n while (start.before(s.getEndDate())) {\n if (start.after(this.startDate) && start.before(this.estimatedEnd)) { //Only lists scholar within the the time frame the project is active\n total += s.getSalary();\n }\n start.add(Calendar.MONTH, 1);\n }\n }\n return total;\n }", "public long getTotal() { return total; }", "public long getTotal() { return total; }", "public long getTotal() {\n return total;\n }", "public long getTotal() {\n return total;\n }", "public int total() {\n return _total;\n }", "public int total() {\n return this.total;\n }", "public int getTotal() {\n\t\treturn this.total;\n\t}", "public BigDecimal getTotalGprs() {\r\n return totalGprs;\r\n }", "public int getTotRuptures();", "public BigDecimal getTotal() {\n return total;\n }", "public BigDecimal getTotal() {\n return total;\n }", "public int getTotalCount() {\n return totalCount;\n }", "public BigDecimal getTotalAmountDue() {\n\t\treturn totalAmountDue;\n\t}", "public Double amountDueForPayment() {\n DecimalFormat df = new DecimalFormat(\"#.##\");\n int numGroupMembers = AppVariables.currentUser.getGroup().getGroupMembers().size();\n\n // if payment made by current user, should be amount owed\n // which is the payment amount - (payment amount) / #groupmembers\n if (username.equals(AppVariables.currentUser.getUsername())) {\n return Double.valueOf(df.format(amountSpent- amountSpent/numGroupMembers));\n }\n\n return Double.valueOf(df.format(amountSpent/numGroupMembers));\n\n\n }", "public int getTotalSPEntries() {\n\t\tList<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\treturn list.size();\n\t}", "private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }", "public int getTotalTransactionsCount(){\n String queryCount = \"SELECT COUNT(*) FROM \" + TransactionEntry.TABLE_NAME +\n \" WHERE \" + TransactionEntry.COLUMN_RECURRENCE_PERIOD + \" =0\";\n Cursor cursor = mDb.rawQuery(queryCount, null);\n int count = 0;\n if (cursor != null){\n cursor.moveToFirst();\n count = cursor.getInt(0);\n cursor.close();\n }\n return count;\n }", "public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }", "@Override\n\tpublic int getTotalNumber() {\n\t\treturn totalNum;\n\t}", "Integer getTotalStepCount();", "public double calculatePay() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}", "public Integer getTotalNumberOfTransactionLines() {\n return totalNumberOfTransactionLines;\n }", "public double getTotalAmountOfInterest(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly - principal_amount;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public int getAmountDone();", "public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}", "public BigDecimal getTotalDue() {\n\t\treturn totalDue;\n\t}", "int getTotal(){\n\t\treturn this.orderTotal;\n\t}", "public double getTotal(){\n\t\tdouble Total = 0;\n\t\t\n\t\tfor(LineItem lineItem : lineItems){\n\t\t\tTotal += lineItem.getTotal();\t\n\t\t}\n\t\treturn Total;\n\t}", "public long getAmountRequested();", "double getTotalProfit();", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "@ApiModelProperty(value = \"Number of matched users by the search criteria\")\n public Integer getTotal() {\n return total;\n }", "public double getTotal() {\r\n\t\treturn total;\r\n\t}", "int getTotalFree();", "@Override\r\n\tpublic long getTotal() {\n\t\treturn 0;\r\n\t}", "double getPaid();", "double getUnpaidAmount();", "Integer total();", "public double getTotal() {\n\t\treturn total;\n\t}", "public BigDecimal getTOTAL_DEFERRED_PROFIT() {\r\n return TOTAL_DEFERRED_PROFIT;\r\n }", "int getRequiredAmountFor(AResourceType type);", "double getTotal();", "public Integer getTotalNum() {\n return totalNum;\n }", "@Override\n public double getTotalCommission() {\n double cost = 0.0;\n //increase cost for each report in the order\n for (Report report : reports.keySet()) {\n //report cost depends on the WorkType\n //audits are not capped by max employee count\n //regular orders are limited by max employee count\n int employeeCount = reports.get(report);\n cost += workType.calculateReportCost(report, employeeCount);\n }\n //increase cost of order based on priority\n //critical orders increase based on their critical loading\n //regular orders don't have an effect\n cost = priorityType.loadCost(cost);\n return cost;\n }", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public java.lang.Integer getTotalOverdueCount12M() {\n return totalOverdueCount12M;\n }", "public BigInteger getTotal()\n\t{\n\t\treturn total;\n\t}", "public BigDecimal getTotalPremAmt() {\n\t\treturn totalPremAmt;\n\t}", "public BigDecimal getTotalAmount() {\n return totalAmount;\n }", "BigDecimal getTotal();", "BigDecimal getTotal();", "public double getPaymentAmount() {\n\t\tdouble amount = 0.0;\n\t\tString content = \"\";\n\t\t\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t.until(ExpectedConditions.presenceOfElementLocated(By.id(\"totalAmt\")));\t\t\n\t\tcontent = temp.findElement(By.xpath(\"span[2]\")).getAttribute(\"innerHTML\");\n\t\tamount = Double.parseDouble(content);\n\t\treturn amount;\n\t}", "public long getTotal() {\r\n\t\treturn page.getTotalElements();\r\n\t}", "public Integer total() {\n return this.total;\n }", "public double getTotal() {\n return Total;\n }", "public BigInteger getTotal() {\n return total;\n }", "public long getTotalAmountUploaded();", "public int getF_NumOfMatchesPayed() {\n return f_numOfMatchesPayed;\n }" ]
[ "0.7211168", "0.6893038", "0.680522", "0.6715126", "0.6615078", "0.65967166", "0.6554185", "0.6462327", "0.64481187", "0.64388967", "0.6391857", "0.63698834", "0.63521385", "0.63335925", "0.6323459", "0.6323459", "0.6315897", "0.63061726", "0.63061726", "0.62925786", "0.628975", "0.6284345", "0.62610817", "0.6250945", "0.6250091", "0.6240996", "0.62146044", "0.6199772", "0.6189534", "0.6177067", "0.6167206", "0.6138107", "0.6118408", "0.61164564", "0.6097405", "0.60952896", "0.6082052", "0.6063472", "0.6055257", "0.6032321", "0.6032226", "0.6032226", "0.60277855", "0.60277855", "0.60256416", "0.60240257", "0.6016816", "0.6009072", "0.60038143", "0.5998076", "0.5998076", "0.59870434", "0.5982982", "0.597323", "0.59648573", "0.59626794", "0.59580433", "0.59578353", "0.5952627", "0.5940749", "0.5933354", "0.5932605", "0.5932312", "0.5929073", "0.5926897", "0.592479", "0.5916704", "0.5914488", "0.5909799", "0.59076715", "0.59066415", "0.5894107", "0.5894107", "0.5892114", "0.5879373", "0.58710635", "0.58704", "0.58702135", "0.58664405", "0.5864911", "0.5850778", "0.584173", "0.58410764", "0.5840858", "0.583881", "0.5835056", "0.58343434", "0.5830956", "0.5829862", "0.5826673", "0.58193755", "0.581731", "0.581731", "0.58165115", "0.58137906", "0.58066326", "0.58031803", "0.5798493", "0.5797431", "0.5797168" ]
0.69496214
1
Provides the date of loan.
public java.util.Date getLoanDate() { return loanDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LocalDate getDate() {\r\n\t\treturn loanDate;\r\n\t}", "public String Get_date() \n {\n \n return date;\n }", "public String getLeavingDate();", "public Date getDate_of_admission() {\r\n return date_of_admission;\r\n }", "java.lang.String getDate();", "public long getDate() {\n return date;\n }", "public long getDate() {\n return date;\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public String getAccessionDeaccessionToDate() {\n return accessionDeaccessionToDate;\n }", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public long getDate() {\n return date_;\n }", "public String getDate() {\n return date;\n }", "public String getReturnDate();", "java.lang.String getFoundingDate();", "public String getDate() {\r\n return date;\r\n }", "long getDate();", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "String getDate();", "String getDate();", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public long getDate() {\n return date_;\n }", "public static Date getLoanDate(Integer id) throws ParseException {\n\t\tDate result = null;\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\ttry\n\t\t{\n\t\t\tstmt = conn.createStatement();\n\t\t\tquery = \"SELECT to_char(PAYMENT_DATE,'dd/mm/yyyy') \" + \"FROM CREDIT.PAYMENTS \" + \"WHERE LOAN_ID=\" + id;\n\t\t\trs = stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tresult = dateFormat.parse(rs.getString(1));\n\t\t\t}\n\t\t\tSystem.out.println(getMethodName(1) + \"\\t\" + result);\n\t\t\t\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public long getDate() {\n\t\treturn date;\n\t}", "public long getDate() {\n\t\treturn date;\n\t}", "public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}", "public String getReturningDate() {\r\n return returningDate;\r\n }", "public int getDate() {\n return date ;\n }", "public java.lang.String getDate() {\n return date;\n }", "long getTradeDate();", "public String getDate() {\r\n\t\treturn date;\r\n\t}", "public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}", "public String getDate(){\n\t\treturn toString();\n\t}", "public Loan (String cId, String date){\n\t\tthis();\n\t\tthis.client_id = cId;\n\t\tthis.start_date = date;\n\t}", "public String getDate(){\n return date;\n }", "public String getDate(){\n return date;\n }", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "java.lang.String getToDate();", "public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }", "public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }", "com.google.type.Date getAcquireDate();", "public double getLoan()\r\n {\r\n return loan;\r\n }", "public int getDate() {\n return date;\n }", "public int getDate() {\n return date;\n }", "public String getDate(){\n\n return this.date;\n }", "public int getLoan() {\n\t\treturn loan;\n\t}", "public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public java.util.Date getDateOfExamination(){\n return localDateOfExamination;\n }", "@Override\n\tpublic java.util.Date getPaymentDate() {\n\t\treturn _esfShooterAffiliationChrono.getPaymentDate();\n\t}", "public String getDate() {\n return this.date;\n }", "public String getDate() {\n return this.date;\n }", "Date getDate();", "Date getDate();", "Date getDate();", "public String date(int lmao) {\r\n switch (lmao) {\r\n case 1:\r\n return time.showDay();\r\n\r\n case 2:\r\n return time.showMonth();\r\n\r\n case 3:\r\n return time.showYear();\r\n\r\n case 4:\r\n return time.showDay() + \"/\" + time.showMonth() + \"/\" + time.showYear();\r\n\r\n default:\r\n return \"error\";\r\n }\r\n }", "public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}", "public String getDate() {\n\t\treturn logInfoSplit[0] + \"_\" + logInfoSplit[1];\n\t}", "public String getDate() {\r\n\t\treturn this.date;\r\n\t}", "public int getDate(){\n return date;\n }", "public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "@Override\n public int getDate() {\n return this.deadline.getDay();\n }", "public double getLoanAmount() {\n return loanAmount;\n }", "public String getdate() {\n\t\treturn date;\n\t}", "public java.util.Date getChallanDate () {\n\t\treturn challanDate;\n\t}", "public String getDate() {\n\t\treturn this.date;\n\t}", "public String getLoanInfo(){\n\t\tString info = \"Klientit me id \"+ client_id + \" iu dha nje kredi me nje shume prej \" + principal_amount+\"€.\\n\"\n\t\t\t\t+ \"Shuma prej \" + getAmountOfFixedPayments()+ \" do te paguhet \" + no_payments_yearly + \" here ne vit pergjate nje periudhe\"\n\t\t\t\t\t\t+ \" prej \\n\"+no_years+\" vitesh. Interesi eshte \" + interest_rate+\"%. Kjo do te thote se ne total \"+ \n\t\t\t\t\t\t\"pagesa e interesave \\neshte\"+getTotalAmountOfInterest()+\" €. Ne fund te kredise klienti do te kete paguar \"+getTotalAmountPaid() + \" €.\";\n\t\t\n\t\treturn info;\n\t}", "public Date date (){\r\n\t\t\treturn _date;\r\n\t\t}", "Date getCheckedOutDate();", "public String availableDate(Lab lab) {\r\n String available = this.rentSettings.getDueDate();\r\n return available;\r\n }", "public java.util.Date getDate(){\n return localDate;\n }", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "@Override\n\tpublic java.util.Date getAffiliationDate() {\n\t\treturn _esfShooterAffiliationChrono.getAffiliationDate();\n\t}", "Date getCheckedOut();", "public Date getDate(){\n\t\treturn date;\n\t}", "@Override\n public String toString() {\n return date.format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy\")) + \" - \" + note;\n }", "public Loan(){\n\t\tthis(\"\", 0, 0, 0, 0);\n\t\tstart_date = null;\n\t}", "public String getLastPaymentDate() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"PAYMENT_DATE\").get(0);\n\t}", "public String getDate() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn sdf.format(txtDate.getDate());\n\t}", "long getSettlementDate();", "Date getInvoicedDate();", "public Date getDate() {\n return date;\n }", "public int getDate() {\n\t\treturn date;\n\t}", "@Override\n public Date getDate() {\n return date;\n }", "long getDate() { return (act != null ? act.getDate() : 0); }", "public Date getLstLostDate() {\n return lstLostDate;\n }", "public Loan getCurrentLoan() {\n\t\treturn currentLoan;\n\t}", "public static String getDate() {\n return annotation != null ? annotation.date() : \"Unknown\";\n }", "protected String getRentDateString() { return \"\" + dateFormat.format(this.rentDate); }", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public String getAccessionDeaccessionFromDate() {\n return accessionDeaccessionFromDate;\n }", "public long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "public Date getDate()\n {\n return date;\n }" ]
[ "0.80278045", "0.7148208", "0.69566554", "0.6690323", "0.666629", "0.661017", "0.66068244", "0.6591761", "0.6571702", "0.65464973", "0.65464973", "0.6542482", "0.6539978", "0.6535568", "0.6522169", "0.65185493", "0.65082425", "0.64739645", "0.64739645", "0.64739645", "0.64739645", "0.64739645", "0.64650714", "0.64650714", "0.6461606", "0.6451098", "0.64497775", "0.6448872", "0.6448872", "0.64367807", "0.643188", "0.6422906", "0.6421964", "0.642101", "0.6420523", "0.6410954", "0.64049494", "0.6399702", "0.6399393", "0.6376478", "0.6376272", "0.6376272", "0.6374891", "0.63733816", "0.63733816", "0.63575923", "0.6346496", "0.6342996", "0.6342996", "0.6337338", "0.633448", "0.631592", "0.6314209", "0.63040626", "0.6290757", "0.6290757", "0.62897855", "0.62897855", "0.62897855", "0.62872434", "0.6285701", "0.62803334", "0.62584966", "0.62460655", "0.62429535", "0.6240201", "0.62357146", "0.6226365", "0.6225671", "0.62235534", "0.62051034", "0.61892843", "0.61884964", "0.6184992", "0.61795425", "0.61780816", "0.61763823", "0.6172907", "0.6172731", "0.6171276", "0.61705965", "0.6156986", "0.6154892", "0.61484957", "0.6146883", "0.6140937", "0.6124414", "0.6118904", "0.6111967", "0.6111126", "0.6110431", "0.6106649", "0.61060905", "0.6101307", "0.6094918", "0.6087097", "0.60799706", "0.60781246", "0.60741", "0.60736734" ]
0.8096227
0
Created by chan on 2/10/18.
public interface DetailContract { interface DetailView{ void openBrowserIntent(String url); void openShareIntent(); } interface DetailMvpPresenter{ void onMenuBrowserOpenClick(String url); void onMenuShareClick(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n public void init() {\n }", "private void poetries() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void init() {}", "public void method_4270() {}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo4359a() {\n }", "public abstract void mo70713b();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void initialize() {\n\t\t\n\t}", "public void mo21877s() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private void init() {\n\n\n\n }", "@Override\n public void initialize() { \n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "public void m23075a() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n public void init() {\n }", "private Rekenhulp()\n\t{\n\t}" ]
[ "0.589098", "0.58720195", "0.5835741", "0.57920796", "0.57533365", "0.5734152", "0.5733649", "0.5700252", "0.5674923", "0.5674923", "0.5674923", "0.5674923", "0.5674923", "0.5674454", "0.5633371", "0.5632893", "0.5627495", "0.5627495", "0.5624418", "0.56141835", "0.5607625", "0.5597303", "0.5594439", "0.55864316", "0.5584343", "0.5581586", "0.55804384", "0.55804384", "0.5569947", "0.5551113", "0.55416745", "0.55376875", "0.5519914", "0.55167866", "0.5512137", "0.5501712", "0.5501019", "0.54956645", "0.54956645", "0.54956645", "0.548685", "0.54783535", "0.54783535", "0.54783535", "0.54705983", "0.54689264", "0.54689264", "0.54689264", "0.54689264", "0.54689264", "0.54689264", "0.5468189", "0.5468189", "0.5468189", "0.5466565", "0.5459082", "0.545866", "0.54559636", "0.54546463", "0.5451269", "0.5451269", "0.54499036", "0.5449895", "0.543769", "0.5433952", "0.54336196", "0.54266006", "0.54183024", "0.541776", "0.5405695", "0.53980917", "0.5391505", "0.5381978", "0.5377911", "0.5374287", "0.5360434", "0.5359282", "0.5359282", "0.5359215", "0.5356778", "0.53514415", "0.5346082", "0.53389275", "0.5336228", "0.5335654", "0.5335654", "0.5335654", "0.5335654", "0.5335654", "0.5335654", "0.5335654", "0.5334415", "0.5328964", "0.5326491", "0.5323066", "0.5319742", "0.53165567", "0.53165567", "0.5315701", "0.53077465", "0.5300149" ]
0.0
-1
Set a new course for this student.
public void changecourse(String replacementcourse, String id1) { course = replacementcourse; courseid = id1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCourse(String course);", "public void assignCourse(Course course) {\n assignedCourse = course;\n }", "public void setcourse(String course) {\n\t\tthis.course = course;\n\t}", "public void assignCourse(Course course) {\r\n this.course.add(course);\r\n }", "public void setEventCourse(String newCourse) {\n\t\tthis.courseRelation = newCourse;\n\t}", "@PUT @Path(\"/{courseId}\")\n \tpublic Response setCourse(\n \t\t\t@Context HttpServletRequest req, \n \t\t\t@Context HttpServletResponse resp,\n \t\t\t@PathParam(\"courseId\") Long courseId) throws IOException {\n \t\tCourse dbCourse = ofy().load().type(Course.class).id(courseId).now();\n \t\t\n \t\t// get provided course object\n \t\tInputStream inputStream = req.getInputStream();\n \t\tCourse providedCourse = new ObjectMapper().readValue(inputStream, Course.class);\n \t\t\n \t\t// ...validate fields?\n \t\ttry {\n \t\t\tassert providedCourse.getId() == dbCourse.getId(); // (dbCourse.id == courseId)\n \t\t} catch(AssertionError ex) {\n \t\t\tthrow new eDABException.NotAuthorizedException(\"Illegal field change\");\n \t\t}\n \t\t\n \t\t// save\n \t\tofy().save().entity(providedCourse).now();\n \t\t\n \t\treturn Response.ok().build();\n \t}", "public void setCourse(String course) {\n\t\tCourse = course;\n\t}", "public void setCourse(String course) {\n\t\tthis.course = course;\n\t}", "public void setCourseID(int courseID) {\n this.courseID = courseID;\n }", "public void setIdCourse(Long idCourse) {\n this.idCourse = idCourse;\n }", "@Test\r\n public void testSetCourse() {\r\n System.out.println(\"setCourse\");\r\n String course = \"\";\r\n Student instance = new Student();\r\n instance.setCourse(course);\r\n \r\n }", "protected void setCourseID(String courseID){\n //adds a key value pair to pref\n edit.putString(AppCSTR.ACCOUNT_COURSE, courseID);\n //records changes\n edit.commit();\n }", "public void setCourseName( String name )\n {\n courseName = name; // store the course name\n }", "public void setHomeCourse(String newHomeCourse)\n {\n if (newHomeCourse == null) \n {\n System.out.println(\"Error: must input a new home course\");\n }\n else\n {\n homeCourse = newHomeCourse;\n }\n }", "public Course(String courseName) {\n this.courseName = courseName;\n }", "@POST\r\n\t@Path(\"/ta\")\r\n\tpublic void assignTAtoCourse(@QueryParam(\"studentID\") String studentID, @QueryParam(\"courseID\") String courseID) {\r\n\r\n\t\tStudent student = InMemoryDataStore.getStudent(studentID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (student == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tcourse.setTaStudentID(studentID);\r\n\t}", "public void EditCourse(String depName, String studentName, String courseName, Course newData) {\n\t\tdNode searchNode = FindByName(depName);\n\t\tif (searchNode != null)\n\t\t\tsearchNode.data.students.EditCourse(studentName, courseName, newData);\n\t}", "public void setCourseId(String courseId) {\n this.courseId = courseId;\n }", "@POST\r\n\t@Path(\"/professor\")\r\n\tpublic void assignCourseToProfessor(@FormParam(\"professorID\") String professorID,\r\n\t\t\t@FormParam(\"courseID\") String courseID) {\r\n\r\n\t\tProfessor professor = InMemoryDataStore.getProfessor(professorID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (professor == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tcourse.setProfessorID(professorID);\r\n\t}", "public void setCourseProperty(java.lang.String courseProperty) {\n this.courseProperty = courseProperty;\n }", "public void setCourseNum(String courseNum) {\n this.courseNum = courseNum;\n }", "@Override\r\n\tpublic void newDeleteCourse(Course course) {\n\t\tcourse.setValid(0);\r\n\t\tthis.update(course);\r\n\t}", "public Course(int courseID) {\n this.courseID = courseID;\n morningRoster = new Vector<Student>();\n waitlist = new LinkedList<Student>();\n eveningRoster = new Vector<Student>();\n }", "public void setCourses(String courses) {\n this.courses = courses == null ? null : courses.trim();\n }", "public void setCourse(UnivClass c){\n\t\tcourses.enqueue(c);\n\t}", "public void createCourse(String courseName, int courseCode){}", "public void setCourseName (String courseName)\n\t{\n\t\tif(courseName.length ( )==0 || courseName==null)\n\t\t{\n\t\t\tcourseName=\"Course Name\";\n\t\t}\n\t\tthis.courseName = courseName;\n\t\tthis.saveNeed = true;\n\n\t}", "@POST\r\n\t@Path(\"/student\")\r\n\tpublic void enrollStudentToCourse(@FormParam(\"studentID\") String studentID,\r\n\t\t\t@FormParam(\"courseID\") String courseID) {\r\n\r\n\t\tStudent student = InMemoryDataStore.getStudent(studentID);\r\n\t\tCourse course = InMemoryDataStore.getCourse(courseID);\r\n\r\n\t\tif (student == null || course == null) {\r\n\t\t\tthrow new WebApplicationException(Response.Status.BAD_REQUEST);\r\n\t\t}\r\n\r\n\t\tstudent.addCourse(courseID);\r\n\t\tcourse.addStudent(studentID);\r\n\t}", "void addCourse(Course course);", "public void testAddCourse() {\n\t System.out.println(\"addCourse\");\n\t Course course = course1;\n\t Student instance = student1;\n\t instance.addCourse(course);\n\t }", "@Override\n\tpublic void setCourse(float course) {\n\t\t\n\t}", "public void setCourseList (Course courseList)\n\n {\n\n // courseList is added to courseList.\n this.courseList.add (courseList);\n\n }", "@PutMapping(\"/courses\")\n public Course updateCourse(@RequestBody Course course) {\n return this.courseService.updateCourse(course);\n }", "public void setCourseId(String courseId) {\n\t\tthis.courseId = courseId == null ? null : courseId.trim();\n\t}", "public void setCourseTable(Courses value);", "public void setCourseNumber (String courseNumber)\n\t{\n\t\tif(courseNumber.length ( )==0 || courseNumber==null)\n\t\t{\n\t\t\tcourseNumber =\"Course Number\"; \n\t\t}\n\t\tthis.courseNumber = courseNumber;\n\t\tthis.saveNeed = true;\n\n\n\t}", "public Course(String courseName) {\n studentList = new ArrayList<Student>(MAXSTUDENT);\n this.courseName = courseName;\n studentCount = 0;\n }", "@Override\n\tpublic void updateCourse(Course course) {\n\t\tcd.updateCourse(course);\n\t}", "public void setCourseName(String name){//setCourseName body start\n\t\tCourseName = name;\n\t}", "public Builder setCourseName(java.lang.String value) {\n\t\t\t\tif (value == null) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\n\t\t\t\tcourseName_ = value;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}", "public StudentCourse(String alias) {\n this(alias, STUDENT_COURSE);\n }", "public void addStudentInCourse(Course course, Student student){\n \n String statement = ADD_STUDENT_IN_COURSE;\n data.makeUpdateStatement(statement,new Object[]{(Object)course.getId(),(Object)student.getId()});\n data.closeConnections(data.ps, data.conn);\n }", "public StudentCourse() {\n this(\"student_course\", null);\n }", "public void setCourseName( String name )\n\t{\n\t\tcourseName = name;\t// store the course name\n\t}", "public PendingCourse setPendingCourse(HttpServletRequest req) throws SQLException {\n\t\tUser user = (User) req.getSession().getAttribute(\"user\");\n\t\t\n\t\t// Create the course object\n\t\tPendingCourse course = new PendingCourse();\n\t\tcourse.setCourseName(req.getParameter(\"courseName\"));\n\t\tcourse.setProfessorName(user.getName());\n\t\tcourse.setEmailAddress(user.getEmailAddress());\n\t\tcourse.setTime(req.getParameter(\"time\"));\n\t\tcourse.setCourseNumber(Integer.parseInt(req.getParameter(\"courseNumber\")));\n\t\tcourse.setCourseSection(Integer.parseInt(req.getParameter(\"sectionNumber\")));\n\t\tcourse.setCredits(Integer.parseInt(req.getParameter(\"credits\")));\n\t\tcourse.setDays(req.getParameter(\"days\"));\n\t\tcourse.setLocation(req.getParameter(\"location\"));\n\t\tcourse.setCRN(Integer.parseInt(req.getParameter(\"CRN\")));\n\t\tcourse.setDescription(req.getParameter(\"description\"));\n\t\treturn course;\n\t\t\n\t}", "public void setStudent(Student s) {\r\n student = s;\r\n }", "public String getcourse() {\n\t\treturn course;\n\t}", "private void assignCourses() throws StudentEnrollmentException {\n\t\tCourse newCourse;\n\t\tfor (int id : courseID) {\n\t\t\tnewCourse = courseDao.getCourse(id);\n\t\t\tstudent.assignNewCourse(newCourse);\n\t\t}\n\t}", "@Override\r\n\tpublic void saveCourse(int studentid) {\n\t\tint courseid =0;\r\n\t\tSystem.out.println(\"输入课程编号:\");\r\n courseid = input.nextInt();\r\n\t\tStudentDAO dao = new StudentDAOimpl();\r\n\t\tint a = dao.saveCourse(studentid,courseid);\r\n\t\tif (a!=0){\r\n\t\t\tSystem.out.println(\"选课成功\");\r\n\t\t}else\r\n\t\t\tSystem.out.println(\"选课失败\");\r\n\t}", "@RequestMapping(value = \"/api/user/{userId}/course\", method = RequestMethod.POST)\n public ResponseEntity<Course> newCourse(@PathVariable String userId, @RequestBody Course courseDetails) {\n try {\n return new ResponseEntity<>(courseService.addCourse(courseDetails, userId), HttpStatus.ACCEPTED);\n } catch (JgitException e) {\n logger.error(\"Error in adding a new course\");\n return new ResponseEntity<>(courseDetails, HttpStatus.PARTIAL_CONTENT);\n }\n }", "@Override\n\tpublic String setCourseId() {\n\t\treturn null;\n\t}", "private void setupCreateCourse() {\n\t\tmakeButton(\"Create Course\", (ActionEvent e) -> {\n\t\t\ttry {\n\t\t\t\tString[] inputs = getInputs(new String[] { \"Name:\", \"Number:\" });\n\t\t\t\tif (inputs == null)\n\t\t\t\t\treturn;\n\n\t\t\t\tint num = Integer.parseInt(inputs[1]);\n\t\t\t\tadCon.createCourse(inputs[0], num);\n\t\t\t\tupdateCourses();\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Course number must be a number\", \"Error\",\n\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t}\n\t\t});\n\t}", "private void updateCourse(final Course course){\n db.collection(\"Courses\").document(course.getDocid())\n .set(course)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n\n Toast.makeText(CourseActivity.this, \"Successfully updated course info\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(CourseActivity.this, \"Failed to update course\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@BeforeEach\r\n void createCourse() {\r\n date = new Date(1220227200L * 1000);\r\n lecture = new Lecture();\r\n lecture.setCourseId(\"CSE1230\");\r\n lecture.setDuration(50);\r\n lecture.setLectureId(9);\r\n lecture.setScheduledDate(date);\r\n }", "Course() {\r\n\t\tsetValidDays(true);\r\n\t\tsetName(null);\r\n\t\tsetNumberOfDays(0);\r\n\t\tsetPrice(0.0);\r\n\t}", "@Override\n\tpublic void addCourse(String courseName) {\n\t\tcd.addCourse(courseName);\n\t}", "public Student(int id, String name, String course) {\n this.id = id;\n this.name = name;\n this.course = course;\n }", "public void setCourseCode(String courseCode)\r\n\t{\r\n\t\tthis.courseCode = courseCode;\r\n\t}", "@Override\n\tpublic void addCourse(Course c) {\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(c);\n\t\t\n\t}", "public Course() {\n this(\"course\", null);\n }", "public void addCourse(Course c){\n\t\tcourses.add(c);\n\t}", "public void setCourseName(String courseName) {\n this.courseName = courseName;\n }", "public void setCourseName(String courseName) {\n this.courseName = courseName;\n }", "public void setCourseName(String courseName) {\n this.courseName = courseName;\n }", "public void setCourseName(String courseName) {\n this.courseName = courseName;\n }", "private void addCourse() throws IOException, InterruptedException {\n Scanner sc = new Scanner(System.in);\n Course course = new Course();\n\n System.out.println(\"\\nPlease enter the course code:\");\n String courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"\\nPlease enter the course code:\");\n courseID = sc.nextLine();\n }\n courseID = courseID.toUpperCase();\n //Course course = new Course(courseID,null,-1)\n\n while(courseMgr.readCourseByID(courseID)!=null){\n ErrorCodeBoundary.printErrorCourseAlreadyExist();\n System.out.println(\"\\n***********What would you like to do next ?***********\");\n System.out.println(\" Course Information \");\n System.out.println(\"______________________________________________________\\n\");\n System.out.println(\"|1. Add another course |\");\n System.out.println(\"|2. Update information for this course |\");\n System.out.println(\"|----------------------------------------------------|\");\n System.out.println(\"|0. Return to admin menu page |\");\n System.out.println(\"|----------------------------------------------------|\");\n System.out.println(\"______________________________________________________\");\n\n //sc.nextLine();\n int choice;\n\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter your choice:\");\n sc.next();\n }\n choice = sc.nextInt();\n if((choice < 0) || (choice > 2))\n System.out.println(\"Invalid input! Please enter your choice:\");\n } while ((choice < 0) || (choice > 2));\n if(choice == 1){\n System.out.println(\"\\nPlease enter another course code:\");\n sc.nextLine();\n courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"\\nPlease enter the course code:\");\n courseID = sc.nextLine();\n }\n\n }\n else if(choice ==2){\n this.courseIDExist = courseID;\n this.updCourse();\n return;\n }\n else\n return;\n\n\n }\n\n courseID = courseID.toUpperCase();\n course.setCourseID(courseID);\n\n\n System.out.println(\"Please enter the school:\");\n String school = sc.nextLine();\n while(!school.matches(\"^[a-zA-Z]*$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter the school:\");\n school = sc.nextLine();\n }\n school = school.toUpperCase();\n course.setSchool(school);\n\n System.out.println(\"\\n**************Please choose a course type**************\");\n System.out.println(\" Course Type Information \");\n System.out.println(\"______________________________________________________\\n\");\n System.out.println(\"|1. Lecture only |\");\n System.out.println(\"|2. Lecture with tutorial |\");\n System.out.println(\"|3. Lecture tutorial and lab |\");\n System.out.println(\"______________________________________________________\");\n\n\n int courseType;\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter the course type:\");\n sc.next();\n }\n courseType = sc.nextInt();\n if((courseType < 1) || (courseType > 3))\n System.out.println(\"Input number out of range! Please enter the course type:\");\n } while ((courseType < 1) || (courseType > 3));\n\n course.setCourseType(courseType-1);\n\n\n System.out.println(\"\\nHow many indices for this course?\");\n int noOfIndex;\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter the number of index for this course:\");\n sc.next();\n }\n noOfIndex = sc.nextInt();\n if(noOfIndex < 1)\n System.out.println(\"The number of index can't be less than 1.Please enter the number of index for this course:\");\n } while (noOfIndex < 1);\n\n ArrayList<String> dateAndTime = new ArrayList<String>();\n CourseIndex courseIndex = new CourseIndex();\n ArrayList<CourseCompo> courseCompoList = new ArrayList<CourseCompo>();\n\n for(int i=0;i<noOfIndex;i++){\n courseIndex = this.addCourseIndex(courseID);\n \n \n if (courseIndex==null)\n return;\n courseCompoList = this.addCourseComp(courseType);\n for(CourseCompo courseComp:courseCompoList){\n courseIndex.addCourseCompo(courseComp);\n }\n\n /*\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n }*/\n course.addCourseIndex(courseIndex);\n CourseManager courseManager = new CourseManager();\n courseManager.addCourseToDB(course);\n System.out.println(\"\\nThe course have been added successfully.\");\n printAllCourseInDB();\n\n\n }\n }", "public void enroll(String studentId, String courseId)\r\n throws RemoteException;", "Course copy(UUID courseOrigUuid, \n\t\t\tCourse courseNew, \n\t\t\tboolean copyParticipants, \n\t\t\tboolean copyLessons, \n\t\t\tboolean copyTrainers) throws ScbValidationException;", "public CreateCourse() {\r\n super(\"Create Course\", \"Creates a course\", \"`!createcourse`\", commands, \"admin\");\r\n this.requiredUserPermissions = new Permission[]{Permission.ADMINISTRATOR}; // User must have administrator privileges\r\n }", "public static Course addCourse() {\n\n Course newCourse = new Course();\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the name of course\");\n String courseName = scan.nextLine();\n newCourse.setCourseName(courseName);\n\n System.out.println(\"Enter course ID number\");\n String numberID = scan.nextLine();\n newCourse.setCourseID(numberID);\n\n System.out.println(\"Enter the first and last name of teacher\");\n String name = scan.nextLine();\n\n// newCourse.setTaughtBy(name);\n\n System.out.println(\"Enter the first and last name of student\");\n String name2 = scan.nextLine();\n\n// newCourse.setTakenBy(name2);\n\n\n return newCourse;\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void setComboBoxTeacherCourse(String id) {\r\n\t\t\r\n\t\tArrayList<String> a1 = new ArrayList<String>();\r\n\t\tArrayList<String> a2 = new ArrayList<String>();\r\n\t\tCourse course = new Course();\r\n\t\tMyThread C = new MyThread(RequestType.setComboBoxTeacherCourse, IndexList.setComboBoxTeacherCourse, id);\r\n\t\tC.start();\r\n\t\ttry {\r\n\t\t\tC.join();\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ta1 = (ArrayList<String>) MsgFromServer.getDataListByIndex(IndexList.setComboBoxTeacherCourse);\r\n\r\n\t\tfor (int i = 0; i < a1.size(); i++) {\r\n\t\t\tMyThread a = new MyThread(RequestType.createCourseEntity, IndexList.createCourseEntity, a1.get(i));\r\n\t\t\ta.start();\r\n\t\t\ttry {\r\n\t\t\t\ta.join();\r\n\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcourse = (Course) MsgFromServer.getDataListByIndex(IndexList.createCourseEntity);\r\n\t\t\ta2.add(course.getName());\r\n\t\t}\r\n\t\r\n\t\tObservableList<String> list = FXCollections.observableArrayList(a2);\t\r\n\t\tSTC.setItems(list);\r\n\r\n\t}", "Student(String name) {\n\t\tthis.name = name;\n\t\tregisteredCourses = new Course[30];\n\t}", "protected Course(Course course) {\n this.courseCode = course.getCourseCode();\n this.courseTitle = course.getCourseTitle();\n this.courseStatus = course.getCourseStatus();\n this.credit = course.getCourseCredit();\n this.preReqList = course.getPrerequisites();\n }", "public void addCourse(String course, int startYear, int endYear, String semester) throws SQLException\r\n\t{\n\t\tPreparedStatement preparedStatement = connection.prepareStatement(ADD_COURSES);\r\n \r\n\t\tpreparedStatement.setString(1, course);\r\n\t\tpreparedStatement.setInt(2, startYear);\r\n\t\tpreparedStatement.setInt(3, endYear);\r\n\t\tpreparedStatement.setString(4, semester);\r\n \r\n\t\tpreparedStatement.executeUpdate();\r\n\t}", "@Override\n public void create(Course t) {\n String statement = INSERT;\n data.makeUpdateStatement(statement,new Object[]{(Object)t.getTitle(),(Object)t.getStream(), (Object)t.getType(),\n (Object)t.getStart_date(),(Object)t.getEnd_date()});\n Course lastCreatedCourse = getByMaxId(); //after the course creation, we get back the last course with the id\n t.setId(lastCreatedCourse.getId()); //and set the id to the given course\n data.closeConnections(data.ps, data.conn);\n \n }", "public void insertCourse(Course course) {\n\t\tthis.getHibernateTemplate().save(course);\n\n\t}", "public void setStudent(Student student) {\r\n\t\tthis.student = student;\r\n\t}", "public SelectCourse() {\n super();\n }", "public void addCourse(Courses course) throws SQLException {\n ConnectDB db = ConnectDB.getInstance();\n Connection con = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try {\n String sql = \"insert into [dbo].[Courses] values (?,?,?,?,?,?,?)\";\n\n con = db.openConnection();\n ps = con.prepareStatement(sql);\n ps.setString(1, course.getCourseName());\n ps.setString(2, course.getCourseImage());\n ps.setInt(3, course.getFee());\n ps.setInt(4, course.getCourseDuration());\n ps.setString(5, course.getTeacherName());\n ps.setString(6, course.getCourseDescription());\n ps.setInt(7, course.getCategory());\n ps.execute();\n\n } catch (Exception ex) {\n Logger.getLogger(CoursesDAO.class.getName()).log(Level.SEVERE,\n null, ex);\n } finally {\n ps.close();\n con.close();\n\n }\n }", "public Course(String n, String i, int m, String in, int s, String l) {\n\t\tname = n;\n\t\tid = i;\n\t\tmaxstudents = m;\n\t\tinstructor = in;\n\t\tsection = s;\n\t\tlocation = l;\n\t}", "public Course(int id, String title) {\n this.id = id;\n this.title = title;\n }", "private void saveCourse() {\n String nameString = mNameEditText.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check if all the fields in the editor are blank\n if (mCurrentCourseUri == null && TextUtils.isEmpty(nameString)) {\n // Since no fields were modified, we can return early without creating a new pet.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and pet attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(CourseEntry.COLUMN_COURSE_NAME, nameString);\n\n // Determine if this is a new or existing pet by checking if mCurrentPetUri is null or not\n if (mCurrentCourseUri == null) {\n // This is a NEW pet, so insert a new pet into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(CourseEntry.CONTENT_URI_COURSE, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_course_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_course_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n\n int rowsAffected = getContentResolver().update(mCurrentCourseUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_course_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_course_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "public CourseCalendar(List<Course> courses) {\n this(courses, \"C-TY\", true, false);\n }", "public Course(int id, String name, String description) {\n this.id = id;\n this.name = name;\n this.description = description;\n this.teachers = new ArrayList<>();\n }", "public void setCourseToFileString (String courseToFileString)\n\t{\n\t\tthis.courseToFileString = getCourseName ( ) + \" | \" + getCourseNumber ( ) + \" | \" + getInstructor ( ) + \"\\n\" ;\n\t\tthis.saveNeed = true;\n\n\t}", "@Override\r\n\tpublic void seCourse() {\n\t\tString coursename = \"\";\r\n int teacherid = 0;\r\n String inputStr = \"\";\r\n System.out.println(\"是否需要输入教师编号关键词(y/n):\");\r\n inputStr = input.next();\r\n if(inputStr.equals(\"y\")) {\r\n System.out.println(\"请输入教师编号关键词:\");\r\n teacherid = input.nextInt();\r\n }\r\n System.out.println(\"是否需要输入课程名称关键词(y/n):\");\r\n inputStr = input.next();\r\n if(inputStr.equalsIgnoreCase(\"y\")) {\r\n System.out.println(\"请输入课程名称关键词:\");\r\n coursename = input.next();\r\n }\r\n StudentDAO dao = new StudentDAOimpl();\r\n List<Course> list = dao.seCourse(coursename, teacherid);\r\n System.out.println(\"课程编号\\t课程名称\\t教师编号\\t课程课时\");\r\n for(Course c : list) {\r\n System.out.println(c.getCourseid()+\"\\t\"+c.getCoursename()+\"\\t\"+c.getTeacherid()+\"\\t\"+c.getCoursetime());\r\n }\r\n\t}", "public SelectCourse(Integer uId, Integer cId) {\n this.uId = uId;\n this.cId = cId;\n }", "public String getCourseId() {\n\t\treturn courseId;\n\t}", "public Course createTestCourseObject() {\n Course course = new Course(makeRandomString());\n return courseRepository.save(course);\n }", "public void setCourseId(long courseId) {\n _courseImage.setCourseId(courseId);\n }", "public void addCourse(Course c) {\n\t\tcourseList.add(c);\n\t}", "public String getCourseId() {\n return courseId;\n }", "public String getCourse() {\n\t\treturn Course;\n\t}", "public void setCourseCode(String courseCode) {\n\t\tCourseCode = courseCode;\n\t}", "Course(Subject subject){\n \t\tthis.subject = subject;\n\t\tdaysToRun = subject.getDuration();\n\t\tenrolled = new ArrayList<Student>();\n\t\tcancelled = false;\n\t\tfinished = false;\n \t}", "public Course(int id, String name, String description, Faculty teacher){\n this.id = id;\n this.name = name;\n this.description = description;\n this.teachers = new ArrayList<>();\n this.teachers.add(teacher);\n }", "public void updateCourse(Connection con) throws SQLException, NumberFormatException, IllegalArgumentException {\r\n //Get all the data about the course from the fields\r\n int intCID = getCID();\r\n int intSID = getSID();\r\n String strName = getName();\r\n String strTitle = getTitle();\r\n String strDepartment = getDepartment();\r\n int intCredits = getCredits();\r\n String strDescription = getDescription();\r\n String strOutcomes = getOutcomes();\r\n String strContactEmail = getContactEmail();\r\n String strContactName = getContactName();\r\n\r\n illegalDataFieldsCheck(intSID, strName, strTitle);;\r\n Queries.updateCourse(con, intCID, intSID, strName, strTitle, strDepartment, intCredits, strDescription, strOutcomes, strContactEmail, strContactName);\r\n }", "public Course(String courseId, String courseIdSchool, String teacherId, String courseName, String courseType, String courseAcademy, Float courseCredit, String courseArea, String courseTeacher) {\n this.courseId = courseId;\n this.courseIdSchool = courseIdSchool;\n this.teacherId = teacherId;\n this.courseName = courseName;\n this.courseType = courseType;\n this.courseAcademy = courseAcademy;\n this.courseCredit = courseCredit;\n this.courseArea = courseArea;\n this.courseTeacher = courseTeacher;\n }", "public EditCourseForm(java.awt.Frame parent, boolean modal, CourseDto course) {\n super(parent, modal);\n initComponents();\n this._course = course;\n onLoading();\n initialization();\n }", "public Course(String alias) {\n this(alias, COURSE);\n }" ]
[ "0.7170034", "0.70155954", "0.67550135", "0.66669047", "0.6576238", "0.6555568", "0.65456015", "0.6453327", "0.6306509", "0.63023466", "0.62776065", "0.6205937", "0.61827826", "0.61738306", "0.6157881", "0.6106482", "0.6082726", "0.60044", "0.5885722", "0.58840066", "0.58113873", "0.5808853", "0.58086944", "0.5795084", "0.5793109", "0.5782402", "0.576149", "0.57599413", "0.5751846", "0.5743128", "0.5737816", "0.5732614", "0.57318974", "0.57286584", "0.5727849", "0.5725532", "0.56962806", "0.5695343", "0.5693922", "0.5689301", "0.5683414", "0.56811607", "0.5676455", "0.56698775", "0.56363994", "0.56340975", "0.5618482", "0.5614163", "0.55983067", "0.5565694", "0.55619806", "0.5539329", "0.5538373", "0.5514858", "0.55089706", "0.54737747", "0.54693824", "0.54675597", "0.5450874", "0.54409593", "0.5420398", "0.54163086", "0.54163086", "0.54163086", "0.54163086", "0.54114366", "0.54107344", "0.54007214", "0.53964794", "0.53950804", "0.53923255", "0.53865576", "0.5385584", "0.53799903", "0.53766775", "0.5348969", "0.53422725", "0.5338316", "0.53368855", "0.53273636", "0.53194356", "0.531937", "0.5318708", "0.53176564", "0.5306601", "0.5305115", "0.5298765", "0.5294371", "0.526279", "0.5260825", "0.52454996", "0.52431893", "0.52428126", "0.52263254", "0.52246416", "0.5222857", "0.5221299", "0.52192587", "0.5212618", "0.52024215" ]
0.6094863
16
String pattern = ",.";
public static String formatNumber(double number) { String pattern = "###,###"; DecimalFormat myFormatter = new DecimalFormat(pattern); String output = myFormatter.format(number); return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidPattern(String pattern) {\n return !pattern.startsWith(\"-\") && !pattern.contains(\",\");\n }", "private void replaceCommaToDot(String contentString)\n {\n char[] charArray = contentString.toCharArray();\n \n for(int i = 0; i < charArray.length; i++)\n {\n //if comma, then replace to dot.\n if(charArray[i] == ',')\n {\n charArray[i] = '.'; \n }\n } \n //reconvert to String.\n contentString = charArray.toString();\n }", "private String regex() {\n final List<String> keys = new LinkedList<>();\n for (final String key : this.template.split(\"\\\\.\")) {\n if (key.equals(\"*\")) {\n keys.add(\"\\\\w+\");\n } else {\n keys.add(key);\n }\n }\n return String.join(\"\\\\.\", keys);\n }", "public void prueba(){\r\n //Float f = Float.parseFloat(jtfValor.getText());\r\n String s = \"100.000,5\";\r\n \r\n String d = s.replace(\".\",\"\");\r\n // s.replaceAll(\",\", \".\");\r\n // s.trim();\r\n System.out.println(d);\r\n \r\n }", "public static String formatCommaString(String text){\r\n\t\tString[] arr = text.split(\",\");\r\n\t\tString result=\"\";\r\n\t\tfor(String s: arr){\r\n\t\t\tif(!\"\".equalsIgnoreCase(s.trim())){\r\n\t\t\t\tresult+=s+\",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(result.endsWith(\",\")){\r\n\t\t\tresult=result.substring(0,result.length()-1);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static String toDotDecimalSeparator(String str) {\r\n return str.replaceAll(\",(?=[0-9]+,)\", \"\").replaceAll(\",\", \".\");\r\n }", "public void addPattern(String pattern) {\n\t\tArrayList<String> patterns = new ArrayList<String>();\n\t\tStringTokenizer entries = new StringTokenizer(pattern, \":,\");\n\t\twhile (entries.hasMoreTokens()) {\n\t\t\tpatterns.add(entries.nextToken());\n\t\t}\n\n\t\taddPatterns((String[]) patterns.toArray(new String[patterns.size()]));\n\t}", "private String[] commaDelimited(String str) {\n StringTokenizer st = new StringTokenizer(str,\",\");\n String strs[] = new String[st.countTokens()];\n for (int i=0;i<strs.length;i++) strs[i] = Utils.decFmURL(st.nextToken());\n return strs;\n }", "public static boolean isDouble(String s){\n boolean flag = true;\n int countPonto = 0;\n if(s.charAt(0) == '.' || s.charAt(0) == ',')\n countPonto++;\n else \n flag = ((s.charAt(0) >= '0' && s.charAt(0) <= '9') || s.charAt(0) == '-' || s.charAt(0) == '+' );\n int i = 1;\n while(flag && i < s.length() && countPonto <=1){\n if(s.charAt(i) == '.' || s.charAt(i) == ',')\n countPonto++;\n else \n flag = (s.charAt(i) >= '0' && s.charAt(i) <= '9' );\n i++;\n }\n flag = flag&&(countPonto<=1) ? true:false;\n return flag;\n }", "public String puncRemoved(String payment){\n String result = \"\";\n for(int i = 0; i < payment.length(); i++){\n if(payment.charAt(i) != ','){\n result = result + payment.charAt(i);\n }\n }\n return result;\n }", "private String findDelimiter(String line) {\n\t\tString d = null;\n\t\tif(line.indexOf(\",\") > 0) {\n\t\t\td = \",\";\n\t\t} else if(line.indexOf(\";\") > 0) {\n\t\t\td = \";\";\n\t\t} else if(line.indexOf(\" \") > 0) {\n\t\t\td = \" \";\n\t\t}\n\t\treturn d;\n\t}", "private String getDecimalPattern(String str) {\n int decimalCount = str.length() - str.indexOf(\".\") - 1;\n StringBuilder decimalPattern = new StringBuilder();\n for (int i = 0; i < decimalCount && i < MAX_DECIMAL; i++) {\n decimalPattern.append(\"0\");\n }\n return decimalPattern.toString();\n }", "private double parseAmount(String amount){\n return Double.parseDouble(amount.replace(\",\", \".\"));\n }", "public InvalidCommaException(String message){\n super(\"Content should be without comma. Your input: \" + message);\n }", "private static String escape(String s) {\n StringBuilder buf = new StringBuilder();\n int length = s.length();\n for (int i = 0; i < length; i++) {\n char c = s.charAt(i);\n if (c == ',') {\n buf.append(\"\\\\,\");\n } else {\n buf.append(c);\n }\n }\n\n return buf.toString();\n }", "@Test public void testEuropeanComma() {\n char comma = ';';\n int n = random.nextInt(10) + 10;\n String[] src = new String[n];\n for (int i = 0; i < n; i++) {\n src[i] = randomString();\n }\n println(Arrays.toString(src));\n try (CSVUtil.Writer writer = CSVUtil.newWriter(path, comma)) {\n for (String s : src) {\n writer.write(s);\n }\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n\n try {\n List<String[]> strings = CSVUtil.read(path, comma);\n assert strings.size() == 1;\n println(Arrays.toString(strings.get(0)));\n assert Arrays.toString(src).equals(Arrays.toString(strings.get(0)));\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n\n try {\n List<String[]> strings = CSVUtil.read(path);\n assert strings.size() == 1;\n println(Arrays.toString(strings.get(0)));\n assert Arrays.toString(src).equals(Arrays.toString(strings.get(0)));\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n }", "public static String format(Object val, String pattern, char groupsepa, char decimalsepa)\n {\n if(val == null)\n {\n\t return \"\";\n } \n try\n {\n\t DecimalFormat _df = new DecimalFormat();\n\t _df.setRoundingMode(RoundingMode.HALF_UP);\n\t _df.applyPattern(pattern);\n\n\t String standardFrmt = _df.format(val);\n\t // need first to replace by #grpSep# so that in case the group separator is equal to dot . the replacement will be correct\n\t String returnFrmt = standardFrmt.replace(\",\",\"#grp#\");\n\t returnFrmt = returnFrmt.replace(\".\",decimalsepa+\"\");\n\t returnFrmt = returnFrmt.replace(\"#grp#\",groupsepa+\"\");\n\t return returnFrmt;\n\n }\n catch(Exception ex)\n {\n\t log.error(ex, \"[NumberUtil] Error caught in method format\");\n\t return \"\";\n }\n}", "Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));\r\n\t\t} else {\r\n\t\t\tpatternSpecs.add(\"^.*$\");\r\n\t\t}\r\n\t\t\r\n\t\tString completeSpec = Joiner.on(\"|\").join(patternSpecs); // \r\n\t\t\r\n\t\tPattern pattern = Pattern.compile(completeSpec);\r\n\t\t\r\n\t\treturn pattern;\r\n\t}", "private static String removeDigitGroupSeparators(final String input)\n {\n final String output = input.trim();\n\n // Replace one occurrence only, otherwise we will generate an incorrect result\n if (output.contains(\",\"))\n {\n return output.replace(\",\", \"\");\n }\n else\n {\n return output.replace(\".\", \"\");\n }\n }", "public static void main(String[] args) {\n\n String[] split = \"hjhk***jklj,j\\nkl\".split(quote(\"***\") + \"|,\");\n for (String every : split)\n System.out.println(\"test slpit: \" + every);\n// Pattern p = Pattern.compile(\"\\\\[([^\\\\]]+)\\\\]\");\n// Matcher m = p.matcher(\"[***]\");\n// while(m.find()) {\n// System.out.println(m.group(0));\n// }\n }", "private static String extractCustomMultipleDelimiters(String delimiter) {\n\t\tdelimiter = delimiter.substring(1, delimiter.length() - 1);\n\t\tdelimiter = delimiter.replace(\"][\", \"|\");\n\t\treturn delimiter;\n\t}", "public static ArrayList<String> negations() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner negationer;\n try {\n negationer = new Scanner(new File(\"Negations.txt\"));\n negationer.useDelimiter(\", *\");\n while (negationer.hasNext()){\n temp.add(\" \"+negationer.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "private String commaDelimited(String strs[]) {\n StringBuffer sb = new StringBuffer();\n if (strs.length > 0) {\n sb.append(Utils.encToURL(strs[0]));\n for (int i=1;i<strs.length;i++) sb.append(\",\" + Utils.encToURL(strs[i]));\n }\n return sb.toString();\n }", "private String getCSVSeparator(){\n DecimalFormatSymbols s = new DecimalFormatSymbols(getLocale());\n if(s.getDecimalSeparator() == ',')\n return \";\";\n else\n return \",\";\n }", "private static String[] sepInst(String inst){\n\n String[] separated = new String[3];\n separated[0] = inst.substring(0, inst.indexOf(' '));\n if(-1 == inst.indexOf(',')){//enters if when only one variable\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.length());\n }else{//enters else when only when two variables\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.indexOf(','));\n separated[2] = inst.substring(inst.indexOf(',')+2, inst.length());\n }//end ifelse\n\n return separated;\n }", "public void testIllegalCommaInName() throws Exception\r\n {\r\n try\r\n {\r\n new ComponentDirective( \r\n \"fred,blogs\", m_activation, m_collection, m_lifestyle, m_classname, \r\n m_categories, m_context, null, null );\r\n fail( \"Did not throw an IllegalArgumentException for a name with a comma.\" ); \r\n }\r\n catch( IllegalArgumentException e )\r\n {\r\n // ok\r\n }\r\n }", "private StringBuffer removeCommasAtEnd(StringBuffer sql) {\r\n int i=sql.length()-3;\r\n while(i>0 && (sql.charAt(i)==' ' || sql.charAt(i)==','))\r\n i--;\r\n sql = sql.replace(i+1,sql.length()-2,\" \");\r\n\r\n return sql;\r\n }", "public static void main(String[] args) {\n\t\tString record =\"px123,kingstone,340,1|3|4|1\";\n\t\tString record1 =\"px125,electronics,storege,pendrive,kingstone,340,1|3|4|1\";\n\t\tString record2 =\"px125,electronics,storege,pendrive,kingstone,340\";\n\t\tString what = \"\\\\d+,(\\\\d\\\\|*)+$\";\n\t\tPattern p=Pattern.compile(what);\n\t\tMatcher m=p.matcher(record);\n\t\tif(m.find())\n\t\t{\n\t\t\tSystem.out.println(\"correct\");\n\t\t\tString str[]=m.group().split(\",\");\n\t\t\tSystem.out.println(str[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"wrong\");\n\t\t}\n\t\t\n\t}", "private static String rep(String input) {\n\t\tchar[] ca = input.toCharArray();\n\t\tint c = 0;\n\t\tfor (int i = 0, n = ca.length; i < n; i++) {\n\t\t\tif (ca[i] == '\\'')\n\t\t\t\tc++;\n\t\t\telse if (ca[i] == ',' && ((c % 2) != 0))\n\t\t\t\tca[i] = '~';\n\t\t}\n\t\treturn String.valueOf(ca);\n\t}", "public String sanitizeNoCommas(String amount) {\n return amount.replaceAll(\"[^\\\\d.]\", \"\");\n }", "private String filterDecimalString(String string) {\n return string\n .replaceAll(\"[^0-9.]\", \"\")\n .replaceFirst(\"\\\\.\", \"@\")\n .replaceAll(\"\\\\.\", \"\")\n .replaceFirst(\"@\", \".\");\n }", "@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }", "private boolean isCommaStatement() {\n return line.contains(\",\") && !line.contains(\"(\");\n }", "String getDelimiter();", "private static String convertPattern(String pattern) {\n if (Strings.isNullOrEmpty(pattern)) {\n return pattern;\n }\n\n return \"^\" + pattern\n .replaceAll(\"\\\\[\", \"\\\\[\")\n .replaceAll(\"]\", \"\\\\]\")\n .replaceAll(\"\\\\.\", \"\\\\.\")\n .replaceAll(\"\\\\*\", \"\\\\*\")\n .replaceAll(\"(?<!\\\\\\\\)_\", \".\")\n .replaceAll(\"\\\\\\\\_\", \"_\")\n .replaceAll(\"(?<!\\\\\\\\)%\", \".*\")\n .replaceAll(\"\\\\\\\\%\", \"%\") +\n \"$\";\n }", "private static void getRidOfComma(String individualLine, int index) {\n }", "public interface RegExp {\n String NUMBER_OF_COMPOSITION = \"^[1-2][0-9]|[1-9]$\";\n String BREAK_DATE_BY_DOT = \"[.]\";\n String IDENTIFY_BUMDLE = \"^([E|e][N|n])|[У|у][К|к][Р|р]$\";\n String DURATION = \"^[1-9]|[1-9][0-9]|[1-4][0-9][0-9]$\";\n}", "public List<String> putDecimal(String p) {\n List<String> decCoordinates = new ArrayList<>();\n decCoordinates.add(p);\n\n //add a decimal point in between every index in s and add the value to the list of decimal coordinates\n for (int i = 1; i < p.length(); i++) {\n decCoordinates.add(p.substring(0, i) + \".\" + p.substring(i));\n }\n return decCoordinates;\n }", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "Rule ListSeparator() {\n // No effect on value stack\n return Sequence(AnyOf(\",;\"), WhiteSpace());\n }", "boolean isDelimited(String s) {\r\n\t\tif (s.length() < 2) return false;\r\n\t\t\r\n\t\tOptional<String> startChar = Optional.of(s.substring(0, 1));\r\n\t\tOptional<String> endChar = Optional.of(s.substring(s.length() - 1));\r\n\t\t\r\n\t\tfor (Delimiter delim: this) {\r\n\t\t\tif (startChar.equals(delim.start()) && endChar.equals(delim.end())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "abstract String toDot();", "@Test\n public void delims() {\n }", "public static boolean isCommaCorrect( String number ) {\n //a string is comma correct if it is not null and any commas are \n //positioned in a position that is a multiple of 4 from the end\n \n if ( number == null ) return false;\n \n boolean valid = true;\n int currPos = 0;\n while ( valid && currPos != - 1 ) {\n \n currPos = number.indexOf( \",\", currPos );\n \t\n if ( currPos != -1 ) {\n valid = ( number.length() - currPos ) % 4 == 0;\n currPos++;\n }\n \n }\n return valid;\n }", "public String delimiterRegex() {\n return DELIMITER_REGEX;\n }", "private String getSeparator(String targetString) {\n return (targetString.indexOf(',') > -1 ? \",\" : (targetString.indexOf(';') > -1 ? \";\" : (targetString.contains(\"regex:\") ? \"\" : \":\")));\n }", "public static double[] parseDoubleAndFilterComma(String val[]) {\n\t\t\n\t\tif (val != null) {\n\t\t\tdouble ret[] = new double[val.length];\n\t\n\t\t\tfor (int i = 0; i < val.length; i++) {\n\t\t\t\tif (val[i] != null) {\n\t\t\t\t\tval[i] = val[i].replaceAll(\",\", \"\");\n\t\t\t\t}\n\t\t\t\tret[i] = parseDouble(val[i]);\n\t\t\t}\n\t\n\t\t\treturn ret;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t}", "private void applyPattern(String pattern, boolean localized) {\n char zeroDigit = PATTERN_ZERO_DIGIT;\n char groupingSeparator = PATTERN_GROUPING_SEPARATOR;\n char decimalSeparator = PATTERN_DECIMAL_SEPARATOR;\n char percent = PATTERN_PERCENT;\n char perMill = PATTERN_PER_MILLE;\n char digit = PATTERN_DIGIT;\n char separator = PATTERN_SEPARATOR;\n char exponent = PATTERN_EXPONENT;\n char minus = PATTERN_MINUS;\n if (localized) {\n zeroDigit = symbols.getZeroDigit();\n groupingSeparator = symbols.getGroupingSeparator();\n decimalSeparator = symbols.getDecimalSeparator();\n percent = symbols.getPercent();\n perMill = symbols.getPerMill();\n digit = symbols.getDigit();\n separator = symbols.getPatternSeparator();\n exponent = symbols.getExponentialSymbol();\n minus = symbols.getMinusSign();\n }\n boolean gotNegative = false;\n\n decimalSeparatorAlwaysShown = false;\n isCurrencyFormat = false;\n useExponentialNotation = false;\n\n // Two variables are used to record the subrange of the pattern\n // occupied by phase 1. This is used during the processing of the\n // second pattern (the one representing negative numbers) to ensure\n // that no deviation exists in phase 1 between the two patterns.\n int phaseOneStart = 0;\n int phaseOneLength = 0;\n /**\n * Back-out comment : HShih boolean phaseTwo = false;\n */\n\n int start = 0;\n for (int j = 1; j >= 0 && start < pattern.length(); --j) {\n boolean inQuote = false;\n StringBuffer prefix = new StringBuffer();\n StringBuffer suffix = new StringBuffer();\n int decimalPos = -1;\n int multiplier = 1;\n int digitLeftCount = 0, zeroDigitCount = 0, digitRightCount = 0;\n byte groupingCount = -1;\n\n // The phase ranges from 0 to 2. Phase 0 is the prefix. Phase 1 is\n // the section of the pattern with digits, decimal separator,\n // grouping characters. Phase 2 is the suffix. In phases 0 and 2,\n // percent, permille, and currency symbols are recognized and\n // translated. The separation of the characters into phases is\n // strictly enforced; if phase 1 characters are to appear in the\n // suffix, for example, they must be quoted.\n int phase = 0;\n\n // The affix is either the prefix or the suffix.\n StringBuffer affix = prefix;\n\n for (int pos = start; pos < pattern.length(); ++pos) {\n char ch = pattern.charAt(pos);\n switch (phase) {\n case 0:\n case 2:\n // Process the prefix / suffix characters\n if (inQuote) {\n // A quote within quotes indicates either the\n // closing\n // quote or two quotes, which is a quote literal.\n // That\n // is,\n // we have the second quote in 'do' or 'don''t'.\n if (ch == QUOTE) {\n if ((pos + 1) < pattern.length() && pattern.charAt(pos + 1) == QUOTE) {\n ++pos;\n affix.append(\"''\"); // 'don''t'\n } else {\n inQuote = false; // 'do'\n }\n continue;\n }\n } else {\n // Process unquoted characters seen in prefix or\n // suffix\n // phase.\n if (ch == digit || ch == zeroDigit || ch == groupingSeparator || ch == decimalSeparator) {\n // Any of these characters implicitly begins the\n // next\n // phase. If we are in phase 2, there is no next\n // phase,\n // so these characters are illegal.\n /**\n * 1.2 Back-out comment : HShih Can't throw exception here. if (phase == 2) throw new IllegalArgumentException\n * (\"Unquoted special character '\" + ch + \"' in pattern \\\"\" + pattern + '\"');\n */\n phase = 1;\n if (j == 1)\n phaseOneStart = pos;\n --pos; // Reprocess this character\n continue;\n } else if (ch == CURRENCY_SIGN) {\n // Use lookahead to determine if the currency\n // sign\n // is\n // doubled or not.\n boolean doubled = (pos + 1) < pattern.length() && pattern.charAt(pos + 1) == CURRENCY_SIGN;\n if (doubled)\n ++pos; // Skip over the doubled character\n isCurrencyFormat = true;\n affix.append(doubled ? \"'\\u00A4\\u00A4\" : \"'\\u00A4\");\n continue;\n } else if (ch == QUOTE) {\n // A quote outside quotes indicates either the\n // opening\n // quote or two quotes, which is a quote\n // literal.\n // That is,\n // we have the first quote in 'do' or o''clock.\n if (ch == QUOTE) {\n if ((pos + 1) < pattern.length() && pattern.charAt(pos + 1) == QUOTE) {\n ++pos;\n affix.append(\"''\"); // o''clock\n } else {\n inQuote = true; // 'do'\n }\n continue;\n }\n } else if (ch == separator) {\n // Don't allow separators before we see digit\n // characters of phase\n // 1, and don't allow separators in the second\n // pattern (j == 0).\n if (phase == 0 || j == 0)\n throw new IllegalArgumentException(\"Unquoted special character '\" + ch + \"' in pattern \\\"\" + pattern + '\"');\n start = pos + 1;\n pos = pattern.length();\n continue;\n }\n\n // Next handle characters which are appended\n // directly.\n else if (ch == percent) {\n if (multiplier != 1)\n throw new IllegalArgumentException(\"Too many percent/permille characters in pattern \\\"\" + pattern + '\"');\n multiplier = 100;\n affix.append(\"'%\");\n continue;\n } else if (ch == perMill) {\n if (multiplier != 1)\n throw new IllegalArgumentException(\"Too many percent/permille characters in pattern \\\"\" + pattern + '\"');\n multiplier = 1000;\n affix.append(\"'\\u2030\");\n continue;\n } else if (ch == minus) {\n affix.append(\"'-\");\n continue;\n }\n }\n // Note that if we are within quotes, or if this is an\n // unquoted,\n // non-special character, then we usually fall through\n // to\n // here.\n affix.append(ch);\n break;\n case 1:\n // Phase one must be identical in the two sub-patterns.\n // We\n // enforce this by doing a direct comparison. While\n // processing the first sub-pattern, we just record its\n // length. While processing the second, we compare\n // characters.\n if (j == 1)\n ++phaseOneLength;\n else {\n /**\n * 1.2 Back-out comment : HShih if (ch != pattern.charAt(phaseOneStart++)) throw new IllegalArgumentException\n * (\"Subpattern mismatch in \\\"\" + pattern + '\"'); phaseTwo = true;\n */\n if (--phaseOneLength == 0) {\n phase = 2;\n affix = suffix;\n }\n continue;\n }\n\n // Process the digits, decimal, and grouping characters.\n // We\n // record five pieces of information. We expect the\n // digits\n // to occur in the pattern ####0000.####, and we record\n // the\n // number of left digits, zero (central) digits, and\n // right\n // digits. The position of the last grouping character\n // is\n // recorded (should be somewhere within the first two\n // blocks\n // of characters), as is the position of the decimal\n // point,\n // if any (should be in the zero digits). If there is no\n // decimal point, then there should be no right digits.\n if (ch == digit) {\n if (zeroDigitCount > 0)\n ++digitRightCount;\n else\n ++digitLeftCount;\n if (groupingCount >= 0 && decimalPos < 0)\n ++groupingCount;\n } else if (ch == zeroDigit) {\n if (digitRightCount > 0)\n throw new IllegalArgumentException(\"Unexpected '0' in pattern \\\"\" + pattern + '\"');\n ++zeroDigitCount;\n if (groupingCount >= 0 && decimalPos < 0)\n ++groupingCount;\n } else if (ch == groupingSeparator) {\n groupingCount = 0;\n } else if (ch == decimalSeparator) {\n if (decimalPos >= 0)\n throw new IllegalArgumentException(\"Multiple decimal separators in pattern \\\"\" + pattern + '\"');\n decimalPos = digitLeftCount + zeroDigitCount + digitRightCount;\n } else if (ch == exponent) {\n if (useExponentialNotation)\n throw new IllegalArgumentException(\"Multiple exponential \" + \"symbols in pattern \\\"\" + pattern + '\"');\n useExponentialNotation = true;\n minExponentDigits = 0;\n\n // Use lookahead to parse out the exponential part\n // of\n // the\n // pattern, then jump into phase 2.\n while (++pos < pattern.length() && pattern.charAt(pos) == zeroDigit) {\n ++minExponentDigits;\n ++phaseOneLength;\n }\n\n if ((digitLeftCount + zeroDigitCount) < 1 || minExponentDigits < 1)\n throw new IllegalArgumentException(\"Malformed exponential \" + \"pattern \\\"\" + pattern + '\"');\n\n // Transition to phase 2\n phase = 2;\n affix = suffix;\n --pos;\n continue;\n } else {\n phase = 2;\n affix = suffix;\n --pos;\n --phaseOneLength;\n continue;\n }\n break;\n }\n }\n /**\n * 1.2 Back-out comment : HShih if (phaseTwo && phaseOneLength > 0) throw new IllegalArgumentException(\"Subpattern mismatch in \\\"\" + pattern +\n * '\"');\n */\n // Handle patterns with no '0' pattern character. These patterns\n // are legal, but must be interpreted. \"##.###\" -> \"#0.###\".\n // \".###\" -> \".0##\".\n /*\n * We allow patterns of the form \"####\" to produce a zeroDigitCount\n * of zero (got that?); although this seems like it might make it\n * possible for format() to produce empty strings, format() checks\n * for this condition and outputs a zero digit in this situation.\n * Having a zeroDigitCount of zero yields a minimum integer digits\n * of zero, which allows proper round-trip patterns. That is, we\n * don't want \"#\" to become \"#0\" when toPattern() is called (even\n * though that's what it really is, semantically).\n */\n if (zeroDigitCount == 0 && digitLeftCount > 0 && decimalPos >= 0) {\n // Handle \"###.###\" and \"###.\" and \".###\"\n int n = decimalPos;\n if (n == 0)\n ++n; // Handle \".###\"\n digitRightCount = digitLeftCount - n;\n digitLeftCount = n - 1;\n zeroDigitCount = 1;\n }\n\n // Do syntax checking on the digits.\n if ((decimalPos < 0 && digitRightCount > 0)\n || (decimalPos >= 0 && (decimalPos < digitLeftCount || decimalPos > (digitLeftCount + zeroDigitCount))) || groupingCount == 0 || inQuote)\n throw new IllegalArgumentException(\"Malformed pattern \\\"\" + pattern + '\"');\n\n if (j == 1) {\n posPrefixPattern = prefix.toString();\n posSuffixPattern = suffix.toString();\n negPrefixPattern = posPrefixPattern; // assume these for now\n negSuffixPattern = posSuffixPattern;\n int digitTotalCount = digitLeftCount + zeroDigitCount + digitRightCount;\n /*\n * The effectiveDecimalPos is the position the decimal is at or\n * would be at if there is no decimal. Note that if\n * decimalPos<0, then digitTotalCount == digitLeftCount +\n * zeroDigitCount.\n */\n int effectiveDecimalPos = decimalPos >= 0 ? decimalPos : digitTotalCount;\n setMinimumIntegerDigits(effectiveDecimalPos - digitLeftCount);\n setMaximumIntegerDigits(useExponentialNotation ? digitLeftCount + getMinimumIntegerDigits() : DOUBLE_INTEGER_DIGITS);\n setMaximumFractionDigits(decimalPos >= 0 ? (digitTotalCount - decimalPos) : 0);\n setMinimumFractionDigits(decimalPos >= 0 ? (digitLeftCount + zeroDigitCount - decimalPos) : 0);\n setGroupingUsed(groupingCount > 0);\n this.groupingSize = (groupingCount > 0) ? groupingCount : 0;\n this.multiplier = multiplier;\n setDecimalSeparatorAlwaysShown(decimalPos == 0 || decimalPos == digitTotalCount);\n } else {\n negPrefixPattern = prefix.toString();\n negSuffixPattern = suffix.toString();\n gotNegative = true;\n }\n }\n\n if (pattern.length() == 0) {\n posPrefixPattern = posSuffixPattern = \"\";\n setMinimumIntegerDigits(0);\n setMaximumIntegerDigits(DOUBLE_INTEGER_DIGITS);\n setMinimumFractionDigits(0);\n setMaximumFractionDigits(DOUBLE_FRACTION_DIGITS);\n }\n\n // If there was no negative pattern, or if the negative pattern is\n // identical\n // to the positive pattern, then prepend the minus sign to the positive\n // pattern to form the negative pattern.\n if (!gotNegative || (negPrefixPattern.equals(posPrefixPattern) && negSuffixPattern.equals(posSuffixPattern))) {\n negSuffixPattern = posSuffixPattern;\n negPrefixPattern = \"'-\" + posPrefixPattern;\n }\n\n expandAffixes();\n }", "private String getSplitCapitalPeriodSent(String text) {\n\t\t\r\n\t\tString testString = text;\r\n\t\t\r\n\t\t/*\r\n\t\ttestString = testString.replaceAll(\"\\\\·\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?\\\\·\\\\s?\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t\r\n\t\ttestString = testString.replaceAll(\"–\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?-\\\\s?\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t*/\r\n\t\t\r\n\t\t// System.out.println(\"testString::Before::\" + testString);\r\n\t\t\r\n\t\tString targetPatternString = \"(\\\\s[A-Z]\\\\.\\\\s)\";\r\n\t\tPattern pattern = Pattern.compile(targetPatternString);\r\n\t\tMatcher matcher = pattern.matcher(testString);\r\n\t\t\r\n\t\twhile (matcher.find()) {\r\n\t\t\t// System.out.println(\"Whloe Sent::\" + matcher.group());\r\n\t\t\t// System.out.println(\"Part 1::\" + matcher.group(1));\r\n\t\t\t// System.out.println(\"Part 2::\" + matcher.group(2));\r\n\t\t\t// System.out.println(\"Part 3::\" + matcher.group(3));\r\n\t\t\t\r\n\t\t\tString matchString = matcher.group(1);\r\n\t\t\t\r\n\t\t\tString newMatchString = \"\";\r\n\t\t\tfor ( int j = 0; j < matchString.length(); j++ ) {\r\n\t\t\t\tnewMatchString += matchString.substring(j, j+1) + \" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tSystem.out.println(\"matchString:: \" + matchString);\r\n\t\t\tSystem.out.println(\"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\tlog(LogLevel.INFO, \"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tlog(LogLevel.INFO, \"matchString:: \" + matchString);\r\n\t\t\tlog(LogLevel.INFO, \"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\ttestString = testString.replaceAll(matcher.group(1), newMatchString);\r\n\t\t\t\r\n\t\t\t// String matchResult = matcher.group(1);\r\n\t\t\t// System.out.println(\"matchResult::\" + matchResult);\r\n\t\t}\r\n\t\t\r\n\t\t// System.out.println(\"testString::After::\" + testString);\r\n\t\t\r\n\t\treturn testString;\r\n\t\t\r\n\t}", "static public String[] parseImport(String value) {\n \treturn value.split(\";\");\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString pattern = scan.nextLine();\r\n\t\tint count = 0;\r\n\t\tfor(int i=0 ; i < pattern.length(); i++){\r\n\t\t\tif(pattern.charAt(i) == '@'){\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count==1){\r\n\t\t\tString[] str1 = pattern.split(\"@\");\r\n\t\t\tchar[] c1 = str1[0].toCharArray();\r\n\t\t\tchar[] c2 = str1[1].toCharArray();\r\n\t\t\tint right = 0;\r\n\t\t\tint left = 0;\r\n\t\t\tfor(int i=0;i<c1.length;i++){\r\n\t\t\t\tif(c1.equals('.') && (c1[i]>'a' && c1[i]<'e'))\r\n\t\t\t\t{\r\n\t\t\t\t\tleft++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int j=0;j<c1.length;j++){\r\n\t\t\t\tif(c2.equals('.') && (c2[j]>'a' && c2[j]<'e'))\r\n\t\t\t\t{\r\n\t\t\t\t\tright++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(left>1 && right>2){\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static String _getPatternFromLengthValidator(LengthValidator validator)\r\n {\n int minimum = validator.getMinimum();\r\n int maximum = validator.getMaximum();\r\n\r\n boolean hasMinimum = minimum != Integer.MIN_VALUE;\r\n boolean hasMaximum = maximum != Integer.MAX_VALUE;\r\n\r\n if (hasMinimum && hasMaximum)\r\n return \"(?:.{\" + minimum + \",\" + maximum + \"})\";\r\n\r\n if (hasMinimum)\r\n return \"(?:.{\" + minimum + \",})\";\r\n\r\n if (hasMaximum)\r\n return \"(?:.{,\" + maximum + \"})\";\r\n\r\n return null;\r\n }", "private String getValue(String s)\n {\n if(s.contains(\",\"))\n {\n return s.split(\",\")[0];\n }\n else\n {\n s = s.replaceAll(\"\\\\)\",\"\");\n return s;\n }\n }", "public final void comma() throws RecognitionException {\r\n Token a=null;\r\n\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:199:7: ( (a= COMMA ) )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:199:8: (a= COMMA )\r\n {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:199:8: (a= COMMA )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:199:9: a= COMMA\r\n {\r\n a=(Token)match(input,COMMA,FOLLOW_COMMA_in_comma1216); \r\n out(\",\");\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public static List toListOfStringsDelimitedByCommaOrSemicolon(String s) {\n if (s == null) {\n return Collections.EMPTY_LIST;\n }\n\n List results = new ArrayList();\n // include empty last one, cft. http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String,%20int%29\n String[] terms = s.split(SEPARATOR,-1);\n\n for (int i = 0; i < terms.length; i++) {\n //this has empty string if nothing is found\n String term = terms[i].trim();\n results.add(term);\n }\n\n return results;\n }", "public DecimalFormat(String pattern) {\n // Always applyPattern after the symbols are set\n this.symbols = new DecimalFormatSymbols();\n applyPattern(pattern, false);\n }", "public static String getMultiRegex(int minimum){\n\t\t if (minimum<=0){\n\t\t\t throw new IllegalArgumentException(\"El valor esperado es entero mayor que 0\");\n\t\t } if (minimum == 1) {\n\t\t\t return \"(?:\" + EMAIL_BASE_PATTERN + \"\\\\s*,\\\\s*)*\" + EMAIL_BASE_PATTERN;\n\t\t } else {\n\t\t\t return \"(?:\" + EMAIL_BASE_PATTERN + String.format(\"\\\\s*,\\\\s*){%d,}\", minimum - 1) + EMAIL_BASE_PATTERN;\n\t\t }\n\t }", "private String escape(String token) {\n return token.replace(\",\" , \"\");\n }", "public void setDelims(String delims)\n {\n _delims = delims;\n }", "public String SplitCurrencyValueString(String str) {\n\t\t\n\t\tString temp = null;\n\t\tPattern pattern;\n\n\t\tif (str.contains(\",\") && str.contains(\".\")) {\n\t\t\tpattern = Pattern.compile(\"(\\\\d{0,9},)?\\\\d{0,9}\\\\.\\\\d{0,9}\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (!m.group().isEmpty())\n\t\t\t\t\ttemp = m.group().replaceAll(\",\", \"\");\n\t\t\t}\n\t\t} else if (str.contains(\",\")) {\n\t\t\tpattern = Pattern.compile(\"(\\\\d{0,9},)?\\\\d{0,9}\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (m.group() != null)\n\t\t\t\t\ttemp = m.group().replaceAll(\",\", \"\");\n\t\t\t}\n\t\t} else if (str.contains(\".\")) {\n\t\t\tpattern = Pattern.compile(\"(\\\\d+(?:\\\\.\\\\d+)?)\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (m.group() != null)\n\t\t\t\t\ttemp = m.group();\n\t\t\t}\n\t\t} else {\n\t\t\tpattern = Pattern.compile(\"(\\\\d+)\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (m.group() != null)\n\t\t\t\t\ttemp = m.group();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(temp);\n\t\treturn df.format(Double.parseDouble(temp));\n\n\t}", "public static String formatG(BigDecimal b) {\n\t\tString s = format(b);\n\t\tchar[] charArray = s.toCharArray();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint cnt = -1;\n\t\tif (!s.contains(\".\")) {\n\t\t\tcnt = 0;\n\t\t}\n\t\tfor (int i = charArray.length - 1; i > -1; i--) {\n\t\t\tchar c = charArray[i];\n\t\t\tsb.append(c);\n\t\t\tif ('.' == c) {\n\t\t\t\tcnt = 0;\n\t\t\t} else if (cnt >= 0) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t\tif (cnt == 3 && i != 0) {\n\t\t\t\tsb.append(\",\");\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\treturn sb.reverse().toString();\n\t}", "public void setPattern(String pattern)\n/* */ {\n/* 71 */ setPatterns(new String[] { pattern });\n/* */ }", "boolean isMultiple(String val) {\n\t\tif (val == null) return false;\n\t\treturn val.indexOf(VcfEntry.WITHIN_FIELD_SEP) >= 0;\n\t}", "public String getPatternSeparator()\r\n\t{\r\n\t\treturn patternSeparator;\r\n\t}", "public abstract char getCustomDelimiter();", "DecimalFormat(String pattern, DecimalFormatSymbols symbols) {\n // Always applyPattern after the symbols are set\n this.symbols = (DecimalFormatSymbols) symbols.clone();\n applyPattern(pattern, false);\n }", "private String doubleChecker(String s) {\n\t\tString newS = \"\";\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif((s.charAt(i) > 47 && s.charAt(i) < 58) || s.charAt(i) == '.') {\n\t\t\t\tnewS += s.charAt(i);\n\t\t\t}\n\t\t}\n\t\treturn newS;\n\t}", "public String check_after_decimal_point(double decimal) {\n String result = null;\n String[] after_point = String.valueOf(decimal).split(\"[:.]\");\n if (after_point[after_point.length - 1].equals(\"0\")) {\n result = after_point[0];\n } else {\n result = String.valueOf(decimal).replace(\".\", \",\");\n }\n return result;\n }", "@ParameterizedTest\n @CsvFileSource(files = \"src/test/resources/params/shoppinglist3.csv\",\n numLinesToSkip = 1, delimiterString = \"___\") // Delimiter string in this case.\n public void csvFileSource_StringDoubleIntStringString3(String name,\n double price, int qty, String uom,\n String provider){\n System.out.println(\"name = \" + name + \", price = \" + price + \", qty = \" + qty\n + \", uom = \" + uom + \", provider = \" + provider);\n }", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "private Pattern ConvertToPattern(String configEntry)\n {\n String finalResult = configEntry;\n int regexFlags = 0;\n\n finalResult = finalResult.replace(\", \",\"|\");\n\n finalResult = finalResult.substring(1,finalResult.length()-1);\n\n regexFlags = ConvertRegExOptions(finalResult);\n\n return(Pattern.compile(finalResult, regexFlags));\n }", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "public static String[] returnGroupDecimalSep()\n {\n String[] returnVal = new String[]{\",\",\".\"};\n // if at level of presentation level then take the separators from session\n if(ActionContext.getContext() != null && ServletActionContext.getRequest() != null)\n {\n \t HashMap<String , Object> theFormats = RootUtil.returnNumberFormat(ServletActionContext.getRequest().getSession());\n \t returnVal[0] = StringUtil.nullEmptyToValue(theFormats.get(\"groupSepa\"), \",\");\n \t returnVal[1] = StringUtil.nullEmptyToValue(theFormats.get(\"decimalSepa\"), \".\");\n }\n else\n {\n \t// if there is not session then need to take the separators from initial load if available\n \tif(ConstantsCommon.PATH_GROUP_SEPARATOR != null)\n \t{\n \t returnVal[0] = ConstantsCommon.PATH_GROUP_SEPARATOR;\n \t}\n \tif(ConstantsCommon.PATH_DECIMAL_SEPARATOR != null)\n \t{\n \t returnVal[1] = ConstantsCommon.PATH_DECIMAL_SEPARATOR;\n \t}\n }\n return returnVal;\n }", "public static void main3(String[] args) {\n String str = \"192*168*1*1\";\n\n //String [] strings = str.split(\"\\\\.\");\n String [] strings = str.split(\"\\\\*\");\n //为什么需要两个斜杠 在本来的情况下 \\ +要转义的字符就可以了\n //但是此时在在\"\"里面不知道\\是干什么的 需要两个斜杠\n for(String s : strings) {\n System.out.println(s);\n }\n }", "private List<String> normalizeCsv(String text) {\n logger.info (\"Text = \" + text);\n List<String> rr = new ArrayList<> ();\n\n StringBuilder line = new StringBuilder ();\n for (int i = 0; i < text.length (); i++) {\n\n String curr = \"\" + text.charAt (i);\n line.append (curr);\n try {\n\n if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"1 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"2 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"3 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"4 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"5 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"6 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"7 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n }\n\n } catch (Exception ex) {\n //System.out.println(ex.getMessage());\n }\n\n }\n return rr;\n }", "public List<String> GetAssegnamentiInCorso() {\n String str = \"Guillizzoni-Coca Cola Spa1-DRYSZO,Rossi-Coca Cola Spa2-DRYSZ2\";\n StringaAssegnamenti = str;\n StringaAssegnamenti = \"\";\n \n\tList<String> items = Arrays.asList(str.split(\"\\\\s*,\\\\s*\"));\n return items;\n }", "@Test\n\t//Normal Test Case of pasteUseDelimiter with one delimiter\n\tpublic void pasteUseDelimiterTestOne() {\n\t\t\n\t\tString parallelLines = \"wild & young\\nwild & young\\ndo it just for fun\\n\"; \n\t\tString []input = parallelLines.split(\"\\n\");\n\t\tString delimiter = \"%\";\n\t\tpasteTool = new PASTETool();\n\t\t\t\n\t\tString actual = pasteTool.pasteUseDelimiter(delimiter, input);\n\t\tString expected = \"wild & young%wild & young%do it just for fun\";\n\t\t\t\n\t\tassertEquals(expected,actual);\n\t\t\t\n\t}", "public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}", "static void checkexpression(String sentence){\n //matching the sentence to see if it begins with capital letter and ends with .\n boolean check = Pattern.matches(\"^[A-Z].*[.]$\",sentence);\n if(check){\n System.out.println(\"Correct Format.\");\n }else{\n System.out.println(\"Incorrect Format.\");\n }\n }", "public static String getDelimiters(String numbers) {\n\t\tString delimiters = \"\";\n\t\tMatcher m = Pattern.compile(\"\\\\[([^]]*)\\\\]\").matcher(numbers);\n List<String> allDelimiters = new ArrayList<>();\n while (m.find()) {\n \tallDelimiters.add(m.group().replace(\"[\",\"\").replace(\"]\",\"\"));\n }\n \n for(String d : allDelimiters) {\n \tdelimiters += (delimiters.length() > 0 ? \"|\" : \"\") + d;\n }\n \n return delimiters;\n\t}", "private static List<Double> getNumbers(String exp) {\n\t\tList<Double> numbers = new ArrayList<Double>();\n\t\t//3-3.4*3/2.5*@3\n\t\texp = getExp(exp);//把表达式中-符号 转成@\n\t\tString[] split = exp.split(\"[\\\\+\\\\-\\\\*/]\");\n\t\tfor (String s : split){\n\t\t\tif (s.charAt(0) == '@') {\n\t\t\t\ts = \"-\" + s.substring(1);\n\t\t\t}\n\t\t\tnumbers.add(Double.parseDouble(s));\n\t\t}\n\t\treturn numbers;\n\t}", "public static Pattern globToRegex(String glob, char delimiter) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tString nonDelimiter = \"[^\" + delimiter + \"]\";\n\t\tfor(int i =0; i<glob.length();i++) {\n\t\t\tchar c = glob.charAt(i);\n\t\t\tif(c == '*') {\n\t\t\t\tif(glob.charAt(i+1) == '*') {\n\t\t\t\t\ti++;\n\t\t\t\t\tbuilder.append(\".*\");\n\t\t\t\t} else {\n\t\t\t\t\tbuilder.append(nonDelimiter);\n\t\t\t\t\tbuilder.append('*');\n\t\t\t\t}\n\t\t\t} else if(c == delimiter) {\n\t\t\t\tbuilder.append(delimiter);\n\t\t\t} else if(c == '?') {\n\t\t\t\tbuilder.append(nonDelimiter);\n\t\t\t} else if(c == '\\\\') {\n\t\t\t\tbuilder.append(\"\\\\\\\\\");\n\t\t\t}\telse if(c == '.') {\n\t\t\t\tbuilder.append(\"\\\\.\");\n\t\t\t}else {\n\t\t\t\tbuilder.append(c);\n\t\t\t}\n\t\t}\n\t\tbuilder.append('$');\n\t\treturn Pattern.compile(builder.toString());\n\t}", "private static @NotNull List<String> parse(@Nullable String s) {\n if (s == null) {\n return Collections.emptyList();\n }\n final Pattern COMPONENT_RE = Pattern.compile(\"\\\\d+|[a-z]+|\\\\.|-|.+\");\n final List<String> results = new ArrayList<>();\n final Matcher matcher = COMPONENT_RE.matcher(s);\n while (matcher.find()) {\n final String component = replace(matcher.group());\n if (component == null) {\n continue;\n }\n results.add(component);\n }\n for (int i = results.size() - 1; i > 0; i--) {\n if (\"00000000\".equals(results.get(i))) {\n results.remove(i);\n }\n else {\n break;\n }\n }\n results.add(\"*final\");\n return results;\n }", "public static ArrayList<String> pronouns() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner pronouner;\n try {\n pronouner = new Scanner(new File(\"pronouns.txt\"));\n pronouner.useDelimiter(\", *\");\n while (pronouner.hasNext()){\n temp.add(\" \"+pronouner.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "private static String[] parseDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getFilenameDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n index = token.indexOf(delimiter);\r\n if (index >= 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index + delimiter.length());\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "private static List<String> listDecimalFormats(){\r\n List<String> result = new ArrayList<String>();\r\n result.add(\"0.###\");\r\n result.add(\"0.00\");\r\n result.add(\"#,##0.###\");\r\n result.add(\"#,##0.00\");\r\n result.add(\"#,##0\");\r\n result.add(\"#,##0%\");\r\n \r\n // Create list of common patterns\r\n Set<String> set = new HashSet<String>();\r\n set.addAll(result);\r\n for (Locale locale: NumberFormat.getAvailableLocales()) {\r\n for (NumberFormat format : new NumberFormat[] { NumberFormat.getNumberInstance(locale),\r\n NumberFormat.getIntegerInstance(locale),\r\n NumberFormat.getCurrencyInstance(locale),\r\n NumberFormat.getPercentInstance(locale) }) {\r\n\r\n // Add pattern\r\n if (format instanceof DecimalFormat) {\r\n String pattern = ((DecimalFormat)format).toPattern();\r\n if (!set.contains(pattern)) {\r\n set.add(pattern);\r\n result.add(pattern);\r\n }\r\n }\r\n }\r\n \r\n }\r\n return result;\r\n }", "private String eliminarComaSi(String str) {\n\t\tString result = null;\r\n\t\tif (str.charAt(str.length() - 1) == ',' && (str != null) && (str.length() > 0)) {\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t result = str.substring(0, str.length() - 1);\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t}\r\n\t\treturn result;\r\n\t\t}", "String toLocalizedPattern() {\n return toPattern(true);\n }", "@Override\n\t\t\tprotected String formatValue(String text) {\n\t\t\t\treturn text.substring(0, text.lastIndexOf('.'));\n\t\t\t}", "@Override\n public void afterTextChanged(Editable s) {\n String temp = s.toString();\n int d = temp.indexOf(\".\");\n if (d < 0) {\n return;\n }\n if (temp.length() - d - 1 > 2) {\n s.delete(d + 3, d + 4);\n } else if (d == 0) {\n s.delete(d, d + 1);\n }\n\n }", "public static ArrayList<String> adverbs() {\n ArrayList<String> temp = new ArrayList<String>();\n Scanner adverber;\n try {\n adverber = new Scanner(new File(\"Adverbs.txt\"));\n adverber.useDelimiter(\", *\");\n while (adverber.hasNext()){\n temp.add(\" \"+adverber.next()+\" \");\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return temp;\n }", "@Test\n\tpublic void common() {\n\t\tString testString = \"Monday,Tuesday,Thursday,Friday,,\";\n\t\tIterable<String> parts = Splitter.on(\",\").split(testString);\n\t\tfor (String s : parts)\n\t\t\tSystem.out.println(s);\n\t}", "public static void main(String args[]){\n \"abc\".chars().forEach(System.out::println);\n\n\n //breaks a String into sub-strings according to specified RegEx:\n Stream<String> stream =\n Pattern.compile(\", \").splitAsStream(\"a, b, c\");\n\n stream.forEach(System.out::println);\n\n }", "private String [] splitString(String name) {\r\n String [] parts = {\"\", \"\"};\r\n if (name != null) {\r\n String [] t = StringExtend.toArray(name, \".\", false);\r\n if (t.length == 3) {\r\n parts [0] = t [0] + \".\" + t [1];\r\n parts [1] = t [2];\r\n }\r\n else if (t.length == 2) {\r\n parts [0] = t [0]; parts [1] = t [1];\r\n }\r\n else if (t.length == 1) {\r\n parts [1] = t [0];\r\n }\r\n }\r\n\r\n return parts;\r\n }", "public final void mRULE_COMMA() throws RecognitionException {\r\n try {\r\n int _type = RULE_COMMA;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../ooi.coi.bspl.ui/src-gen/ooi/coi/bspl/ui/contentassist/antlr/internal/InternalBSPL.g:2465:12: ( ',' )\r\n // ../ooi.coi.bspl.ui/src-gen/ooi/coi/bspl/ui/contentassist/antlr/internal/InternalBSPL.g:2465:14: ','\r\n {\r\n match(','); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "public boolean countDecimals(String assetValue){\n\n int count = 0;\n for(int i = 0; i < assetValue.length(); i++){\n\n if(assetValue.charAt(i) == '.'){\n count++;\n if(count > 1)\n return false;\n\n }\n\n }\n return true;\n }", "private static String globToRegex(final String glob) {\n return \"^\" + glob.replace(\".\", \"\\\\.\").replace(\"*\", \".*\") + \"$\";\n }", "public double[] makeDouble(String[] vals){\n try {\n double[] result = new double[vals.length - 1];\n\n for (int i = 0; i < vals.length - 1; i++) {\n vals[i] = vals[i].replace(\",\", \".\");\n result[i] = Double.parseDouble(vals[i]);\n }\n return result;\n }catch (Exception e){\n System.out.println(e);\n }\n return null;\n }", "private ArrayList<String> removeCommas(ArrayList<String> tokens) {\n ArrayList<String> newTokens = new ArrayList<>();\n for (String s : tokens) {\n if (s.contains(\",\")) {\n s = s.replace(\",\", \"\");\n }\n newTokens.add(s);\n }\n\n return newTokens;\n }", "public static void main(String[] args){\n\n String fileName = \"abc.jpeg\";\n String[] parts = fileName.split(\"\\\\.\");\n\n System.out.println(parts[1]);\n\n\n\n }" ]
[ "0.60660654", "0.5590494", "0.5509168", "0.5488579", "0.5449958", "0.53112024", "0.527919", "0.5214272", "0.51839405", "0.51621026", "0.5157084", "0.5153784", "0.51366234", "0.51056427", "0.50686616", "0.50637674", "0.5051741", "0.5043206", "0.5026043", "0.50193626", "0.49853948", "0.49778786", "0.49686784", "0.49648258", "0.49462947", "0.49136153", "0.49077633", "0.48837942", "0.48518217", "0.4846499", "0.48274833", "0.48248896", "0.48172528", "0.48082042", "0.479873", "0.4798632", "0.47477865", "0.47429165", "0.4742819", "0.4738944", "0.47331265", "0.47320205", "0.4731476", "0.47216305", "0.47202197", "0.47178948", "0.47080752", "0.47067416", "0.4693612", "0.4680971", "0.46662837", "0.46634415", "0.4648238", "0.46457422", "0.46451297", "0.4623767", "0.461931", "0.4610252", "0.4605665", "0.46052933", "0.45997658", "0.45912787", "0.45886624", "0.45858523", "0.45821086", "0.45767167", "0.45755017", "0.4569852", "0.45687288", "0.4560438", "0.4553853", "0.4548926", "0.45427135", "0.4537889", "0.45327693", "0.45187312", "0.45172748", "0.45150554", "0.45139435", "0.45105642", "0.44992116", "0.44969258", "0.44888446", "0.44859996", "0.44808236", "0.4474258", "0.44728968", "0.4466199", "0.4465855", "0.44649997", "0.44456202", "0.44453406", "0.44442752", "0.44402897", "0.44402185", "0.44342637", "0.44341925", "0.4430897", "0.4430744", "0.4427154", "0.44268504" ]
0.0
-1
mashing it all into one function of methods
public static long doubleToLong(double d) { return new Long(String.format("%.0f", d)).longValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMethods(Class<?> token) {\n List<Method> newMethods = new ArrayList<>();\n for (Method method : token.getDeclaredMethods()) {\n if (methods.add(new MethodWithHash(method)) && !method.isDefault()) {\n newMethods.add(method);\n }\n }\n for (Method method : newMethods) {\n Type returnType = method.getReturnType();\n StringBuilder body = new StringBuilder(\"return\");\n if (((Class) returnType).isPrimitive()) {\n if (returnType.equals(boolean.class)) {\n body.append(\" false\");\n } else if (!returnType.equals(void.class)) {\n body.append(\" 0\");\n }\n } else {\n body.append(\" null\");\n }\n body.append(\";\");\n setExecutable(method, ((Class) returnType).getCanonicalName(), body, false);\n }\n }", "abstract protected Set<Method> createMethods();", "private void scanAndCopyMethods() {\n int numMethods = copyShort();\n for (int i = 0; i < numMethods; i++) {\n scanAndCopyAccessFlags();\n copy(4); // name_index, descriptor_index\n int numAttributes = copyShort();\n for (int j = 0; j < numAttributes; j++) {\n // Look for \"Code\" attribute.\n int attrNameIdx = copyShort();\n if (cpIdxIsCode(attrNameIdx)) {\n processCodeAttribute();\n } else {\n copyRestOfAttribute();\n }\n }\n }\n }", "public void andThisIsAMethodName(){}", "private void generateMethods(Class<?> token, BufferedWriter writer) throws IOException {\n StringBuilder result = new StringBuilder();\n Set<MethodBox> methods = new HashSet<>();\n addToMethodStorage(token.getMethods(), methods);\n\n if (!token.isInterface()) {\n for (Class<?> t = token; t != null; t = t.getSuperclass()) {\n addToMethodStorage(t.getDeclaredMethods(), methods);\n }\n }\n\n for (MethodBox method : methods) {\n result.append(getExecutable(method.method));\n result.append(LINE_SEPARATOR);\n }\n\n writer.write(toUnicode(result.toString()));\n }", "List method_111(class_922 var1, int var2, int var3, int var4);", "Operations operations();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void buildMethods(JDefinedClass cls) {\n\n\t}", "private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "private java.lang.reflect.Method m16124a(java.lang.Class r3, java.lang.String r4, java.lang.Class[] r5) {\n /*\n r2 = this;\n r0 = 0\n if (r3 == 0) goto L_0x0028\n boolean r1 = r2.m16125a((java.lang.Object) r4)\n if (r1 == 0) goto L_0x000a\n goto L_0x0028\n L_0x000a:\n r3.getMethods() // Catch:{ Exception -> 0x0015 }\n r3.getDeclaredMethods() // Catch:{ Exception -> 0x0015 }\n java.lang.reflect.Method r3 = r3.getDeclaredMethod(r4, r5) // Catch:{ Exception -> 0x0015 }\n return r3\n L_0x0015:\n java.lang.reflect.Method r3 = r3.getMethod(r4, r5) // Catch:{ Exception -> 0x001a }\n return r3\n L_0x001a:\n java.lang.Class r1 = r3.getSuperclass()\n if (r1 == 0) goto L_0x0028\n java.lang.Class r3 = r3.getSuperclass()\n java.lang.reflect.Method r0 = r2.m16124a((java.lang.Class) r3, (java.lang.String) r4, (java.lang.Class[]) r5)\n L_0x0028:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.shortcutbadger.impl.OPPOHomeBader.m16124a(java.lang.Class, java.lang.String, java.lang.Class[]):java.lang.reflect.Method\");\n }", "private void addMethods(StringBuilder xml) {\n\t\t\n\t\tfor(MethodRequest method : methods) {\n\t\t\tstartElementWithAttributes(xml, \"Method\");\n\t\t\taddStringAttribute(xml, \"name\", method.getName());\n\t\t\taddStringAttribute(xml, \"contextObject\", method.getContextObject());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t\t\n\t}", "public static LinkedList<String> trackMethod(Class<?> myClass,Integer year,Integer month,Integer day){\n LinkedList<String> result = null;//array with result\n\n /*\n * Map stores methods and their annotations\n * Data are store sorted by MethodNoteBook,\n * because this annotation is describe\n * the queue of executions of methods and\n * descriptions\n */\n Map<MethodNoteBook, Method> map = new TreeMap<MethodNoteBook, Method>(\n new Comparator<MethodNoteBook>() {\n\n @Override\n public int compare(MethodNoteBook o1, MethodNoteBook o2) {\n return o1.name() - (o2.name());\n }\n\n });\n\n try {\n Class classNoteBook = NoteBook.class;\n\n /* Create instance of class */\n NoteBook newInstance = (NoteBook) classNoteBook.getConstructor().newInstance();\n\n /* Put all methods of class to map*/\n for (Method methodNoteBook : myClass.getDeclaredMethods()){\n MethodNoteBook methodClass = methodNoteBook.getAnnotation(MethodNoteBook.class);\n map.put(methodClass,methodNoteBook);\n }\n\n result = new LinkedList<String>();\n\n /* Invoke methods */\n for (Map.Entry<MethodNoteBook, Method> el : map.entrySet()) {\n if (el.getKey().description().compareTo(\"set\") == 0) {\n switch (el.getKey().name()) {\n case 1: //name() of annotation return 1 , so, the first, execute this method\n result.add(\"1 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"lastName\"));\n continue;\n case 2://name() of annotation return 2 , so ,the second, execute this method\n result.add(\"2 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"firstName\"));\n continue;\n case 3:\n result.add(\"3 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"middleName\"));\n continue;\n case 4:\n result.add(\"4 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"telephone\"));\n continue;\n case 5:\n result.add(\"5 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new Integer(year), new Integer(month), new Integer(day));\n continue;\n }\n } else if (el.getKey().name() == 6 && el.getKey().description().compareTo(\"Count days to birthday\") == 0) {\n result.add(\"6 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance);\n }\n }\n } catch (NoSuchMethodException e1) {\n e1.printStackTrace();\n } catch (InstantiationException e1) {\n e1.printStackTrace();\n } catch (IllegalAccessException e1) {\n e1.printStackTrace();\n } catch (InvocationTargetException e1) {\n e1.printStackTrace();\n }\n return result;\n }", "@Override\r\n \tpublic void addMethods(KawaWrap kawa) throws Throwable {\r\n \tkawa.eval(\"(define (sub1 n) (- n 1))\");\r\n \tkawa.eval(\"(define (add1 n) (+ n 1))\");\r\n \t}", "public class_4 method_9() {\n return this.method_17();\n }", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "protected void method_2251() {\r\n this.method_2181();\r\n this.field_1823.method_128(this.field_1824, this.field_1850.method_2383().method_8922());\r\n this.field_1826.method_7081();\r\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "protected void generateMethods(ClassContext classContext, IData data, String bean, SourceWriter sw) {\n }", "List<Method> getAllMethods();", "abstract String applicable(Method[] getters) throws InvalidObjectException;", "void method25()\n {\n }", "private HashSet<SootMethod> getMethodsInvokingAtLevel(SootMethod method,\r\n\t\t\tint level) {\n\t\tHashSet<SootMethod> workSet = new HashSet<SootMethod>();\r\n\t\tworkSet.add(method);\r\n\t\t\r\n\t\tHashSet<SootMethod> newWorkset = new HashSet<SootMethod>(1);\r\n\t\tHashSet<SootMethod> topLevel = new HashSet<SootMethod>();\r\n\t\tHashSet<SootMethod> processed = new HashSet<SootMethod>(1);\r\n\t\tfor(int i=0; i< level; i++){\r\n\t\t\tif(i !=0){\r\n\t\t\t\tfor (SootMethod sootMethod : newWorkset) {\r\n\t\t\t\t\tif(!processed.contains(sootMethod))\r\n\t\t\t\t\t\tworkSet = new HashSet<SootMethod>(newWorkset);\r\n\t\t\t\t}\r\n\t\t\t\tnewWorkset = new HashSet<SootMethod>(1);\r\n\t\t\t}\r\n\t\t\tif(workSet.isEmpty())\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tHashSet<SootMethod> implementedMethods = new HashSet<SootMethod>();\r\n\t\t\tfor (SootMethod m : workSet) {\r\n\t\t\t\tfor (SootClass interfaze : m.getDeclaringClass().getInterfaces()) {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tSootMethod m2 = interfaze.getMethod(m.getName(), \r\n\t\t\t\t\t\t\t\tm.getParameterTypes(), m.getReturnType());\r\n\t\t\t\t\t\tif(!processed.contains(m2))\r\n\t\t\t\t\t\t\timplementedMethods.add(m2);\r\n\t\t\t\t\t}catch (RuntimeException e) {\r\n\t\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tworkSet.addAll(implementedMethods);\r\n\t\t\tIterator<SootMethod> iter = workSet.iterator();\r\n\t\t\t\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSootMethod m = iter.next();\r\n\t\t\t\tif(getMethodsInvoking(m) != null){\r\n\t\t\t\t\tnewWorkset.addAll(getMethodsInvoking(m));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ttopLevel.add(m);\r\n\t\t\t}\r\n\t\t\tprocessed.addAll(workSet);\r\n\t\t}\r\n\t\tprocessed.remove(method);\r\n\t\ttadaMethodInvokedByMap.put(method, processed);\r\n\t\ttopLevel.addAll(newWorkset);\r\n\t\treturn topLevel;\r\n\t}", "private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}", "@Override\n\tpublic Void visit(OwnMethodCall method) {\n\t\tprintIndent(\"implicit dispatch\");\n\t\tindent++;\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public interface C2541a {\n /* renamed from: O */\n boolean mo6498O(C41531v c41531v);\n\n /* renamed from: P */\n boolean mo6499P(C41531v c41531v);\n\n /* renamed from: a */\n void mo6500a(int i, int i2, Object obj, boolean z);\n\n /* renamed from: a */\n void mo6501a(C41531v c41531v, View view, Object obj, int i);\n\n /* renamed from: a */\n boolean mo6502a(C41531v c41531v, Object obj);\n\n /* renamed from: b */\n View mo6503b(RecyclerView recyclerView, C41531v c41531v);\n\n /* renamed from: by */\n void mo6504by(Object obj);\n\n /* renamed from: cu */\n void mo6505cu(View view);\n}", "private void initMethods(Method[] _methods, ConstantPoolGen cp)\n\t\tthrows ReadAttributeException {\n\t\tmethods = new HashMap();\n\t\t//\tfor (int i = 0; i < _methods.length; i++) {\n\t\tfor (int i = 0; i < _methods.length ;i++) {\n\t\t\tMethodGen mg = new MethodGen(_methods[i], className, cp);\n\t\t\tBCMethod bcm = new BCMethod(mg, this, cp);\n\t\t\tString signature = mg.getSignature();\t\n\t\t\tString key = MethodSignature.getSignature(bcm.getName(), bcm.getArgTypes(), bcm.getReturnType());\n\t\t\t/*Util.dump(\" add method \" + key + \" in class \" + getName() );*/\n\t\t\tmethods.put(key,bcm);\n\t\t}\n\t}", "public void parseFunctions(){\n\t\t\n\t}", "public T CallFunctions(T obj) {\n for (Function<T,T> action : actions) {\n obj = action.apply(obj);\n }\n \n return obj;\n }", "@Override\n\tpublic Void visit(MethodCall method) {\n\t\tprintIndent(\".\");\n\t\tindent++;\n\t\tmethod.caller.accept(this);\n\t\tmethod.type.accept(this);\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}", "private List<Method> getTargetMethods(Class<? extends Annotation> ann) {\n List<List<Method>> list = mutableCopy(\n removeShadowed(removeOverrides(annotatedWith(allTargetMethods, ann))));\n \n // Reverse processing order to super...clazz for befores\n if (ann == Before.class || ann == BeforeClass.class) {\n Collections.reverse(list);\n }\n \n // Shuffle at class level.\n Random rnd = new Random(runnerRandomness.seed);\n for (List<Method> clazzLevel : list) {\n Collections.shuffle(clazzLevel, rnd);\n }\n \n return flatten(list);\n }", "private Map<String,List<Invoker<T>>> toMergeMethodInvokerMap(Map<String, List<Invoker<T>>> methodMap) {\n Map<String, List<Invoker<T>>> result = new HashMap<>();\n for (Map.Entry<String, List<Invoker<T>>> entry : methodMap.entrySet()) {\n String method = entry.getKey();\n List<Invoker<T>> invokers = entry.getValue();\n Map<String, List<Invoker<T>>> groupMap = new HashMap<>();\n invokers.stream().forEach(invoker -> {\n String group = invoker.getUrl().getParameter(Constants.GROUP_KEY, \"\");\n List<Invoker<T>> groupInvokers = groupMap.get(group);\n if (Objects.isNull(groupInvokers)){\n groupInvokers = new ArrayList<>();\n groupMap.put(group, groupInvokers);\n }\n groupInvokers.add(invoker);\n });\n if (groupMap.size() == 1){\n result.put(method, groupMap.values().iterator().next());\n }else if (groupMap.size() == 2){\n List<Invoker<T>> groupInvokers = new ArrayList<>();\n groupMap.values().forEach(groupList -> {\n groupInvokers.add(cluster.join(new StaticDirectory<T>(groupList)));\n });\n result.put(method, groupInvokers);\n }else {\n result.put(method, invokers);\n }\n }\n return result;\n }", "void addActions(Object bean) {\n Class<?> clazz = bean.getClass();\n Method[] ms = clazz.getMethods();\n for (Method m : ms) {\n if (isActionMethod(m)) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n String url = mapping.value();\n UrlMatcher matcher = new UrlMatcher(url);\n if (matcher.getArgumentCount()!=m.getParameterTypes().length) {\n warnInvalidActionMethod(m, \"Arguments in URL '\" + url + \"' does not match the arguments of method.\");\n continue;\n }\n log.info(\"Mapping url '\" + url + \"' to method '\" + m.toGenericString() + \"'.\");\n urlMap.put(matcher, new Action(bean, m));\n }\n }\n }", "@FunctionalInterface // or we can call it SAM\r\n interface ShowMe{\r\n\t\r\n\t void showOk();\r\n\t \r\n\tpublic default void one()\r\n\t {\r\n\t System.out.println(\"method one \");\r\n };\r\n \r\n public static void one1()\r\n {\r\n System.out.println(\"method one 1 \");\r\n };\r\n \r\n public default void one2()\r\n \t {\r\n \t System.out.println(\"method one2 \");\r\n };\r\n \r\n }", "private void findMethods() {\n List<Method> methods = new ArrayList<Method>(Arrays.asList(getObject().getClass().getMethods()));\r\n List<Method> objectMethods = new ArrayList<Method>(Arrays.asList(Object.class.getMethods()));\r\n methods.removeAll(objectMethods);\r\n \r\n for(Method method:methods) {\r\n //does method have @ManagedAttribute annotation?\r\n if(method.isAnnotationPresent(ManagedAttribute.class) || method.isAnnotationPresent(Property.class)) {\r\n exposeManagedAttribute(method);\r\n }\r\n //or @ManagedOperation\r\n else if (method.isAnnotationPresent(ManagedOperation.class) || isMBeanAnnotationPresentWithExposeAll()){\r\n exposeManagedOperation(method); \r\n } \r\n }\r\n }", "void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\n }", "private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}", "private void visitAdditionalEntrypoints() {\n\tLinkedHashSet<jq_Class> extraClasses = new LinkedHashSet<jq_Class>();\n\tfor(jq_Method m: publicMethods) {\n\t extraClasses.add(m.getDeclaringClass());\n\t}\n\t\n\tfor(jq_Class cl: extraClasses) {\n\t visitClass(cl);\n\t\t\tjq_Method ctor = cl.getInitializer(new jq_NameAndDesc(\"<init>\", \"()V\"));\n\t\t\tif (ctor != null)\n\t\t\t\tvisitMethod(ctor);\n\t}\n\n\tfor(jq_Method m: publicMethods) {\n\t visitMethod(m);\n\t}\n }", "public static void main(String[] args)\r\n\t{\n\t\tMyStringBuilder msb;\r\n\t\tStringBuilder sb;\r\n\t\tString s;\r\n\t\t//Loop iterating 3 times testing each method for all types one by one\r\n\t\tfor(int i = 0; i < 3; i++)\r\n\t\t{\r\n\t\t\t//Initialize variables\r\n\t\t\tmsb = new MyStringBuilder(\"\");\r\n\t\t\tsb = new StringBuilder(\"\");\r\n\t\t\ts = new String(\"\");\r\n\t\t\t//Test fill, delete, and insert with each iteration of the loop respectively\r\n\t\t\tswitch(i)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tfill(msb, args[0]);\r\n\t\t\t\t\tfill(sb, args[0]);\r\n\t\t\t\t\tfill(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdelete(msb, args[0]);\r\n\t\t\t\t\tdelete(sb, args[0]);\r\n\t\t\t\t\tdelete(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tinsert(msb, args[0]);\r\n\t\t\t\t\tinsert(sb, args[0]);\r\n\t\t\t\t\tinsert(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private void init() {\n Method m = getAsListMethod();\r\n Class< ? > c = Object[].class;\r\n branchMethods.put( c, m );\r\n // Treat Map as an Entry set\r\n c = Map.class;\r\n m = getEntrySetMethod();\r\n branchMethods.put( c, m );\r\n // Make an Entry a List\r\n c = Entry.class;\r\n m = getEntryToListMethod();\r\n branchMethods.put( c, m );\r\n // Make a Pair a List\r\n c = Pair.class;\r\n m = getPairToListMethod();\r\n branchMethods.put( c, m );\r\n// c = Iterable.class;\r\n// m = null;\r\n// branchMethods.put( c, m );\r\n }", "static void method1(B b1)\n\t\t{\n\t\t\tb1.test1();\n\t\t\tb1.test2();\n\t\t}", "public void extractMethod(List<Book> books) {\n for (Book book : books) {\n loopAuthors(book);\n }\n }", "public void updateMethods (Method method) throws RepeatMethodName{\n for (Method met:methods){ // check if there isn't already method with such name\n if (met.getName().equals(method.getName())){\n throw new RepeatMethodName();\n }\n }\n methods.add(method);\n }", "public HashSet<SootMethod> getMethodsToExplore(int invocationLevel){\n\t\tHashSet<SootMethod> methodsToExplore = new HashSet<SootMethod>();\r\n\t\t\r\n\t\tfor (SootMethod method : tadaMethods) {\r\n\t\t\tHashSet<SootMethod> invokingMethods = getMethodsInvokingAtLevel(method, invocationLevel);\r\n\t\t\tmethodsToExplore.addAll(invokingMethods);\r\n\t\t}\r\n\t\treturn methodsToExplore;\r\n\t}", "private void jetFunctions(){\n\t\tInvokeExpr invokeExpr = (InvokeExpr) rExpr;\n\t\tSootMethodRef methodRef = invokeExpr.getMethodRef();\n\t\t\n\t\t//if this is a java.lang.String.func, we don't need to declare it\n\t\tif(StringModeling.stringMethods.contains(methodRef.getSignature())){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString funStr = constructFunStr(invokeExpr);\n\t\tType thisType = null;\n\t\tif(!fileGenerator.getDeclaredFunctions().contains(funStr)){\n\t\t\tif(invokeExpr instanceof StaticInvokeExpr){\n\t\t\t\twriter.println(Z3MiscFunctions.v().getFuncDeclareStmt(funStr, thisType,\n\t\t\t\t\t\tmethodRef.parameterTypes(), methodRef.returnType()));\n\t\t\t}else{\n\t\t\t\tif(invokeExpr instanceof InterfaceInvokeExpr){\n\t\t\t\t\tthisType = ((InterfaceInvokeExpr) invokeExpr).getBase().getType();\n\t\t\t\t}else if(invokeExpr instanceof SpecialInvokeExpr){\n\t\t\t\t\tthisType = ((SpecialInvokeExpr) invokeExpr).getBase().getType();\n\t\t\t\t}else if(invokeExpr instanceof VirtualInvokeExpr){\n\t\t\t\t\tthisType = ((VirtualInvokeExpr) invokeExpr).getBase().getType();\n\t\t\t\t}\n\t\t\t\twriter.println(Z3MiscFunctions.v().getFuncDeclareStmt(funStr, thisType,\n\t\t\t\t\t\tmethodRef.parameterTypes(), methodRef.returnType()));\n\t\t\t}\n\t\t\tfileGenerator.getDeclaredFunctions().add(funStr);\n\t\t}\n\t}", "private void method_2684(ahb var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n int var7 = method_2686(var6);\r\n String[] var5 = var10000;\r\n int var9 = var7;\r\n if(var5 != null) {\r\n if(var7 == 7) {\r\n return;\r\n }\r\n\r\n var9 = this.method_2685(var1, var2, var3, var4, var7);\r\n }\r\n\r\n int var8 = var9;\r\n var9 = var8;\r\n if(var5 != null) {\r\n label45: {\r\n if(var8 != 0) {\r\n var9 = method_2687(var6);\r\n if(var5 == null) {\r\n break label45;\r\n }\r\n\r\n if(var9 == 0) {\r\n ahb var10 = var1;\r\n int var10001 = var2;\r\n int var10002 = var3;\r\n int var10003 = var4;\r\n if(var5 != null) {\r\n if(!method_2690(var1, var2, var3, var4, var7)) {\r\n return;\r\n }\r\n\r\n var10 = var1;\r\n var10001 = var2;\r\n var10002 = var3;\r\n var10003 = var4;\r\n }\r\n\r\n var10.method_2193(var10001, var10002, var10003, this, 0, var7);\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n var9 = var8;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 != 0) {\r\n return;\r\n }\r\n\r\n var9 = method_2687(var6);\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 == 0) {\r\n return;\r\n }\r\n\r\n var1.method_2055(var2, var3, var4, var7, 2);\r\n }\r\n\r\n var1.method_2193(var2, var3, var4, this, 1, var7);\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "private void initMethodMap(Class<?> type, Set<Class<?>> closeList, List<Method> methodList) {\n\t\tcloseList.add(type);\n\t\t\n\t\tfor(Method method : type.getMethods()) {\n\t\t\t// check if there is a field annotation\n\t\t\tif(method.isAnnotationPresent(Field.class)) {\n\t\t\t\tString key = getKeyFromMethodName(method.getName());\n\t\t\t\tif(!key.equalsIgnoreCase(\"id\")) {\n\t\t\t\t\tList<Method> methods = null;\n\t\t\t\t\tif(methodList != null) {\n\t\t\t\t\t\tmethods = new ArrayList<Method>(methodList);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmethods = new ArrayList<Method>();\n\t\t\t\t\t}\n\t\t\t\t\tmethods.add(method);\n\t\t\t\t\t_methodMap.put(key, methods);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// check if there is an index embedded annotation\n\t\t\t\tif(method.isAnnotationPresent(IndexedEmbedded.class)) {\n\t\t\t\t\tClass<?> subtype = method.getReturnType();\n\t\t\t\t\t// check if return type is searchable and close list does not contain subtype\t\t\n\t\t\t\t\tif(Searchable.class.isAssignableFrom(subtype) && !closeList.contains(subtype)) {\n\t\t\t\t\t\t// recursion\n\t\t\t\t\t\tList<Method> methods = null;\n\t\t\t\t\t\tif(methodList != null) {\n\t\t\t\t\t\t\tmethods = new ArrayList<Method>(methodList);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmethods = new ArrayList<Method>();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmethods.add(method);\n\t\t\t\t\t\tinitMethodMap(subtype, closeList, methods);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void add(T input, List<Method> methods);", "void emitMethod (ClassMember m) {\r\n Emitter.emitln ();\r\n\t\r\n MethodType mt = (MethodType) m.getType ();\r\n ExpressionList args = mt.getArguments ();\r\n\t\r\n /* emit variable for arguments */\r\n \r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n Identifier a = (Identifier) args.get (j);\r\n Emitter.emit (a.getType () + \" \");\r\n emitArg (method_number, j, a);\r\n Emitter.emitln (\";\");\r\n }\r\n Emitter.emitln ();\r\n \r\n /* emit methods */\r\n Emitter.emit (m.modifiers ());\r\n Emitter.emit (mt);\r\n \r\n /* emit method body */\r\n Emitter.emit (\"{\");\r\n Emitter.indentPush ();\r\n \r\n Emitter.emitln ();\r\n Emitter.emitln (\"enter ();\");\r\n\r\n Emitter.emit (\"try {\");\r\n Emitter.indentPush ();\r\n \r\n if (m.isOnce ()) \r\n mt.emitOnceBefore (method_number);\r\n\r\n Emitter.emitln ();\r\n Emitter.emitln (\"part = \" + part_no + \";\");\r\n Emitter.emitln (\"selector = \" + method_number + \";\");\r\n \r\n /* emit arguments copy */\r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n Identifier a = (Identifier) args.get (j);\r\n emitArg (method_number, j, a);\r\n Emitter.emitln (\" = \" + a + \";\");\r\n }\r\n \r\n Emitter.emit (\"fork ();\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"} catch (Exception e) {\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n /* Emitter.emitln (\"JP.go.ipa.oz.system.OzSystem.debug (\\\"\" + class_id\r\n\t\t + \"\\\", \\\"\" + m + \"\\\", e);\"); */\r\n Emitter.emit (\"throw e;\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"} finally {\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n/* Emitter.emitln (\"arguments = null;\"); */\r\n \r\n /* emit argument clear */\r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n Identifier a = (Identifier) args.get (j);\r\n emitArg (method_number, j, a);\r\n\r\n if (a.type.isClass ())\r\n\tEmitter.emitln (\" = null;\");\r\n else if (a.type.isBool ())\r\n\tEmitter.emitln (\" = false;\");\r\n else\r\n\tEmitter.emitln (\" = 0;\");\r\n }\r\n method_number++;\r\n \r\n Emitter.emit (\"leave ();\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"}\");\r\n \r\n Emitter.emitln ();\r\n Type rt = mt.getReturnType ();\r\n if (rt.isClass ()) \r\n Emitter.emit (\"return (\" + rt + \") join ();\");\r\n else if (rt.isVoid ()) {\r\n Emitter.emit (\"join ();\");\r\n if (m.isNew ()) {\r\n\tEmitter.emitln ();\r\n\tEmitter.emit (\"return this;\");\r\n }\r\n } else {\r\n emitType (rt);\r\n Emitter.emit (\" result = (\");\r\n emitType (rt);\r\n Emitter.emitln (\") join ();\");\r\n Emitter.emit (\"return result.\" + rt + \"Value ();\");\r\n }\r\n \r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"}\");\r\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public void testMethodInfo889() throws Exception {\n\t\tClassInfo var2788 = instantiateClassInfo431();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2789 = new MethodInfo(var2788, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2789.isSetter();\n\t\tvar2789.isSetter();\n\t}", "public List<Unit> getAllUnit(SootMethod sm,int count ){\n\t if(count<=0) {\r\n\t\t return null;\r\n\t }\t \r\n\t count--;\r\n\t\tif (sm == null || !sm.isConcrete())\r\n\t\t\treturn null;\r\n\t\tif (sm.getDeclaringClass().getName().startsWith(\"java\")\r\n\t\t\t|| sm.getDeclaringClass().getName().startsWith(\"android\"))\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tList<Unit> fu = new ArrayList<Unit>();\r\n//\t\tList<Unit> tmp = null;\r\n \tBody b = sm.retrieveActiveBody();\r\n \tChain<Unit> u = b.getUnits();\r\n fu.addAll(u); \r\n//\t\tUnitGraph unitGraph = new BriefUnitGraph(b);\r\n\t\tIterator<Unit> it = u.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tUnit u1 = it.next();\r\n\t\t\tStmt stmt = (Stmt) u1;\r\n\t\t\t\r\n\t\t\tif ((stmt instanceof InvokeStmt || stmt instanceof AssignStmt) && stmt.containsInvokeExpr()) {\r\n\t\t\t\tif (stmt.getInvokeExpr().getMethod().getDeclaringClass().getName().startsWith(\"java\")|| stmt.getInvokeExpr().getMethod().getDeclaringClass().getName().startsWith(\"android\"))\t\t\t\t\t\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tSootMethod s = stmt.getInvokeExpr().getMethod();\t\t\t\r\n\t\t\t\tif (s.getSignature().equals(sm.getSignature()))\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t List<Unit> appendfu = getAllUnit(s,count);\r\n\t\t\t\t if(appendfu!=null)\r\n\t\t\t\t fu.addAll(appendfu);\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\t\r\n\t\treturn fu;\r\n\t}", "private List<String> callMethod(final int m, final int n) {\n return uniquePathsGenerator.uniquePathsByVijayApproach(m, n);\n }", "private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}", "public void testMethodInfo888() throws Exception {\n\t\tClassInfo var2785 = instantiateClassInfo430();\n\t\tFieldInfo var2786 = instantiateFieldInfo429();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2787 = new MethodInfo(var2785, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.getSetters();\n\t\tvar2787.isSetter();\n\t\tvar2787.isSetter();\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override public Iterable<JflowModel.Method> getStartMethods()\n{\n Vector<JflowModel.Method> v = new Vector<JflowModel.Method>();\n\n for (JflowMethod cm : model_master.getStartMethods()) {\n ModelMethod cs = complete_calls.get(cm);\n if (cs != null) v.add(cs);\n }\n\n return v;\n}", "@Override\n public void visitEnd() {\n// fv = super.visitField(ACC_PRIVATE, \"returnMethods\", \"Ljava/util/Map;\",\n// \"Ljava/util/Map<Ljava/lang/String;Lru/mousecray/mousecore/api/asm/methods/MouseExecutor;>;\", null);\n// fv.visitEnd();\n MethodVisitor mv;\n// = super.visitMethod(ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n\n// mv.visitVarInsn(ALOAD, 0);\n// mv.visitTypeInsn(NEW, \"java/util/HashMap\");\n// mv.visitInsn(DUP);\n// mv.visitMethodInsn(INVOKESPECIAL, \"java/util/HashMap\", \"<init>\", \"()V\", false);\n// mv.visitFieldInsn(PUTFIELD, \"ru/mousecray/mousecore/Get\", \"voidMethods\", \"Ljava/util/Map;\");\n//\n//\n// mv.visitVarInsn(ALOAD, 0);\n// mv.visitTypeInsn(NEW, \"java/util/HashMap\");\n// mv.visitInsn(DUP);\n// mv.visitMethodInsn(INVOKESPECIAL, \"java/util/HashMap\", \"<init>\", \"()V\", false);\n// mv.visitFieldInsn(PUTFIELD, \"ru/mousecray/mousecore/Get\", \"returnMethods\", \"Ljava/util/Map;\");\n//\n// mv.visitEnd();\n\n for (Map.Entry<String, MouseMethod> entry : methods.entrySet()) {\n MouseMethod method = entry.getValue();\n mv = super.visitMethod(ACC_PUBLIC, method.);\n }\n// for (int count = 0; count < methods.size(); ++count) {\n// Method method = methods.get(count);\n\n\n Type.getMethodDescriptor(method.getReturnType(), method.getParameterTypes()), null, null);\n mv.visitCode();\n mv.visitVarInsn(ALOAD, 0);\n //TODO:\n// mv.visitFieldInsn(GETFIELD, \"ru/mousecray/mousecore/Get\", \"transformer\",\n// \"Lru/mousecray/mousecore/api/asm/transformers/CoreClassHookWithAddInterface;\");\n// }\n\n// super.visitEnd();\n }", "private void callbacksUsingCompose() {\n userService.getUser()\n .compose(user -> {\n return userService.login(user);\n })\n .compose(status -> {\n return userService.showDashBoard(status);\n })\n .onSuccess(System.out::println)\n .onFailure(System.out::println);\n //simplifed version\n userService.getUser()\n .compose(user -> userService.login(user))\n .compose(status -> userService.showDashBoard(status))\n .onSuccess(System.out::println)\n .onFailure(System.out::println);\n\n //method reference\n userService.getUser()\n .compose(userService::login)\n .compose(userService::showDashBoard)\n .onSuccess(System.out::println)\n .onFailure(System.out::println);\n }", "void method_115();", "public class_1343 method_2452(ahb var1, int var2, int var3, int var4) {\r\n this.method_2486(var1, var2, var3, var4);\r\n return super.method_2452(var1, var2, var3, var4);\r\n }", "public void testMethodInfo885() throws Exception {\n\t\tClassInfo var2769 = instantiateClassInfo424();\n\t\tLocalVariableInfo var2770 = instantiateLocalVariableInfo423();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2772 = new MethodInfo(var2769, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2772.isSetter();\n\t\tvar2772.isSetter();\n\t}", "protected void writeObjectByMethods(UBJOutputStream out, String name,\n\t\t\tClass<?> type, Object obj) throws IOException {\n\t\tif (name != null && sstack.peek() != ScopeType.ARRAY && !name.isEmpty())\n\t\t\tout.writeString(name);\n\n\t\t// Check cache for existing filtered method list.\n\t\tList<MethodCacheElement> methodList = methodCache.get(type);\n\n\t\t// Filter and cache field list if we didn't already.\n\t\tif (methodList == null) {\n\t\t\t// Get all public, inherited methods.\n\t\t\tMethod[] methods = type.getMethods();\n\t\t\tmethodList = new ArrayList<MethodCacheElement>(methods.length);\n\n\t\t\t// Filter the methods down to just the ones we want to map.\n\t\t\tfor (int i = 0; i < methods.length; i++) {\n\t\t\t\tMethod m = methods[i];\n\t\t\t\tint mods = m.getModifiers();\n\n\t\t\t\t// Skip static, transient, synthetic or methods that take args.\n\t\t\t\tif (Modifier.isStatic(mods) || Modifier.isTransient(mods)\n\t\t\t\t\t\t|| m.isSynthetic() || m.getParameterTypes().length != 0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tint j = 0;\n\t\t\t\tString mName = m.getName();\n\n\t\t\t\t/*\n\t\t\t\t * We need to normalize the method name into a proper property\n\t\t\t\t * name. First we need to find where the prefix is to chop\n\t\t\t\t * off...\n\t\t\t\t */\n\t\t\t\tif (mName.startsWith(\"is\"))\n\t\t\t\t\tj = 2;\n\t\t\t\telse if (mName.startsWith(\"get\") || mName.startsWith(\"has\")\n\t\t\t\t\t\t|| mName.startsWith(\"can\"))\n\t\t\t\t\tj = 3;\n\n\t\t\t\t/*\n\t\t\t\t * Skip mapping this property totally if the method name isn't\n\t\t\t\t * long enough to be used as a property name (e.g. the method\n\t\t\t\t * name is just \"get\" or \"is\" and not something like \"getAge\" or\n\t\t\t\t * \"isRegistered\".\n\t\t\t\t */\n\t\t\t\tif (j >= mName.length())\n\t\t\t\t\tcontinue;\n\n\t\t\t\t/*\n\t\t\t\t * Now we set the property name to the method's name with the\n\t\t\t\t * prefix chopped and the first char lowercased.\n\t\t\t\t */\n\t\t\t\tmName = Character.toLowerCase(mName.charAt(j))\n\t\t\t\t\t\t+ mName.substring(j + 1);\n\n\t\t\t\tmethodList.add(new MethodCacheElement(m, mName));\n\t\t\t}\n\t\t}\n\n\t\tout.writeObjectHeader(methodList.size());\n\n\t\t// Enter object scope\n\t\tsstack.push(ScopeType.OBJECT);\n\n\t\t// Write out the values for each method we are mapping.\n\t\tfor (int i = 0, s = methodList.size(); i < s; i++) {\n\t\t\tMethodCacheElement cacheElement = methodList.get(i);\n\t\t\tObject mValue = null;\n\n\t\t\ttry {\n\t\t\t\t// Safely reflect the method value.\n\t\t\t\tmValue = cacheElement.method.invoke(obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tdispatchWrite(out, cacheElement.name, mValue);\n\t\t}\n\n\t\t// Exit object scope\n\t\tsstack.pop();\n\t}", "public List method_111(class_922 var1, int var2, int var3, int var4) {\r\n class_985 var5 = this.field_5907.method_35(var2, var4);\r\n return var5.method_5706(var1);\r\n }", "public void rewrite(IRCode code, DexEncodedMethod method) {\n ListIterator<BasicBlock> blocks = code.blocks.listIterator();\n while (blocks.hasNext()) {\n BasicBlock block = blocks.next();\n InstructionListIterator iterator = block.listIterator();\n while (iterator.hasNext()) {\n Instruction current = iterator.next();\n if (current.isInvokeCustom()) {\n InvokeCustom invokeCustom = current.asInvokeCustom();\n DexCallSite callSite = invokeCustom.getCallSite();\n DexMethodHandle newBootstrapMethod = rewriteDexMethodHandle(method,\n callSite.bootstrapMethod);\n List<DexValue> newArgs = callSite.bootstrapArgs.stream().map(\n (arg) -> {\n if (arg instanceof DexValueMethodHandle) {\n return new DexValueMethodHandle(\n rewriteDexMethodHandle(method, ((DexValueMethodHandle) arg).value));\n }\n return arg;\n })\n .collect(Collectors.toList());\n\n if (newBootstrapMethod != callSite.bootstrapMethod\n || !newArgs.equals(callSite.bootstrapArgs)) {\n DexCallSite newCallSite = appInfo.dexItemFactory.createCallSite(\n callSite.methodName, callSite.methodProto, newBootstrapMethod, newArgs);\n InvokeCustom newInvokeCustom = new InvokeCustom(newCallSite, invokeCustom.outValue(),\n invokeCustom.inValues());\n iterator.replaceCurrentInstruction(newInvokeCustom);\n }\n } else if (current.isInvokeMethod()) {\n InvokeMethod invoke = current.asInvokeMethod();\n DexMethod invokedMethod = invoke.getInvokedMethod();\n DexType invokedHolder = invokedMethod.getHolder();\n if (!invokedHolder.isClassType()) {\n continue;\n }\n DexMethod actualTarget = graphLense.lookupMethod(invokedMethod, method);\n Invoke.Type invokeType = getInvokeType(invoke, actualTarget, invokedMethod);\n if (actualTarget != invokedMethod || invoke.getType() != invokeType) {\n Invoke newInvoke = Invoke\n .create(invokeType, actualTarget, null,\n invoke.outValue(), invoke.inValues());\n iterator.replaceCurrentInstruction(newInvoke);\n // Fix up the return type if needed.\n if (actualTarget.proto.returnType != invokedMethod.proto.returnType\n && newInvoke.outValue() != null) {\n Value newValue = code.createValue(newInvoke.outType(), invoke.getDebugInfo());\n newInvoke.outValue().replaceUsers(newValue);\n CheckCast cast = new CheckCast(\n newValue,\n newInvoke.outValue(),\n graphLense.lookupType(invokedMethod.proto.returnType, method));\n iterator.add(cast);\n // If the current block has catch handlers split the check cast into its own block.\n if (newInvoke.getBlock().hasCatchHandlers()) {\n iterator.previous();\n iterator.split(1, code, blocks);\n }\n }\n }\n } else if (current.isInstanceGet()) {\n InstanceGet instanceGet = current.asInstanceGet();\n DexField field = instanceGet.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n InstanceGet newInstanceGet =\n new InstanceGet(\n instanceGet.getType(), instanceGet.dest(), instanceGet.object(), actualField);\n iterator.replaceCurrentInstruction(newInstanceGet);\n }\n } else if (current.isInstancePut()) {\n InstancePut instancePut = current.asInstancePut();\n DexField field = instancePut.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n InstancePut newInstancePut =\n new InstancePut(instancePut.getType(), instancePut.inValues(), actualField);\n iterator.replaceCurrentInstruction(newInstancePut);\n }\n } else if (current.isStaticGet()) {\n StaticGet staticGet = current.asStaticGet();\n DexField field = staticGet.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n StaticGet newStaticGet =\n new StaticGet(staticGet.getType(), staticGet.dest(), actualField);\n iterator.replaceCurrentInstruction(newStaticGet);\n }\n } else if (current.isStaticPut()) {\n StaticPut staticPut = current.asStaticPut();\n DexField field = staticPut.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n StaticPut newStaticPut =\n new StaticPut(staticPut.getType(), staticPut.inValue(), actualField);\n iterator.replaceCurrentInstruction(newStaticPut);\n }\n } else if (current.isCheckCast()) {\n CheckCast checkCast = current.asCheckCast();\n DexType newType = graphLense.lookupType(checkCast.getType(), method);\n if (newType != checkCast.getType()) {\n CheckCast newCheckCast =\n new CheckCast(makeOutValue(checkCast, code), checkCast.object(), newType);\n iterator.replaceCurrentInstruction(newCheckCast);\n }\n } else if (current.isConstClass()) {\n ConstClass constClass = current.asConstClass();\n DexType newType = graphLense.lookupType(constClass.getValue(), method);\n if (newType != constClass.getValue()) {\n ConstClass newConstClass = new ConstClass(makeOutValue(constClass, code), newType);\n iterator.replaceCurrentInstruction(newConstClass);\n }\n } else if (current.isInstanceOf()) {\n InstanceOf instanceOf = current.asInstanceOf();\n DexType newType = graphLense.lookupType(instanceOf.type(), method);\n if (newType != instanceOf.type()) {\n InstanceOf newInstanceOf = new InstanceOf(makeOutValue(instanceOf, code),\n instanceOf.value(), newType);\n iterator.replaceCurrentInstruction(newInstanceOf);\n }\n } else if (current.isInvokeNewArray()) {\n InvokeNewArray newArray = current.asInvokeNewArray();\n DexType newType = graphLense.lookupType(newArray.getArrayType(), method);\n if (newType != newArray.getArrayType()) {\n InvokeNewArray newNewArray = new InvokeNewArray(newType, makeOutValue(newArray, code),\n newArray.inValues());\n iterator.replaceCurrentInstruction(newNewArray);\n }\n } else if (current.isNewArrayEmpty()) {\n NewArrayEmpty newArrayEmpty = current.asNewArrayEmpty();\n DexType newType = graphLense.lookupType(newArrayEmpty.type, method);\n if (newType != newArrayEmpty.type) {\n NewArrayEmpty newNewArray = new NewArrayEmpty(makeOutValue(newArrayEmpty, code),\n newArrayEmpty.size(), newType);\n iterator.replaceCurrentInstruction(newNewArray);\n }\n }\n }\n }\n assert code.isConsistentSSA();\n }", "@Override\n\tpublic void operate() {\n\t\tthis.method2();\n\t\tsuper.operate();\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tpublic void buildMethodDetails(List elements) throws Exception {\n\t\tMethodBuilder.getInstance(\n\t\t\t\tconfiguration,\n\t\t\t\twriter.getClassDoc(),\n\t\t\t\tnew CustomMethodWriterImpl((SubWriterHolderWriter) writer, writer.getClassDoc(),\n\t\t\t\t\t\ttargetContractMap)).build(elements);\n\t}", "private Stream<Method> getMethodStream(\n Class<?> api,\n ProtocolHandler protocol\n ) {\n Stream<Method> methodStream = Stream\n .of(api.getMethods())\n .filter(m -> !ReflectUtils.isDeprecated(m))\n .filter(m -> !ReflectUtils.isDeprecated(m.getReturnType()))\n .filter(m -> !ReflectUtils.hasAnyBitwigObjectParameter(m))\n .filter(m -> !ReflectUtils.hasAnyCallbackParameter(m))\n .filter(m -> !ReflectUtils.isModuleFactory(m))\n .filter(m -> {\n if (LOG.isDebugEnabled() && m.isBridge()) {\n LOG.debug(\n \"node[{}] member method[{}] is bridge method\",\n absoluteName,\n ReflectUtils.javaExpression(m)\n );\n }\n return !m.isBridge();\n });\n\n // markInterested is probably same as Subscribable#subscibe()\n if (Value.class.isAssignableFrom(nodeType)) {\n methodStream =\n methodStream.filter(m -> !(\"markInterested\".equals(m.getName())));\n }\n\n // TODO other Host methods ?\n if (ControllerHost.class.isAssignableFrom(nodeType)) {\n methodStream =\n methodStream.filter(m ->\n \"getNotificationSettings\".equals(m.getName()) ||\n \"showPopupNotification\".equals(m.getName())\n );\n }\n\n // MasterTrack#sendBank() is useless, and host throw exception.\n if (MasterTrack.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"sendBank\".equals(m.getName()));\n }\n\n // SceneBank is implemented Bank<Scene>, should use Bank#getItemAt(int) instead of SceneBank#getScene(int)\n if (SceneBank.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"getScene\".equals(m.getName()));\n }\n // DeviceBank is implemented Bank<Device>, should use Bank#getItemAt(int) instead of DeviceBank#getDevice(int)\n if (DeviceBank.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"getDevice\".equals(m.getName()));\n }\n // Parameter#setLabel(String) can only be called during driver initialization\n if (Parameter.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"setLabel\".equals(m.getName()));\n }\n\n // since bitwig 3.1\n\n //#if bitwig.extension.api.version >= 10\n methodStream =\n methodStream.filter(m ->\n !ReflectUtils.isPureHardwareBindable(m.getReturnType(), protocol)\n );\n //#endif\n\n // TODO since bitwig 3.1, API methods are annotated with @OscMethod, @OscNode\n // Will OSC server be released soon ?\n\n // Color class is difficult to use via remote. ColorValue class is enough.\n methodStream =\n methodStream.filter(m -> !Color.class.equals(m.getReturnType()));\n\n // move to ApplicationExt#observerdAction\n if (Action.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"isEnabled\".equals(m.getName()));\n }\n return methodStream;\n }", "public void miseAJour();", "public abstract void mo2624j();", "public static void main(String[] args)\n {\n methodA();\n methodB();\n\n }", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}", "public abstract void afvuren();", "private static HashMap<Method, Double> getActionTaggedMethods(FsmModel fsm) {\n HashMap<Method, Double> ret = new HashMap<Method, Double>();\n for (Method m : fsm.getClass().getDeclaredMethods()) {\n Annotation[] ta = m.getDeclaredAnnotations();\n for (int i=0; i < ta.length; i++) {\n if (ta[i] instanceof Action) {\n Method actProba = null;\n double proba = 0;\n try {\n actProba = fsm.getClass().getDeclaredMethod(m.getName() + \"Proba\");\n proba = (Double) actProba.invoke(fsm);\n } catch (NoSuchMethodException e) {\n System.err.println(\"Warning: method \" + m.getName() + \" has no probability. Considered 0.\");\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n System.err.println(\"Illegal access to \" + m.getName() + \"Proba\");\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n } catch (InvocationTargetException e) {\n System.err.println(\"Exception on target invocation on \" + m.getName() + \"Proba\");\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n }\n ret.put(m, proba);\n }\n }\n }\n return ret;\n }", "public static void main(String[] args) {\n\n Method();\n Method(10);\n Method(\"Hello\");\n Method(10, 20);\n // Multiple methods can have the same name as long as the number and/or type of parameters are different.\n \n }", "interface C15937b {\n /* renamed from: a */\n void mo13368a();\n\n /* renamed from: a */\n void mo13369a(int i, int i2, int i3, boolean z);\n\n /* renamed from: a */\n void mo13370a(int i, int i2, List<C15929a> list) throws IOException;\n\n /* renamed from: a */\n void mo13371a(int i, long j);\n\n /* renamed from: a */\n void mo13372a(int i, ErrorCode errorCode);\n\n /* renamed from: a */\n void mo13373a(int i, ErrorCode errorCode, ByteString byteString);\n\n /* renamed from: a */\n void mo13374a(boolean z, int i, int i2);\n\n /* renamed from: a */\n void mo13375a(boolean z, int i, int i2, List<C15929a> list);\n\n /* renamed from: a */\n void mo13376a(boolean z, int i, BufferedSource bufferedSource, int i2) throws IOException;\n\n /* renamed from: a */\n void mo13377a(boolean z, C15943j c15943j);\n }", "public String getFunctions();", "private void readMethodsAnnotations() {\n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n Annotation[] annotations = method.getDeclaredAnnotations();\n for (Annotation a : annotations) {\n Class<? extends Annotation> aType = a.annotationType();\n List<Entry<Annotation>> list = entries.get(aType);\n if (list == null) {\n list = new ArrayList();\n entries.put(aType, list);\n }\n list.add(new Entry<>(method, a));\n }\n }\n }", "private void addClassOrMethod(String methodOrClass) {\n\t\t//System.out.println(\"###addClassOrMethod [\" + methodOrClass + \"]\");\n\t\tSimpleMethod method = new SimpleMethod();\n\t\t\n\t\tList<SimpleMethod> allMethods = null;\n\t\t\n\t\tString[] parts = methodOrClass.split(CLASS_METHOD_DELIMITER);\n\t\tif (parts.length >= 1 && parts[0]!=null) {\n\t\t\tallMethods = this.myInstrCriteria.get(parts[0]);\n\t\t\tif (allMethods == null) {\n\t\t\t\tallMethods = new ArrayList<SimpleMethod>();\n\t\t\t\t//this.logVerbose(\"in addClassOrMethod just created allMethods hash[\" + allMethods.hashCode() + \"]myInstrCriteriaHash[\" + myInstrCriteria.hashCode() + \"]\");\n\t\t\t\tthis.myInstrCriteria.put(parts[0], allMethods);\n\t\t\t}\n\t\t\t\n\t\t\tswitch (parts.length) {\n\t\t\t\tcase 1: //just the package and class name were specified, meaning that all methods should be instrumented.\n\t\t\t\t\tmethod.ynAllMethods = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: //a method was specified after a # sign...only instrument this specific method.\n\t\t\t\t\tmethod.setNameAndArgs(parts[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RuntimeException(\"Was expecting to find either zero or one of the [\" + this.CLASS_METHOD_DELIMITER + \"] character inside of [\" + methodOrClass + \"]\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Error adding this method/class [\" + methodOrClass + \"]\");\n\t\t}\n\t\tallMethods.add(method);\n//\t\tSystem.out.println(\"## Just added methodName[\" + method.name + \"] methodArg [\" + method.args + \"]methodArgGetter [\" + method.getArgs() + \"]\");\n//\t\tSystem.out.println(\"@@@@@@@Class count [\" + myInstrCriteria.size() + \"] for class[\" + parts[0] + \"] count is [\" + allMethods.size() + \"]\");\n\t}", "public void method_192() {}", "private void prepareMethodsToInstrument(\r\n\t\t\tboolean useInlinedVersion,\r\n\t\t\tboolean useCaller, // Compressor.compress\r\n\t\t\tboolean useCallee1, // CodeTable.of\r\n\t\t\tboolean useCallee2, // CodeTable.set\r\n\t\t\tboolean useCallee3, // HashTable.clear\r\n\t\t\tboolean useCallee4, // HashTable.hsize\r\n\t\t\tboolean useCallee5, // HashTable.of_hash\r\n\t\t\tboolean useCallee6, // HashTable.set_hash\r\n\t\t\tboolean useCallee7, // Compressor.clblock\r\n\t\t\tboolean useCallee8, // Compressor.output\r\n\t\t\tboolean useCallee9, // InputBuffer.readByte\r\n\t\t\tboolean useCalleeA, // Compressor.getMaxCode\r\n\t\t\tboolean useCalleeB, // OutputBuffer.writeByte\r\n\t\t\tboolean useCalleeC, // OutputBuffer.writeBytes\r\n\t\t\tString packageName,\r\n\t\t\tList<MethodDescriptor> methodsToInstrument\r\n\t\t) {\r\n\t\tMethodDescriptor caller = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", //Compressor is not an inner class! thus, do not try Compress$Compressor!\r\n\t\t\t\t\"public void compress()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); \r\n\t\tcaller.setContext(new UUID(System.currentTimeMillis(),System.currentTimeMillis()));\r\n\t\t\r\n\t\tMethodDescriptor callee1 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee1.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee2 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee2.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee3;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001... \r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001...\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee3.setContext(caller.getContext());\r\n\r\n\t\tMethodDescriptor callee4;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee4.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee5;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name of\");\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int of_hash(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee5.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee6;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name set\");\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void set_hash(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee6.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee7 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void clBlock()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); //I had an error here\r\n\t\tcallee7.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 8 (Compressor.output) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee8 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void output(int code)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee8.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 9 (InputBuffer.readByte) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee9 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".InputBuffer\",\r\n\t\t\t\t\"public int readByte()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee9.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output, implemented in Compressor's superclass (CompBase)\r\n\t\t//does not call other methods\r\n\t\tlog.warn(\"For instrumenting getMaxCode: replaced Compressor with CompBase, but only in prepareMethodsToInstrument\");\r\n\t\tMethodDescriptor calleeA = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CompBase\",\r\n\t\t\t\t\"public int getMaxCode()\",//TODO inherited but not overwritten method!!!\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeA.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeB = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writeByte(byte c)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeB.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeC = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writebytes(byte[] buf, int n)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeC.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\tif(useCaller){\r\n\t\t\tmethodsToInstrument.add(caller);\r\n\t\t}\r\n\t\tif(useCallee1){\r\n\t\t\tmethodsToInstrument.add(callee1);\r\n\t\t}\r\n\t\tif(useCallee2){\r\n\t\t\tmethodsToInstrument.add(callee2);\r\n\t\t}\r\n\t\tif(useCallee3){\r\n\t\t\tmethodsToInstrument.add(callee3);\r\n\t\t}\r\n\t\tif(useCallee4){\r\n\t\t\tmethodsToInstrument.add(callee4);\r\n\t\t}\r\n\t\tif(useCallee5){\r\n\t\t\tmethodsToInstrument.add(callee5);\r\n\t\t}\r\n\t\tif(useCallee6){\r\n\t\t\tmethodsToInstrument.add(callee6);\r\n\t\t}\r\n\t\tif(useCallee7){\r\n\t\t\tmethodsToInstrument.add(callee7);\r\n\t\t}\r\n\t\tif(useCallee8){\r\n\t\t\tmethodsToInstrument.add(callee8);\r\n\t\t}\r\n\t\tif(useCallee9){\r\n\t\t\tmethodsToInstrument.add(callee9);\r\n\t\t}\r\n\t\tif(useCalleeA){\r\n\t\t\tmethodsToInstrument.add(calleeA);\r\n\t\t}\r\n\t\tif(useCalleeB){\r\n\t\t\tmethodsToInstrument.add(calleeB);\r\n\t\t}\r\n\t\tif(useCalleeC){\r\n\t\t\tmethodsToInstrument.add(calleeC);\r\n\t\t}\r\n\t}", "public Methods() {\n // what is this doing? -PMC\n }", "Iterable<T> getFunctions();", "protected String generateOpsMethodHandlerGetMethods(AmqpModel model, boolean serverFlag, int indentSize)\n {\n String indent = Utils.createSpaces(indentSize);\n StringBuffer sb = new StringBuffer();\n for (String thisClassName : model.getClassMap().keySet())\n {\n AmqpClass thisClass = model.getClassMap().get(thisClassName);\n // Only generate for this class if there is at least one method of the\n // required chassis (server/client flag).\n boolean chassisFoundFlag = false;\n for (String thisMethodName : thisClass.getMethodMap().keySet())\n {\n AmqpMethod method = thisClass.getMethodMap().get(thisMethodName);\n boolean clientChassisFlag = method.getClientMethodFlagMap().isSet();\n boolean serverChassisFlag = method.getServerMethodFlagMap().isSet();\n if ((serverFlag && serverChassisFlag) || (!serverFlag && clientChassisFlag))\n {\n chassisFoundFlag = true;\n }\n }\n if (chassisFoundFlag)\n {\n sb.append(indent + \"virtual AMQP_\" + (serverFlag ? \"Server\" : \"Client\") + \"Operations::\" +\n thisClass.getName() + \"Handler* get\" + thisClass.getName() + \"Handler() = 0;\" + CR);\n }\n }\n return sb.toString();\n }", "public Recusive_Methods(){\n int[][] array = {\n {1,2,3,4},\n {5,6,7,8},\n {9,10,11,12},\n {13,14,15,16},\n {17,18,19,20},\n };\n printer(array,0,0,array[0].length-1,array.length-1,0);\n\n StringReverse(\"this function writes the sentence in reverse\");\n StringReverse(\"selam alp emir bilek ben\");\n\n elfish(\"alpemir\",0,0,0);\n elfish(\"leaf\",0,0,0);\n elfish(\"waffles\",0,0,0);\n }", "private static Set<SootMethod> searchDownForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\t//1.判断sm中是否含有intent的定义信息,若有,则返回\n\t\tif(containsInitMethod(sm, type)){\n\t\t\tmethods.add(sm);\n\t\t}\n\t\telse{\n\t\t\tList<SootMethod> targets = InterMethodAnalysis.getTargetsMethods(sm);\t\n\t\t\tfor(SootMethod tgt:targets){\n\t\t\t\tif(tgt.equals(sm))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(tgt.getReturnType().toString().contains(type)){\n\t\t\t\t\tif(tgt.isAbstract()){\n\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(tgt)){\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(tgt, type);\n\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}", "public abstract void populatePeripheralMethods(@Nonnull final List<ComputerMethod> methods);", "public abstract Builder methods(RequestMethod... paramVarArgs);", "private void methodOne() {\n\t\tSystem.out.println(\"I am method one\");\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void method_115() {}", "void m21();", "class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);", "public abstract Result mo5059a(Params... paramsArr);", "public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}" ]
[ "0.5966792", "0.5933956", "0.5698374", "0.56169844", "0.55956304", "0.5549709", "0.5485362", "0.54074925", "0.538804", "0.5362182", "0.5361501", "0.5361501", "0.53313553", "0.53275615", "0.5310093", "0.5306132", "0.53046024", "0.5282257", "0.5278007", "0.52459455", "0.52346367", "0.52304965", "0.5217441", "0.5217287", "0.51930416", "0.51850176", "0.51684403", "0.51556414", "0.5150066", "0.51470155", "0.51316184", "0.5128282", "0.5125438", "0.51205164", "0.51191187", "0.51098853", "0.5090713", "0.5079568", "0.50778484", "0.5071339", "0.50647295", "0.50646657", "0.50447655", "0.5038614", "0.5036175", "0.50317955", "0.50312555", "0.50265914", "0.5022825", "0.5016028", "0.5008838", "0.5007379", "0.5004025", "0.5003938", "0.4995449", "0.49833262", "0.49742964", "0.49612588", "0.49581164", "0.49500158", "0.49497467", "0.4949366", "0.49492696", "0.4941071", "0.49355358", "0.49280393", "0.49222642", "0.49156597", "0.49118927", "0.49068642", "0.49044052", "0.4902544", "0.48999363", "0.48970205", "0.4895042", "0.48942015", "0.4884539", "0.48719186", "0.48706824", "0.4858686", "0.48585436", "0.4857435", "0.48570335", "0.48542374", "0.4851686", "0.48508495", "0.48508206", "0.48506805", "0.4850369", "0.48489052", "0.48480392", "0.48400277", "0.4839836", "0.48386323", "0.48385313", "0.48385313", "0.48357025", "0.48334897", "0.4832685", "0.48300093", "0.4826277" ]
0.0
-1
mashing it all into one function of methods
public static double longToDouble(long l) { return (double) l; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMethods(Class<?> token) {\n List<Method> newMethods = new ArrayList<>();\n for (Method method : token.getDeclaredMethods()) {\n if (methods.add(new MethodWithHash(method)) && !method.isDefault()) {\n newMethods.add(method);\n }\n }\n for (Method method : newMethods) {\n Type returnType = method.getReturnType();\n StringBuilder body = new StringBuilder(\"return\");\n if (((Class) returnType).isPrimitive()) {\n if (returnType.equals(boolean.class)) {\n body.append(\" false\");\n } else if (!returnType.equals(void.class)) {\n body.append(\" 0\");\n }\n } else {\n body.append(\" null\");\n }\n body.append(\";\");\n setExecutable(method, ((Class) returnType).getCanonicalName(), body, false);\n }\n }", "abstract protected Set<Method> createMethods();", "private void scanAndCopyMethods() {\n int numMethods = copyShort();\n for (int i = 0; i < numMethods; i++) {\n scanAndCopyAccessFlags();\n copy(4); // name_index, descriptor_index\n int numAttributes = copyShort();\n for (int j = 0; j < numAttributes; j++) {\n // Look for \"Code\" attribute.\n int attrNameIdx = copyShort();\n if (cpIdxIsCode(attrNameIdx)) {\n processCodeAttribute();\n } else {\n copyRestOfAttribute();\n }\n }\n }\n }", "public void andThisIsAMethodName(){}", "private void generateMethods(Class<?> token, BufferedWriter writer) throws IOException {\n StringBuilder result = new StringBuilder();\n Set<MethodBox> methods = new HashSet<>();\n addToMethodStorage(token.getMethods(), methods);\n\n if (!token.isInterface()) {\n for (Class<?> t = token; t != null; t = t.getSuperclass()) {\n addToMethodStorage(t.getDeclaredMethods(), methods);\n }\n }\n\n for (MethodBox method : methods) {\n result.append(getExecutable(method.method));\n result.append(LINE_SEPARATOR);\n }\n\n writer.write(toUnicode(result.toString()));\n }", "List method_111(class_922 var1, int var2, int var3, int var4);", "Operations operations();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void buildMethods(JDefinedClass cls) {\n\n\t}", "private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "private java.lang.reflect.Method m16124a(java.lang.Class r3, java.lang.String r4, java.lang.Class[] r5) {\n /*\n r2 = this;\n r0 = 0\n if (r3 == 0) goto L_0x0028\n boolean r1 = r2.m16125a((java.lang.Object) r4)\n if (r1 == 0) goto L_0x000a\n goto L_0x0028\n L_0x000a:\n r3.getMethods() // Catch:{ Exception -> 0x0015 }\n r3.getDeclaredMethods() // Catch:{ Exception -> 0x0015 }\n java.lang.reflect.Method r3 = r3.getDeclaredMethod(r4, r5) // Catch:{ Exception -> 0x0015 }\n return r3\n L_0x0015:\n java.lang.reflect.Method r3 = r3.getMethod(r4, r5) // Catch:{ Exception -> 0x001a }\n return r3\n L_0x001a:\n java.lang.Class r1 = r3.getSuperclass()\n if (r1 == 0) goto L_0x0028\n java.lang.Class r3 = r3.getSuperclass()\n java.lang.reflect.Method r0 = r2.m16124a((java.lang.Class) r3, (java.lang.String) r4, (java.lang.Class[]) r5)\n L_0x0028:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.shortcutbadger.impl.OPPOHomeBader.m16124a(java.lang.Class, java.lang.String, java.lang.Class[]):java.lang.reflect.Method\");\n }", "private void addMethods(StringBuilder xml) {\n\t\t\n\t\tfor(MethodRequest method : methods) {\n\t\t\tstartElementWithAttributes(xml, \"Method\");\n\t\t\taddStringAttribute(xml, \"name\", method.getName());\n\t\t\taddStringAttribute(xml, \"contextObject\", method.getContextObject());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t\t\n\t}", "public static LinkedList<String> trackMethod(Class<?> myClass,Integer year,Integer month,Integer day){\n LinkedList<String> result = null;//array with result\n\n /*\n * Map stores methods and their annotations\n * Data are store sorted by MethodNoteBook,\n * because this annotation is describe\n * the queue of executions of methods and\n * descriptions\n */\n Map<MethodNoteBook, Method> map = new TreeMap<MethodNoteBook, Method>(\n new Comparator<MethodNoteBook>() {\n\n @Override\n public int compare(MethodNoteBook o1, MethodNoteBook o2) {\n return o1.name() - (o2.name());\n }\n\n });\n\n try {\n Class classNoteBook = NoteBook.class;\n\n /* Create instance of class */\n NoteBook newInstance = (NoteBook) classNoteBook.getConstructor().newInstance();\n\n /* Put all methods of class to map*/\n for (Method methodNoteBook : myClass.getDeclaredMethods()){\n MethodNoteBook methodClass = methodNoteBook.getAnnotation(MethodNoteBook.class);\n map.put(methodClass,methodNoteBook);\n }\n\n result = new LinkedList<String>();\n\n /* Invoke methods */\n for (Map.Entry<MethodNoteBook, Method> el : map.entrySet()) {\n if (el.getKey().description().compareTo(\"set\") == 0) {\n switch (el.getKey().name()) {\n case 1: //name() of annotation return 1 , so, the first, execute this method\n result.add(\"1 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"lastName\"));\n continue;\n case 2://name() of annotation return 2 , so ,the second, execute this method\n result.add(\"2 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"firstName\"));\n continue;\n case 3:\n result.add(\"3 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"middleName\"));\n continue;\n case 4:\n result.add(\"4 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"telephone\"));\n continue;\n case 5:\n result.add(\"5 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new Integer(year), new Integer(month), new Integer(day));\n continue;\n }\n } else if (el.getKey().name() == 6 && el.getKey().description().compareTo(\"Count days to birthday\") == 0) {\n result.add(\"6 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance);\n }\n }\n } catch (NoSuchMethodException e1) {\n e1.printStackTrace();\n } catch (InstantiationException e1) {\n e1.printStackTrace();\n } catch (IllegalAccessException e1) {\n e1.printStackTrace();\n } catch (InvocationTargetException e1) {\n e1.printStackTrace();\n }\n return result;\n }", "@Override\r\n \tpublic void addMethods(KawaWrap kawa) throws Throwable {\r\n \tkawa.eval(\"(define (sub1 n) (- n 1))\");\r\n \tkawa.eval(\"(define (add1 n) (+ n 1))\");\r\n \t}", "public class_4 method_9() {\n return this.method_17();\n }", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "protected void method_2251() {\r\n this.method_2181();\r\n this.field_1823.method_128(this.field_1824, this.field_1850.method_2383().method_8922());\r\n this.field_1826.method_7081();\r\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "protected void generateMethods(ClassContext classContext, IData data, String bean, SourceWriter sw) {\n }", "List<Method> getAllMethods();", "abstract String applicable(Method[] getters) throws InvalidObjectException;", "void method25()\n {\n }", "private HashSet<SootMethod> getMethodsInvokingAtLevel(SootMethod method,\r\n\t\t\tint level) {\n\t\tHashSet<SootMethod> workSet = new HashSet<SootMethod>();\r\n\t\tworkSet.add(method);\r\n\t\t\r\n\t\tHashSet<SootMethod> newWorkset = new HashSet<SootMethod>(1);\r\n\t\tHashSet<SootMethod> topLevel = new HashSet<SootMethod>();\r\n\t\tHashSet<SootMethod> processed = new HashSet<SootMethod>(1);\r\n\t\tfor(int i=0; i< level; i++){\r\n\t\t\tif(i !=0){\r\n\t\t\t\tfor (SootMethod sootMethod : newWorkset) {\r\n\t\t\t\t\tif(!processed.contains(sootMethod))\r\n\t\t\t\t\t\tworkSet = new HashSet<SootMethod>(newWorkset);\r\n\t\t\t\t}\r\n\t\t\t\tnewWorkset = new HashSet<SootMethod>(1);\r\n\t\t\t}\r\n\t\t\tif(workSet.isEmpty())\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tHashSet<SootMethod> implementedMethods = new HashSet<SootMethod>();\r\n\t\t\tfor (SootMethod m : workSet) {\r\n\t\t\t\tfor (SootClass interfaze : m.getDeclaringClass().getInterfaces()) {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tSootMethod m2 = interfaze.getMethod(m.getName(), \r\n\t\t\t\t\t\t\t\tm.getParameterTypes(), m.getReturnType());\r\n\t\t\t\t\t\tif(!processed.contains(m2))\r\n\t\t\t\t\t\t\timplementedMethods.add(m2);\r\n\t\t\t\t\t}catch (RuntimeException e) {\r\n\t\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tworkSet.addAll(implementedMethods);\r\n\t\t\tIterator<SootMethod> iter = workSet.iterator();\r\n\t\t\t\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSootMethod m = iter.next();\r\n\t\t\t\tif(getMethodsInvoking(m) != null){\r\n\t\t\t\t\tnewWorkset.addAll(getMethodsInvoking(m));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ttopLevel.add(m);\r\n\t\t\t}\r\n\t\t\tprocessed.addAll(workSet);\r\n\t\t}\r\n\t\tprocessed.remove(method);\r\n\t\ttadaMethodInvokedByMap.put(method, processed);\r\n\t\ttopLevel.addAll(newWorkset);\r\n\t\treturn topLevel;\r\n\t}", "private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}", "@Override\n\tpublic Void visit(OwnMethodCall method) {\n\t\tprintIndent(\"implicit dispatch\");\n\t\tindent++;\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "public interface C2541a {\n /* renamed from: O */\n boolean mo6498O(C41531v c41531v);\n\n /* renamed from: P */\n boolean mo6499P(C41531v c41531v);\n\n /* renamed from: a */\n void mo6500a(int i, int i2, Object obj, boolean z);\n\n /* renamed from: a */\n void mo6501a(C41531v c41531v, View view, Object obj, int i);\n\n /* renamed from: a */\n boolean mo6502a(C41531v c41531v, Object obj);\n\n /* renamed from: b */\n View mo6503b(RecyclerView recyclerView, C41531v c41531v);\n\n /* renamed from: by */\n void mo6504by(Object obj);\n\n /* renamed from: cu */\n void mo6505cu(View view);\n}", "private void initMethods(Method[] _methods, ConstantPoolGen cp)\n\t\tthrows ReadAttributeException {\n\t\tmethods = new HashMap();\n\t\t//\tfor (int i = 0; i < _methods.length; i++) {\n\t\tfor (int i = 0; i < _methods.length ;i++) {\n\t\t\tMethodGen mg = new MethodGen(_methods[i], className, cp);\n\t\t\tBCMethod bcm = new BCMethod(mg, this, cp);\n\t\t\tString signature = mg.getSignature();\t\n\t\t\tString key = MethodSignature.getSignature(bcm.getName(), bcm.getArgTypes(), bcm.getReturnType());\n\t\t\t/*Util.dump(\" add method \" + key + \" in class \" + getName() );*/\n\t\t\tmethods.put(key,bcm);\n\t\t}\n\t}", "public void parseFunctions(){\n\t\t\n\t}", "public T CallFunctions(T obj) {\n for (Function<T,T> action : actions) {\n obj = action.apply(obj);\n }\n \n return obj;\n }", "@Override\n\tpublic Void visit(MethodCall method) {\n\t\tprintIndent(\".\");\n\t\tindent++;\n\t\tmethod.caller.accept(this);\n\t\tmethod.type.accept(this);\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}", "private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}", "private List<Method> getTargetMethods(Class<? extends Annotation> ann) {\n List<List<Method>> list = mutableCopy(\n removeShadowed(removeOverrides(annotatedWith(allTargetMethods, ann))));\n \n // Reverse processing order to super...clazz for befores\n if (ann == Before.class || ann == BeforeClass.class) {\n Collections.reverse(list);\n }\n \n // Shuffle at class level.\n Random rnd = new Random(runnerRandomness.seed);\n for (List<Method> clazzLevel : list) {\n Collections.shuffle(clazzLevel, rnd);\n }\n \n return flatten(list);\n }", "private Map<String,List<Invoker<T>>> toMergeMethodInvokerMap(Map<String, List<Invoker<T>>> methodMap) {\n Map<String, List<Invoker<T>>> result = new HashMap<>();\n for (Map.Entry<String, List<Invoker<T>>> entry : methodMap.entrySet()) {\n String method = entry.getKey();\n List<Invoker<T>> invokers = entry.getValue();\n Map<String, List<Invoker<T>>> groupMap = new HashMap<>();\n invokers.stream().forEach(invoker -> {\n String group = invoker.getUrl().getParameter(Constants.GROUP_KEY, \"\");\n List<Invoker<T>> groupInvokers = groupMap.get(group);\n if (Objects.isNull(groupInvokers)){\n groupInvokers = new ArrayList<>();\n groupMap.put(group, groupInvokers);\n }\n groupInvokers.add(invoker);\n });\n if (groupMap.size() == 1){\n result.put(method, groupMap.values().iterator().next());\n }else if (groupMap.size() == 2){\n List<Invoker<T>> groupInvokers = new ArrayList<>();\n groupMap.values().forEach(groupList -> {\n groupInvokers.add(cluster.join(new StaticDirectory<T>(groupList)));\n });\n result.put(method, groupInvokers);\n }else {\n result.put(method, invokers);\n }\n }\n return result;\n }", "void addActions(Object bean) {\n Class<?> clazz = bean.getClass();\n Method[] ms = clazz.getMethods();\n for (Method m : ms) {\n if (isActionMethod(m)) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n String url = mapping.value();\n UrlMatcher matcher = new UrlMatcher(url);\n if (matcher.getArgumentCount()!=m.getParameterTypes().length) {\n warnInvalidActionMethod(m, \"Arguments in URL '\" + url + \"' does not match the arguments of method.\");\n continue;\n }\n log.info(\"Mapping url '\" + url + \"' to method '\" + m.toGenericString() + \"'.\");\n urlMap.put(matcher, new Action(bean, m));\n }\n }\n }", "@FunctionalInterface // or we can call it SAM\r\n interface ShowMe{\r\n\t\r\n\t void showOk();\r\n\t \r\n\tpublic default void one()\r\n\t {\r\n\t System.out.println(\"method one \");\r\n };\r\n \r\n public static void one1()\r\n {\r\n System.out.println(\"method one 1 \");\r\n };\r\n \r\n public default void one2()\r\n \t {\r\n \t System.out.println(\"method one2 \");\r\n };\r\n \r\n }", "private void findMethods() {\n List<Method> methods = new ArrayList<Method>(Arrays.asList(getObject().getClass().getMethods()));\r\n List<Method> objectMethods = new ArrayList<Method>(Arrays.asList(Object.class.getMethods()));\r\n methods.removeAll(objectMethods);\r\n \r\n for(Method method:methods) {\r\n //does method have @ManagedAttribute annotation?\r\n if(method.isAnnotationPresent(ManagedAttribute.class) || method.isAnnotationPresent(Property.class)) {\r\n exposeManagedAttribute(method);\r\n }\r\n //or @ManagedOperation\r\n else if (method.isAnnotationPresent(ManagedOperation.class) || isMBeanAnnotationPresentWithExposeAll()){\r\n exposeManagedOperation(method); \r\n } \r\n }\r\n }", "void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\n }", "private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}", "private void visitAdditionalEntrypoints() {\n\tLinkedHashSet<jq_Class> extraClasses = new LinkedHashSet<jq_Class>();\n\tfor(jq_Method m: publicMethods) {\n\t extraClasses.add(m.getDeclaringClass());\n\t}\n\t\n\tfor(jq_Class cl: extraClasses) {\n\t visitClass(cl);\n\t\t\tjq_Method ctor = cl.getInitializer(new jq_NameAndDesc(\"<init>\", \"()V\"));\n\t\t\tif (ctor != null)\n\t\t\t\tvisitMethod(ctor);\n\t}\n\n\tfor(jq_Method m: publicMethods) {\n\t visitMethod(m);\n\t}\n }", "public static void main(String[] args)\r\n\t{\n\t\tMyStringBuilder msb;\r\n\t\tStringBuilder sb;\r\n\t\tString s;\r\n\t\t//Loop iterating 3 times testing each method for all types one by one\r\n\t\tfor(int i = 0; i < 3; i++)\r\n\t\t{\r\n\t\t\t//Initialize variables\r\n\t\t\tmsb = new MyStringBuilder(\"\");\r\n\t\t\tsb = new StringBuilder(\"\");\r\n\t\t\ts = new String(\"\");\r\n\t\t\t//Test fill, delete, and insert with each iteration of the loop respectively\r\n\t\t\tswitch(i)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tfill(msb, args[0]);\r\n\t\t\t\t\tfill(sb, args[0]);\r\n\t\t\t\t\tfill(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdelete(msb, args[0]);\r\n\t\t\t\t\tdelete(sb, args[0]);\r\n\t\t\t\t\tdelete(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tinsert(msb, args[0]);\r\n\t\t\t\t\tinsert(sb, args[0]);\r\n\t\t\t\t\tinsert(s, args[0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private void init() {\n Method m = getAsListMethod();\r\n Class< ? > c = Object[].class;\r\n branchMethods.put( c, m );\r\n // Treat Map as an Entry set\r\n c = Map.class;\r\n m = getEntrySetMethod();\r\n branchMethods.put( c, m );\r\n // Make an Entry a List\r\n c = Entry.class;\r\n m = getEntryToListMethod();\r\n branchMethods.put( c, m );\r\n // Make a Pair a List\r\n c = Pair.class;\r\n m = getPairToListMethod();\r\n branchMethods.put( c, m );\r\n// c = Iterable.class;\r\n// m = null;\r\n// branchMethods.put( c, m );\r\n }", "static void method1(B b1)\n\t\t{\n\t\t\tb1.test1();\n\t\t\tb1.test2();\n\t\t}", "public void extractMethod(List<Book> books) {\n for (Book book : books) {\n loopAuthors(book);\n }\n }", "public void updateMethods (Method method) throws RepeatMethodName{\n for (Method met:methods){ // check if there isn't already method with such name\n if (met.getName().equals(method.getName())){\n throw new RepeatMethodName();\n }\n }\n methods.add(method);\n }", "public HashSet<SootMethod> getMethodsToExplore(int invocationLevel){\n\t\tHashSet<SootMethod> methodsToExplore = new HashSet<SootMethod>();\r\n\t\t\r\n\t\tfor (SootMethod method : tadaMethods) {\r\n\t\t\tHashSet<SootMethod> invokingMethods = getMethodsInvokingAtLevel(method, invocationLevel);\r\n\t\t\tmethodsToExplore.addAll(invokingMethods);\r\n\t\t}\r\n\t\treturn methodsToExplore;\r\n\t}", "private void jetFunctions(){\n\t\tInvokeExpr invokeExpr = (InvokeExpr) rExpr;\n\t\tSootMethodRef methodRef = invokeExpr.getMethodRef();\n\t\t\n\t\t//if this is a java.lang.String.func, we don't need to declare it\n\t\tif(StringModeling.stringMethods.contains(methodRef.getSignature())){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString funStr = constructFunStr(invokeExpr);\n\t\tType thisType = null;\n\t\tif(!fileGenerator.getDeclaredFunctions().contains(funStr)){\n\t\t\tif(invokeExpr instanceof StaticInvokeExpr){\n\t\t\t\twriter.println(Z3MiscFunctions.v().getFuncDeclareStmt(funStr, thisType,\n\t\t\t\t\t\tmethodRef.parameterTypes(), methodRef.returnType()));\n\t\t\t}else{\n\t\t\t\tif(invokeExpr instanceof InterfaceInvokeExpr){\n\t\t\t\t\tthisType = ((InterfaceInvokeExpr) invokeExpr).getBase().getType();\n\t\t\t\t}else if(invokeExpr instanceof SpecialInvokeExpr){\n\t\t\t\t\tthisType = ((SpecialInvokeExpr) invokeExpr).getBase().getType();\n\t\t\t\t}else if(invokeExpr instanceof VirtualInvokeExpr){\n\t\t\t\t\tthisType = ((VirtualInvokeExpr) invokeExpr).getBase().getType();\n\t\t\t\t}\n\t\t\t\twriter.println(Z3MiscFunctions.v().getFuncDeclareStmt(funStr, thisType,\n\t\t\t\t\t\tmethodRef.parameterTypes(), methodRef.returnType()));\n\t\t\t}\n\t\t\tfileGenerator.getDeclaredFunctions().add(funStr);\n\t\t}\n\t}", "private void method_2684(ahb var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n int var7 = method_2686(var6);\r\n String[] var5 = var10000;\r\n int var9 = var7;\r\n if(var5 != null) {\r\n if(var7 == 7) {\r\n return;\r\n }\r\n\r\n var9 = this.method_2685(var1, var2, var3, var4, var7);\r\n }\r\n\r\n int var8 = var9;\r\n var9 = var8;\r\n if(var5 != null) {\r\n label45: {\r\n if(var8 != 0) {\r\n var9 = method_2687(var6);\r\n if(var5 == null) {\r\n break label45;\r\n }\r\n\r\n if(var9 == 0) {\r\n ahb var10 = var1;\r\n int var10001 = var2;\r\n int var10002 = var3;\r\n int var10003 = var4;\r\n if(var5 != null) {\r\n if(!method_2690(var1, var2, var3, var4, var7)) {\r\n return;\r\n }\r\n\r\n var10 = var1;\r\n var10001 = var2;\r\n var10002 = var3;\r\n var10003 = var4;\r\n }\r\n\r\n var10.method_2193(var10001, var10002, var10003, this, 0, var7);\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n var9 = var8;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 != 0) {\r\n return;\r\n }\r\n\r\n var9 = method_2687(var6);\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 == 0) {\r\n return;\r\n }\r\n\r\n var1.method_2055(var2, var3, var4, var7, 2);\r\n }\r\n\r\n var1.method_2193(var2, var3, var4, this, 1, var7);\r\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "private void initMethodMap(Class<?> type, Set<Class<?>> closeList, List<Method> methodList) {\n\t\tcloseList.add(type);\n\t\t\n\t\tfor(Method method : type.getMethods()) {\n\t\t\t// check if there is a field annotation\n\t\t\tif(method.isAnnotationPresent(Field.class)) {\n\t\t\t\tString key = getKeyFromMethodName(method.getName());\n\t\t\t\tif(!key.equalsIgnoreCase(\"id\")) {\n\t\t\t\t\tList<Method> methods = null;\n\t\t\t\t\tif(methodList != null) {\n\t\t\t\t\t\tmethods = new ArrayList<Method>(methodList);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmethods = new ArrayList<Method>();\n\t\t\t\t\t}\n\t\t\t\t\tmethods.add(method);\n\t\t\t\t\t_methodMap.put(key, methods);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// check if there is an index embedded annotation\n\t\t\t\tif(method.isAnnotationPresent(IndexedEmbedded.class)) {\n\t\t\t\t\tClass<?> subtype = method.getReturnType();\n\t\t\t\t\t// check if return type is searchable and close list does not contain subtype\t\t\n\t\t\t\t\tif(Searchable.class.isAssignableFrom(subtype) && !closeList.contains(subtype)) {\n\t\t\t\t\t\t// recursion\n\t\t\t\t\t\tList<Method> methods = null;\n\t\t\t\t\t\tif(methodList != null) {\n\t\t\t\t\t\t\tmethods = new ArrayList<Method>(methodList);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmethods = new ArrayList<Method>();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmethods.add(method);\n\t\t\t\t\t\tinitMethodMap(subtype, closeList, methods);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract void add(T input, List<Method> methods);", "void emitMethod (ClassMember m) {\r\n Emitter.emitln ();\r\n\t\r\n MethodType mt = (MethodType) m.getType ();\r\n ExpressionList args = mt.getArguments ();\r\n\t\r\n /* emit variable for arguments */\r\n \r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n Identifier a = (Identifier) args.get (j);\r\n Emitter.emit (a.getType () + \" \");\r\n emitArg (method_number, j, a);\r\n Emitter.emitln (\";\");\r\n }\r\n Emitter.emitln ();\r\n \r\n /* emit methods */\r\n Emitter.emit (m.modifiers ());\r\n Emitter.emit (mt);\r\n \r\n /* emit method body */\r\n Emitter.emit (\"{\");\r\n Emitter.indentPush ();\r\n \r\n Emitter.emitln ();\r\n Emitter.emitln (\"enter ();\");\r\n\r\n Emitter.emit (\"try {\");\r\n Emitter.indentPush ();\r\n \r\n if (m.isOnce ()) \r\n mt.emitOnceBefore (method_number);\r\n\r\n Emitter.emitln ();\r\n Emitter.emitln (\"part = \" + part_no + \";\");\r\n Emitter.emitln (\"selector = \" + method_number + \";\");\r\n \r\n /* emit arguments copy */\r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n Identifier a = (Identifier) args.get (j);\r\n emitArg (method_number, j, a);\r\n Emitter.emitln (\" = \" + a + \";\");\r\n }\r\n \r\n Emitter.emit (\"fork ();\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"} catch (Exception e) {\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n /* Emitter.emitln (\"JP.go.ipa.oz.system.OzSystem.debug (\\\"\" + class_id\r\n\t\t + \"\\\", \\\"\" + m + \"\\\", e);\"); */\r\n Emitter.emit (\"throw e;\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"} finally {\");\r\n Emitter.indentPush ();\r\n Emitter.emitln ();\r\n/* Emitter.emitln (\"arguments = null;\"); */\r\n \r\n /* emit argument clear */\r\n for (int j = 0, arg_size = args.size (); j < arg_size; j++) {\r\n Identifier a = (Identifier) args.get (j);\r\n emitArg (method_number, j, a);\r\n\r\n if (a.type.isClass ())\r\n\tEmitter.emitln (\" = null;\");\r\n else if (a.type.isBool ())\r\n\tEmitter.emitln (\" = false;\");\r\n else\r\n\tEmitter.emitln (\" = 0;\");\r\n }\r\n method_number++;\r\n \r\n Emitter.emit (\"leave ();\");\r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"}\");\r\n \r\n Emitter.emitln ();\r\n Type rt = mt.getReturnType ();\r\n if (rt.isClass ()) \r\n Emitter.emit (\"return (\" + rt + \") join ();\");\r\n else if (rt.isVoid ()) {\r\n Emitter.emit (\"join ();\");\r\n if (m.isNew ()) {\r\n\tEmitter.emitln ();\r\n\tEmitter.emit (\"return this;\");\r\n }\r\n } else {\r\n emitType (rt);\r\n Emitter.emit (\" result = (\");\r\n emitType (rt);\r\n Emitter.emitln (\") join ();\");\r\n Emitter.emit (\"return result.\" + rt + \"Value ();\");\r\n }\r\n \r\n Emitter.indentPop ();\r\n Emitter.emitln ();\r\n Emitter.emit (\"}\");\r\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public void testMethodInfo889() throws Exception {\n\t\tClassInfo var2788 = instantiateClassInfo431();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2789 = new MethodInfo(var2788, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2789.isSetter();\n\t\tvar2789.isSetter();\n\t}", "public List<Unit> getAllUnit(SootMethod sm,int count ){\n\t if(count<=0) {\r\n\t\t return null;\r\n\t }\t \r\n\t count--;\r\n\t\tif (sm == null || !sm.isConcrete())\r\n\t\t\treturn null;\r\n\t\tif (sm.getDeclaringClass().getName().startsWith(\"java\")\r\n\t\t\t|| sm.getDeclaringClass().getName().startsWith(\"android\"))\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tList<Unit> fu = new ArrayList<Unit>();\r\n//\t\tList<Unit> tmp = null;\r\n \tBody b = sm.retrieveActiveBody();\r\n \tChain<Unit> u = b.getUnits();\r\n fu.addAll(u); \r\n//\t\tUnitGraph unitGraph = new BriefUnitGraph(b);\r\n\t\tIterator<Unit> it = u.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tUnit u1 = it.next();\r\n\t\t\tStmt stmt = (Stmt) u1;\r\n\t\t\t\r\n\t\t\tif ((stmt instanceof InvokeStmt || stmt instanceof AssignStmt) && stmt.containsInvokeExpr()) {\r\n\t\t\t\tif (stmt.getInvokeExpr().getMethod().getDeclaringClass().getName().startsWith(\"java\")|| stmt.getInvokeExpr().getMethod().getDeclaringClass().getName().startsWith(\"android\"))\t\t\t\t\t\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tSootMethod s = stmt.getInvokeExpr().getMethod();\t\t\t\r\n\t\t\t\tif (s.getSignature().equals(sm.getSignature()))\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t List<Unit> appendfu = getAllUnit(s,count);\r\n\t\t\t\t if(appendfu!=null)\r\n\t\t\t\t fu.addAll(appendfu);\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\t\r\n\t\treturn fu;\r\n\t}", "private List<String> callMethod(final int m, final int n) {\n return uniquePathsGenerator.uniquePathsByVijayApproach(m, n);\n }", "private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}", "public void testMethodInfo888() throws Exception {\n\t\tClassInfo var2785 = instantiateClassInfo430();\n\t\tFieldInfo var2786 = instantiateFieldInfo429();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2787 = new MethodInfo(var2785, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.getSetters();\n\t\tvar2787.isSetter();\n\t\tvar2787.isSetter();\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override public Iterable<JflowModel.Method> getStartMethods()\n{\n Vector<JflowModel.Method> v = new Vector<JflowModel.Method>();\n\n for (JflowMethod cm : model_master.getStartMethods()) {\n ModelMethod cs = complete_calls.get(cm);\n if (cs != null) v.add(cs);\n }\n\n return v;\n}", "@Override\n public void visitEnd() {\n// fv = super.visitField(ACC_PRIVATE, \"returnMethods\", \"Ljava/util/Map;\",\n// \"Ljava/util/Map<Ljava/lang/String;Lru/mousecray/mousecore/api/asm/methods/MouseExecutor;>;\", null);\n// fv.visitEnd();\n MethodVisitor mv;\n// = super.visitMethod(ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n\n// mv.visitVarInsn(ALOAD, 0);\n// mv.visitTypeInsn(NEW, \"java/util/HashMap\");\n// mv.visitInsn(DUP);\n// mv.visitMethodInsn(INVOKESPECIAL, \"java/util/HashMap\", \"<init>\", \"()V\", false);\n// mv.visitFieldInsn(PUTFIELD, \"ru/mousecray/mousecore/Get\", \"voidMethods\", \"Ljava/util/Map;\");\n//\n//\n// mv.visitVarInsn(ALOAD, 0);\n// mv.visitTypeInsn(NEW, \"java/util/HashMap\");\n// mv.visitInsn(DUP);\n// mv.visitMethodInsn(INVOKESPECIAL, \"java/util/HashMap\", \"<init>\", \"()V\", false);\n// mv.visitFieldInsn(PUTFIELD, \"ru/mousecray/mousecore/Get\", \"returnMethods\", \"Ljava/util/Map;\");\n//\n// mv.visitEnd();\n\n for (Map.Entry<String, MouseMethod> entry : methods.entrySet()) {\n MouseMethod method = entry.getValue();\n mv = super.visitMethod(ACC_PUBLIC, method.);\n }\n// for (int count = 0; count < methods.size(); ++count) {\n// Method method = methods.get(count);\n\n\n Type.getMethodDescriptor(method.getReturnType(), method.getParameterTypes()), null, null);\n mv.visitCode();\n mv.visitVarInsn(ALOAD, 0);\n //TODO:\n// mv.visitFieldInsn(GETFIELD, \"ru/mousecray/mousecore/Get\", \"transformer\",\n// \"Lru/mousecray/mousecore/api/asm/transformers/CoreClassHookWithAddInterface;\");\n// }\n\n// super.visitEnd();\n }", "private void callbacksUsingCompose() {\n userService.getUser()\n .compose(user -> {\n return userService.login(user);\n })\n .compose(status -> {\n return userService.showDashBoard(status);\n })\n .onSuccess(System.out::println)\n .onFailure(System.out::println);\n //simplifed version\n userService.getUser()\n .compose(user -> userService.login(user))\n .compose(status -> userService.showDashBoard(status))\n .onSuccess(System.out::println)\n .onFailure(System.out::println);\n\n //method reference\n userService.getUser()\n .compose(userService::login)\n .compose(userService::showDashBoard)\n .onSuccess(System.out::println)\n .onFailure(System.out::println);\n }", "void method_115();", "public class_1343 method_2452(ahb var1, int var2, int var3, int var4) {\r\n this.method_2486(var1, var2, var3, var4);\r\n return super.method_2452(var1, var2, var3, var4);\r\n }", "public void testMethodInfo885() throws Exception {\n\t\tClassInfo var2769 = instantiateClassInfo424();\n\t\tLocalVariableInfo var2770 = instantiateLocalVariableInfo423();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2772 = new MethodInfo(var2769, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2772.isSetter();\n\t\tvar2772.isSetter();\n\t}", "protected void writeObjectByMethods(UBJOutputStream out, String name,\n\t\t\tClass<?> type, Object obj) throws IOException {\n\t\tif (name != null && sstack.peek() != ScopeType.ARRAY && !name.isEmpty())\n\t\t\tout.writeString(name);\n\n\t\t// Check cache for existing filtered method list.\n\t\tList<MethodCacheElement> methodList = methodCache.get(type);\n\n\t\t// Filter and cache field list if we didn't already.\n\t\tif (methodList == null) {\n\t\t\t// Get all public, inherited methods.\n\t\t\tMethod[] methods = type.getMethods();\n\t\t\tmethodList = new ArrayList<MethodCacheElement>(methods.length);\n\n\t\t\t// Filter the methods down to just the ones we want to map.\n\t\t\tfor (int i = 0; i < methods.length; i++) {\n\t\t\t\tMethod m = methods[i];\n\t\t\t\tint mods = m.getModifiers();\n\n\t\t\t\t// Skip static, transient, synthetic or methods that take args.\n\t\t\t\tif (Modifier.isStatic(mods) || Modifier.isTransient(mods)\n\t\t\t\t\t\t|| m.isSynthetic() || m.getParameterTypes().length != 0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tint j = 0;\n\t\t\t\tString mName = m.getName();\n\n\t\t\t\t/*\n\t\t\t\t * We need to normalize the method name into a proper property\n\t\t\t\t * name. First we need to find where the prefix is to chop\n\t\t\t\t * off...\n\t\t\t\t */\n\t\t\t\tif (mName.startsWith(\"is\"))\n\t\t\t\t\tj = 2;\n\t\t\t\telse if (mName.startsWith(\"get\") || mName.startsWith(\"has\")\n\t\t\t\t\t\t|| mName.startsWith(\"can\"))\n\t\t\t\t\tj = 3;\n\n\t\t\t\t/*\n\t\t\t\t * Skip mapping this property totally if the method name isn't\n\t\t\t\t * long enough to be used as a property name (e.g. the method\n\t\t\t\t * name is just \"get\" or \"is\" and not something like \"getAge\" or\n\t\t\t\t * \"isRegistered\".\n\t\t\t\t */\n\t\t\t\tif (j >= mName.length())\n\t\t\t\t\tcontinue;\n\n\t\t\t\t/*\n\t\t\t\t * Now we set the property name to the method's name with the\n\t\t\t\t * prefix chopped and the first char lowercased.\n\t\t\t\t */\n\t\t\t\tmName = Character.toLowerCase(mName.charAt(j))\n\t\t\t\t\t\t+ mName.substring(j + 1);\n\n\t\t\t\tmethodList.add(new MethodCacheElement(m, mName));\n\t\t\t}\n\t\t}\n\n\t\tout.writeObjectHeader(methodList.size());\n\n\t\t// Enter object scope\n\t\tsstack.push(ScopeType.OBJECT);\n\n\t\t// Write out the values for each method we are mapping.\n\t\tfor (int i = 0, s = methodList.size(); i < s; i++) {\n\t\t\tMethodCacheElement cacheElement = methodList.get(i);\n\t\t\tObject mValue = null;\n\n\t\t\ttry {\n\t\t\t\t// Safely reflect the method value.\n\t\t\t\tmValue = cacheElement.method.invoke(obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tdispatchWrite(out, cacheElement.name, mValue);\n\t\t}\n\n\t\t// Exit object scope\n\t\tsstack.pop();\n\t}", "public List method_111(class_922 var1, int var2, int var3, int var4) {\r\n class_985 var5 = this.field_5907.method_35(var2, var4);\r\n return var5.method_5706(var1);\r\n }", "public void rewrite(IRCode code, DexEncodedMethod method) {\n ListIterator<BasicBlock> blocks = code.blocks.listIterator();\n while (blocks.hasNext()) {\n BasicBlock block = blocks.next();\n InstructionListIterator iterator = block.listIterator();\n while (iterator.hasNext()) {\n Instruction current = iterator.next();\n if (current.isInvokeCustom()) {\n InvokeCustom invokeCustom = current.asInvokeCustom();\n DexCallSite callSite = invokeCustom.getCallSite();\n DexMethodHandle newBootstrapMethod = rewriteDexMethodHandle(method,\n callSite.bootstrapMethod);\n List<DexValue> newArgs = callSite.bootstrapArgs.stream().map(\n (arg) -> {\n if (arg instanceof DexValueMethodHandle) {\n return new DexValueMethodHandle(\n rewriteDexMethodHandle(method, ((DexValueMethodHandle) arg).value));\n }\n return arg;\n })\n .collect(Collectors.toList());\n\n if (newBootstrapMethod != callSite.bootstrapMethod\n || !newArgs.equals(callSite.bootstrapArgs)) {\n DexCallSite newCallSite = appInfo.dexItemFactory.createCallSite(\n callSite.methodName, callSite.methodProto, newBootstrapMethod, newArgs);\n InvokeCustom newInvokeCustom = new InvokeCustom(newCallSite, invokeCustom.outValue(),\n invokeCustom.inValues());\n iterator.replaceCurrentInstruction(newInvokeCustom);\n }\n } else if (current.isInvokeMethod()) {\n InvokeMethod invoke = current.asInvokeMethod();\n DexMethod invokedMethod = invoke.getInvokedMethod();\n DexType invokedHolder = invokedMethod.getHolder();\n if (!invokedHolder.isClassType()) {\n continue;\n }\n DexMethod actualTarget = graphLense.lookupMethod(invokedMethod, method);\n Invoke.Type invokeType = getInvokeType(invoke, actualTarget, invokedMethod);\n if (actualTarget != invokedMethod || invoke.getType() != invokeType) {\n Invoke newInvoke = Invoke\n .create(invokeType, actualTarget, null,\n invoke.outValue(), invoke.inValues());\n iterator.replaceCurrentInstruction(newInvoke);\n // Fix up the return type if needed.\n if (actualTarget.proto.returnType != invokedMethod.proto.returnType\n && newInvoke.outValue() != null) {\n Value newValue = code.createValue(newInvoke.outType(), invoke.getDebugInfo());\n newInvoke.outValue().replaceUsers(newValue);\n CheckCast cast = new CheckCast(\n newValue,\n newInvoke.outValue(),\n graphLense.lookupType(invokedMethod.proto.returnType, method));\n iterator.add(cast);\n // If the current block has catch handlers split the check cast into its own block.\n if (newInvoke.getBlock().hasCatchHandlers()) {\n iterator.previous();\n iterator.split(1, code, blocks);\n }\n }\n }\n } else if (current.isInstanceGet()) {\n InstanceGet instanceGet = current.asInstanceGet();\n DexField field = instanceGet.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n InstanceGet newInstanceGet =\n new InstanceGet(\n instanceGet.getType(), instanceGet.dest(), instanceGet.object(), actualField);\n iterator.replaceCurrentInstruction(newInstanceGet);\n }\n } else if (current.isInstancePut()) {\n InstancePut instancePut = current.asInstancePut();\n DexField field = instancePut.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n InstancePut newInstancePut =\n new InstancePut(instancePut.getType(), instancePut.inValues(), actualField);\n iterator.replaceCurrentInstruction(newInstancePut);\n }\n } else if (current.isStaticGet()) {\n StaticGet staticGet = current.asStaticGet();\n DexField field = staticGet.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n StaticGet newStaticGet =\n new StaticGet(staticGet.getType(), staticGet.dest(), actualField);\n iterator.replaceCurrentInstruction(newStaticGet);\n }\n } else if (current.isStaticPut()) {\n StaticPut staticPut = current.asStaticPut();\n DexField field = staticPut.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n StaticPut newStaticPut =\n new StaticPut(staticPut.getType(), staticPut.inValue(), actualField);\n iterator.replaceCurrentInstruction(newStaticPut);\n }\n } else if (current.isCheckCast()) {\n CheckCast checkCast = current.asCheckCast();\n DexType newType = graphLense.lookupType(checkCast.getType(), method);\n if (newType != checkCast.getType()) {\n CheckCast newCheckCast =\n new CheckCast(makeOutValue(checkCast, code), checkCast.object(), newType);\n iterator.replaceCurrentInstruction(newCheckCast);\n }\n } else if (current.isConstClass()) {\n ConstClass constClass = current.asConstClass();\n DexType newType = graphLense.lookupType(constClass.getValue(), method);\n if (newType != constClass.getValue()) {\n ConstClass newConstClass = new ConstClass(makeOutValue(constClass, code), newType);\n iterator.replaceCurrentInstruction(newConstClass);\n }\n } else if (current.isInstanceOf()) {\n InstanceOf instanceOf = current.asInstanceOf();\n DexType newType = graphLense.lookupType(instanceOf.type(), method);\n if (newType != instanceOf.type()) {\n InstanceOf newInstanceOf = new InstanceOf(makeOutValue(instanceOf, code),\n instanceOf.value(), newType);\n iterator.replaceCurrentInstruction(newInstanceOf);\n }\n } else if (current.isInvokeNewArray()) {\n InvokeNewArray newArray = current.asInvokeNewArray();\n DexType newType = graphLense.lookupType(newArray.getArrayType(), method);\n if (newType != newArray.getArrayType()) {\n InvokeNewArray newNewArray = new InvokeNewArray(newType, makeOutValue(newArray, code),\n newArray.inValues());\n iterator.replaceCurrentInstruction(newNewArray);\n }\n } else if (current.isNewArrayEmpty()) {\n NewArrayEmpty newArrayEmpty = current.asNewArrayEmpty();\n DexType newType = graphLense.lookupType(newArrayEmpty.type, method);\n if (newType != newArrayEmpty.type) {\n NewArrayEmpty newNewArray = new NewArrayEmpty(makeOutValue(newArrayEmpty, code),\n newArrayEmpty.size(), newType);\n iterator.replaceCurrentInstruction(newNewArray);\n }\n }\n }\n }\n assert code.isConsistentSSA();\n }", "@Override\n\tpublic void operate() {\n\t\tthis.method2();\n\t\tsuper.operate();\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tpublic void buildMethodDetails(List elements) throws Exception {\n\t\tMethodBuilder.getInstance(\n\t\t\t\tconfiguration,\n\t\t\t\twriter.getClassDoc(),\n\t\t\t\tnew CustomMethodWriterImpl((SubWriterHolderWriter) writer, writer.getClassDoc(),\n\t\t\t\t\t\ttargetContractMap)).build(elements);\n\t}", "private Stream<Method> getMethodStream(\n Class<?> api,\n ProtocolHandler protocol\n ) {\n Stream<Method> methodStream = Stream\n .of(api.getMethods())\n .filter(m -> !ReflectUtils.isDeprecated(m))\n .filter(m -> !ReflectUtils.isDeprecated(m.getReturnType()))\n .filter(m -> !ReflectUtils.hasAnyBitwigObjectParameter(m))\n .filter(m -> !ReflectUtils.hasAnyCallbackParameter(m))\n .filter(m -> !ReflectUtils.isModuleFactory(m))\n .filter(m -> {\n if (LOG.isDebugEnabled() && m.isBridge()) {\n LOG.debug(\n \"node[{}] member method[{}] is bridge method\",\n absoluteName,\n ReflectUtils.javaExpression(m)\n );\n }\n return !m.isBridge();\n });\n\n // markInterested is probably same as Subscribable#subscibe()\n if (Value.class.isAssignableFrom(nodeType)) {\n methodStream =\n methodStream.filter(m -> !(\"markInterested\".equals(m.getName())));\n }\n\n // TODO other Host methods ?\n if (ControllerHost.class.isAssignableFrom(nodeType)) {\n methodStream =\n methodStream.filter(m ->\n \"getNotificationSettings\".equals(m.getName()) ||\n \"showPopupNotification\".equals(m.getName())\n );\n }\n\n // MasterTrack#sendBank() is useless, and host throw exception.\n if (MasterTrack.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"sendBank\".equals(m.getName()));\n }\n\n // SceneBank is implemented Bank<Scene>, should use Bank#getItemAt(int) instead of SceneBank#getScene(int)\n if (SceneBank.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"getScene\".equals(m.getName()));\n }\n // DeviceBank is implemented Bank<Device>, should use Bank#getItemAt(int) instead of DeviceBank#getDevice(int)\n if (DeviceBank.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"getDevice\".equals(m.getName()));\n }\n // Parameter#setLabel(String) can only be called during driver initialization\n if (Parameter.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"setLabel\".equals(m.getName()));\n }\n\n // since bitwig 3.1\n\n //#if bitwig.extension.api.version >= 10\n methodStream =\n methodStream.filter(m ->\n !ReflectUtils.isPureHardwareBindable(m.getReturnType(), protocol)\n );\n //#endif\n\n // TODO since bitwig 3.1, API methods are annotated with @OscMethod, @OscNode\n // Will OSC server be released soon ?\n\n // Color class is difficult to use via remote. ColorValue class is enough.\n methodStream =\n methodStream.filter(m -> !Color.class.equals(m.getReturnType()));\n\n // move to ApplicationExt#observerdAction\n if (Action.class.isAssignableFrom(nodeType)) {\n methodStream = methodStream.filter(m -> !\"isEnabled\".equals(m.getName()));\n }\n return methodStream;\n }", "public void miseAJour();", "public abstract void mo2624j();", "public static void main(String[] args)\n {\n methodA();\n methodB();\n\n }", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}", "public abstract void afvuren();", "private static HashMap<Method, Double> getActionTaggedMethods(FsmModel fsm) {\n HashMap<Method, Double> ret = new HashMap<Method, Double>();\n for (Method m : fsm.getClass().getDeclaredMethods()) {\n Annotation[] ta = m.getDeclaredAnnotations();\n for (int i=0; i < ta.length; i++) {\n if (ta[i] instanceof Action) {\n Method actProba = null;\n double proba = 0;\n try {\n actProba = fsm.getClass().getDeclaredMethod(m.getName() + \"Proba\");\n proba = (Double) actProba.invoke(fsm);\n } catch (NoSuchMethodException e) {\n System.err.println(\"Warning: method \" + m.getName() + \" has no probability. Considered 0.\");\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n System.err.println(\"Illegal access to \" + m.getName() + \"Proba\");\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n } catch (InvocationTargetException e) {\n System.err.println(\"Exception on target invocation on \" + m.getName() + \"Proba\");\n System.err.println(\"Shouldn't have happened\");\n // e.printStackTrace(System.err);\n }\n ret.put(m, proba);\n }\n }\n }\n return ret;\n }", "public static void main(String[] args) {\n\n Method();\n Method(10);\n Method(\"Hello\");\n Method(10, 20);\n // Multiple methods can have the same name as long as the number and/or type of parameters are different.\n \n }", "interface C15937b {\n /* renamed from: a */\n void mo13368a();\n\n /* renamed from: a */\n void mo13369a(int i, int i2, int i3, boolean z);\n\n /* renamed from: a */\n void mo13370a(int i, int i2, List<C15929a> list) throws IOException;\n\n /* renamed from: a */\n void mo13371a(int i, long j);\n\n /* renamed from: a */\n void mo13372a(int i, ErrorCode errorCode);\n\n /* renamed from: a */\n void mo13373a(int i, ErrorCode errorCode, ByteString byteString);\n\n /* renamed from: a */\n void mo13374a(boolean z, int i, int i2);\n\n /* renamed from: a */\n void mo13375a(boolean z, int i, int i2, List<C15929a> list);\n\n /* renamed from: a */\n void mo13376a(boolean z, int i, BufferedSource bufferedSource, int i2) throws IOException;\n\n /* renamed from: a */\n void mo13377a(boolean z, C15943j c15943j);\n }", "public String getFunctions();", "private void readMethodsAnnotations() {\n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n Annotation[] annotations = method.getDeclaredAnnotations();\n for (Annotation a : annotations) {\n Class<? extends Annotation> aType = a.annotationType();\n List<Entry<Annotation>> list = entries.get(aType);\n if (list == null) {\n list = new ArrayList();\n entries.put(aType, list);\n }\n list.add(new Entry<>(method, a));\n }\n }\n }", "private void addClassOrMethod(String methodOrClass) {\n\t\t//System.out.println(\"###addClassOrMethod [\" + methodOrClass + \"]\");\n\t\tSimpleMethod method = new SimpleMethod();\n\t\t\n\t\tList<SimpleMethod> allMethods = null;\n\t\t\n\t\tString[] parts = methodOrClass.split(CLASS_METHOD_DELIMITER);\n\t\tif (parts.length >= 1 && parts[0]!=null) {\n\t\t\tallMethods = this.myInstrCriteria.get(parts[0]);\n\t\t\tif (allMethods == null) {\n\t\t\t\tallMethods = new ArrayList<SimpleMethod>();\n\t\t\t\t//this.logVerbose(\"in addClassOrMethod just created allMethods hash[\" + allMethods.hashCode() + \"]myInstrCriteriaHash[\" + myInstrCriteria.hashCode() + \"]\");\n\t\t\t\tthis.myInstrCriteria.put(parts[0], allMethods);\n\t\t\t}\n\t\t\t\n\t\t\tswitch (parts.length) {\n\t\t\t\tcase 1: //just the package and class name were specified, meaning that all methods should be instrumented.\n\t\t\t\t\tmethod.ynAllMethods = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: //a method was specified after a # sign...only instrument this specific method.\n\t\t\t\t\tmethod.setNameAndArgs(parts[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RuntimeException(\"Was expecting to find either zero or one of the [\" + this.CLASS_METHOD_DELIMITER + \"] character inside of [\" + methodOrClass + \"]\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Error adding this method/class [\" + methodOrClass + \"]\");\n\t\t}\n\t\tallMethods.add(method);\n//\t\tSystem.out.println(\"## Just added methodName[\" + method.name + \"] methodArg [\" + method.args + \"]methodArgGetter [\" + method.getArgs() + \"]\");\n//\t\tSystem.out.println(\"@@@@@@@Class count [\" + myInstrCriteria.size() + \"] for class[\" + parts[0] + \"] count is [\" + allMethods.size() + \"]\");\n\t}", "public void method_192() {}", "private void prepareMethodsToInstrument(\r\n\t\t\tboolean useInlinedVersion,\r\n\t\t\tboolean useCaller, // Compressor.compress\r\n\t\t\tboolean useCallee1, // CodeTable.of\r\n\t\t\tboolean useCallee2, // CodeTable.set\r\n\t\t\tboolean useCallee3, // HashTable.clear\r\n\t\t\tboolean useCallee4, // HashTable.hsize\r\n\t\t\tboolean useCallee5, // HashTable.of_hash\r\n\t\t\tboolean useCallee6, // HashTable.set_hash\r\n\t\t\tboolean useCallee7, // Compressor.clblock\r\n\t\t\tboolean useCallee8, // Compressor.output\r\n\t\t\tboolean useCallee9, // InputBuffer.readByte\r\n\t\t\tboolean useCalleeA, // Compressor.getMaxCode\r\n\t\t\tboolean useCalleeB, // OutputBuffer.writeByte\r\n\t\t\tboolean useCalleeC, // OutputBuffer.writeBytes\r\n\t\t\tString packageName,\r\n\t\t\tList<MethodDescriptor> methodsToInstrument\r\n\t\t) {\r\n\t\tMethodDescriptor caller = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", //Compressor is not an inner class! thus, do not try Compress$Compressor!\r\n\t\t\t\t\"public void compress()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); \r\n\t\tcaller.setContext(new UUID(System.currentTimeMillis(),System.currentTimeMillis()));\r\n\t\t\r\n\t\tMethodDescriptor callee1 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee1.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee2 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee2.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee3;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001... \r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001...\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee3.setContext(caller.getContext());\r\n\r\n\t\tMethodDescriptor callee4;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee4.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee5;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name of\");\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int of_hash(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee5.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee6;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name set\");\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void set_hash(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee6.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee7 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void clBlock()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); //I had an error here\r\n\t\tcallee7.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 8 (Compressor.output) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee8 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void output(int code)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee8.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 9 (InputBuffer.readByte) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee9 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".InputBuffer\",\r\n\t\t\t\t\"public int readByte()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee9.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output, implemented in Compressor's superclass (CompBase)\r\n\t\t//does not call other methods\r\n\t\tlog.warn(\"For instrumenting getMaxCode: replaced Compressor with CompBase, but only in prepareMethodsToInstrument\");\r\n\t\tMethodDescriptor calleeA = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CompBase\",\r\n\t\t\t\t\"public int getMaxCode()\",//TODO inherited but not overwritten method!!!\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeA.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeB = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writeByte(byte c)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeB.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeC = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writebytes(byte[] buf, int n)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeC.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\tif(useCaller){\r\n\t\t\tmethodsToInstrument.add(caller);\r\n\t\t}\r\n\t\tif(useCallee1){\r\n\t\t\tmethodsToInstrument.add(callee1);\r\n\t\t}\r\n\t\tif(useCallee2){\r\n\t\t\tmethodsToInstrument.add(callee2);\r\n\t\t}\r\n\t\tif(useCallee3){\r\n\t\t\tmethodsToInstrument.add(callee3);\r\n\t\t}\r\n\t\tif(useCallee4){\r\n\t\t\tmethodsToInstrument.add(callee4);\r\n\t\t}\r\n\t\tif(useCallee5){\r\n\t\t\tmethodsToInstrument.add(callee5);\r\n\t\t}\r\n\t\tif(useCallee6){\r\n\t\t\tmethodsToInstrument.add(callee6);\r\n\t\t}\r\n\t\tif(useCallee7){\r\n\t\t\tmethodsToInstrument.add(callee7);\r\n\t\t}\r\n\t\tif(useCallee8){\r\n\t\t\tmethodsToInstrument.add(callee8);\r\n\t\t}\r\n\t\tif(useCallee9){\r\n\t\t\tmethodsToInstrument.add(callee9);\r\n\t\t}\r\n\t\tif(useCalleeA){\r\n\t\t\tmethodsToInstrument.add(calleeA);\r\n\t\t}\r\n\t\tif(useCalleeB){\r\n\t\t\tmethodsToInstrument.add(calleeB);\r\n\t\t}\r\n\t\tif(useCalleeC){\r\n\t\t\tmethodsToInstrument.add(calleeC);\r\n\t\t}\r\n\t}", "public Methods() {\n // what is this doing? -PMC\n }", "Iterable<T> getFunctions();", "protected String generateOpsMethodHandlerGetMethods(AmqpModel model, boolean serverFlag, int indentSize)\n {\n String indent = Utils.createSpaces(indentSize);\n StringBuffer sb = new StringBuffer();\n for (String thisClassName : model.getClassMap().keySet())\n {\n AmqpClass thisClass = model.getClassMap().get(thisClassName);\n // Only generate for this class if there is at least one method of the\n // required chassis (server/client flag).\n boolean chassisFoundFlag = false;\n for (String thisMethodName : thisClass.getMethodMap().keySet())\n {\n AmqpMethod method = thisClass.getMethodMap().get(thisMethodName);\n boolean clientChassisFlag = method.getClientMethodFlagMap().isSet();\n boolean serverChassisFlag = method.getServerMethodFlagMap().isSet();\n if ((serverFlag && serverChassisFlag) || (!serverFlag && clientChassisFlag))\n {\n chassisFoundFlag = true;\n }\n }\n if (chassisFoundFlag)\n {\n sb.append(indent + \"virtual AMQP_\" + (serverFlag ? \"Server\" : \"Client\") + \"Operations::\" +\n thisClass.getName() + \"Handler* get\" + thisClass.getName() + \"Handler() = 0;\" + CR);\n }\n }\n return sb.toString();\n }", "public Recusive_Methods(){\n int[][] array = {\n {1,2,3,4},\n {5,6,7,8},\n {9,10,11,12},\n {13,14,15,16},\n {17,18,19,20},\n };\n printer(array,0,0,array[0].length-1,array.length-1,0);\n\n StringReverse(\"this function writes the sentence in reverse\");\n StringReverse(\"selam alp emir bilek ben\");\n\n elfish(\"alpemir\",0,0,0);\n elfish(\"leaf\",0,0,0);\n elfish(\"waffles\",0,0,0);\n }", "private static Set<SootMethod> searchDownForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\t//1.判断sm中是否含有intent的定义信息,若有,则返回\n\t\tif(containsInitMethod(sm, type)){\n\t\t\tmethods.add(sm);\n\t\t}\n\t\telse{\n\t\t\tList<SootMethod> targets = InterMethodAnalysis.getTargetsMethods(sm);\t\n\t\t\tfor(SootMethod tgt:targets){\n\t\t\t\tif(tgt.equals(sm))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(tgt.getReturnType().toString().contains(type)){\n\t\t\t\t\tif(tgt.isAbstract()){\n\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(tgt)){\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(tgt, type);\n\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}", "public abstract void populatePeripheralMethods(@Nonnull final List<ComputerMethod> methods);", "public abstract Builder methods(RequestMethod... paramVarArgs);", "private void methodOne() {\n\t\tSystem.out.println(\"I am method one\");\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void method_115() {}", "void m21();", "class_1034 method_112(ahb var1, String var2, int var3, int var4, int var5);", "public abstract Result mo5059a(Params... paramsArr);", "public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}" ]
[ "0.5966792", "0.5933956", "0.5698374", "0.56169844", "0.55956304", "0.5549709", "0.5485362", "0.54074925", "0.538804", "0.5362182", "0.5361501", "0.5361501", "0.53313553", "0.53275615", "0.5310093", "0.5306132", "0.53046024", "0.5282257", "0.5278007", "0.52459455", "0.52346367", "0.52304965", "0.5217441", "0.5217287", "0.51930416", "0.51850176", "0.51684403", "0.51556414", "0.5150066", "0.51470155", "0.51316184", "0.5128282", "0.5125438", "0.51205164", "0.51191187", "0.51098853", "0.5090713", "0.5079568", "0.50778484", "0.5071339", "0.50647295", "0.50646657", "0.50447655", "0.5038614", "0.5036175", "0.50317955", "0.50312555", "0.50265914", "0.5022825", "0.5016028", "0.5008838", "0.5007379", "0.5004025", "0.5003938", "0.4995449", "0.49833262", "0.49742964", "0.49612588", "0.49581164", "0.49500158", "0.49497467", "0.4949366", "0.49492696", "0.4941071", "0.49355358", "0.49280393", "0.49222642", "0.49156597", "0.49118927", "0.49068642", "0.49044052", "0.4902544", "0.48999363", "0.48970205", "0.4895042", "0.48942015", "0.4884539", "0.48719186", "0.48706824", "0.4858686", "0.48585436", "0.4857435", "0.48570335", "0.48542374", "0.4851686", "0.48508495", "0.48508206", "0.48506805", "0.4850369", "0.48489052", "0.48480392", "0.48400277", "0.4839836", "0.48386323", "0.48385313", "0.48385313", "0.48357025", "0.48334897", "0.4832685", "0.48300093", "0.4826277" ]
0.0
-1
We use DSL here to try invoke the step implementation, if there is Step implementation found it's handled or it's an error. sandbox security execution relies on the assumption that CpsScript.invokeMethod() is safe for sandboxed code. That means we cannot let userwritten script override this method, hence the final.
@Override public final Object invokeMethod(String name, Object args) { DSL dsl = (DSL) getBinding().getVariable(STEPS_VAR); return dsl.invokeMethod(name,args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void doExecute(StepExecution stepExecution) throws Exception {\n\t\t\r\n\t}", "protected abstract R runStep();", "public interface IAutomationStep {\n\n void executeStep();\n}", "private Object invokeStep(MethodInvocation invocation) throws Throwable {\n\t\tprinter().onStepBegins(classToString(invocation), methodToString(invocation));\n\t\tExpected expected = invocation.getMethod().getAnnotation(Expected.class);\n\t\tObject result = null;\n\t\tif (expected == null) {\n\t\t\tresult = invocation.proceed();\n\t\t} else {\n\t\t\tboolean succeed = false;\n\t\t\ttry {\n\t\t\t\tresult = invocation.proceed();\n\t\t\t\tsucceed = true;\n\t\t\t} catch (Throwable throwable) {\n\t\t\t\tverifyException(expected, throwable);\n\t\t\t}\n\t\t\tif (succeed) {\n\t\t\t\tthrow new Exception(\"Expected exception \" + expected.value().getName());\n\t\t\t}\n\t\t}\n\t\tprinter().onStepEnds(classToString(invocation), methodToString(invocation));\n\t\treturn result;\n\t}", "public abstract void performStep();", "public interface StepExecutor {\n ExecutionResult execute(StepExecutionContext context) throws Exception;\n}", "public abstract void doInvoke(InvocationContext ic) throws Exception;", "protected abstract Object invokeInContext(MethodInvocation paramMethodInvocation)\r\n/* 111: */ throws Throwable;", "Object proceed() throws Throwable;", "private interface AnyKindOfStep\n\t{\n\t\tpublic void step() throws PlayerDebugException;\n\t}", "public Object proceed() throws Throwable;", "public interface NormalStep extends Step { // <-- [user code injected with eMoflon]\n\n\t// [user code injected with eMoflon] -->\n}", "protected abstract boolean invokable(Resource r);", "InvocationResult invoke(RemoteService service, MethodInvocation invocation);", "@Override\n public Object proceed() throws Throwable {\n if (this.currentInterceptorIndex == this.interceptorsAndDynamicMethodMatchers.size() - 1) {\n return invokeJoinpoint();\n }\n\n Object interceptorOrInterceptionAdvice =\n this.interceptorsAndDynamicMethodMatchers.get(++this.currentInterceptorIndex);\n\n if (interceptorOrInterceptionAdvice instanceof MyMethodIntercept) {\n // Evaluate dynamic method matcher here: static part will already have\n // been evaluated and found to match.\n MyMethodIntercept mi =\n (MyMethodIntercept) interceptorOrInterceptionAdvice;\n Class<?> targetClass = (this.targetClass != null ? this.targetClass : this.method.getDeclaringClass());\n return mi.invoke(this);\n // Dynamic matching failed.\n // Skip this interceptor and invoke the next in the chain.\n } else {\n return proceed();\n }\n }", "abstract protected boolean checkMethod();", "protected void runBeforeStep() {}", "public /* bridge */ /* synthetic */ java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.1.run():java.lang.Object\");\n }", "@Test\n public void testInvokeEffectorStartFailing_MethodInDynamicTask() {\n Task<Void> task = app.getExecutionContext().submit(Tasks.<Void>builder().dynamic(true).body(new Callable<Void>() {\n @Override public Void call() throws Exception {\n testInvokeEffectorStartFailing_Method();\n return null;\n }\n }).build());\n \n assertTaskSucceeds(task);\n assertTaskHasFailedChild(task);\n }", "@Test\n\tpublic void testScenario04_ControllingWhichMethodsRun() throws Exception {\n\t\tSpelExpressionParser parser = new SpelExpressionParser();\n\t\tStandardEvaluationContext ctx = new StandardEvaluationContext();\n\n\t\tctx.setRootObject(new Supervisor(\"Ben\")); // so non-qualified references 'hasRole()' 'hasIpAddress()' are invoked against it;\n\n\t\tctx.addMethodResolver(new MyMethodResolver()); // NEEDS TO OVERRIDE THE REFLECTION ONE - SHOW REORDERING MECHANISM\n\t\t// Might be better with a as a variable although it would work as a property too...\n\t\t// Variable references using a '#'\n//\t\tSpelExpression expr = parser.parseExpression(\"(hasRole('SUPERVISOR') or (#a < 1.042)) and hasIpAddress('10.10.0.0/16')\");\n\t\tExpression expr = parser.parseRaw(\"(hasRole(3) or (#a < 1.042)) and hasIpAddress('10.10.0.0/16')\");\n\n\t\tBoolean value = null;\n\n\t\tctx.setVariable(\"a\",1.0d); // referenced as #a in the expression\n\t\tvalue = expr.getValue(ctx,Boolean.class);\n\t\tassertThat((boolean) value).isTrue();\n\n//\t\t\tctx.setRootObject(new Manager(\"Luke\"));\n//\t\t\tctx.setVariable(\"a\",1.043d);\n//\t\t\tvalue = (Boolean)expr.getValue(ctx,Boolean.class);\n//\t\t\tassertFalse(value);\n\t}", "protected void execute(ActionInvocation<LocalService> actionInvocation, Object serviceImpl) throws Exception {\n/* 67 */ Object result, inputArgumentValues[] = createInputArgumentValues(actionInvocation, this.method);\n/* */ \n/* */ \n/* 70 */ if (!actionInvocation.getAction().hasOutputArguments()) {\n/* 71 */ log.fine(\"Calling local service method with no output arguments: \" + this.method);\n/* 72 */ Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* */ \n/* */ return;\n/* */ } \n/* 76 */ boolean isVoid = this.method.getReturnType().equals(void.class);\n/* */ \n/* 78 */ log.fine(\"Calling local service method with output arguments: \" + this.method);\n/* */ \n/* 80 */ boolean isArrayResultProcessed = true;\n/* 81 */ if (isVoid) {\n/* */ \n/* 83 */ log.fine(\"Action method is void, calling declared accessors(s) on service instance to retrieve ouput argument(s)\");\n/* 84 */ Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* 85 */ result = readOutputArgumentValues(actionInvocation.getAction(), serviceImpl);\n/* */ }\n/* 87 */ else if (isUseOutputArgumentAccessors(actionInvocation)) {\n/* */ \n/* 89 */ log.fine(\"Action method is not void, calling declared accessor(s) on returned instance to retrieve ouput argument(s)\");\n/* 90 */ Object returnedInstance = Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* 91 */ result = readOutputArgumentValues(actionInvocation.getAction(), returnedInstance);\n/* */ }\n/* */ else {\n/* */ \n/* 95 */ log.fine(\"Action method is not void, using returned value as (single) output argument\");\n/* 96 */ result = Reflections.invoke(this.method, serviceImpl, inputArgumentValues);\n/* 97 */ isArrayResultProcessed = false;\n/* */ } \n/* */ \n/* 100 */ ActionArgument[] arrayOfActionArgument = actionInvocation.getAction().getOutputArguments();\n/* */ \n/* 102 */ if (isArrayResultProcessed && result instanceof Object[]) {\n/* 103 */ Object[] results = (Object[])result;\n/* 104 */ log.fine(\"Accessors returned Object[], setting output argument values: \" + results.length);\n/* 105 */ for (int i = 0; i < arrayOfActionArgument.length; i++) {\n/* 106 */ setOutputArgumentValue(actionInvocation, arrayOfActionArgument[i], results[i]);\n/* */ }\n/* 108 */ } else if (arrayOfActionArgument.length == 1) {\n/* 109 */ setOutputArgumentValue(actionInvocation, arrayOfActionArgument[0], result);\n/* */ } else {\n/* 111 */ throw new ActionException(ErrorCode.ACTION_FAILED, \"Method return does not match required number of output arguments: \" + arrayOfActionArgument.length);\n/* */ } \n/* */ }", "@Override\n\tpublic void step() {\n\t}", "@Override\n\tpublic void step() {\n\t}", "public void run() {\n super.executeStep();\n }", "@Override\n public void execute(RuntimeStep exe, RuntimePlan plan) {\n }", "public abstract void execute(VirtualMachine vm);", "public java.lang.Void run() throws java.security.KeyManagementException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: java.security.Signer.1.run():java.lang.Void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.1.run():java.lang.Void\");\n }", "public void step();", "public void step();", "@Override\n\tpublic void step() {\n\t\t\n\t}", "@Override\n\tpublic void step() {\n\t\t\n\t}", "private void invoke(Method m, Object instance, Object... args) throws Throwable {\n if (!Modifier.isPublic(m.getModifiers())) {\n try {\n if (!m.isAccessible()) {\n m.setAccessible(true);\n }\n } catch (SecurityException e) {\n throw new RuntimeException(\"There is a non-public method that needs to be called. This requires \" +\n \"ReflectPermission('suppressAccessChecks'). Don't run with the security manager or \" +\n \" add this permission to the runner. Offending method: \" + m.toGenericString());\n }\n }\n \n try {\n m.invoke(instance, args);\n } catch (InvocationTargetException e) {\n throw e.getCause();\n }\n }", "public boolean onRemoteExecutionStart(Method method, Object invoker, Object[] args);", "protected boolean applyImpl() throws Exception\n {\n MBeanServer mbeanServer = (MBeanServer) getCorrectiveActionContext()\n .getContextObject(CorrectiveActionContextConstants.Agent_MBeanServer);\n ObjectName objectName = (ObjectName) getCorrectiveActionContext()\n .getContextObject(CorrectiveActionContextConstants.MBean_ObjectName);\n\n Object result = mbeanServer.invoke(objectName, m_methodName, m_parameters, m_signature);\n\n return matchesDesiredResult(result);\n }", "public void execute() throws MojoExecutionException, MojoFailureException {\n\n\t\tif (super.isSkip()) {\n\t\t\tlogger.info(\"Skipping\");\n\t\t\treturn;\n\t\t}\n\n\t\tLogger logger = LogManager.getLogger(FlowHookMojo.class);\n\n\t\ttry {\n\t\t\t\n\t\t\tinit();\n\n\t\t\tif (buildOption == OPTIONS.none) {\n\t\t\t\tlogger.info(\"Skipping Flow Hooks (default action)\");\n\t\t\t\treturn;\n\t\t\t}\n\n if (serverProfile.getEnvironment() == null) {\n throw new MojoExecutionException(\n \"Apigee environment not found in profile\");\n }\n\n\t\t\tList flowhooks = getEnvConfig(logger, \"flowhooks\");\n\t\t\tif (flowhooks == null || flowhooks.size() == 0) {\n\t\t\t\tlogger.info(\"No flowhooks config found.\");\n return;\n\t\t\t}\n\n\t\t\tdoUpdate(flowhooks);\t\t\t\t\n\t\t\t\n\t\t} catch (MojoFailureException e) {\n\t\t\tthrow e;\n\t\t} catch (RuntimeException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "Object executeMethod(Object pObject, Method pMethod,Object[] pArgs) {\r\n\t\tObject result = null ;\r\n\t\ttry {\r\n\t\t\tresult = pMethod.invoke(pObject,pArgs) ;\r\n\t\t} catch (Exception e) {\r\n\t\t\tString message ;\r\n\t\t\tmessage = \"Error Capturing \" + getCallingClassSignature() ;\r\n\t\t\t_supervisor.echo(message) ;\r\n\t\t\tthrow new ExecutionException(message) ;\r\n\t\t}\r\n\t\treturn result ;\r\n\t}", "public void callMethod( String objectName )\n throws MraldException\n {\n AbstractStep mraldObject = ( AbstractStep )createObject( objectName );\n mraldObject.execute( messageObject );\n mraldObject = null;\n }", "@Override\n public boolean executeBeforeRunTask(ExecutionEnvironment env) {\n throw new RuntimeException(\n String.format(\n \"Unexpected code path: program runner %s, executor: %s\",\n env.getRunner().getClass(), env.getExecutor().getId()));\n }", "public abstract boolean execute(PlugInContext context) throws Exception;", "Object invoke(Object reqest) throws IOException, ClassNotFoundException,\n InvocationTargetException, IllegalAccessException, IllegalArgumentException;", "@Override\n public void evaluate() throws Throwable\n {\n String name =\n description.getMethodName() != null ? description.getMethodName() : description.getClassName();\n clusterDirectory = testDirectory.directory( name );\n base.evaluate();\n }", "protected abstract void stepImpl( long stepMicros );", "org.omg.CORBA.portable.OutputStream try_invoke(java.lang.String method, org.omg.CORBA.portable.InputStream input,\r\n org.omg.CORBA.portable.ResponseHandler handler) throws X;", "public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}", "@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n for (Map.Entry<String, RequiredFunctionalExtension> behaviorEntry : myRequiredBehaviorById.entrySet()) {\n Object returnObj = behaviorEntry.getValue().invoke(proxy, method, args);\n if (SuccessorStrategy.NO_FOUND_CODE.equals(returnObj)) {\n continue;\n }\n return returnObj;\n }\n return SuccessorStrategy.NO_FOUND_CODE;\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void testExecuteWithInvocationContext() throws Exception {\n TestApplicationWithoutEngine processApplication = spy(pa);\n ProcessApplicationReference processApplicationReference = mock(ProcessApplicationReference.class);\n when(processApplicationReference.getProcessApplication()).thenReturn(processApplication);\n\n // when execute with context\n InvocationContext invocationContext = new InvocationContext(mock(BaseDelegateExecution.class));\n Context.executeWithinProcessApplication(mock(Callable.class), processApplicationReference, invocationContext);\n\n // then the execute method should be invoked with context\n verify(processApplication).execute(any(Callable.class), eq(invocationContext));\n // and forward to call to the default execute method\n verify(processApplication).execute(any(Callable.class));\n }", "public boolean performAction(int action, Bundle arguments) {\n/* 583 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract String initExecute() throws Exception;", "@Override\r\n public void afterOriginalStep(TestCaseRunner testRunner, SecurityTestRunContext runContext,\r\n SecurityTestStepResult result) {\n\r\n }", "public Object captureExecution(Object proxy, Method method,Object[] args) {\r\n \tObject _caller = _callerStack.peek();\r\n \tInvocation invocation = new Invocation(_caller,proxy,method,args,null) ;\r\n \t_supervisor._invocations.add(invocation) ;\r\n \t_callerStack.push(proxy);\r\n \t_supervisor.echo(\"Capturing \"+invocation.getString());\r\n \tObject target = _supervisor._attachments.getTarget(proxy) ;\r\n \tif(target==null) {\r\n \tString message = \"No Target Attached at \" + getCallingClassSignature() ;\r\n \t_supervisor.echo(message);\r\n \t\tthrow new ExecutionException(message) ;\r\n \t}\r\n \tObject theReturnValue = executeMethod(target, method, args) ;\r\n \tinvocation._result = new InvocationResult();\r\n \tinvocation._result.setReturn(theReturnValue) ;\r\n \t_callerStack.pop();\r\n\t\treturn theReturnValue ;\r\n }", "@Override\r\n public String execute() throws JShellException {\r\n // validate before executing\r\n try {\r\n this.validate();\r\n } catch (JShellException e) {\r\n throw e;\r\n }\r\n // pop the path and cd to it\r\n DirectoryStack dStack = this.getShell().getDirStack();\r\n Path newCwd = dStack.pop();\r\n this.getShell().getFs().changeDirectory(newCwd);\r\n return null;\r\n }", "@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }", "protected abstract void doExecute() throws IOException, MojoExecutionException;", "protected void runAfterStep() {}", "protected abstract void executeActionsIfError();", "public abstract void runScript() throws Exception;", "public interface StepServiceMethod {\n void putSuccess(ResponseModel responseModel);\n void putError(Throwable e);\n}", "protected interface InvocationCallback {\n\n\t\tObject proceedWithInvocation() throws Throwable;\n\t}", "public Object proceed() throws Throwable {\n if (joinPoint!=null) {\n return joinPoint.proceed();\n }\n return method.invoke(myObject, args);\n }", "public Step add(Step step) throws SecurityException, IllegalStateException, NotSupportedException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException {\n\t\tSystem.out.println(step);\r\n\t\tcreate(step);\r\n\t\t\r\n\t\t//getEntityManager().createNativeQuery(\"Insert into step values(\"+step.getName()+\");\", Step.class).executeUpdate();\r\n\t\t//getEntityManager().createQuery(\"Insert into step values(\"+step.getName()+\");\", Step.class).executeUpdate();\r\n\t\treturn step;\r\n\t}", "@Test\npublic void testJudge() throws Exception { \n//TODO: Test goes here... \n/* \ntry { \n Method method = ResultService.getClass().getMethod(\"judge\", String.class, String.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/ \n}", "@Test\n public void testExecuteStep() {\n assertFalse(mgr.executeStep());\n\n // add a step to the queue\n mgr.getSteps().add(stepa);\n\n // step returns false\n when(stepa.start(anyLong())).thenReturn(false);\n assertFalse(mgr.executeStep());\n\n // step returns true\n when(stepa.start(anyLong())).thenReturn(true);\n assertTrue(mgr.executeStep());\n }", "@Override\n public Object callStatic(Class receiver, Object arg1, @Nullable Object arg2, @Nullable Object arg3) throws Throwable {\n if (receiver.equals(ProcessGroovyMethods.class)) {\n Optional<Process> result = tryCallExecute(arg1, arg2, arg3);\n if (result.isPresent()) {\n return result.get();\n }\n }\n return super.callStatic(receiver, arg1, arg2, arg3);\n }", "public String getScript() {\n/* 256 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@BeforeStep\r\n\tpublic void beforeStep(StepExecution stepExecution) {\r\n\t\t\r\n\t\tLOG.info(DOLLAR + INSIDE_METHOD + DOLLAR);\r\n\t\t\r\n\t\tJobExecution jobExec = stepExecution.getJobExecution();\r\n\t\t\r\n\t\tifFileId = jobExec.getJobParameters().getString(\r\n\t\t\t\tIFConstants.INTERFACE_FILE_ID);\r\n\t\tporCd = jobExec.getJobParameters()\r\n\t\t\t\t.getString(IFConstants.POR_CD);\r\n\t\tbuyrGrpCd = jobExec.getJobParameters()\r\n\t\t\t\t.getString(IFConstants.BUYER_GRP_CD);\r\n\t\tseqNo = (long)jobExec.getExecutionContext().get(IFConstants.SEQ_NO);\r\n\t\t\r\n\t\tordrTkeBseMnth = (String)jobExec.getExecutionContext().get(\"ordrTkeBseMnth\");\r\n\t\t\r\n\t\tLOG.info(DOLLAR + OUTSIDE_METHOD + DOLLAR);\r\n\t}", "@Override\n public void evaluate() throws Throwable {\n tryDeploy();\n try {\n base.evaluate();\n } finally {\n // undeploy cannot be done while the components are started\n // RuntimeFeature will do a reset if needed\n // see RuntimeFeature.afterTeardown\n // undeploy();\n }\n }", "@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }", "public Object proceed(Object[] args) throws Throwable;", "boolean invokeOperation() {\n return false;\n }", "Object execute(StatefulRuleSession session) throws InvalidRuleSessionException, InvalidHandleException, RemoteException;", "private boolean isOveridingCallScriptCorrectiveAction(final CorrectiveAction correctiveAction)\n {\n return (correctiveAction instanceof CallScriptCorrectiveAction)\n && ((CallScriptCorrectiveAction) correctiveAction)\n .getOveridesInvokeMethodCorrectiveAction();\n }", "@Override\r\n\tpublic void beforeInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\t\r\n\t}", "public boolean performAction(int action) {\n/* 567 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public interface InvocationContext {\n\n /**\n * Gets the class of the invocation target.\n *\n * @return the target class\n */\n Class<?> getTargetClass();\n\n /**\n * Gets the method which was invoked.\n *\n * @return the method\n */\n Method getMethod();\n\n /**\n * Gets the arguments with which the method was invoked.\n *\n * @return the arguments\n */\n Object[] getArguments();\n\n /**\n * Proceeds with the invocation on the intercepted method.\n *\n * @return the result of the original invocation\n * @throws Throwable any exception can be thrown by the intercepted method\n */\n Object proceed() throws Throwable;\n}", "protected abstract Double MLexecStep(Object[] input, MLBoxMode currentMode) throws BoxError;", "private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }", "@Test\n\tvoid testHandleStep() throws Exception {\n\n\t\tclass StubStep extends StepSupport {\n\n\t\t\tstatic final String value = \"message for next steps\";\n\n\t\t\tstatic final String key = \"StubStep\";\n\n\t\t\t{\n\t\t\t\tsetName(\"StubStep\");\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void execute(StepExecution stepExecution) throws JobInterruptedException {\n\t\t\t\tstepExecution.getJobExecution().getExecutionContext().put(key, value);\n\t\t\t}\n\n\t\t}\n\n\t\tjob.setJobRepository(this.jobRepository);\n\t\tjob.setRestartable(true);\n\n\t\tJobExecution execution = this.jobRepository.createJobExecution(\"testHandleStepJob\", new JobParameters());\n\t\tjob.handleStep(new StubStep(), execution);\n\n\t\tassertEquals(StubStep.value, execution.getExecutionContext().get(StubStep.key));\n\n\t\t// simulate restart and check the job execution context's content survives\n\t\texecution.setEndTime(LocalDateTime.now());\n\t\texecution.setStatus(BatchStatus.FAILED);\n\t\tthis.jobRepository.update(execution);\n\n\t\tJobExecution restarted = this.jobRepository.createJobExecution(\"testHandleStepJob\", new JobParameters());\n\t\tassertEquals(StubStep.value, restarted.getExecutionContext().get(StubStep.key));\n\t}", "private void invokeHandleHookMethod(Context context, String modulePackageName, String handleHookClass, String handleHookMethod, XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable {\n try {\n// 同样的寻包过程\n File apkFile = findApkFile(context, modulePackageName);\n if (apkFile == null) {\n throw new RuntimeException(\"Find Apk File Error\");\n }\n Logger.logi(String.format(\"Get Apk File:%s\", apkFile.toString()));\n// 新建pathclassloader得到真正hook逻辑类,并调用hook方法\n PathClassLoader pathClassLoader = new PathClassLoader(apkFile.getAbsolutePath(), XposedBridge.BOOTCLASSLOADER);\n Class<?> cls = Class.forName(handleHookClass, true, pathClassLoader);\n Logger.logi(String.format(\"Get ClassLoader:%s\", apkFile.toString()));\n Object instance = cls.newInstance();\n Method method = cls.getDeclaredMethod(handleHookMethod, XC_LoadPackage.LoadPackageParam.class);\n Logger.logi(String.format(\"Get Needed Hook Method:%s\", apkFile.toString()));\n method.invoke(instance, loadPackageParam);\n } catch (Exception e) {\n Logger.loge(e.toString());\n }\n }", "@Override\r\n\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\tbeforeMethod();\r\n\t\tObject result = method.invoke(target, args);\r\n\t\tafterMethod();\r\n\t\treturn result;\r\n\t}", "@Test(expectedExceptions = JodaEngineRuntimeException.class)\n public void testInvokingNonExistingMethodAndEvaluate() {\n\n new MethodInvokingEventCondition(DummyAdapterEvent.class, \"get123\", STRING_TO_MATCH);\n\n Assert.fail(\"An JodaEngineRuntimeException should already been raised.\");\n }", "public void step()\n {\n status = stepInternal();\n }", "void callMethod(String name, Object... args)\n throws ScriptRunnerException;", "public int step() {\n // PUT YOUR CODE HERE\n }", "Result invoke(Invoker<?> invoker, Invocation invocation);", "public void testBeforeInvoke() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def invokeMe() {'hello'} }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaClass.getInstance(testClass);\r\n go.setMetaClass(pmc);\r\n\r\n pmc.setInterceptor( new Interceptor() {\r\n public Object beforeInvoke(Object object, String methodName, Object[] arguments, InvocationCallback callback) {\r\n callback.markInvoked();\r\n return \"success\";\r\n }\r\n public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {\r\n return result;\r\n }\r\n });\r\n\r\n Object result = go.invokeMethod(\"invokeMe\", null);\r\n assertNotNull(result);\r\n assertEquals(\"success\",result);\r\n }", "public Object doAround(ProceedingJoinPoint pjp) throws Throwable {\r\n\t\tint highmagnitude = 5;\r\n\t\tint lowmagnitude = 3; \r\n\t\tString classname=\"\";\r\n\t\tObject result= null;\r\n\t\t//gets the calling class name\r\n\t\tStackTraceElement[] stackTraceElements = Thread.currentThread()\r\n\t\t\t\t.getStackTrace();\r\n\t\tfor (int i = 0; i < stackTraceElements.length; i++) {\r\n\t\t\tif (stackTraceElements[i].getClassName().equals(\"sun.reflect.NativeMethodAccessorImpl\")\r\n\t\t\t\t\t&& !(stackTraceElements[i - 1].getClassName().equals(pjp.getThis().getClass().getName()))) {\r\n\t\t\t\tif (!(stackTraceElements[i - 1].getClassName().equals(this.getClass().getName()))\r\n\t\t\t\t\t\t&& !(stackTraceElements[i - 1].getClassName().equals(\"sun.reflect.NativeMethodAccessorImpl\"))) {\r\n\t\t\t\t\tclassname = stackTraceElements[i - 1].getClassName();//calling class name assigned to variable class name\r\n\t\t\t\t\tmethodlog += \"Name: \" + classname + \",\";\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//gets passed arguments\r\n\t\tObject[] args = pjp.getArgs();\r\n\t\tString parameters = \"\";\r\n\t\tif (args.length > 0) {\r\n\t\t\t// captures method arguments\r\n\t\t\tfor (int i = 0; i < args.length; i++) {\r\n\t\t\t\tparameters += args[i];\r\n\t\t\t}\r\n\t\t\tmethodlog += parameters;// appends the method log\r\n\t\t}\r\n\t\t//assign the signature of the method called\r\n\t\tString passedMethod = pjp.getSignature().getName();\r\n\r\n\t\t//System.out.println(\"Method passed \" + pjp.getSignature().getName());\r\n\t\t// Not working for now.....>>>\tmyAnalysis.readPolicy();// read in the policies before the method executes.\r\n\t\t//returns the number of violations a method has committed\r\n\r\n\t\tint deciding = myAnalysis.Analyse(passedMethod, parameters,classname);\r\n\r\n\t\tif (deciding==0) {// no violation proceed with method execution\r\n\t\t\tresult = pjp.proceed();\t\r\n\t\t\tSystem.out.println(\"This policy has not been violated, the method can proceed\");\r\n\t\t}\r\n\t\telse if(deciding < 10) \t{//Number of violations are low\r\n\t\t\t//increase tendency by a lower magnitude\r\n\t\t\ttendency += lowmagnitude;\r\n\t\t\tresult= pjp.proceed();\r\n\t\t\tSystem.out.println(\"This method has violated few policies, it can proceed but with caution \");\r\n\t\t}\r\n\r\n\t\telse {// Unacceptable level; throw exception to stop method execution\r\n\t\t\tSystem.out.println(\"This method needs to be blocked, it has violated a lot of policies\");\r\n\t\t\ttendency+=highmagnitude;\r\n\t\t\tthrow new Throwable();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "protected abstract TestResult runTestImpl() throws Exception;", "public interface RoutineException {}", "public interface StepExecutable<T> {\n\n void execute(T object, MigrationReport report) throws RuntimeException;\n\n}", "@Override\n public void execute(IEnvironment env)\n {\n \n }", "public boolean invoke(Invocation invocation)\n throws IllegalArgumentException, IOException,\n ContentHandlerException, SecurityException\n {\n return invoke(invocation, null);\n }", "abstract protected Object invoke0 (Object obj, Object[] args);", "protected boolean executeJobImpl(JobScheduled job) {\n\t\tthrow new UnsupportedOperationException();\n\t}", "IfaceSpecial getCallSpecial(IfaceProgramPoint pt,IfaceMethod fm);", "StackManipulation virtual(TypeDescription invocationTarget);", "public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;", "@Override\n public boolean step() {\n return false;\n }", "abstract int steps();", "CdapStartFlowStep createCdapStartFlowStep();", "void check () {\r\n OzcError.setLineNumber (body.line_no);\r\n\r\n check_constructor:\r\n\r\n if (method.isNew () && !method.wasCalledSuper ()) {\r\n ClassType c = method.getDefinedClass ();\r\n ClassImplementation ci;\r\n if (c.isClassInterface ()) \r\n\tci = ((ClassInterface) c).getImplementation ();\r\n else \r\n\tci = (ClassImplementation) c;\r\n do {\r\n\tci = ci.getSuperClass ();\r\n\tif (ci == null || School.isSystem (ci)) break check_constructor;\r\n } while (!ci.hasConstructor ());\r\n\r\n OzcError.constructorMustCallSuper (method);\r\n }\r\n\r\n /* need return statement as last statement */\r\n try {\r\n body.check (this);\r\n } catch (Unreachable e) {\r\n Statement st = e.getStatement ();\r\n if (st != null) \r\n\tOzcError.unreachableSt (st);\r\n else if (method.isNew () && need_return)\r\n\tOzcError.unreachableLastSt (body.line_no);\r\n }\r\n }" ]
[ "0.6157857", "0.61558944", "0.5930179", "0.5908954", "0.58547926", "0.58203876", "0.5559398", "0.55302256", "0.5482509", "0.5472053", "0.5468591", "0.53335416", "0.5262466", "0.52398247", "0.52250826", "0.5222291", "0.522215", "0.52130604", "0.5203503", "0.518782", "0.51817375", "0.5142389", "0.5142389", "0.5140753", "0.5140459", "0.513477", "0.51252586", "0.51115865", "0.51115865", "0.51007026", "0.51007026", "0.50923544", "0.50908005", "0.5088808", "0.50877327", "0.5085689", "0.50793463", "0.50675833", "0.5051996", "0.5049625", "0.50491184", "0.5035502", "0.50324726", "0.503161", "0.5031123", "0.50135213", "0.4998107", "0.49954665", "0.49909952", "0.49866185", "0.4986298", "0.49839658", "0.49692488", "0.496784", "0.4963125", "0.4953476", "0.494641", "0.4938764", "0.49218112", "0.49091077", "0.48988706", "0.48966226", "0.48927346", "0.489142", "0.48880756", "0.4887749", "0.48874164", "0.48857588", "0.48762357", "0.48715964", "0.4865625", "0.48646164", "0.4864427", "0.4861957", "0.48619327", "0.48606023", "0.48469827", "0.4846661", "0.4842031", "0.4840469", "0.48402697", "0.4829937", "0.48268476", "0.48260748", "0.48240232", "0.4816057", "0.48119938", "0.48112386", "0.48105645", "0.48043898", "0.47962427", "0.47854054", "0.47776228", "0.4775375", "0.4765072", "0.475766", "0.47572166", "0.47565976", "0.47460073", "0.47378403" ]
0.5166901
21
this might throw the magic CpsCallableInvocation to execute the script asynchronously
@Override public Object evaluate(String script) throws CompilationFailedException { return getShell().evaluate(script); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void asyncExecute(String script)\r\n {\n\r\n }", "private static Object executeAsyncJavascript(WebDriver driver, String script) {\n System.out.println(\"Executing Async javascript: \" + script);\n return ((JavascriptExecutor) driver).executeAsyncScript(script);\n }", "@Override\r\n public void syncExecute(String script)\r\n {\n\r\n }", "public interface ExecuteScriptCallback extends CallbackBase {\n\n /**\n * Override this method with the code you want to run after executing script service\n *\n * @param data Result to script\n * @param e NCMBException from NIFTY Cloud mobile backend\n */\n void done(byte[] data, NCMBException e);\n}", "public abstract void runScript() throws Exception;", "@Override\n public void execute() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n exportData();\n return null;\n }\n\n @Override\n protected void succeeded(){\n callback.onSuccess();\n super.succeeded();\n }\n\n @Override\n protected void failed(){\n callback.onFail(this.getException());\n super.failed();\n }\n };\n new Thread(task).start();\n }", "public void runInExecutor() {\n this.executor.execute(this.callback);\n }", "public void execute() {\n\t\tlaunch();\n\t}", "public abstract String initExecute() throws Exception;", "@Override\n\tprotected void run() {\n\t\tUtils.executeAndWaitForCommand(this.getHMetisExec());\n\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void execute()\n {\n // Display the dialog and wait for the close action (the user\n // selects the Okay button or the script execution completes\n // and a Cancel button is issued)\n int option = cancelDialog.showMessageDialog(dialog,\n \"<html><b>Script execution in progress...<br><br>\"\n + CcddUtilities.colorHTMLText(\"*** Press </i>Halt<i> \"\n + \"to terminate script execution ***\",\n Color.RED),\n \"Script Executing\",\n JOptionPane.ERROR_MESSAGE,\n DialogOption.HALT_OPTION);\n\n // Check if the script execution was terminated by the user and\n // that the script is still executing\n if (option == OK_BUTTON && scriptThread.isAlive())\n {\n // Forcibly stop script execution. Note: this method is\n // deprecated due to inherent issues that can occur when a\n // thread is abruptly stopped. However, the stop method is\n // the only manner in which the script can be terminated\n // (without additional code within the script itself, which\n // cannot be assumed since the scripts are user-generated).\n // There shouldn't be a potential for object corruption in\n // the application since it doesn't reference any objects\n // created by a script\n scriptThread.stop();\n\n // Set the execution status(es) to indicate the scripts\n // didn't complete\n isBad = new boolean[associations.size()];\n Arrays.fill(isBad, true);\n }\n }", "@SuppressWarnings(\"rawtypes\")\n private void synchronousInvokeCallback(Callable call) {\n\n Future future = streamingSlopResults.submit(call);\n\n try {\n future.get();\n\n } catch(InterruptedException e1) {\n\n logger.error(\"Callback failed\", e1);\n throw new VoldemortException(\"Callback failed\");\n\n } catch(ExecutionException e1) {\n\n logger.error(\"Callback failed during execution\", e1);\n throw new VoldemortException(\"Callback failed during execution\");\n }\n\n }", "@Override\n public String call() throws Exception {\n if (!iAmSpecial) {\n blocker.await();\n }\n ran = true;\n return result;\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\texecutable.feedbackExecutionProcessRunning();\r\n\t\t\t}", "public final void run() {\n final long contextID = Nodex.instance.getContextID();\n Runnable runner = new Runnable() {\n public void run() {\n try {\n final T result = execute();\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(result));\n }\n });\n } catch (final Exception e) {\n NodexInternal.instance.executeOnContext(contextID, new Runnable() {\n public void run() {\n completionHandler.onEvent(new Completion(e));\n }\n });\n } catch (Throwable t) {\n //Not much we can do, just log it\n t.printStackTrace(System.err);\n }\n }\n };\n\n NodexInternal.instance.executeInBackground(runner);\n }", "public void execute() {\n if (hasError())\n return;\n\n runLocally();\n runRemotely();\n }", "@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinvoke();\n\t\t\t\t\t}", "@Override\r\n\tvoid execute(Runnable task);", "@Override\r\n\tpublic void execute() {\n\t}", "@Override\r\n\tpublic void execute() {\n\t}", "@Override\n\tpublic void execute() {\n\t}", "public abstract void doExecute(A a, TaskCompletionSource<ResultT> taskCompletionSource) throws RemoteException;", "protected void execute() {\n\t\t//execution handled by pid thread\n\t}", "protected void execute() {}", "public void run()\r\n/* 996: */ {\r\n/* 997:838 */ if (DefaultPromise.this.listeners == null) {\r\n/* 998: */ for (;;)\r\n/* 999: */ {\r\n/* :00:840 */ GenericFutureListener<?> l = (GenericFutureListener)poll();\r\n/* :01:841 */ if (l == null) {\r\n/* :02: */ break;\r\n/* :03: */ }\r\n/* :04:844 */ DefaultPromise.notifyListener0(DefaultPromise.this, l);\r\n/* :05: */ }\r\n/* :06: */ }\r\n/* :07:849 */ DefaultPromise.execute(DefaultPromise.this.executor(), this);\r\n/* :08: */ }", "@Override\n\tpublic void execute() {\n\t\tThreadPool pool=ThreadPool.getInstance();\n\t\tpool.beginTaskRun(this);\n\t}", "@Override\r\n\tprotected void execute() {\r\n\t}", "@Override\r\n\tpublic void execute() {\n }", "@Override\n\tpublic void execute() {\n\t\t\n\t}", "protected void execute() {\r\n }", "public void asynchExecution(String remoteMethod, String[] param) {\n return;\n }", "public void executeASync (ProcessInfo pi)\r\n\t {\r\n\t }", "@Override\n public void callSync() {\n\n }", "public void execute() {\n }", "public void execute() {\n\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tAbsTaskAsynCallBack.this.run();\n\t\t\t\tAbsTaskAsynCallBack.this.callback();\n\t\t\t}", "@Override\n public void execute() {\n }", "protected void execute() {\n\n\t}", "public void execute() {\r\n\t\r\n\t}", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n\t\t\n\t}", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "public void execute() {\n\t\t\n\t}", "protected void execute() {\n\t}", "abstract void doTaskOnRun();", "public void execute() throws org.apache.ant.common.util.ExecutionException {\n try {\n executeMethod.invoke(worker, null);\n } catch (java.lang.Throwable t) {\n throw new org.apache.ant.common.util.ExecutionException(t);\n }\n }", "public Void execute() throws SocketTimeoutException, NetworkException, UnexpectedResponseException, SSLException {\n try {\n super.execute();\n } catch (Exception e) {\n Log.m1919i(this.TAG, \"<- call(failed) - mark it as success anyways\");\n }\n return null;\n }", "@Override\r\n\tpublic void execute() throws Exception {\n\t\t\r\n\t}", "public CompletableFuture<Object> eval(final String script) {\n return eval(script, null, new SimpleBindings());\n }", "@Override\r\n\tpublic void doTask() {\n\t}", "protected void execute()\n {\n }", "@Override\r\n\tpublic void execute() {\n\r\n\t}", "protected void execute()\n\t{\n\t}", "@Override\n\tprotected void doAsyncExecute(VoiceMessage requestMessage) {\n\n\t}", "private void async(Runnable runnable) {\n Bukkit.getScheduler().runTaskAsynchronously(KitSQL.getInstance(), runnable);\n }", "public void mo9845a() {\n ArrayList arrayList = new ArrayList();\n arrayList.add(new CallableC1816b(this, (byte) 0));\n try {\n Executors.newSingleThreadExecutor().invokeAny(arrayList);\n } catch (InterruptedException e) {\n e.printStackTrace();\n this.f4523c.onFail();\n } catch (ExecutionException e2) {\n e2.printStackTrace();\n this.f4523c.onFail();\n }\n }", "private static void executeTask02() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n \n }", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "@Override\n public void run() {\n load_remote_data();\n }", "@Override\n\t\tprotected Void doInBackground(String... arg0) {\n\t\t\tdoSomething();\n\t\t\treturn null;\n\t\t}", "public abstract void execute(Task t);", "@Test\n public void testInvokeEffectorStartFailing_MethodInDynamicTask() {\n Task<Void> task = app.getExecutionContext().submit(Tasks.<Void>builder().dynamic(true).body(new Callable<Void>() {\n @Override public Void call() throws Exception {\n testInvokeEffectorStartFailing_Method();\n return null;\n }\n }).build());\n \n assertTaskSucceeds(task);\n assertTaskHasFailedChild(task);\n }", "public abstract void task();", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "protected abstract void execute();", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}", "<T> AsyncResult<T> startProcess(Callable<T> task);", "protected abstract void execute() throws InterruptedException, SenseException;", "public void run() { wait for the launcher script to talk to us\n //\n try {\n ssocket.setSoTimeout(30 * 1000); // 30 seconds\n socket = ssocket.accept();\n socket.setSoTimeout(3 * 60 * 1000);\n socket.setTcpNoDelay(true);\n } catch (SocketTimeoutException stmo) {\n String msg = \"timeout error on initial connection from \" + execName();\n task.log(msg, Project.MSG_ERR);\n failure = new BuildException(msg);\n } catch (Exception e) {\n String err = \"error establishing communication with \" + execName();\n String msg = e.getMessage();\n if (msg != null) {\n err = err + \": \" + msg;\n } else {\n err = err + \": \" + e;\n }\n task.log(err, Project.MSG_ERR);\n failure = new BuildException(err);\n }\n }", "@Override\n public void execute() {}", "public TaskReturnType Run();", "@Override\n\tpublic Object execute() {\n\n\t\treturn null;\n\t}", "public void exec();", "@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}", "public abstract void onWait();", "@Override\n\t\t\tpublic void onAsyncTaskPreExecute(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAsyncTaskPreExecute(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}", "@Override\n public void execute() {\n \n \n }", "void execute(final Callback callback);", "public void Execute() {\n\n }" ]
[ "0.757757", "0.65191174", "0.6447996", "0.6241113", "0.61415005", "0.6032064", "0.5891763", "0.5882295", "0.58384997", "0.58029366", "0.57619566", "0.5755553", "0.5746768", "0.5740441", "0.57321906", "0.57050854", "0.5703898", "0.57031", "0.56879973", "0.56841975", "0.56841975", "0.56629884", "0.5647417", "0.56455386", "0.56267554", "0.5591724", "0.5590975", "0.5586904", "0.5580817", "0.55714387", "0.55656", "0.55652326", "0.55646133", "0.5564416", "0.5559872", "0.55581707", "0.5547908", "0.55390877", "0.5525994", "0.5517012", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5509581", "0.5508481", "0.5507788", "0.5507788", "0.5507788", "0.5507788", "0.55025685", "0.55016136", "0.5501574", "0.5501248", "0.54922265", "0.54914707", "0.5488083", "0.54834276", "0.54737604", "0.5471653", "0.54705995", "0.54632115", "0.54588395", "0.54459476", "0.5445813", "0.54405606", "0.54405606", "0.54405606", "0.5439618", "0.5438685", "0.5438685", "0.5438685", "0.5438193", "0.5411641", "0.54085064", "0.54036033", "0.53957444", "0.5389529", "0.5389403", "0.53870934", "0.5368045", "0.53603333", "0.5354167", "0.53496647", "0.5349516", "0.53492886", "0.53455424", "0.534093", "0.5334061", "0.533339", "0.533339", "0.53318805", "0.53311694", "0.53257674" ]
0.0
-1
Obtains the Groovy compiler to be used for compiling user script in the CPStransformed and sandboxed manner.
private GroovyShell getShell() { return CpsThreadGroup.current().getExecution().getShell(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCompiler();", "public Compiler getCompiler() {\n\t\treturn this.compiler;\n\t}", "public String getCompilerSourceVM();", "public String getCompilerClassName();", "public PyCode compile(String script) {\n return null;\n }", "public T execute() {\n return GraalCompiler.compile(this);\n }", "public interface XpCompilerContext {\n\n JavaCompiler getJavaCompiler();\n TagLibraryRegistry getTagLibraryRegistry();\n File getJavaDirectory();\n OutputStream getOut();\n\n}", "public void compileScript( TemplateCompilerContext context )\r\n\t{\r\n\t\t// Compile to bytes\r\n\t\tCompilationUnit unit = new CompilationUnit();\r\n\t\tunit.addSource( context.getPath(), context.getScript().toString() );\r\n\t\tunit.compile( Phases.CLASS_GENERATION );\r\n\r\n\t\t// Results\r\n\t\t@SuppressWarnings( \"unchecked\" )\r\n\t\tList< GroovyClass > classes = unit.getClasses();\r\n\t\tAssert.isTrue( classes.size() > 0, \"Expecting 1 or more classes\" );\r\n\r\n\t\tClassLoader parent = Thread.currentThread().getContextClassLoader();\r\n\t\tif( parent == null )\r\n\t\t\tparent = GroovyTemplateCompiler.class.getClassLoader();\r\n\r\n\t\t// Define the class\r\n\t\t// TODO Configurable class loader\r\n\t\tDefiningClassLoader classLoader = new DefiningClassLoader( parent );\r\n\t\tClass< ? > first = null;\r\n\t\tfor( GroovyClass cls : classes )\r\n\t\t{\r\n\t\t\tClass< ? > clas = classLoader.defineClass( cls.getName(), cls.getBytes() );\r\n\t\t\tif( first == null )\r\n\t\t\t\tfirst = clas; // TODO Are we sure that the first one is always the right one?\r\n\t\t}\r\n\r\n\t\t// Instantiate the first\r\n\t\tGroovyObject object = (GroovyObject)Util.newInstance( first );\r\n\t\tClosure closure = (Closure)object.invokeMethod( \"getClosure\", null );\r\n\r\n\t\t// The old way:\r\n//\t\tClass< GroovyObject > groovyClass = new GroovyClassLoader().parseClass( new GroovyCodeSource( getSource(), getName(), \"x\" ) );\r\n\r\n\t\tcontext.setTemplate( new GroovyTemplate( closure ) );\r\n\t}", "String compile() throws IOException {\n\t\tString line = \"\";\n\t\tString[] command = {\n\t\t\t\tjavacPath,\n\t\t\t\tsavedFilePath\n\t\t};\n\t\tProcessBuilder pb=new ProcessBuilder(command);\n\t\tpb.redirectErrorStream(true);\n\t\tProcess process=pb.start();\n\t\tBufferedReader inStreamReader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(process.getInputStream())); \n\n\t\tline = inStreamReader.readLine();\n\t\tif(line == null) {\n\t\t\tline = \"\";\n\t\t\tcompiled = true;\n\t\t}\n\t\treturn line;\n\t}", "ICompilerWorkflow getRobotCompilerWorkflow();", "ICompilerWorkflow getSimCompilerWorkflow();", "public CompilerOptions getCompilerOptions() {\n return compilerOptions;\n }", "CompileScope getCompileScope();", "public String compile () throws IOException, RhinoEvaluatorException {\n return compile(1, null);\n }", "public String getCompilerTargetVM();", "public Script tryCompile(Node node) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), false);\n }", "void compileToJava();", "@VisibleForTesting\n public List<String> getCompilerOptions() throws CommandLineExpansionException {\n return compileCommandLine.getCompilerOptions(/*overwrittenVariables=*/ null);\n }", "private JavaCompiler.CompilationTask getCompilationTask(File file)\n\t{\n\t\tDiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);\n\n Iterable<? extends JavaFileObject> compilationUnit\n = fileManager.getJavaFileObjectsFromFiles(Arrays.asList(file));\n return compiler.getTask(null, fileManager, diagnostics, null, null, compilationUnit);\n\t}", "private ClassLoader getCompileClassLoader() throws MojoExecutionException {\n\t\ttry {\n\t\t\tList<String> runtimeClasspathElements = project.getRuntimeClasspathElements();\n\t\t\tList<String> compileClasspathElements = project.getCompileClasspathElements();\n\t\t\tArrayList<URL> classpathURLs = new ArrayList<>();\n\t\t\tfor (String element : runtimeClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tfor (String element : compileClasspathElements) {\n\t\t\t\tclasspathURLs.add(new File(element).toURI().toURL());\n\t\t\t}\n\t\t\tURL[] urlArray = classpathURLs.toArray(new URL[classpathURLs.size()]);\n\t\t\treturn new URLClassLoader(urlArray, Thread.currentThread().getContextClassLoader());\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new MojoExecutionException(\"Unable to load project runtime !\", e);\n\t\t}\n\t}", "public native void compile() /*-{\r\n\t\tvar template = [email protected]::getJsObj()();\r\n\t\ttemplate.compile();\r\n\t}-*/;", "public ScriptingClassLoader getClassLoader()\n {\n return vm.getClassLoader();\n }", "protected static ICompilerRequestor getRequestor() {\n return new ICompilerRequestor() {\n\n public void acceptResult(CompilationResult compilationResult) {\n // do nothing\n }\n };\n }", "public Script tryCompile(Node node, ASTInspector inspector) {\n return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), inspector, false);\n }", "public void activeCompilerChanged() { }", "public void compileScript() {\n // find and prepare by extension\n //\n log.info(\"Compiling script...\");\n Timer engineTimer = new Timer();\n \n engine = EngineHelper.findByFileExtension(scriptExtension, dependencyJarFiles != null && !dependencyJarFiles.isEmpty());\n \n if (engine == null) {\n throw new BlazeException(\"Unable to find script engine for file extension \" + scriptExtension + \". Maybe bad file extension or missing dependency?\");\n }\n\n log.debug(\"Using script engine {}\", engine.getClass().getCanonicalName());\n \n if (!engine.isInitialized()) {\n engine.init(context);\n }\n \n script = engine.compile(context);\n \n log.info(\"Compiled script in {} ms\", engineTimer.stop().millis());\n }", "CompilationBuilder(CharSequence source, String name, CompilerConfiguration compilerConfiguration) {\n\t\tif(source==null) throw new IllegalArgumentException(\"The passed source text was null\");\n\t\tif(name==null) name = \"WatchTowerGroovy\" + syntheticNameSerial.incrementAndGet();\n\t\tthis.compilerConfiguration = compilerConfiguration!=null ? compilerConfiguration : new CompilerConfiguration(CompilerConfiguration.DEFAULT);\t\t\n\t\ttry {\n\t\t\tcodeSource = new GroovyCodeSource(source.toString(), name, \"watchtower\");\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to create GroovyCodeSource from [\" + name + \"/\" + source + \"]\", ex);\n\t\t}\n\t}", "public static Compile instance() {\n\tif (__instance == null) {\n\t synchronized (Compile.class) {\n\t\tif (__instance == null) {\n\t\t __instance = new Compile();\n\t\t}/* if (__instance == null) */\n\t }/* synchronized (Compile.class) */\n\t}/* if (__instance == null) */\n\n\treturn __instance;\n }", "public GroovyScriptEvaluator() {\n\t}", "public boolean getUsePrecompiled();", "private void registerEcolawCompiler(final BundleContext context) {\n\t\telCompilerServiceReg = context.registerService(EcolawCompiler.class,\n\t\t\t\tnew EcolawCompilerImpl(), declareCompilersProps());\n\n\t\tlog(\"Eco-law Compiler REGISTERED.\");\n\t}", "@Input\n public ListProperty<String> getCompilerArgs() {\n return compilerArgs;\n }", "public static GroupSearchCompiler getInstance() {\n return new GroupSearchCompilerImpl();\n }", "public abstract void compile();", "JavaEvaluator createJavaEvaluator();", "public BdsVm compile() {\n\t\tif (bdsvm != null) throw new RuntimeException(\"Code already compiled!\");\n\n\t\t// Initialize\n\t\tbdsvm = new BdsVm();\n\t\tcode = new ArrayList<>();\n\t\tbdsvm.setDebug(debug);\n\t\tbdsvm.setVerbose(verbose);\n\t\tinit();\n\n\t\t// Read file and parse each line\n\t\tlineNum = 1;\n\t\tfor (String line : code().split(\"\\n\")) {\n\t\t\t// Remove comments and labels\n\t\t\tif (isCommentLine(line)) continue;\n\n\t\t\t// Parse label, if any.Keep the rest of the line\n\t\t\tline = label(line);\n\t\t\tif (line.isEmpty()) continue;\n\n\t\t\t// Decode instruction\n\t\t\tOpCode opcode = opcode(line);\n\t\t\tString param = null;\n\t\t\tif (opcode.hasParam()) param = param(line);\n\t\t\t// Add instruction\n\t\t\taddInstruction(opcode, param);\n\t\t\tlineNum++;\n\t\t}\n\n\t\tbdsvm.setCode(code);\n\t\tif (debug) System.err.println(\"# Assembly: Start\\n\" + bdsvm.toAsm() + \"\\n# Assembly: End\\n\");\n\t\treturn bdsvm;\n\t}", "public CompilationBuilder setRecompileGroovySource(boolean recompile) {\n\t\tcompilerConfiguration.setRecompileGroovySource(recompile);\n\t\treturn this;\n\t}", "public final MultiContextV8 mo43932Co() {\n AppMethodBeat.m2504i(113818);\n this.chC = MultiContextNodeJS.createMultiContextNodeJS(1, this.chs, this.cht);\n this.cht = null;\n MultiContextV8 runtime = this.chC.getRuntime();\n AppMethodBeat.m2505o(113818);\n return runtime;\n }", "public IRubyObject runNormally(Node scriptNode) {\n Script script = null;\n boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();\n if (compile || config.isShowBytecode()) {\n script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());\n }\n \n if (script != null) {\n if (config.isShowBytecode()) {\n return getNil();\n }\n \n return runScript(script);\n } else {\n failForcedCompile(scriptNode);\n \n return runInterpreter(scriptNode);\n }\n }", "private XProcRuntime getRuntime()\n throws PackageException\n , ServlexException\n , TechnicalException\n {\n Processor saxon = myCalabash.getSaxon();\n XProcConfiguration xconf = new XProcConfiguration(saxon);\n // < temporary >\n temporary_FIX_BECAUSE_OF_CALABASH(xconf);\n XProcRuntime runtime = new SafeCloseXProcRuntime(xconf);\n // </ temporary >\n SaxonRepository repo = myCalabash.getRepository();\n PkgConfigurer configurer = new PkgConfigurer(runtime, repo.getUnderlyingRepo());\n runtime.setConfigurer(configurer);\n File profiling = myConfig.getProfileFile(\"xproc-profile\");\n if ( profiling != null ) {\n try {\n OutputStream stream = new FileOutputStream(profiling);\n Output out = new Output(stream);\n runtime.setProfile(out);\n }\n catch ( FileNotFoundException ex ) {\n // there is no point in stopping processing if the profile\n // file is not writable\n LOG.error(\"Error opening the profile file for Calabash: \" + profiling);\n }\n }\n // FIXME: Have to reconfigure the Saxon processor, because Calabash\n // install its own resolvers. Should be ok though, but double-check!\n ConfigHelper helper = new ConfigHelper(repo);\n helper.config(saxon.getUnderlyingConfiguration());\n return runtime;\n }", "@Override\n public Scalar<Boolean, Object> compile(List<Symbol> arguments, String currentUser, UserLookup userLookup) {\n Object userValue = null;\n Symbol privileges = null;\n if (arguments.size() == 2) {\n userValue = currentUser;\n privileges = arguments.get(1);\n }\n if (arguments.size() == 3) {\n if (arguments.get(0) instanceof Input<?> input) {\n userValue = input.value();\n }\n privileges = arguments.get(2);\n }\n\n Collection<Privilege.Type> compiledPrivileges = normalizePrivilegeIfLiteral(privileges);\n if (userValue == null) {\n // Fall to non-compiled version which returns null.\n return this;\n }\n\n // Compiled privileges can be null here but we don't fall to non-compiled version as\n // can mean that privilege string is not null but not Literal either.\n // When we pass NULL to the compiled version, it treats last argument like regular evaluate:\n // does null check and parses privileges string.\n var sessionUser = USER_BY_NAME.apply(userLookup, currentUser);\n User user = getUser.apply(userLookup, userValue);\n validateCallPrivileges(sessionUser, user);\n return new CompiledHasPrivilege(signature, boundSignature, sessionUser, user, compiledPrivileges);\n }", "protected void compile() throws FileNotFoundException, DebuggerCompilationException{\n String[] compileArgs = new String[5];\n String cOutFile = Integer.toString(handle);//filename + Integer.toString(handle);\n String outArg = cOutFile;\n compileArgs[0] = ocamlCompileC;\n compileArgs[1] = \"-g\";\n compileArgs[2] = filename;\n compileArgs[3] = \"-o\";\n compileArgs[4] = cOutFile;\n outFile = cOutFile;\n\n /* Start the ocamlc compiler */\n Process compileProcess;\n try{\n compileProcess = runtime.exec(compileArgs);\n }catch(IOException e){\n System.out.println(\"HERE\");\n throw new DebuggerCompilationException();\n //}catch(FileNotFoundException f){\n // throw new FileNotFoundException();\n }\n OutputStreamWriter compileWriter = new OutputStreamWriter(compileProcess.getOutputStream());\n\n InputStream processInputStream = compileProcess.getInputStream();\n\n /* Create a DebugListener to read the output */\n DebugListener compileReader = new DebugListener(processInputStream, this.observers, handle);\n\n compileReader.start();\n \n try{\n Thread.sleep(2000);\n }catch(Exception e){\n\n }\n\n }", "private CompilationObject compile(AbstractSyntaxTree ast, String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue,\n Supplier< Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n HashMap<String, ProcessNode> processNodeMap = new HashMap<>();\n // HashMap<String, ProcessNode> dependencyMap = new HashMap<>();\n\n //System.out.println(\"\\nCOMPILER \"+ast.myString()+\" symb \"+symb.get()+\"\\n\");\n for (ProcessNode node : ast.getProcesses()) {\n //messageQueue.add(new LogMessage(\"Compile starting \"+node.getIdentifier()+\" s \"+symb.get()));\n //System.out.println(\"**COMPILER** Compiler Start node = \"+ node.myString());\n processNodeMap.put(node.getIdentifier(), (ProcessNode) node.copy());\n // dependencyMap.put(node.getIdentifier(), node);\n }\n\n AbstractSyntaxTree symbAST = ast.copy(); // to be used to build symbolic models\n //??????\n\n //System.out.println(\"symb \"+symb.get());\n if (!symb.get()) {\n ast = processAtomicAST(ast, z3Context, messageQueue);\n } else {\n //expander.expand(ast, messageQueue, z3Context); // use for error detection\n ast = symbAST;\n //ast = expander.expand(ast, messageQueue, z3Context);\n //System.out.println(\" COMPILER Before ReferenceReplacer \"+ast.processes2String());\n //ast = replacer.replaceReferences(ast, messageQueue);\n // If we replace the references then we lose the assignment information\n //System.out.println(\" COMPILER After ReferenceReplacer \"+ast.processes2String());\n\n }\n //\n //\n // ??????\n //store alphabet\n Set<String> alpha = ast.getAlphabet().stream().map(x -> x.getAction()).collect(Collectors.toSet());\n //System.out.println(\"Compiler alph = \"+alpha);\n\n //Having built the final AST now build the processes\n /*System.out.println(\"**COMPILER** Entering interpreter with ast for processes -> Types \"+\n ast.getProcesses().stream().map(x->\"\\n\"+x.getIdentifier()+\"->\"+x.getType())\n .reduce(\"\",(x,y)->x+\" \"+y)); */\n Interpreter.ProcessMapFull pmf = interpreter.interpret(ast,\n messageQueue, z3Context, alpha, symb.get());\n // Optional<Map<String, ProcessModel>> processMap = interpreter.interpret(ast,\n // messageQueue, z3Context, alpha, symb.get());\n\n //System.out.println(\" **COMPILER** before operation evaluation \"+processMap.keySet());\n List<OperationResult> opResults = new ArrayList<>();\n EquationEvaluator.EquationReturn eqResults = new EquationEvaluator.EquationReturn();\n if (pmf.getIsFull()) {\n\n //System.out.println(\" isPresent \"+pmf.getProcessMap().size()+\" \"+ast.getProcesses().size());\n // if (ast.getProcesses().size() <= processMap.get().size()) {\n //System.out.println(\"equal size\"); // not sure why <= and not ==\n opResults = evaluator.evaluateOperations(\n ast.getOperations(), pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(), code, z3Context, messageQueue, alpha);\n //System.out.println(\" **COMPILER** before equation evaluation \"+processMap.keySet());\n\n // HEAVY LIFTING need thread pool\n this.eqEvaluator = new EquationEvaluator(); // need to reset equationEvaluator else !!!!\n eqResults = eqEvaluator.evaluateEquations(\n pmf.getProcessMap(),\n interpreter.getpetrinetInterpreter(),\n ast.getEquations(), // one entry per equation\n z3Context, messageQueue, alpha);\n }\n\n\n //System.out.println(\"Compiler built pn \"+ pmf.getProcessMap().size());\n return new CompilationObject(pmf.getProcessMap(), opResults, eqResults.getResults());\n }", "public interface Scripting {\n\n String NAME = \"cuba_Scripting\";\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param policies policies for script execution {@link ScriptExecutionPolicy}\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding, ScriptExecutionPolicy... policies);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Binding binding);\n\n /**\n * Evaluates Groovy expression.\n * @param text expression text\n * @param context map of parameters to pass to the expression, same as Binding\n * @param <T> result type\n * @return result of expression\n */\n <T> T evaluateGroovy(String text, Map<String, Object> context);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param binding Groovy binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Binding binding);\n\n /**\n * Runs Groovy script.\n * The script must be located as file under <em>conf</em> directory, or as a classpath resource.\n * @param name path to the script relative to <em>conf</em> dir or to the classpath root\n * @param context map of parameters to pass to the script, same as Binding\n * @param <T> result type\n * @return result of the script execution\n */\n <T> T runGroovyScript(String name, Map<String, Object> context);\n\n /**\n * Returns the dynamic classloader.\n * <p>Actually it is the GroovyClassLoader which parent is {@link com.haulmont.cuba.core.sys.javacl.JavaClassLoader}.\n * For explanation on class loading sequence see {@link #loadClass(String)}\n * </p>\n * @return dynamic classloader\n */\n ClassLoader getClassLoader();\n\n /**\n * Loads class by name using the following sequence:\n * <ul>\n * <li>Search for a Groovy source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a Java source in the <em>conf</em> directory. If found, compile it and return</li>\n * <li>Search for a class in classpath</li>\n * </ul>\n * It is possible to change sources in <em>conf</em> directory at run time, affecting the returning class,\n * with the following restrictions:\n * <ul>\n * <li>You can not change source from Groovy to Java</li>\n * <li>If you had Groovy source and than removed it, you'll still get the class compiled from those sources\n * and not from classpath</li>\n * </ul>\n * You can bypass these restrictions if you invoke {@link #clearCache()} method, e.g. through JMX interface\n * CachingFacadeMBean.\n * @param name fully qualified class name\n * @return class or null if not found\n */\n @Nullable\n Class<?> loadClass(String name);\n\n /**\n * Loads a class by name using the sequence described in {@link #loadClass(String)}.\n *\n * @param name fully qualified class name\n * @return class\n * @throws IllegalStateException if the class is not found\n */\n Class<?> loadClassNN(String name);\n\n /**\n * Remove compiled class from cache\n * @return true if class removed from cache\n */\n boolean removeClass(String name);\n\n /**\n * Clears compiled classes cache\n */\n void clearCache();\n\n}", "CompilationBuilder(Reader source, String name, CompilerConfiguration compilerConfiguration) {\n\t\tif(source==null) throw new IllegalArgumentException(\"The passed source text was null\");\n\t\tif(name==null) name = \"WatchTowerGroovy\" + syntheticNameSerial.incrementAndGet();\n\t\tthis.compilerConfiguration = compilerConfiguration!=null ? compilerConfiguration : new CompilerConfiguration(CompilerConfiguration.DEFAULT);\n\t\ttry {\n\t\t\tcodeSource = new GroovyCodeSource(source.toString(), name, \"watchtower\");\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to create GroovyCodeSource from [\" + name + \"/\" + source + \"]\", ex);\n\t\t}\n\t}", "public SortedMap<Integer,Statement> executeCompiler() throws CompilerException {\n try {\n SortedMap<Integer,Statement> code = new TreeMap<Integer,Statement>();\n this.symbolTable.clear();\n statements(code);\n return code;\n }\n catch(ParseException e) {\n if (e.currentToken!=null) {\n throw new CompilerException(CompilationErrorType.SYNTAX_ERROR,\n e.currentToken.endLine, e);\n }\n else if (this.token!=null) {\n throw new CompilerException(CompilationErrorType.SYNTAX_ERROR,\n this.token.endLine, e);\n }\n throw new CompilerException(CompilationErrorType.SYNTAX_ERROR, e);\n }\n catch(TokenMgrError e) {\n if (this.token!=null) {\n throw new CompilerException(CompilationErrorType.ILLEGAL_CHARACTER,\n this.token.endLine, e);\n }\n throw new CompilerException(CompilationErrorType.INTERNAL_LEXER_ERROR, e);\n }\n catch(Throwable e) {\n throw new CompilerException(CompilationErrorType.INTERNAL_ERROR, e);\n }\n }", "public static ClassLoader getClassLoader() {\n ClassLoader loader = Ruby.class.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n \n return loader;\n }", "public static ClassLoader getClassLoader() {\n ClassLoader loader = Ruby.class.getClassLoader();\n if (loader == null) {\n loader = ClassLoader.getSystemClassLoader();\n }\n \n return loader;\n }", "private static void compileFile(String path) throws IOException {\n File f = new File(path);\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);\n File[] files = {f};\n Iterable<? extends JavaFileObject> compilationUnits =\n fileManager.getJavaFileObjectsFromFiles(Arrays.asList(files));\n compiler.getTask(null, fileManager, null, null, null, compilationUnits).call();\n fileManager.close();\n }", "public CompilationObject compile(String code,\n com.microsoft.z3.Context z3Context,\n BlockingQueue<Object> messageQueue, Supplier<Boolean> symb)\n throws CompilationException, InterruptedException, ExecutionException {\n //LEX ->PARSE->COMPILE\n List<Token> codeInput = lexer.tokenise(code);\n AbstractSyntaxTree ast = parser.parse(codeInput, z3Context);\n messageQueue.add(new LogMessage(Runtime.class.getPackage().getImplementationVersion()+ \" XXXXXXXXX \"));\n messageQueue.add(new LogMessage(\"Compile starting symbolic \"+symb.get()));\n System.out.println(Runtime.class.getPackage().getImplementationVersion());\n System.out.println(\"Compiler called parse that output \" + ast.myString());\n return compile(ast, code, z3Context, messageQueue,symb);\n }", "public String getcJsyy() {\n return cJsyy;\n }", "public Path compile(Path filePath, ErrorLog errorlog) {\n\n\t\tPath path = null;\n\n\t\tif (this.checkIfGccExists()) {\n\t\t\ttry {\n\t\t\t\tif (filePath != null) {\n\t\t\t\t\tpath = filePath;\n\t\t\t\t\tSystem.out.println(filePath.toString());\n\t\t\t\t\tCommandLineControls clc = new CommandLineControls(filePath.toString());\n\n\t\t\t\t\tif (!clc.getStdOut().equals(\"\")) {\n\t\t\t\t\t\terrorlog.setErrorLog((clc.getStdOut() + \"\\n\" + clc.getStdError() + \"\\n\").toString());\n\t\t\t\t\t\t//compileLog.setText(clc.getStdOut() + \"\\n\" + clc.getStdError() + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\terrorlog.setErrorLog((clc.getStdError() + \"\\n\").toString());\n\t\t\t\t\t\t//compileLog.setText(clc.getStdError() + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!clc.getStdError().equals(\"\")) {\n\t\t\t\t\t\t// this.deleteDontTouch();\n\t\t\t\t\t\tclc.runMyCompiler();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn path;\n\t}", "public boolean compiling()\n {\n return this.compiling.get();\n }", "ScriptEvaluator createScriptEvaluator();", "@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}", "Interpreter getInterpreter();", "Set<CompiledClass> getCompiledClasses() {\n if (!isCompiled()) {\n return null;\n }\n if (exposedCompiledClasses == null) {\n FindTypesInCud typeFinder = new FindTypesInCud();\n cud.traverse(typeFinder, cud.scope);\n Set<CompiledClass> compiledClasses = typeFinder.getClasses();\n exposedCompiledClasses = Sets.normalizeUnmodifiable(compiledClasses);\n }\n return exposedCompiledClasses;\n }", "private GC getGC() {\n\tif (printerGC != null) return printerGC;\n\treturn new GC(styledText);\n}", "@SuppressWarnings(\"try\")\n public static <T extends CompilationResult> T compile(Request<T> r) {\n DebugContext debug = r.graph.getDebug();\n try (CompilationAlarm alarm = CompilationAlarm.trackCompilationPeriod(r.graph.getOptions())) {\n assert !r.graph.isFrozen();\n try (DebugContext.Scope s0 = debug.scope(\"GraalCompiler\", r.graph, r.providers.getCodeCache()); DebugCloseable a = CompilerTimer.start(debug)) {\n emitFrontEnd(r.providers, r.backend, r.graph, r.graphBuilderSuite, r.optimisticOpts, r.profilingInfo, r.suites);\n emitBackEnd(r.graph, null, r.installedCodeOwner, r.backend, r.compilationResult, r.factory, null, r.lirSuites);\n } catch (Throwable e) {\n throw debug.handle(e);\n }\n checkForRequestedCrash(r.graph);\n return r.compilationResult;\n }\n }", "public WorkResult execute() {\n source = new SimpleFileCollection(source.getFiles());\n classpath = new SimpleFileCollection(Lists.newArrayList(classpath));\n\n for (File file : source) {\n if (!file.getName().endsWith(\".java\")) {\n throw new InvalidUserDataException(String.format(\"Cannot compile non-Java source file '%s'.\", file));\n }\n }\n configure(compiler);\n return compiler.execute();\n }", "CompilationBuilder(URI source, CompilerConfiguration compilerConfiguration) {\n\t\tif(source==null) throw new IllegalArgumentException(\"The passed URI was null\");\n\t\tthis.compilerConfiguration = compilerConfiguration!=null ? compilerConfiguration : new CompilerConfiguration(CompilerConfiguration.DEFAULT);\n\t\ttry {\n\t\t\tcodeSource = new GroovyCodeSource(source);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to create GroovyCodeSource from [\" + source + \"]\", ex);\n\t\t}\n\t}", "public String compile (int lineno, Object securityDomain) throws IOException, JavaScriptException {\n Context context = Context.enter();\n Reader reader = new InputStreamReader(program);\n Object ret = context.evaluateReader(instanceScope,\n reader,\n programName,\n lineno,\n securityDomain);\n if (ret instanceof org.mozilla.javascript.Undefined) {\n // This is really 'void'. Perhaps a separate 'compile' method\n // should be used that has 'void' as its return type, and that\n // get used by the likes of the RjsConfigCompiler\n return \"\";\n } else {\n return (String) ret;\n }\n }", "protected Object compileAndLoad() throws IOException {\n String generatedSource = printJCodeModel();\n return compileAndLoadSource(generatedSource, TEST_CLASS_NAME);\n }", "public static ApplicationContext getContext() {\n if (context == null) {\n CompilerExtensionRegistry.setActiveExtension( OTA2CompilerExtensionProvider.OTA2_COMPILER_EXTENSION_ID );\n }\n return context;\n }", "private ArrayList<String> javacCommandBuilder(StringBuilder currentProject, StringBuilder currentFile)\n\t{\n\t\tFile folder = new File(currentProject.toString());\n\t\tString[] files = folder.list();\n\t\tArrayList<String> command = new ArrayList<String>(Arrays.asList(\"javac\", \"-d\", \"Class\"));\n\t\t\n\t\tfor(String file : files)\n\t\t{\n\t\t\tcommand.add(currentProject.toString()+\"\\\\\"+file);\n\t\t}\n\t\treturn command;\n\t}", "@Override\n public void compile(LinkedList<Token> theStack, Compiler c) throws CompilerException {\n\n\tVariableToken vt;\n\tvt = c.getGlobalVariable(this.getTokenString());\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getLocalVariable(this.getTokenString());\n\t }\n\t}\n\tif (vt == null) {\n\t if (c.getCurrentFunction() != null) {\n\t\tvt = c.getCurrentFunction().getParameter(this.getTokenString());\n\t }\n\t}\n\n\tif (vt == null) {\n\t throw new CompilerException(\"The variable \\\"\" + this.getTokenString() + \"\\\" cannot be used in an expression, as it is not a known variable in the current context!\");\n\t} else {\n\t NumberTokenFactory ntf = new NumberTokenFactory();\n\n//\t\t\tNumberToken nt = (NumberToken) ntf.create(Integer.toString(vt.getVariableID()), 0);\n\t //nt.compile(theStack, c);//when we compile the variable, we add the ID of the variable on the bytecode stack of the compiler c. We use NumberTokenFactory to decide, whether the ID is actually 1 byte long or 2 bytes long and then we add those bytes to the compiler bytecode stack.\n\t //theStack.pop();//well... the previous call had the side effect of placing the \"NumberToken\" on the working stack \"theStack\", which is not what we want, so we're removing it from the working stack here!\n\t extended = CompilableToken.compileNumber(vt.getVariableID(), c);\n\n\t //boolean extended = false;\n\t\t\t/*\n\t if (nt instanceof ByteNumberToken) {\n\t extended = false;\n\t } else {\n\t extended = true;\n\t }\n\t */\n\t this.type = vt.getType();\n\t this.context = vt.getContext();\n\n\t c.getByteCode().push(this);\n\n\t //TODO: Following code should have been here for ages, it seems suspicious\n\t // (impossible)\n\t //that everything even worked without it\n\t theStack.push(this.type);\n\t /*\n\t if (this.getType() == BYTE) {\n\t c.getByteCode().push(new PushByteVariableOnStackByteCodeToken(extended));\n\t theStack.push(new ByteNumberToken(\"0\"));\n\t } else if (this.getType() == INT) {\n\t c.getByteCode().push(new PushIntegerVariableOnStackByteCodeToken(extended));\n\t theStack.push(new IntegerNumberToken(\"0\"));\n\t } else {\n\t System.err.println(\"Cannot compile a variable reference; unknown variable type for variable \\\"\" + this.getTokenString() + \".\\\"\");\n\n\t }\n\t */\n\t}\n\n }", "private Javier getJavier() {\r\n\t\tif(javier == null) {\r\n\t\t String ttsProvider = \"org.javier.browser.handlers.SAPIOutputHandler\";\r\n\t\t String voiceName = \"\";\r\n\t\t String logFile = \"Javier.log\";\r\n\t\t homeAddress = \"http://localhost/javier/default.vxml\";\r\n\t\t\t\r\n\t\t try {\r\n\t\t\t Properties properties = new Properties();\r\n\t\t\t \r\n\t\t properties.load(new FileInputStream(\"JavierGUI.conf\"));\r\n\t\t ttsProvider = properties.getProperty(\"tts_class\", ttsProvider);\r\n\t\t\t voiceName = properties.getProperty(\"tts_voice\", voiceName);\r\n\t\t \thomeAddress = properties.getProperty(\"home_address\", homeAddress);\r\n\t\t \tlogFile = properties.getProperty(\"log_file\", logFile);\r\n\t\t } catch (IOException e) {\r\n\t\t \t\r\n\t\t }\r\n\t\t\t\r\n\t\t\tjavier = new Javier(this,new MSXMLHTTPNetworkHandler());\r\n\t\t\tjavier.addJavierListener(this);\r\n\t\t\tjavier.addOutputListener(this);\r\n\t\t\tjavier.addOutputListener(new SAPIOutputHandler(voiceName));\r\n\t\t\tjavier.addErrorListener(this);\r\n\t\t\t/*\r\n\t\t\tjavier.addLogListener(new ConsoleLogHandler());\r\n\t\t\t*/\t\r\n\t\t\t/*\r\n\t\t\ttry {\r\n\t\t\t\tjavier.mainLoop(homeAddress);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\treturn javier;\r\n\t}", "public /* synthetic */ String mo15511g(Void __) {\n boolean[] $jacocoInit = $jacocoInit();\n String string = getArguments().getString(\"package_name\");\n $jacocoInit[218] = true;\n return string;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp\", line = 522,\n FQN=\"clang::CodeGen::CodeGenFunction::GenerateCXXGlobalInitFunc\", NM=\"_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.codegen/llvmToClangType -split-class=clang::CodeGen::CodeGenFunction@this ${LLVM_SRC}/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp -nm=_ZN5clang7CodeGen15CodeGenFunction25GenerateCXXGlobalInitFuncEPN4llvm8FunctionENS2_8ArrayRefIS4_EENS0_7AddressE\")\n//</editor-fold>\npublic final void GenerateCXXGlobalInitFunc(Function /*P*/ Fn, \n ArrayRef<Function /*P*/ > Decls) {\n GenerateCXXGlobalInitFunc(Fn, \n Decls, \n Address.invalid());\n}", "public synchronized ClassLoader getClassLoader() {\n return new BrainClassLoader(buildClassLoader(projectCP), \n buildClassLoader(buildCP), \n buildClassLoader(projectFilesCP), \n buildClassLoader(externalFilesCP), \n buildClassLoader(extraCP));\n }", "public String getRuntimeExpr() {\n switch (provider) {\n case MATH:\n return \"Math.\" + runtimeName;\n case JIFFLE:\n // _FN is the instance of JiffleFunctions in AbstractJiffleRuntime\n return \"_FN.\" + runtimeName;\n case PROXY:\n return runtimeName;\n default:\n throw new IllegalStateException(\"Internal compiler error: getRuntimeExpr\");\n }\n }", "public void testDisableAsNoJavaCompiler() throws Exception {\n\n\t\t// Ensure compiler available for test\n\t\tClass<?> javacProcessingEnvironmentClass = Class\n\t\t\t\t.forName(\"com.sun.tools.javac.processing.JavacProcessingEnvironment\");\n\t\tassertNotNull(\"Invalid test: should have javac processing environment\", javacProcessingEnvironmentClass);\n\t\tassertTrue(\"Should be processing environment\",\n\t\t\t\tProcessingEnvironment.class.isAssignableFrom(javacProcessingEnvironmentClass));\n\n\t\t// Ensure correct java compiler class to check\n\t\tassertEquals(\"Incorrect check class\", javacProcessingEnvironmentClass.getName(),\n\t\t\t\tOfficeFloorJavaCompilerImpl.JAVAC_PROCESSING_ENVIRONMENT_CLASS_NAME);\n\n\t\t// Create class loader without compiler\n\t\tSourceContext sourceContext = getSourceContext(new ClassLoader() {\n\t\t\t@Override\n\t\t\tpublic Class<?> loadClass(String name) throws ClassNotFoundException {\n\t\t\t\tif (name.equals(javacProcessingEnvironmentClass.getName())) {\n\t\t\t\t\tthrow new ClassNotFoundException(name);\n\t\t\t\t}\n\t\t\t\treturn super.loadClass(name);\n\t\t\t}\n\t\t});\n\t\tassertNull(\"No Java compiler, so no compiling\", OfficeFloorJavaCompiler.newInstance(sourceContext));\n\t}", "public static Executor getExecutor(EvaluatorComponent component) {\n\t\tEvaluatorData data = component.getData();\n\t\tString language = data.getLanguage();\n\t\tExecutor executor = null;\n\t\t// cache here if necessary\n\t\tfor (EvaluatorProvider provider : registry) {\n\t\t\tif (provider.getLanguage().equals(language)) {\n\t\t\t\texecutor = provider.compile(data.getCode());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn executor;\n\t}", "InterpreterRuntimeContext createInterpreterRuntimeContext();", "@Nullable\n @Generated\n @Selector(\"sourceApplication\")\n public native String sourceApplication();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }", "private RhinoScriptBuilder initScriptBuilder() {\r\n // TODO: Find a way to encapsulate this code\r\n RhinoScriptBuilder builder = null;\r\n try {\r\n if (scope == null) {\r\n builder = RhinoScriptBuilder.newChain().addJSON().evaluateChain(UglifyJs.class.getResourceAsStream(\"init.js\"),\r\n \"initScript\").evaluateChain(getScriptAsStream(), DEFAULT_UGLIFY_JS);\r\n scope = builder.getScope();\r\n } else {\r\n builder = RhinoScriptBuilder.newChain(scope);\r\n }\r\n return builder;\r\n } catch (final Exception ex) {\r\n throw new IllegalStateException(\"Failed initializing js\", ex);\r\n }\r\n }", "protected Program getProgram() {\n final Holder<Program> holder = Holder.of( null );\n Hook.PROGRAM.run( holder );\n if ( holder.get() != null ) {\n return holder.get();\n }\n\n return Programs.standard();\n }", "public BCClass getReturnBC() {\n return getProject().loadClass(getReturnName(), getClassLoader());\n }", "public String build() {\n StringBuilder scriptBuilder = new StringBuilder();\n StringBuilder scriptBody = new StringBuilder();\n String importStmt = \"import \";\n \n try {\n if (scriptCode.contains(importStmt)) {\n BufferedReader reader = new BufferedReader(new StringReader(scriptCode));\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.trim().startsWith(importStmt)) {\n scriptBuilder.append(line);\n scriptBuilder.append(\"\\n\");\n } else {\n scriptBody.append((scriptBody.length() == 0 ? \"\" : \"\\n\"));\n scriptBody.append(line);\n }\n }\n } else {\n scriptBody.append(scriptCode);\n }\n } catch (IOException e) {\n throw new CitrusRuntimeException(\"Failed to construct script from template\", e);\n }\n \n scriptBuilder.append(scriptHead);\n scriptBuilder.append(scriptBody.toString());\n scriptBuilder.append(scriptTail);\n \n return scriptBuilder.toString();\n }", "public JSRuntime createJSRuntime() {\n long runtime = QuickJS.createRuntime();\n if (runtime == 0) {\n throw new IllegalStateException(\"Cannot create JSRuntime instance\");\n }\n return new JSRuntime(runtime, this);\n }", "public String[] getClassesToCompile();", "public boolean compile(String source) {\n\t return compile(source, true);\n\t}", "public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}", "CompilationBuilder(URL source, CompilerConfiguration compilerConfiguration) {\n\t\tif(source==null) throw new IllegalArgumentException(\"The passed URL was null\");\n\t\tthis.compilerConfiguration = compilerConfiguration!=null ? compilerConfiguration : new CompilerConfiguration(CompilerConfiguration.DEFAULT);\n\t\ttry {\n\t\t\tcodeSource = new GroovyCodeSource(source);\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to create GroovyCodeSource from [\" + source + \"]\", ex);\n\t\t}\n\t}", "CodegenFactory getCodegenFactory();", "public V8 getRuntime() {\n return v8;\n }", "private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}", "@Override\n public XPathExecutable compile(String source) throws SaxonApiException\n {\n final XPathCompiler compiler = XmlUtils.newXPathCompiler(xPathVersion, nsPrefixToUriMap);\n compiler.setAllowUndeclaredVariables(true);\n final XPathExecutable xpathExec = compiler.compile(source);\n final Iterator<QName> xpathVarsIterator = xpathExec.iterateExternalVariables();\n if(xpathVarsIterator.hasNext()) {\n if(this.allowedXPathVariables.isEmpty()) {\n throw new SaxonApiException(\"Input XPath expression contains variable(s) but there is no (XACML) VariableDefinition in this context: '\" +source+\"'\");\n }\n /*\n XPath variable(s) found, we need to validate them against allowedXPathVariables (from XACML VariableDefinitions in enclosing policy)\n */\n final XPathCompiler xpathCompiler = XmlUtils.newXPathCompiler(getXPathVersion(), getDeclaredNamespacePrefixToUriMap());\n xpathCompiler.setAllowUndeclaredVariables(false);\n do {\n final QName xpathVarName = xpathVarsIterator.next();\n final Optional<VariableReference<?>> matchedVarRef = this.allowedXPathVariables.stream().filter(varRef -> varRef.getXPathVariableName().equals(xpathVarName)).findAny();\n if(matchedVarRef.isEmpty()) {\n throw new SaxonApiException(\"Input XPath expression contains variable '\"+xpathVarName+\"' but there is no matching (XACML) VariableDefinition in this context\");\n }\n\n xpathCompiler.declareVariable(xpathVarName, matchedVarRef.get().getReturnType().getXPathItemType(), OccurrenceIndicator.ONE_OR_MORE);\n } while(xpathVarsIterator.hasNext());\n return xpathCompiler.compile(source);\n }\n\n // no XPath variable, we can use xpathExec directly.\n return xpathExec;\n }", "@Override\n\tpublic void compile() {\n\t\t\n\t}", "@Override\n\tpublic boolean getIsCompile() {\n\t\treturn _scienceApp.getIsCompile();\n\t}", "public static synchronized HotspotCompilationMBean getHotspotCompilationMBean()\n/* */ {\n/* 330 */ if (hsCompileMBean == null) {\n/* 331 */ hsCompileMBean = new HotspotCompilation(jvm);\n/* */ }\n/* 333 */ return hsCompileMBean;\n/* */ }", "public Script build() {\n return new Script(scriptLanguage, scriptText);\n }", "public boolean compile(String name, String source) {\n\t return compile(source);\n\t}", "public void setCompiler(org.nhindirect.policy.Compiler compiler)\n\t{\n\t\tthis.compiler = compiler;\n\t}", "private FilterByAllCompiler() {\n }", "public static void main (String[] args) {import java.util.*;%>\n//&&&staticSymbol&&&<%import org.eclipse.emf.codegen.ecore.genmodel.*;%>\n//&&&staticSymbol&&&<%\n\n/**\n * Copyright (c) 2002-2010 IBM Corporation and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors:\n * IBM - Initial API and implementation\n */\n\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nGenPackage genPackage = (GenPackage)((Object[])argument)[0]; GenModel genModel=genPackage.getGenModel(); /* Trick to import java.util.* without warnings */Iterator.class.getName();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nboolean isInterface = Boolean.TRUE.equals(((Object[])argument)[1]); boolean isImplementation = Boolean.TRUE.equals(((Object[])argument)[2]);\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nString publicStaticFinalFlag = isImplementation ? \"public static final \" : \"\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%include(\"../Header.javajetinc\");%>\n//&&&staticSymbol&&&<%\nif (isInterface || genModel.isSuppressInterfaces()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&package <%\n//&&&staticSymbol&&&=genPackage.getReflectionPackageName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&package <%\n//&&&staticSymbol&&&=genPackage.getClassPackageName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addPseudoImport(\"org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addPseudoImport(\"org.eclipse.emf.ecore.impl.MinimalEObjectImpl.Container.Dynamic\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addImport(\"org.eclipse.emf.ecore.EClass\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.addImport(\"org.eclipse.emf.ecore.EObject\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (!genPackage.hasJavaLangConflict() && !genPackage.hasInterfaceImplConflict() && !genPackage.getClassPackageName().equals(genPackage.getInterfacePackageName())) genModel.addImport(genPackage.getInterfacePackageName() + \".*\");\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.markImportLocation(stringBuffer);\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (isInterface) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&/**\n//&&&staticSymbol&&& * <!-- begin-user-doc -->\n//&&&staticSymbol&&& * The <b>Factory</b> for the model.\n//&&&staticSymbol&&& * It provides a create method for each non-abstract class of the model.\n//&&&staticSymbol&&& * <!-- end-user-doc -->\n//&&&staticSymbol&&&<%\nif (!genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& * @see <%\n//&&&staticSymbol&&&=genPackage.getQualifiedPackageInterfaceName()\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& * @generated\n//&&&staticSymbol&&& */\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&/**\n//&&&staticSymbol&&& * <!-- begin-user-doc -->\n//&&&staticSymbol&&& * An implementation of the model <b>Factory</b>.\n//&&&staticSymbol&&& * <!-- end-user-doc -->\n//&&&staticSymbol&&& * @generated\n//&&&staticSymbol&&& */\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&public class <%\n//&&&staticSymbol&&&=genPackage.getFactoryClassName()\n//&&&staticSymbol&&&%> extends <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.impl.EFactoryImpl\")\n//&&&staticSymbol&&&%><%\nif (!genModel.isSuppressInterfaces()) {\n//&&&staticSymbol&&&%> implements <%\n//&&&staticSymbol&&&=genPackage.getImportedFactoryInterfaceName()\n//&&&staticSymbol&&&%><%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&public interface <%\n//&&&staticSymbol&&&=genPackage.getFactoryInterfaceName()\n//&&&staticSymbol&&&%><%\nif (!genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%> extends <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EFactory\")\n//&&&staticSymbol&&&%><%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&{\n//&&&staticSymbol&&&<%\nif (genModel.hasCopyrightField()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.String\")\n//&&&staticSymbol&&&%> copyright = <%\n//&&&staticSymbol&&&=genModel.getCopyrightFieldLiteral()\n//&&&staticSymbol&&&%>;<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isImplementation && (genModel.isSuppressEMFMetaData() || genModel.isSuppressInterfaces())) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * The singleton instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genPackage.getFactoryClassName()\n//&&&staticSymbol&&&%> eINSTANCE = init();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isInterface && genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * The singleton instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genPackage.getFactoryInterfaceName()\n//&&&staticSymbol&&&%> INSTANCE = <%\n//&&&staticSymbol&&&=genPackage.getQualifiedFactoryClassName()\n//&&&staticSymbol&&&%>.eINSTANCE;\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n} else if (isInterface && !genModel.isSuppressInterfaces()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * The singleton instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=publicStaticFinalFlag\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genPackage.getFactoryInterfaceName()\n//&&&staticSymbol&&&%> eINSTANCE = <%\n//&&&staticSymbol&&&=genPackage.getQualifiedFactoryClassName()\n//&&&staticSymbol&&&%>.init();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Creates the default factory implementation.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&<%\nString factoryType = genModel.isSuppressEMFMetaData() ? genPackage.getFactoryClassName() : genPackage.getImportedFactoryInterfaceName();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic static <%\n//&&&staticSymbol&&&=factoryType\n//&&&staticSymbol&&&%> init()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\t<%\n//&&&staticSymbol&&&=factoryType\n//&&&staticSymbol&&&%> the<%\n//&&&staticSymbol&&&=genPackage.getFactoryName()\n//&&&staticSymbol&&&%> = (<%\n//&&&staticSymbol&&&=factoryType\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EPackage\")\n//&&&staticSymbol&&&%>.Registry.INSTANCE.getEFactory(<%\n//&&&staticSymbol&&&=genPackage.getPackageInterfaceName()\n//&&&staticSymbol&&&%>.eNS_URI);\n//&&&staticSymbol&&&\t\t\tif (the<%\n//&&&staticSymbol&&&=genPackage.getFactoryName()\n//&&&staticSymbol&&&%> != null)\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\treturn the<%\n//&&&staticSymbol&&&=genPackage.getFactoryName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (Exception exception)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.plugin.EcorePlugin\")\n//&&&staticSymbol&&&%>.INSTANCE.log(exception);\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genPackage.getImportedFactoryClassName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Creates an instance of the factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genPackage.getFactoryClassName()\n//&&&staticSymbol&&&%>()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tsuper();\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Override\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic EObject create(EClass eClass)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tswitch (eClass.getClassifierID())\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&<%\nfor (GenClass genClass : genPackage.getGenClasses()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (!genClass.isAbstract()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tcase <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genClass.getClassifierID()\n//&&&staticSymbol&&&%>: return <%\n//&&&staticSymbol&&&*%%storeSymbol%%*0\n//&&&staticSymbol&&&%>create<%\n//&&&staticSymbol&&&=genClass.getName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tdefault:\n//&&&staticSymbol&&&\t\t\t\tthrow new IllegalArgumentException(\"The class '\" + eClass.getName() + \"' is not a valid classifier\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (!genPackage.getAllGenDataTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Override\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic Object createFromString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, String initialValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tswitch (eDataType.getClassifierID())\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&<%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tcase <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genDataType.getClassifierID()\n//&&&staticSymbol&&&%>:\n//&&&staticSymbol&&&\t\t\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>FromString(eDataType, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tdefault:\n//&&&staticSymbol&&&\t\t\t\tthrow new IllegalArgumentException(\"The datatype '\" + eDataType.getName() + \"' is not a valid classifier\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Override\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic String convertToString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, Object instanceValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\tswitch (eDataType.getClassifierID())\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&<%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tcase <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genDataType.getClassifierID()\n//&&&staticSymbol&&&%>:\n//&&&staticSymbol&&&\t\t\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>ToString(eDataType, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tdefault:\n//&&&staticSymbol&&&\t\t\t\tthrow new IllegalArgumentException(\"The datatype '\" + eDataType.getName() + \"' is not a valid classifier\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nfor (GenClass genClass : genPackage.getGenClasses()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (!genClass.isAbstract()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genClass.getTypeParameters()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getImportedInterfaceName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getInterfaceTypeArguments()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genClass.getName()\n//&&&staticSymbol&&&%>()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genClass.isDynamic()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genClass.getImportedInterfaceName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getInterfaceTypeArguments()\n//&&&staticSymbol&&&%> <%\n//&&&staticSymbol&&&=genClass.getSafeUncapName()\n//&&&staticSymbol&&&%> = <%\n//&&&staticSymbol&&&=genClass.getCastFromEObject()\n//&&&staticSymbol&&&%>super.create(<%\n//&&&staticSymbol&&&=genClass.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genClass.getImportedClassName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getClassTypeArguments()\n//&&&staticSymbol&&&%> <%\n//&&&staticSymbol&&&=genClass.getSafeUncapName()\n//&&&staticSymbol&&&%> = new <%\n//&&&staticSymbol&&&=genClass.getImportedClassName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getClassTypeArguments()\n//&&&staticSymbol&&&%>()<%\nif (genModel.isSuppressInterfaces() && !genPackage.getReflectionPackageName().equals(genPackage.getInterfacePackageName())) {\n//&&&staticSymbol&&&%>{}<%\n}\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genClass.getSafeUncapName()\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) { String eDataType = genDataType.getQualifiedClassifierAccessor();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useGenerics() && genDataType.isUncheckedCast() && !genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@SuppressWarnings(\"unchecked\")\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedInstanceClassName()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>final <%\n}\n//&&&staticSymbol&&&%>String <%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>it<%\n} else {\n//&&&staticSymbol&&&%>literal<%\n}\n//&&&staticSymbol&&&%>)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getCreatorBody(genModel.getIndentation(stringBuffer))\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%> result = <%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%>.get(literal);\n//&&&staticSymbol&&&\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + literal + \"' is not a valid enumerator of '\" + <%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>.getName() + \"'\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(3)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (isPrimitiveConversion && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genBaseType.getGenPackage().isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (isPrimitiveConversion && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (literal == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedInstanceClassName()\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.ArrayList\")\n//&&&staticSymbol&&&%><%\nif (genModel.useGenerics()) {\n//&&&staticSymbol&&&%><<%=genItemType.getObjectType().getImportedParameterizedInstanceClassName()%>><%\n}\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%> stringTokenizer = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%>(literal); stringTokenizer.hasMoreTokens(); )\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (String item : split(literal))\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString item = stringTokenizer.nextToken();\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>(item));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>(item));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (literal == null) return <%\n//&&&staticSymbol&&&=genDataType.getStaticValue(null)\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%> result = <%\n//&&&staticSymbol&&&=genDataType.getStaticValue(null)\n//&&&staticSymbol&&&%>;\n//&&&staticSymbol&&&\t\tRuntimeException exception = null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = (<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { if (!genDataType.isPrimitiveType()) genMemberType = genMemberType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(literal);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = (<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tif (<%\nif (!genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>result != null && <%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.util.Diagnostician\")\n//&&&staticSymbol&&&%>.INSTANCE.validate(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, <%\nif (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(result)<%\n} else {\n//&&&staticSymbol&&&%>result<%\n}\n//&&&staticSymbol&&&%>, null, null))\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\treturn result;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (RuntimeException e)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\texception = e;\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (<%\nif (!genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>result != null || <%\n}\n//&&&staticSymbol&&&%>exception == null) return result;\n//&&&staticSymbol&&& \n//&&&staticSymbol&&&\t\tthrow exception;\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn (<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)super.createFromString(literal);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn ((<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)super.createFromString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, literal)).<%\n//&&&staticSymbol&&&=genDataType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>super.createFromString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, literal);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (!genPackage.isDataTypeConverters() && genModel.useGenerics() && genDataType.isUncheckedCast() && !genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@SuppressWarnings(\"unchecked\")\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, String initialValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=((GenEnum)genDataType).getImportedInstanceClassName()\n//&&&staticSymbol&&&%> result = <%\n//&&&staticSymbol&&&=((GenEnum)genDataType).getImportedInstanceClassName()\n//&&&staticSymbol&&&%>.get(initialValue);\n//&&&staticSymbol&&&\t\tif (result == null) throw new IllegalArgumentException(\"The value '\" + initialValue + \"' is not a valid enumerator of '\" + eDataType.getName() + \"'\");<%\n//&&&staticSymbol&&&=genModel.getNonNLS()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(2)\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genModel.getNonNLS(3)\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.getObjectInstanceClassName().equals(genBaseType.getObjectInstanceClassName())) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>create<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (initialValue == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.ArrayList\")\n//&&&staticSymbol&&&%><%\nif (genModel.useGenerics()) {\n//&&&staticSymbol&&&%><<%=genItemType.getObjectType().getImportedParameterizedInstanceClassName()%>><%\n}\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%> stringTokenizer = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.StringTokenizer\")\n//&&&staticSymbol&&&%>(initialValue); stringTokenizer.hasMoreTokens(); )\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (String item : split(initialValue))\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genModel.getRuntimeVersion().getValue() < GenRuntimeVersion.EMF26_VALUE) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString item = stringTokenizer.nextToken();\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(create<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.add(<%\nif (!genItemType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genItemType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, item));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (initialValue == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%> result = null;\n//&&&staticSymbol&&&\t\tRuntimeException exception = null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = <%\nif (!genDataType.isObjectType() && !genDataType.getObjectInstanceClassName().equals(genMemberType.getObjectInstanceClassName())) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>create<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>FromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult = <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.createFromString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tif (result != null && <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.util.Diagnostician\")\n//&&&staticSymbol&&&%>.INSTANCE.validate(eDataType, result, null, null))\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\treturn result;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (RuntimeException e)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\texception = e;\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (result != null || exception == null) return result;\n//&&&staticSymbol&&& \n//&&&staticSymbol&&&\t\tthrow exception;\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(initialValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>super.createFromString(initialValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\nif (!genDataType.isObjectType()) {\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n}\n//&&&staticSymbol&&&%>super.createFromString(eDataType, initialValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\nif (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) { String eDataType = genDataType.getQualifiedClassifierAccessor();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic String convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\nif (genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>final <%\n}\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%> <%\nif (genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>it<%\n} else {\n//&&&staticSymbol&&&%>instanceValue<%\n}\n//&&&staticSymbol&&&%>)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genDataType.getConverterBody(genModel.getIndentation(stringBuffer))\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : instanceValue.toString();\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); boolean isPrimitiveConversion = !genDataType.isPrimitiveType() && genBaseType.isPrimitiveType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (isPrimitiveConversion) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(instanceValue<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genBaseType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>()<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genBaseType.getGenPackage().isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedFactoryInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&&\t\tif (instanceValue.isEmpty()) return \"\";\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nString item; if (!genModel.useGenerics()) { item = \"i.next()\"; \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.Iterator\")\n//&&&staticSymbol&&&%> i = instanceValue.iterator(); i.hasNext(); )\n//&&&staticSymbol&&& <%\n} else { item = \"item\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.Object\")\n//&&&staticSymbol&&&%> item : instanceValue)\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genItemType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage().isDataTypeConverters()) { genItemType = genItemType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genItemType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)<%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(' ');\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result.substring(0, result.length() - 1);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (!genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>.isInstance(instanceValue))\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\ttry\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genMemberType.getQualifiedInstanceClassName().equals(genDataType.getQualifiedInstanceClassName())) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else if (genMemberType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(((<%\n//&&&staticSymbol&&&=genMemberType.getObjectType().getImportedInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue).<%\n//&&&staticSymbol&&&=genMemberType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>());\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genMemberType.getObjectType().getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage().isDataTypeConverters()) { genMemberType = genMemberType.getObjectType();\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genMemberType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tif (value != null) return value;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t\tcatch (Exception e)\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\t// Keep trying other member types until all have failed.\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\ttry\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>new <%\n//&&&staticSymbol&&&=genMemberType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(instanceValue)<%\n} else {\n//&&&staticSymbol&&&%>instanceValue<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage().isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>new <%\n//&&&staticSymbol&&&=genMemberType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(instanceValue)<%\n} else {\n//&&&staticSymbol&&&%>instanceValue<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tif (value != null) return value;\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\tcatch (Exception e)\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\t// Keep trying other member types until all have failed.\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :\"+<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>.getName());\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(instanceValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else if (genDataType.isPrimitiveType() && genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, new <%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>(instanceValue));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(<%\n//&&&staticSymbol&&&=eDataType\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useGenerics() && (genDataType.getItemType() != null || genDataType.isUncheckedCast()) && (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody())) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@SuppressWarnings(\"unchecked\")\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic String convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"org.eclipse.emf.ecore.EDataType\")\n//&&&staticSymbol&&&%> eDataType, Object instanceValue)\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&& <%\nif (genDataType instanceof GenEnum) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genDataType.getImportedInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : instanceValue.toString();\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getBaseType() != null) { GenDataType genBaseType = genDataType.getBaseType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genBaseType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genBaseType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genBaseType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genBaseType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genDataType.getItemType() != null) { GenDataType genItemType = genDataType.getItemType(); \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasCreatorBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n} else { final String singleWildcard = genModel.useGenerics() ? \"<?>\" : \"\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.List\")\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=singleWildcard\n//&&&staticSymbol&&&%> list = (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.List\")\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=singleWildcard\n//&&&staticSymbol&&&%>)instanceValue;\n//&&&staticSymbol&&&\t\tif (list.isEmpty()) return \"\";\n//&&&staticSymbol&&&\t\t<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%> result = new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.StringBuffer\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\nString item; if (!genModel.useGenerics()) { item = \"i.next()\"; \n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.util.Iterator\")\n//&&&staticSymbol&&&%> i = list.iterator(); i.hasNext(); )\n//&&&staticSymbol&&& <%\n} else { item = \"item\";\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tfor (<%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.Object\")\n//&&&staticSymbol&&&%> item : list)\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&& <%\nif (genItemType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(convert<%\n//&&&staticSymbol&&&=genItemType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(<%\n//&&&staticSymbol&&&=genItemType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genItemType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, <%\n//&&&staticSymbol&&&=item\n//&&&staticSymbol&&&%>));\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\tresult.append(' ');\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&&\t\treturn result.substring(0, result.length() - 1);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (!genDataType.getMemberTypes().isEmpty()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(((<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue)<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>.<%\n//&&&staticSymbol&&&=genDataType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>()<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (instanceValue == null) return null;\n//&&&staticSymbol&&& <%\nfor (GenDataType genMemberType : genDataType.getMemberTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tif (<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>.isInstance(instanceValue))\n//&&&staticSymbol&&&\t\t{\n//&&&staticSymbol&&&\t\t\ttry\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&& <%\nif (genMemberType.getGenPackage() == genPackage) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = convert<%\n//&&&staticSymbol&&&=genMemberType.getName()\n//&&&staticSymbol&&&%>ToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tString value = <%\n//&&&staticSymbol&&&=genMemberType.getGenPackage().getQualifiedEFactoryInternalInstanceAccessor()\n//&&&staticSymbol&&&%>.convertToString(<%\n//&&&staticSymbol&&&=genMemberType.getQualifiedClassifierAccessor()\n//&&&staticSymbol&&&%>, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t\t\tif (value != null) return value;\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t\tcatch (Exception e)\n//&&&staticSymbol&&&\t\t\t{\n//&&&staticSymbol&&&\t\t\t\t// Keep trying other member types until all have failed.\n//&&&staticSymbol&&&\t\t\t}\n//&&&staticSymbol&&&\t\t}\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\tthrow new IllegalArgumentException(\"Invalid value: '\"+instanceValue+\"' for datatype :\"+eDataType.getName());\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (genPackage.isDataTypeConverters() || genDataType.hasConverterBody()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isPrimitiveType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn instanceValue == null ? null : convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>(<%\n}\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getObjectInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue<%\nif (genModel.getComplianceLevel().getValue() < GenJDKLevel.JDK50) {\n//&&&staticSymbol&&&%>).<%\n//&&&staticSymbol&&&=genDataType.getPrimitiveValueFunction()\n//&&&staticSymbol&&&%>()<%\n}\n//&&&staticSymbol&&&%>);\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>((<%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%>)instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genModel.useGenerics() && (genDataType.isArrayType() || !genDataType.getEcoreDataType().getETypeParameters().isEmpty() || genDataType.getEcoreDataType().getInstanceTypeName().contains(\"<\"))) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(instanceValue);\n//&&&staticSymbol&&& <%\n} else if (!genDataType.hasConversionDelegate() && genDataType.isArrayType()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\t// TODO: implement this method\n//&&&staticSymbol&&&\t\t// Ensure that you remove @generated or mark it @generated NOT\n//&&&staticSymbol&&&\t\tthrow new <%\n//&&&staticSymbol&&&=genModel.getImportedName(\"java.lang.UnsupportedOperationException\")\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&& <%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t\treturn super.convertToString(eDataType, instanceValue);\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n} else {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nfor (GenClass genClass : genPackage.getGenClasses()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genClass.hasFactoryInterfaceCreateMethod()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns a new object of class '<em><%\n//&&&staticSymbol&&&=genClass.getFormattedName()\n//&&&staticSymbol&&&%></em>'.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @return a new object of class '<em><%\n//&&&staticSymbol&&&=genClass.getFormattedName()\n//&&&staticSymbol&&&%></em>'.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=genClass.getTypeParameters()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getImportedInterfaceName()\n//&&&staticSymbol&&&%><%\n//&&&staticSymbol&&&=genClass.getInterfaceTypeArguments()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genClass.getName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genPackage.isDataTypeConverters()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nfor (GenDataType genDataType : genPackage.getAllGenDataTypes()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\nif (genDataType.isSerializable()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns an instance of data type '<em><%\n//&&&staticSymbol&&&=genDataType.getFormattedName()\n//&&&staticSymbol&&&%></em>' corresponding the given literal.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @param literal a literal of the data type.\n//&&&staticSymbol&&&\t * @return a new instance value of the data type.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=genDataType.getImportedParameterizedInstanceClassName()\n//&&&staticSymbol&&&%> create<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(String literal);\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns a literal representation of an instance of data type '<em><%\n//&&&staticSymbol&&&=genDataType.getFormattedName()\n//&&&staticSymbol&&&%></em>'.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @param instanceValue an instance value of the data type.\n//&&&staticSymbol&&&\t * @return a literal representation of the instance value.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tString convert<%\n//&&&staticSymbol&&&=genDataType.getName()\n//&&&staticSymbol&&&%>(<%\n//&&&staticSymbol&&&=genDataType.getImportedBoundedWildcardInstanceClassName()\n//&&&staticSymbol&&&%> instanceValue);\n//&&&staticSymbol&&&\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\nif (!isImplementation && !genModel.isSuppressEMFMetaData()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * Returns the package supported by this factory.\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @return the package supported by this factory.\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\t<%\n//&&&staticSymbol&&&=genPackage.getPackageInterfaceName()\n//&&&staticSymbol&&&%> get<%\n//&&&staticSymbol&&&=genPackage.getBasicPackageName()\n//&&&staticSymbol&&&%>();\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n} else if (isImplementation) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&&\tpublic <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%> get<%\n//&&&staticSymbol&&&=genPackage.getBasicPackageName()\n//&&&staticSymbol&&&%>()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\treturn (<%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>)getEPackage();\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&\t/**\n//&&&staticSymbol&&&\t * <!-- begin-user-doc -->\n//&&&staticSymbol&&&\t * <!-- end-user-doc -->\n//&&&staticSymbol&&&\t * @deprecated\n//&&&staticSymbol&&&\t * @generated\n//&&&staticSymbol&&&\t */\n//&&&staticSymbol&&& <%\nif (genModel.useClassOverrideAnnotation()) {\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\t@Deprecated\n//&&&staticSymbol&&& <%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&\tpublic static <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%> getPackage()\n//&&&staticSymbol&&&\t{\n//&&&staticSymbol&&&\t\treturn <%\n//&&&staticSymbol&&&=genPackage.getImportedPackageInterfaceName()\n//&&&staticSymbol&&&%>.eINSTANCE;\n//&&&staticSymbol&&&\t}\n//&&&staticSymbol&&&\n//&&&staticSymbol&&&<%\n}\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&} //<%\n//&&&staticSymbol&&&*%%storeSymbol%%*1\n//&&&staticSymbol&&&%>\n//&&&staticSymbol&&&<%\ngenModel.emitSortedImports();\n//&&&staticSymbol&&&%>\n\n}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 241,\n FQN=\"llvm::Module::getModuleInlineAsm\", NM=\"_ZNK4llvm6Module18getModuleInlineAsmEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module18getModuleInlineAsmEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getModuleInlineAsm() /*const*/ {\n return GlobalScopeAsm;\n }", "@Override\n public Object evaluate(String script) throws CompilationFailedException {\n return getShell().evaluate(script);\n }", "public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}" ]
[ "0.7087824", "0.6494653", "0.60767746", "0.5958724", "0.5936324", "0.5928866", "0.5802162", "0.57071745", "0.56498486", "0.5627082", "0.5612963", "0.55880183", "0.555377", "0.5541758", "0.5421811", "0.54092026", "0.52320236", "0.5230801", "0.5148512", "0.51443297", "0.5133404", "0.51305646", "0.51222366", "0.5106578", "0.50770444", "0.5070888", "0.5051108", "0.5027959", "0.4998638", "0.49611238", "0.49518734", "0.49433878", "0.49404612", "0.49208802", "0.49068546", "0.4893015", "0.48772785", "0.48422724", "0.48385757", "0.48313388", "0.48291498", "0.4803227", "0.48018014", "0.48013288", "0.47881636", "0.4781341", "0.476979", "0.476979", "0.47621098", "0.4727231", "0.47266304", "0.47260737", "0.47222894", "0.4719684", "0.46956688", "0.46916974", "0.46850437", "0.46753407", "0.46735302", "0.46382755", "0.46272314", "0.46229285", "0.46175975", "0.46095443", "0.45870808", "0.45760244", "0.45684478", "0.45682865", "0.45446166", "0.45437723", "0.45391744", "0.4523461", "0.45204312", "0.45198432", "0.4516925", "0.4505226", "0.44998622", "0.44985622", "0.44975442", "0.4491955", "0.44893014", "0.44853684", "0.447057", "0.4469731", "0.4463512", "0.444611", "0.44418097", "0.44417214", "0.44388878", "0.44367674", "0.44219017", "0.44143555", "0.44118467", "0.44074652", "0.44051802", "0.43976304", "0.43654203", "0.43644205", "0.43562633", "0.43547493" ]
0.46303353
60
/ Test hook, disable the LocalCBVLSN updates.
public void setAllowUpdate(boolean allowUpdate) { this.allowUpdate = allowUpdate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setDontSendLocalSecurityUpdates(boolean arg0)\r\n\t\t\tthrows NotesApiException {\n\r\n\t}", "public void onNotEnabled() {\n Timber.d(\"onNotEnabled\");\n // keep the callback in case they turn it on manually\n setTorPref(Status.DISABLED);\n createClearnetClient();\n status = Status.NOT_ENABLED;\n if (onStatusChangedListener != null) {\n new Thread(() -> onStatusChangedListener.notEnabled()).start();\n }\n }", "@Override\r\n\tpublic boolean getDontSendLocalSecurityUpdates() throws NotesApiException {\n\t\treturn false;\r\n\t}", "default void onDisable() {}", "public abstract void wgb_onDisable();", "void disableMod();", "protected void onDisabled() {\n // Do nothing.\n }", "private void processCallStateOffhook () {\n\t\t\n\t\ttry {\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"OFFHOOK\");\t\n\t\t\t\n\t\t\tConfigAppValues.processRingCall = false;\n\t\t\t\n\t\t\tif (QSToast.DEBUG) QSToast.d(\n \t\tConfigAppValues.getContext().getApplicationContext(),\n \t\t\"OFFHOOK!!!!!!!!\",\n \t\tToast.LENGTH_SHORT);\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t}\n\t}", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisable() {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "public void onPowerSaveUnwhitelisted(AppStateTracker sender) {\n updateAllJobs();\n unblockAllUnrestrictedAlarms();\n }", "@Override \n public void onProviderDisabled(String provider) { \n }", "@Override\n public void onDisabled() {\n }", "public void onDisable() {\r\n }", "@Override\r\n\tpublic void onDisable() {\n\t}", "public void onDisable() {\n }", "public void onDisabled(Context context) {\n\t}", "public void onProviderDisabled(String provider) {\n\n\n\n }", "public void onDisable() {\n }", "public void onDisable() {\n }", "protected boolean disableEnableSvcs() throws Throwable {\n int i = ((int)(Math.random() * nodes));\n portString = \"\" + (i + NODE_PORT_OFFSET);\n \n return (verifySvcs(\"online\") &&\n changeSvcs(\"disable\") &&\n verifySvcs(\"disabled\") &&\n changeSvcs(\"enable\") &&\n verifySvcs(\"online\"));\n }", "@Test\n public void trackingDisabled_unsolicitedResultsIgnored_withoutToken() {\n configureTrackingDisabled();\n\n // Initialize the tracker.\n assertFalse(mPackageTracker.start());\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n\n // Receiving a check result when tracking is disabled should cause the storage to be\n // reset.\n mPackageTracker.recordCheckResult(null /* checkToken */, true /* success */);\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n\n // Assert the storage was reset.\n checkPackageStorageStatusIsInitialOrReset();\n }", "@Override\npublic void onProviderDisabled(String provider) {\n\n}", "@Override\n public void onProviderDisabled(String s) {\n }", "@Override\n public void onProviderDisabled(String s) {\n }", "@Override\n public void onDisabled(Context context) {\n Log.d(TAG, \"onDisabled\");\n //Class clazz = WidgetBroadcastReceiver.class;\n\n PackageManager pm = context.getPackageManager();\n pm.setComponentEnabledSetting(new ComponentName(\"org.nilriri.LunarCalendar\", \".widget.BroadcastReceiver\"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);\n }", "@Override\n \tpublic void onProviderDisabled(String provider) {\n \n \t}", "@Override\n\tpublic void onDisable() {\n\t\t\n\t}", "@Override\r\n public void onProviderDisabled(String provider) {\n\r\n }", "boolean disableMonitoring();", "@Override\n\tpublic void onDisable() {\n\n\t}", "@Test\n public void trackingDisabled_unsolicitedResultsIgnored_withToken() {\n configureTrackingDisabled();\n\n // Set the storage into an arbitrary state so we can detect a reset.\n mPackageStatusStorage.generateCheckToken(INITIAL_APP_PACKAGE_VERSIONS);\n\n // Initialize the tracker.\n assertFalse(mPackageTracker.start());\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n\n // Receiving a check result when tracking is disabled should cause the storage to be reset.\n mPackageTracker.recordCheckResult(createArbitraryCheckToken(), true /* success */);\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n\n // Assert the storage was reset.\n checkPackageStorageStatusIsInitialOrReset();\n }", "void disable() {\n }", "public void onDisable()\n {\n }", "@org.junit.Before\n public void turnOffAllAccessDetection() {\n Settings.INSTANCE.set(Settings.SETT_MTD_ACCS, \"false\"); /* Not tested here. */\n Settings.INSTANCE.set(Settings.SETT_FLD_ACCS, \"false\"); /* Not tested here. */\n }", "@Override\r\n public void onDisable() {\r\n log.info(\"[SeattleSummer] plugin disabled.\");\r\n }", "public void onProviderDisabled(String provider) {\n\t }", "public void onProviderDisabled(String provider) {\n\n }", "@Override\n public void onProviderDisabled(String provider) {\n\n }", "@Override\n public void onProviderDisabled(String provider) {\n\n }", "@Override\n public void onProviderDisabled(String provider) {\n\n }", "@Override\n public void onProviderDisabled(String provider) {\n\n }", "@Override\n public void onProviderDisabled(String provider) {\n\n }", "@Override\n \t\tpublic void onProviderDisabled(String provider) {\n \t\t\t\n \t\t}", "@Override\n\tpublic void onDisable() {\n\t\tgetLogger().info(\"SimplyWrapper successfully disabled !\");\n\t}", "public void onProviderDisabled(String provider) {\n \n \t}", "@Override\n\tpublic void onProviderDisabled(String provider) {\n\t}", "public void securityOff()\n {\n m_bSecurity = false;\n }", "@Override\n\tpublic void onProviderDisabled(String provider)\n\t{\n\t}", "@Override\n public void onProviderDisabled(String provider) {\n }", "@Override\n public void onProviderDisabled(String provider) {\n }", "@Override\n public void onProviderDisabled(String provider) {\n }", "@Override\n public void onProviderDisabled(String provider) {\n }", "@Override\n public void onProviderDisabled(String provider) {\n }", "@Override\n \t\tpublic void onProviderDisabled(String provider) {\n \t\t}", "@Override\n\tpublic void onProviderDisabled(String provider) {\n\t\t\n\t}", "@Override\n\tpublic void onProviderDisabled(String provider) {\n\t\t\n\t}", "@Override\n\tpublic void onProviderDisabled(String provider) {\n\t\t\n\t}", "public void disable(){\n if(criticalStop) return;\n getModel().setStatus(false);\n }", "@Override\r\n public void onProviderDisabled(String provider) {\n }", "void disable();" ]
[ "0.6171968", "0.60608035", "0.58863413", "0.5865614", "0.5767688", "0.5760496", "0.573063", "0.5718143", "0.571538", "0.571538", "0.5711072", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.570262", "0.56903476", "0.5650388", "0.56464213", "0.56409174", "0.5633522", "0.5630647", "0.56278294", "0.5624798", "0.562255", "0.562255", "0.5620135", "0.56117254", "0.56099254", "0.56015044", "0.56015044", "0.55998474", "0.55911756", "0.5587973", "0.55790734", "0.5577293", "0.5577141", "0.5558966", "0.5558752", "0.55571496", "0.554878", "0.55405205", "0.5534129", "0.55251855", "0.55221033", "0.55221033", "0.55221033", "0.55221033", "0.55221033", "0.55097985", "0.5489028", "0.5478437", "0.5477806", "0.54745084", "0.54739314", "0.5469539", "0.5469539", "0.5469539", "0.5469539", "0.5469539", "0.5467761", "0.54660434", "0.54660434", "0.54660434", "0.54652786", "0.5430795", "0.5429336" ]
0.0
-1
If GlobalCBVLSN is defunct, does nothing. If GlobalCBVLSN is defunct, tracks barrier VLSNs, updating the local CBVLSN if the associated log file has changed. When tracking is done on a replica, the currentLocalCBVLSN value is ultimately sent via heartbeat response to the master, which updates the RepGroupDb. When tracking is done on a master, the update is done on this node. The update is only done once per file in order to decrease the cost of tracking. Since we want the local cbvlsn to be durable, we use the last vlsn in the penultimate log file as the local cbvlsn value. We know the penultimate log file has been fsynced, and therefore the last vlsn within that file has also been fsynced. Tracking can be called quite often, and should be lightweight.
public void track(VLSN newVLSN, long lsn) { if (defunct || !allowUpdate) { return; } synchronized (this) { if (newVLSN.compareTo(lastSyncableVLSN) > 0) { VLSN old = lastSyncableVLSN; lastSyncableVLSN = newVLSN; if (DbLsn.getFileNumber(lsn) != currentFile) { currentFile = DbLsn.getFileNumber(lsn); currentLocalCBVLSN = old; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateLocalCallLogs() {\n setIncludePairedCallLogs();\n buildCallLogsList();\n\n notifyCallDataChanged();\n }", "synchronized void updateCheckpointOnReplica(final long checkpoint) {\n /*\n * The global checkpoint here is a local knowledge which is updated under the mandate of the primary. It can happen that the primary\n * information is lagging compared to a replica (e.g., if a replica is promoted to primary but has stale info relative to other\n * replica shards). In these cases, the local knowledge of the global checkpoint could be higher than sync from the lagging primary.\n */\n if (this.globalCheckpoint <= checkpoint) {\n this.globalCheckpoint = checkpoint;\n logger.trace(\"global checkpoint updated from primary to [{}]\", checkpoint);\n }\n }", "public void set_next_local_commitment_number(long val) {\n\t\tbindings.ChannelReestablish_set_next_local_commitment_number(this.ptr, val);\n\t}", "public synchronized void updateLocalCheckpoint(final String allocationId, final long checkpoint) {\n final int indexOfKey = inSyncLocalCheckpoints.indexOf(allocationId);\n if (indexOfKey >= 0) {\n final long current = inSyncLocalCheckpoints.indexGet(indexOfKey);\n if (current < checkpoint) {\n inSyncLocalCheckpoints.indexReplace(indexOfKey, checkpoint);\n if (logger.isTraceEnabled()) {\n logger.trace(\"updated local checkpoint of [{}] to [{}] (was [{}])\", allocationId, checkpoint, current);\n }\n } else {\n logger.trace(\n \"skipping update of local checkpoint [{}], current checkpoint is higher (current [{}], incoming [{}], type [{}])\",\n allocationId,\n current,\n checkpoint,\n allocationId);\n }\n } else {\n logger.trace(\"[{}] isn't marked as in sync. ignoring local checkpoint of [{}].\", allocationId, checkpoint);\n }\n }", "private void handleTracking(int oldLastId, int newLastId) {\n List<TerritoryLog> logs = this.territoryLogRepository.findAllInRange(oldLastId, newLastId);\n\n if (logs == null) {\n this.logger.log(0, \"Territory tracker: failed to retrieve last log list. \" +\n \"Not sending tracking this time. old id (exclusive): \" + oldLastId + \", new id (inclusive): \" + newLastId);\n return;\n }\n\n if (logs.isEmpty()) {\n return;\n }\n\n Map<Integer, String> serverNames = this.getCorrespondingWarNames(\n logs.stream().map(TerritoryLog::getId).collect(Collectors.toList()));\n\n List<TrackChannel> allTerritoryTracks = this.trackChannelRepository.findAllOfType(TrackType.TERRITORY_ALL);\n if (allTerritoryTracks == null) {\n this.logger.log(0, \"Territory tracker: failed to retrieve tracking channels list. \" +\n \"Not sending tracking this time. old id (exclusive): \" + oldLastId + \", new id (inclusive): \" + newLastId);\n return;\n }\n\n for (TerritoryLog log : logs) {\n Set<TrackChannel> channelsToSend = new HashSet<>(allTerritoryTracks);\n\n List<TrackChannel> specificTracksOld = this.trackChannelRepository\n .findAllOfGuildNameAndType(log.getOldGuildName(), TrackType.TERRITORY_SPECIFIC);\n List<TrackChannel> specificTracksNew = this.trackChannelRepository\n .findAllOfGuildNameAndType(log.getNewGuildName(), TrackType.TERRITORY_SPECIFIC);\n if (specificTracksOld == null || specificTracksNew == null) {\n return;\n }\n channelsToSend.addAll(specificTracksOld);\n channelsToSend.addAll(specificTracksNew);\n\n String messageBase = formatBase(log, serverNames.get(log.getId()));\n channelsToSend.forEach(ch -> {\n TextChannel channel = this.manager.getTextChannelById(ch.getChannelId());\n if (channel == null) return;\n channel.sendMessage(messageBase + formatAcquiredTime(log, ch)).queue();\n });\n }\n }", "public void setGBF(java.lang.String param) {\r\n localGBFTracker = param != null;\r\n\r\n this.localGBF = param;\r\n }", "public void setNetStatus(java.lang.String param) {\r\n localNetStatusTracker = param != null;\r\n\r\n this.localNetStatus = param;\r\n }", "@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {\n IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), \"db-checkpoint-thread\", checkpointer);\n\n cpThread.start();\n\n checkpointerThread = cpThread;\n\n CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, \"node started\");\n\n if (chp != null)\n chp.cpBeginFut.get();\n }", "@Nullable\n protected ClusterBlockLevel globalBlockLevel() {\n return null;\n }", "public void setGHLBDM(java.lang.String param) {\r\n localGHLBDMTracker = param != null;\r\n\r\n this.localGHLBDM = param;\r\n }", "public void registerMatchpoint(VLSN matchpoint) {\n if (defunct) {\n return;\n }\n this.currentLocalCBVLSN = matchpoint;\n this.lastSyncableVLSN = matchpoint;\n }", "private boolean local_fresh(int freshness_interval) {\n long current_time = System.currentTimeMillis();\n boolean fresh = current_time - server_checkin_time < freshness_interval;\n if (Constants.DEBUG) System.out.println(\"(log) Checking freshness locally: it is currently \" + current_time +\n \" and we last checked the server at time \" + server_checkin_time);\n if (Constants.DEBUG) {\n if (fresh) {\n System.out.println(\"(log) -> fresh locally\");\n }\n else {\n System.out.println(\"(log) -> not fresh locally\");\n }\n }\n return fresh;\n }", "public void lspStatusChangeEvent(Lsp lsp) {\n instance.invalidateDB();\n }", "public void setSyncToMachineHistory(final long lngPvLogId) throws SynchronizationException {\n\t \n PVLoggerDataSource srcPvLog = new PVLoggerDataSource(lngPvLogId);\n this.mdlBeamline = srcPvLog.setModelSource(this.smfSeq, this.mdlBeamline);\n this.mdlBeamline.resync();\n\t}", "private static boolean updateFilureLog(final HealthCheckVO healthCheckVO, final long currentFailedCount) {\n\t\tfinal Status status = healthCheckVO.getStatus().getStatus();\n\t\t\n\t\t//Update the failure log only if there is a status change\n\t\tif (status == healthCheckVO.getCurrentStatus()) {\n\t\t\treturn false;\n\t\t}\n\t\t//Even if there is a failure and the max retry count is not reached - ignore\n\t\tif (status != Status.UP && currentFailedCount < healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\treturn false;\n\t\t}\n\t\t//First time status check and if success - ignore\n\t\tif(healthCheckVO.getCurrentStatus() == null && status == Status.UP){\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\tString message = healthCheckVO.getStatus().getMessage();\n\t\tif (status != Status.UP && currentFailedCount >= healthCheckVO.getHealthCheckRetryMaxCount().longValue()) {\n\t\t\tmessage = healthCheckVO.getStatus().getMessage();\n\t\t} else if (status == Status.UP) {\n\t\t\tmessage = \"Status changed from \\\"\" + (healthCheckVO.getCurrentStatus() == null ? \"Not Available\"\n\t\t\t\t\t\t\t: healthCheckVO.getCurrentStatus().getStatusDesc()) + \"\\\" to \\\"\" + status.getStatusDesc() + \"\\\"\";\n\t\t}\n\t\tfinal String updateMessage = message;\n\t\thealthCheckVO.setFailureStatusMessage(updateMessage);\n\t\tComponentFailureLogEntity cfl = new ComponentFailureLogEntity();\n\t\tcfl.setCompRegStsTime(new java.sql.Timestamp(System.currentTimeMillis()));\n\t\tcfl.setFailureMessage(updateMessage);\n\t\tcfl.setStatusId(status.getStatusId());\n\t\tcfl.setHealthCheckId(healthCheckVO.getHealthCheckId());\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tsession.save(cfl);\n\t\ttxn.commit();\n\t\t\n\t\tlogger.debug(\"Inserted Failed Status comp_failure_log : HEALTH_CHECK = \" + healthCheckVO.getHealthCheckId());\n\t\treturn true;\n\t}", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "public void globalLog() {\n\t\tIterator iter = myCommit.entrySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tVersion currVersion = (Version) entry.getValue();\n\t\t\tcurrVersion.log();\n\t\t}\n\t}", "public void setZLF(java.lang.String param) {\r\n localZLFTracker = param != null;\r\n\r\n this.localZLF = param;\r\n }", "private final void setupLocal() {\n _topLocal = true;\n // Check for global vs local work\n if( _nlo >= 0 && _nlo < _nhi-1 ) { // Have global work?\n // Note: some top-level calls have no other global work, so\n // \"topLocal==true\" does not imply \"nlo < nhi-1\".\n int selfidx = H2O.SELF.index();\n if( _nlo < selfidx ) _nleft = remote_compute(_nlo, selfidx );\n if( selfidx+1 < _nhi ) _nrite = remote_compute(selfidx+1,_nhi);\n }\n _lo = 0; _hi = _fr.firstReadable().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n if( _fr.hasAppendables() )\n _fs = new Futures();\n init(); // Setup any user's shared local structures\n }", "private static TransactionStatistics initLocalTransaction() {\n TransactionStatistics lts = thread.get();\n if (lts == null && configuration != null) {\n if (log.isTraceEnabled()) {\n log.tracef(\"Init a new local transaction statistics\");\n }\n lts = new LocalTransactionStatistics(configuration);\n thread.set(lts);\n //Here only when transaction starts\n TransactionTS lastTS = lastTransactionTS.get();\n if (lastTS == null) {\n if (log.isTraceEnabled())\n log.tracef(\"Init a new local transaction statistics for Timestamp\");\n lastTransactionTS.set(new TransactionTS());\n } else {\n lts.addValue(ExposedStatistic.NTBC_EXECUTION_TIME, System.nanoTime() - lastTS.getEndLastTxTs());\n lts.incrementValue(ExposedStatistic.NTBC_COUNT);\n }\n } else if (configuration == null) {\n if (log.isDebugEnabled()) {\n log.debugf(\"Trying to create a local transaction statistics in a not initialized Transaction Statistics Registry\");\n }\n } else {\n if (log.isTraceEnabled()) {\n log.tracef(\"Local transaction statistic is already initialized: %s\", lts);\n }\n }\n return lts;\n }", "public boolean isvSync() {\n return vSync;\n }", "public void handle(PBFTStatusActive sa){\n\n Object lpid = getLocalProcessID();\n\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", received \" + sa);\n\n if(!(\n sa != null && sa.getViewNumber() != null && sa.getPrepared() != null && sa.getCommited() != null &&\n sa.getLastExecutedSEQ() != null && sa.getLastStableCheckpointSEQ() != null && sa.getReplicaID() != null \n )){\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", discarded \" + sa + \" because it's a malformed message.\");\n return;\n }\n\n if(!wasSentByAGroupMember(sa)){\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", discarded \" + sa + \" because it wasn't sent by a group member.\");\n return;\n }\n\n if(sa.getReplicaID().equals(lpid)){\n JDSUtility.debug(\"[handle(statusactive)] s\" + lpid + \", at time \" + getClockValue() + \", discarded \" + sa + \" because it was sent by the local server.\");\n return;\n }\n \n long rlesq = sa.getLastExecutedSEQ();\n long rlcwm = sa.getLastStableCheckpointSEQ();\n int view = sa.getViewNumber();\n\n BitSet prepared = sa.getPrepared();\n BitSet commited = sa.getCommited();\n\n Long lpseq = getPrepareInfo().getLastSequenceNumber(view);\n Long lcseq = getCommitInfo().getLastSequenceNumber(view);\n\n if(lpseq == null) lpseq = getCurrentExecuteSEQ();\n if(lcseq == null) lcseq = getCurrentExecuteSEQ();\n \n long llcwm = getLCWM();\n\n \n Object lsid = getLocalServerID();\n\n PBFTBag bag = new PBFTBag(lsid);\n\n bag.setSequenceNumber(sa.getSequenceNumber());\n\n \n if(sa instanceof PBFTStatusPending){\n PBFTStatusPending sp = (PBFTStatusPending) sa;\n int viewn = sp.getViewNumber();\n\n for(int i = 0; i < getLocalGroup().getGroupSize(); i++){\n IProcess p = getLocalGroup().getMember(i);\n boolean found = false;\n for(Object pid : sp.getChangeViewReplicas()){\n if(p.getID().equals(pid)){\n found = true;\n break;\n }\n }\n\n if(!found){\n PBFTChangeView cv = getChangeViewInfo().getChangeView(viewn, p.getID());\n if(cv != null){\n bag.addMessage(cv);\n PBFTChangeViewACK ack = getChangeViewInfo().getMyACK(view, p.getID());\n if(ack != null){\n bag.addMessage(ack);\n }\n }\n }\n }\n\n boolean hasNewView = sp.hasNewView();\n\n if(!hasNewView){\n PBFTNewView nv = getNewViewInfo().get(viewn);\n if(nv != null){\n bag.addMessage(nv);\n }\n }\n }\n\n for(String digest : sa.getDigests()){\n if(getRequestInfo().hasRequest(digest)){\n bag.addMessage(getRequestInfo().getRequest(digest));\n }\n }\n \n for(long csqn = rlesq + 1; lpseq >= 0 && csqn <= lpseq ; csqn ++){\n\n int i = (int)(csqn - (rlesq+1));\n\n if(csqn > rlcwm){\n if(isPrimary()){\n if(!prepared.get(i)){\n\n PBFTPrePrepare pp = (PBFTPrePrepare) getPrePrepareInfo().get(view, csqn);\n\n if(pp != null) {\n bag.addMessage(pp);\n }\n\n }\n }\n\n PBFTPrepare p = null;\n\n if(!prepared.get(i) && (p = getPrepareInfo().get(view, csqn, lsid)) != null) {\n bag.addMessage(p);\n }\n }\n }\n \n for(long csqn = rlesq + 1; lcseq >= 0 && csqn <= lcseq; csqn ++){\n\n int i = (int)(csqn - (rlesq+1));\n\n if(csqn > rlcwm){\n PBFTCommit c = null;\n\n if(!commited.get(i) && (c = (PBFTCommit ) getCommitInfo().get(view, csqn, lsid))!= null) {\n bag.addMessage(c);\n }\n }\n }\n\n if(rlcwm < llcwm){\n try {\n \n CheckpointLogEntry clogEntry = rStateManager.getBiggestLogEntry();\n if(clogEntry != null){\n long seqn = clogEntry.getCheckpointID();\n String digest = clogEntry.getDigest();\n PBFTCheckpoint checkpoint = new PBFTCheckpoint(seqn, digest, getLocalServerID());\n bag.addMessage(checkpoint);\n }\n\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n }\n\n if(!bag.isEmpty()){\n emit(bag, new BaseProcess(sa.getReplicaID()));\n }\n }", "public void setBlh(java.lang.String param) {\r\n localBlhTracker = param != null;\r\n\r\n this.localBlh = param;\r\n }", "public void onAlivenessChange(long nodehash, boolean b) { synchronized (this.nodedb) {\n\t\tNodeDB.NodeInfo n = this.nodedb.get(nodehash);\n\t\tif (n == null) return;\n\t\tif (n.alive == b) return;\n\t\tif ((n.isLocal) && !b) throw new RuntimeException(\"Local liveness change!!\");\n\n\t\tn.timestamp = System.currentTimeMillis();\n\t\tn.alive = b;\n\t\t\n\t\tGossipThread.getInstance().replicateNodeInfo(n);\n\t}}", "public void initializeStatusFields(NbaUserVO user, NbaLob lob, NbaTXLife aNbaTXLife, RequirementInfo requirementInfo) throws NbaBaseException {\n NbaVpmsAdaptor vpmsProxy = null;\n try {\n NbaOinkDataAccess data = new NbaOinkDataAccess(lob);\n if (aNbaTXLife != null) {\n data.setContractSource(aNbaTXLife);\n } \n vpmsProxy = new NbaVpmsAdaptor(data, NbaVpmsAdaptor.AUTO_PROCESS_STATUS);\n String busFunc = NbaUtils.getBusinessProcessId(user);\n getDeOinkMap().put(NbaVpmsConstants.A_PROCESS_ID, busFunc);\n String mode = NbaServerUtility.getDataStore(lob, null);\n getDeOinkMap().put(NbaVpmsConstants.A_DATASTORE_MODE, mode);\n if (NbaConstants.PROC_APP_SUBMIT.equals(busFunc) || NbaConstants.PROC_GI_APP_SUBMIT.equals(busFunc) ) {\n Category configCategory = NbaConfiguration.getInstance().getIntegrationCategory(lob.getBackendSystem(),\n NbaConfigurationConstants.UNDERWRITINGRISK);\n if (configCategory != null && configCategory.hasValue()) {\n getDeOinkMap().put(NbaVpmsConstants.A_INTEGRATED_CLIENT, configCategory.getValue());\n } else {\n getDeOinkMap().put(NbaVpmsConstants.A_INTEGRATED_CLIENT, \"\");\n }\n }\n //Begin NBA250\n if (NbaConstants.PROC_PRV_FLWUP.equals(busFunc) && aNbaTXLife != null) {//ALII457\n \tRequirementInfo reqInfo = aNbaTXLife.getRequirementInfo(lob.getReqUniqueID());\n \tRequirementInfoExtension reqInfoExt = NbaUtils.getFirstRequirementInfoExtension(reqInfo);\n TrackingInfo trackingInfo = reqInfoExt.getTrackingInfo();\n \tif (trackingInfo != null && trackingInfo.getFollowUpCompleted()) {\n getDeOinkMap().put(NbaVpmsConstants.A_FLWUP_COMPLETD, String.valueOf(trackingInfo.getFollowUpCompleted()));\n } else {\n getDeOinkMap().put(NbaVpmsConstants.A_FLWUP_COMPLETD, \"false\");\n }\n }//End NBA250\n // begin AXAL3.7.20\n\t\tif (NbaConstants.PROC_NBAFORMAL.equalsIgnoreCase(busFunc) ||\n\t\t\t\t//NbaConstants.PROC_AUTO_UNDERWRITING.equalsIgnoreCase(busFunc) || // code commented by ALS3347\n\t\t\t\tNbaConstants.PROC_NBACREATE.equalsIgnoreCase(busFunc)) {\n\t\t\tAxaUtils.deOinkCWAInd(getWork(), (HashMap) getDeOinkMap());\n\t\t}\n\t\t// end AXAL3.7.20\n\t\t//start NBA300\n\t\tif ((NbaConstants.PROC_AUTO_UNDERWRITING.equals(busFunc) || NbaConstants.PROC_TERMCONV.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_AGGREGATE.equals(busFunc) || NbaConstants.PROC_ELECTRONIC_MONEY.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_AGGR_CONTRACT.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_PRINT_HOLD.equals(busFunc)) \n\t\t\t\t&& (aNbaTXLife != null)) {//ALII457,APSL2735,APSL4765\n\t\t\tNbaVPMSHelper.deOinkTermConvData(getDeOinkMap(), aNbaTXLife, lob);\n\t\t}\n\t\t\n\t\t//end NBA300\n\t\t//start APSL4412\n\t\tif ((NbaConstants.PROC_AGGR_CONTRACT.equals(busFunc)) && (aNbaTXLife != null)) {\n\t\t\tString rcmTeam = NbaUtils.getRCMTeam(NbaUtils.getAsuCodeForRetail(aNbaTXLife), NbaUtils.getEPGInd(aNbaTXLife));\n\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_RCMTEAM, rcmTeam);\n\t\t}\n\t\t//end APSL4412\n\t\t\n\t\t// Begin NBLXA-2035\n\t\tif ((NbaConstants.PROC_AGGREGATE.equals(busFunc))\n\t\t\t\t&& (lob.getReview() == NbaConstants.REVIEW_USER_REQUIRED || lob.getReview() == NbaConstants.REVIEW_SYSTEMATIC)\n\t\t\t\t&& (aNbaTXLife != null)) {\n\t\t\t\t\tMap resultMap = getAppQueueAndStatus(user, aNbaTXLife.getPolicy().getPolNumber());\n\t\t\t\n\t\t\t\tString appQueue = (String)resultMap.get(\"appQueue\");\n\t\t\t\tString appStatus = (String)resultMap.get(\"appStatus\");\n\t\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_APPLICATION_QUEUE_LOB, appQueue);\n\t\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_APPLICATION_STATUS, appStatus);\n\t\t}\n\t\t// End NBLXA-2035\n\t\t// NBLXA-2343,NBLXA-2658 deleted switch over logic\n\t\tvpmsProxy.setSkipAttributesMap(getDeOinkMap());\n vpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_WORKITEM_STATUSES);\n if (requirementInfo != null) {\n NbaOinkRequest oinkRequest = new NbaOinkRequest();\n oinkRequest.setRequirementIdFilter(requirementInfo.getId());\n vpmsProxy.setANbaOinkRequest(oinkRequest);\n }\n VpmsComputeResult result = vpmsProxy.getResults();\n updateProcessStatus(result);\n } catch (java.rmi.RemoteException re) {\n throw new NbaBaseException(NbaBaseException.VPMS_AUTOMATED_PROCESS_STATUS, re);\n } catch (Throwable t) {\n throw new NbaBaseException(NbaBaseException.VPMS_AUTOMATED_PROCESS_STATUS, t);\n } finally {\n //begin SPR3362\n try {\n if (vpmsProxy != null) {\n vpmsProxy.remove();\n }\n } catch (Throwable th) {\n LogHandler.Factory.LogError(this, NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n //end SPR3362\n }\n}", "public void setNDVs(double localTrans){\r\n\t\tfor(int i = 0; i < this.getnVillages(); i++){\r\n\t\t\tthis.vVillages[i].seedNDVector(this.ndvPool);\r\n\t\t\tthis.vVillages[i].setLocalTransmission(localTrans);\r\n\t\t}\r\n\t}", "public synchronized void m29984l() {\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeatSlave \");\n }\n f23274i++;\n mo33398h();\n if (C6973b.m29763a().mo33291f(C6973b.m29776f())) {\n if (!C7048a.m30142d(C6973b.m29776f())) {\n C6864a.m29308i(Constants.ServiceLogTag, \"network is unreachable ,give up and go on slave service\");\n } else if (C6973b.m29776f() != null) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n boolean isForeiginPush = XGPushConfig.isForeiginPush(C6973b.m29776f());\n String str = Constants.ACTION_SLVAE_2_MAIN;\n String str2 = Constants.ServiceLogTag;\n if (isForeiginPush) {\n C6864a.m29308i(str2, \"isForeiginPush network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else if (C6979b.m29795a(C6973b.m29776f()).mo33300b()) {\n C6864a.m29308i(str2, \"network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else {\n C6864a.m29308i(str2, \"network is error , go on slave service\");\n }\n }\n });\n } else {\n C6864a.m29308i(Constants.ServiceLogTag, \"PushServiceManager.getInstance().getContext() is null\");\n }\n }\n }", "public long get_next_local_commitment_number() {\n\t\tlong ret = bindings.ChannelReestablish_get_next_local_commitment_number(this.ptr);\n\t\treturn ret;\n\t}", "public void fullSync() {\n if (checkboxRepository.findOne(1).isCheckboxState()) {\n now = LocalDateTime.now();\n\n logger.info(\"De sync start\");\n long startTime = System.nanoTime();\n try {\n fillLocalDB.fillDb();\n smartschoolSync.ssSync();\n } catch (IOException e) {\n e.getStackTrace();\n logger.error(\"Error bij het uitvoeren van de sync\");\n } catch (MessagingException e) {\n logger.error(\"Error bij het verzenden van een mail tijdens de sync\");\n }\n logger.info(\"De sync is voltooid\");\n Statistic statistic = statisticRepository.findOne(1);\n statistic.setAantal(informatService.getTotaalAantalServerErrors());\n statisticRepository.save(statistic);\n informatService.setTotaalAantalServerErrors(0L);\n long endTime = System.nanoTime();\n long duration = (endTime - startTime) / 1000000; //milliseconds\n Statistic statisticDuration = statisticRepository.findOne(3);\n statisticDuration.setAantal(duration);\n statisticRepository.save(statisticDuration);\n Statistic statisticLastSync = statisticRepository.findOne(4);\n statisticLastSync.setError(String.valueOf(now));\n statisticRepository.save(statisticLastSync);\n }\n }", "protected void checkUpdate() {\n \t\t// only update from remote server every so often.\n \t\tif ( ( System.currentTimeMillis() - lastUpdated ) > refreshInterval ) return;\n \t\t\n \t\tClusterTask task = getSessionUpdateTask();\n \t\tObject o = CacheFactory.doSynchronousClusterTask( task, this.nodeId );\n \t\tthis.copy( (Session) o );\n \t\t\n \t\tlastUpdated = System.currentTimeMillis();\n \t}", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "@NotNull private GridCacheDatabaseSharedManager.CheckpointProgress updateCurrentCheckpointProgress() {\n final CheckpointProgress curr;\n\n synchronized (this) {\n curr = scheduledCp;\n\n curr.state(LOCK_TAKEN);\n\n if (curr.reason == null)\n curr.reason = \"timeout\";\n\n // It is important that we assign a new progress object before checkpoint mark in page memory.\n scheduledCp = new CheckpointProgress(checkpointFreq);\n\n curCpProgress = curr;\n }\n return curr;\n }", "GlobalUpdateStatus update(ServerConfiguration serverConfig, @Nullable ProgressMonitor monitor);", "private void updateLocalCommunityAggressive(Node encounteredNode) {\n if (!(encounteredNode.getCommunityInfo() instanceof KClique)) {\n return;\n }\n\n KClique nodeCommunity = (KClique) encounteredNode.getCommunityInfo();\n\n // consider each vertex in the local community of the encountered node\n // to be added to the local community of the current node if the encountered node\n // has been previously added to the local community of the current node\n for (Integer newID : nodeCommunity.localCommunity) {\n int count = 0;\n\n // if a candidate node contains k - 1 nodes in its familiar set\n // than also belong to the local community of the current node,\n // then it is also added to the local community of the current node\n for (int i = 0; i < globalFamiliarSet[newID].length; i++) {\n if (globalFamiliarSet[newID][i] && inLocalCommunity(i)) {\n count++;\n }\n }\n\n if (count >= communityThreshold - 1) {\n if (!inLocalCommunity(newID)) {\n localCommunity.add(newID);\n }\n }\n }\n }", "public void cb(CBResult result, ClustReleaseRequestMsg msg,\n\t\t\t\tAddressIF remoteAddr1, Long ts, CB1<Boolean> cbHandled) {\n\t\t\tClustReleaseResponseMsg msg1 = null;\n\n\t\t\tSystem.out.println(\"in ReleaseHandler cb\");\n\t\t\tif (pendingHSHLandmarks.isEmpty()) {\n\t\t\t\tmsg1 = new ClustReleaseResponseMsg(UpdateSource, null, null,\n\t\t\t\t\t\tnull, -1);\n\t\t\t\tsendResponseMessage(\"Release\", msg.from, msg1, msg.getMsgId(),\n\t\t\t\t\t\tnull, cbHandled);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// not empty\n\t\t\tlong timeStamp = Long.MIN_VALUE;\n\t\t\tIterator<Long> ierTimer = pendingHSHLandmarks.keySet().iterator();\n\t\t\twhile (ierTimer.hasNext()) {\n\t\t\t\tlong tmp = ierTimer.next().longValue();\n\t\t\t\tif (timeStamp < tmp\n\t\t\t\t\t\t&& pendingHSHLandmarks.get(Long.valueOf(tmp)).alreadyComputedClustering) {\n\t\t\t\t\ttimeStamp = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tHSHRecord record = pendingHSHLandmarks.get(Long.valueOf(timeStamp));\n\n\t\t\tif (record != null && record.alreadyComputedClustering) {\n\n\t\t\t\tint NODES_NUM = record.H.length;\n\t\t\t\tint NC_NUM_DIMS = record.S.length;\n\n\t\t\t\tdouble _H[][] = new double[NODES_NUM][NC_NUM_DIMS];\n\t\t\t\tdouble _S[][] = new double[NC_NUM_DIMS][NC_NUM_DIMS];\n\t\t\t\t_H = makeCopy(record.H, NODES_NUM, NC_NUM_DIMS);\n\t\t\t\t_S = makeCopy(record.S, NC_NUM_DIMS, NC_NUM_DIMS);\n\n\t\t\t\tmsg1 = new ClustReleaseResponseMsg(UpdateSource, _H, _S,\n\t\t\t\t\t\trecord.IndexOfLandmarks, versionNumber);\n\t\t\t\tmsg1.setResponse(true);\n\t\t\t\tmsg1.setMsgId(msg.getMsgId());\n\t\t\t} else {\n\t\t\t\tmsg1 = new ClustReleaseResponseMsg(UpdateSource, null, null,\n\t\t\t\t\t\tnull, -1);\n\t\t\t}\n\t\t\tsendResponseMessage(\"Release\", msg.from, msg1, msg.getMsgId(),\n\t\t\t\t\tnull, cbHandled);\n\t\t}", "public EmitirNFBonusTLDC (long logId)\n\t {\n\t\tsuper(logId, Definicoes.CL_EMITIR_NF_BONUS_TLDC);\n\t\t\n\t\t// Obtem referencia do gerente de conexoes do Banco de Dados\n\t\tthis.gerenteBancoDados = GerentePoolBancoDados.getInstancia(logId);\n\t }", "public void setGBInterval_from(java.math.BigInteger param){\n localGBInterval_fromTracker = param != null;\n \n this.localGBInterval_from=param;\n \n\n }", "private void updateBinaryLogisticRegression(int labelIndex){\n AugmentedLRLoss loss = new AugmentedLRLoss(dataSet, labelIndex, gammas,\n cbms.getBinaryClassifiers()[labelIndex],priorVarianceBinary, componentWeightsVariance);\n LBFGS lbfgs = new LBFGS(loss);\n //todo\n lbfgs.getTerminator().setMaxIteration(numBinaryParaUpdates);\n lbfgs.getTerminator().setGoal(Terminator.Goal.MINIMIZE);\n lbfgs.optimize();\n }", "public void setZLFMC(java.lang.String param) {\r\n localZLFMCTracker = param != null;\r\n\r\n this.localZLFMC = param;\r\n }", "@Override\n public void fireProviderStatusChangeEvent(\n PresenceStatus oldStatus,\n PresenceStatus newStatus)\n {\n if (!oldStatus.equals(newStatus))\n {\n currentStatus = newStatus;\n\n super.fireProviderStatusChangeEvent(oldStatus, newStatus);\n\n PresenceStatus offlineStatus =\n parentProvider.getJabberStatusEnum().getStatus(\n JabberStatusEnum.OFFLINE);\n\n if(newStatus.equals(offlineStatus))\n {\n //send event notifications saying that all our buddies are\n //offline. The protocol does not implement top level buddies\n //nor subgroups for top level groups so a simple nested loop\n //would be enough.\n Iterator<ContactGroup> groupsIter =\n getServerStoredContactListRoot().subgroups();\n while(groupsIter.hasNext())\n {\n ContactGroup group = groupsIter.next();\n\n Iterator<Contact> contactsIter = group.contacts();\n\n while(contactsIter.hasNext())\n {\n ContactJabberImpl contact\n = (ContactJabberImpl)contactsIter.next();\n\n updateContactStatus(contact, offlineStatus);\n }\n }\n\n //do the same for all contacts in the root group\n Iterator<Contact> contactsIter\n = getServerStoredContactListRoot().contacts();\n\n while (contactsIter.hasNext())\n {\n ContactJabberImpl contact\n = (ContactJabberImpl) contactsIter.next();\n\n updateContactStatus(contact, offlineStatus);\n }\n }\n }\n }", "int getGlobalIndex(int localIndex) {\r\n return local2globalIndex[localIndex];\r\n }", "public void markLocalConfigApnMerge() throws JNCException {\n markLeafMerge(\"localConfigApn\");\n }", "public static String getLocalLabel() {\r\n\t\treturn \"l\" + SEQ_LOCAL_LABEL++;\r\n\t}", "public void setGBInterval_point(java.math.BigInteger param){\n localGBInterval_pointTracker = param != null;\n \n this.localGBInterval_point=param;\n \n\n }", "public void syncPositionSilent() {\n MathUtil.setVector(this.syncAbsPos, this.liveAbsPos);\n this.syncYaw = this.liveYaw;\n this.syncPitch = this.livePitch;\n this.syncVel = this.liveVel;\n }", "public void setZLFDM(java.lang.String param) {\r\n localZLFDMTracker = param != null;\r\n\r\n this.localZLFDM = param;\r\n }", "@Override\n\tpublic SystemStatusMessage updateCurrentLocation() {\n\t\t\n\t\tDataStore dataStore = getSystemComputer().getStorageDevice();\n\t\t\n\t\t// Look for subspace beacons in navigation archive\n\t\tMap<String,DataRecord> subspaceBeacons = dataStore.getData(CelestialObject.category(), SubspaceBeacon.type());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}", "BufferedLogChannel getCurrentLogIfPresent(long entryLogId);", "public void setCOVERING_ACC_BR(BigDecimal COVERING_ACC_BR) {\r\n this.COVERING_ACC_BR = COVERING_ACC_BR;\r\n }", "public void setGlobalDiscountThresold(BigDecimal globalDiscountThresold) {\n\t\tthis.globalDiscountThresold = globalDiscountThresold;\n\t}", "public void setUnused(VersionVO param){\n \n if (param != null){\n //update the setting tracker\n localUnusedTracker = true;\n } else {\n localUnusedTracker = true;\n \n }\n \n this.localUnused=param;\n \n\n }", "public void setBankNo(java.lang.String param) {\r\n localBankNoTracker = param != null;\r\n\r\n this.localBankNo = param;\r\n }", "public void setBankNo(java.lang.String param) {\r\n localBankNoTracker = param != null;\r\n\r\n this.localBankNo = param;\r\n }", "public void handle(PBFTCheckpoint checkpoint){\n\n JDSUtility.debug(\"[PBFTServer:handle(checkpoint)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + checkpoint);\n\n if(isValid(checkpoint)){\n \n long seqn = checkpoint.getSequenceNumber();\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n long now = getClockValue();\n\n getCheckpointInfo().put(checkpoint);\n \n Object lpid = getLocalProcessID();\n \n CheckpointSubject cs = getDecision(checkpoint);\n \n if(getCheckpointInfo().hasEnough(seqn) && cs != null && lcwm < seqn && seqn <= hcwm){\n\n if(seqn > hcwm){\n\n JDSUtility.debug(\"[handle(checkpoint)] s\"+ lpid +\", at time \"+ now +\", detected a stable checkpoint certificate with SEQN{\"+ seqn +\"} > HCWM{\"+ hcwm +\"}.\");\n JDSUtility.debug(\"[handle(checkpoint)] s\"+ lpid +\", at time \"+ now +\", is going to start a start transfer procedure.\");\n\n emitFetch();\n return;\n\n }//end if I've a unsynchronized state\n\n if(getCheckpointInfo().getMine(lpid, seqn) != null){ \n doCheckpoint(seqn); \n }\n \n }//end if has a decision\n \n }//end if isValid(checkpoint)\n \n }", "private void monitoringLicenseAndSendNotification(NotificationBean notificationBean){\n\t\t\n//System.out.println(\"execute cmd -- \" + notificationBean.getConnection() + \" --- \" + notificationBean.getNotificationLmstatCmdLoc());\t\t\n\t\t\n\t\t//download lmstat file and delete it remotely\t\t\n//\t\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n//\t\t\tnotificationBean.getNotificationLmstatCmdLoc(),LicLiteData.licLiteDataTmpDir);\n\n//local one_server.log and two_server.log test\nif(isGetingOneServerFile()){\nSystem.out.println(\"downloading one_server.log ...\");\n\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n\t\t\tnotificationBean.getNotificationLmstatCmdLoc(),LicLiteData.licLiteDataTmpDir);\n}else{\n\tString cmdTwoServerLog = \"cat /home/leo/Desktop/log/two_server.log > /home/leo/Desktop/log/notificationtmp\";\n\tNetWorkUtil.executeSCPCmdForNotification(notificationBean.getConnection(),\n\t\t\tcmdTwoServerLog , LicLiteData.licLiteDataTmpDir);\nSystem.out.println(\"downloading two_server.log ...\");\n}\n\t\t\n\t\t\n\t\t\n\t\t//parse file to generate notification bean\n\t\tString notificationTmpFile = LicLiteData.licLiteDataTmpDir + File.separator + LicLiteData.NOTIFICATION_TMP_FILE;\n//System.out.println(\"notificationTmpFile --> \" + notificationTmpFile);\n\t\tNotificationCmpBean notificationCmpBean = Parser.parseDownloadDataFileToNotificationCmpBean(notificationTmpFile,\n\t\t\tnotificationBean.getNotificationLicenseName(),notificationBean.getNotificationLicenseUserName());\n//System.out.println(\"notificationCmpBean --> \" + notificationCmpBean.toString());\n//System.out.println(\"notificationCmpBean --> \" + notificationTmpFile);\n//System.out.println(\"NotificationLicenseName --> \" + notificationBean.getNotificationLicenseName());\n//System.out.println(\"NotificationLicenseUserName --> \" + notificationBean.getNotificationLicenseUserName());\n//System.out.println(\"licenseName, userName, cmpbeanStr -> \" + notificationBean.getNotificationLicenseName() \n//+ \" -- \" + notificationBean.getNotificationLicenseUserName() + \"\\n\" + notificationCmpBean.toString());\t\t\n\t\tif(notificationCmpBean.getFeatureNameCmp() == null){\n\t\t\t//stop service\n\t\t\t\n\t\t\t//toast say : \"wrong feature name or user name\"\n\t\t}else {\n\t\t\tif(LicLiteData.previousNotificationBean == null){\n\t\t\t\tLicLiteData.previousNotificationBean = notificationCmpBean;\n\t\t\t} else {\n\t\t\t\t//compare previous and current bean to see if need to send notification\n\t\t\t\t//compare LicLiteData.previousNotificationBean as 1st bean with notificationCmpBean as 2nd bean\n//System.out.println(\"LicLiteData.previousNotificationBean --> \" + LicLiteData.previousNotificationBean.toString());\n//System.out.println(\"notificationCmpBean --> \" + notificationCmpBean.toString());\n\t\t\t\tArrayList<NotificationCmpResultBean> tmpCmpResultBeanList = UIUtil\n\t\t\t\t\t.comparePreviousWithSecondNotificationBean(LicLiteData.previousNotificationBean , notificationCmpBean);\n//System.out.println(\"tmpCmpResultBeanList --> \" + tmpCmpResultBeanList);\t\t\t\t\n\t\t\t\tif(tmpCmpResultBeanList.size() > 0){\n//System.out.println(\"sending notification...\");\n\t\t\t\t\tLicLiteData.notificationCmpResultBeanList = tmpCmpResultBeanList;\n\t\t\t\t\t\n\t\t\t\t\tsendNotification();\n\t\t\t\t} else {\n//System.out.println(\"not sending notification...\");\n\t\t\t\t}\n\t\t\t\t//set the ischanged file to true for future comparison\n\t\t\t\tfor(int i = 0; i < notificationCmpBean.getUserUsageListCmp().size(); i++){\n\t\t\t\t\tnotificationCmpBean.getUserUsageListCmp().get(i).setChanged(true);\n\t\t\t\t}\n\t\t\t\t//notificationCmpBean overwrite LicLiteData.previousNotificationBean\n\t\t\t\tLicLiteData.previousNotificationBean = notificationCmpBean;\n\t\t\t} \n\t\t\t\n\t\t}\n\t\t\n\t\t//delete download local lmstat file\n\t\t//this one doesn't needed anymore\n\t\t\n\t\t\n\t}", "public void testExplicitGcAnalsysisParallelSerialOld() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset56.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"Event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertTrue(JdkUtil.LogEventType.PARALLEL_SCAVENGE.toString() + \" collector not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.PARALLEL_SCAVENGE));\n Assert.assertTrue(JdkUtil.LogEventType.PARALLEL_SERIAL_OLD.toString() + \" collector not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.PARALLEL_SERIAL_OLD));\n Assert.assertTrue(Analysis.WARN_EXPLICIT_GC_SERIAL_PARALLEL + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_EXPLICIT_GC_SERIAL_PARALLEL));\n Assert.assertTrue(Analysis.ERROR_SERIAL_GC_PARALLEL + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_SERIAL_GC_PARALLEL));\n }", "public void updateCurrClient(){\n if ( ( ( client2 == currClient) && ( client3 != null ) ) || ( (client1 == currClient) && ( client2 == null ) ) ) {\n currClient = client3;\n } else if ( ( ( client3 == currClient) && ( client1 != null ) ) || ( ( client2 == currClient ) && ( client3 == null ) ) ) {\n currClient = client1;\n } else if ( ( ( client1 == currClient ) && ( client2 != null ) ) || ( ( client3 ==currClient) && ( client1 == null ) ) ) {\n currClient = client2;\n }\n }", "public java.lang.String getBLH() {\r\n return localBLH;\r\n }", "private void loadPreviousStatuses(String userUid) {\n final String token = prefs.getString(getString(R.string.v_token), \"\");\n final String state = prefs.getString(getString(R.string.v_state), \"\");\n final String pin = prefs.getString(getString(R.string.v_pin), \"\");\n final long expiry = prefs.getLong(getString(R.string.v_expiry), 0);\n final int registrationCnt = prefs.getInt(getString(R.string.v_registered), 0);\n\n final String path = userUid + \"/\" + getString(R.string.firebase_path) + state + \"/\" + pin + \"/\" + token;\n\n FirebaseAnalytics.getInstance(this).setUserProperty(\"COVIDDetection\", token);\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n dbRef = database.getReference(path + \"/\" + getString(R.string.firebase_path_registration));\n\n Map<String, Object> registration = new HashMap<>();\n registration.put(\"token\", token);\n registration.put(\"state\", state);\n registration.put(\"pin\", pin);\n registration.put(\"time\", new Date().getTime());\n registration.put(\"expTime\", expiry);\n dbRef.child(Integer.toString(registrationCnt)).setValue(registration);\n\n dbRef = database.getReference(path);\n dbRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n if (snapshot != null) {\n for (DataSnapshot userData : snapshot.getChildren()) {\n if(userData.getKey() == getString(R.string.firebase_path_location)) {\n for (DataSnapshot userLocations : userData.getChildren()) {\n personStatuses.add(Integer.parseInt(userLocations.getKey()), (Map<String, Object>) userLocations.getValue());\n }\n }\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // TODO: Handle gracefully\n }\n });\n\n LocationRequest request = new LocationRequest();\n //Specify how often your app should request the device’s location//\n request.setInterval(remoteConfig.getLong(\"LOCATION_REQUEST_INTERVAL\"));\n request.setFastestInterval(remoteConfig.getLong(\"LOCATION_REQUEST_INTERVAL_FASTEST\"));\n //Get the most accurate location data available//\n request.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n FusedLocationProviderClient client = LocationServices.getFusedLocationProviderClient(this);\n int permission = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n //If the app currently has access to the location permission...//\n if (permission == PackageManager.PERMISSION_GRANTED) {\n //...then request location updates//\n setStatusMessage(R.string.tracking);\n\n // Hold a partial wake lock to keep CPU awake when the we're tracking location.\n PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);\n mWakelock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, \"myapp:MyWakelockTag\");\n mWakelock.acquire();\n\n client.requestLocationUpdates(request, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n //Get a reference to the database, so your app can perform read and write operations//\n Location location = locationResult.getLastLocation();\n if (location != null) {\n onLocationChanged(location);\n }\n }\n }, null);\n }\n }", "public void setVersion(long param){\n \n // setting primitive attribute tracker to true\n \n if (param==java.lang.Long.MIN_VALUE) {\n localVersionTracker = false;\n \n } else {\n localVersionTracker = true;\n }\n \n this.localVersion=param;\n \n\n }", "private void DownloadCMVMMVFiles() {\n ConnectivityManager cm = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo nInfo = cm.getActiveNetworkInfo();\r\n if (nInfo != null && nInfo.isAvailable() && nInfo.isConnected()) {\r\n dbHelper.open();\r\n ArrayList<String> mfb = dbHelper.getCMVFiles(divid, rangeCode, fbid);\r\n String path = GetFilePath();\r\n for (int i = 0; i < mfb.size(); i++) {\r\n if (!mfb.get(i).equals(\"null\")) {\r\n getCMVData(mfb.get(i));\r\n }\r\n }\r\n /* if (state == true && circle == true && ran == true && div == true) {\r\n\r\n } else {\r\n for (int i = 0; i < master.length; i++) {\r\n getCMVData(master[i]);\r\n }\r\n }*/\r\n } else {\r\n Toast.makeText(this, \"Please check your Internet Connection.\", Toast.LENGTH_SHORT).show();\r\n }\r\n }", "public void setCOVERING_ACC_SL(BigDecimal COVERING_ACC_SL) {\r\n this.COVERING_ACC_SL = COVERING_ACC_SL;\r\n }", "public void setDELB(java.lang.String param) {\r\n localDELBTracker = param != null;\r\n\r\n this.localDELB = param;\r\n }", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }", "public void setIV_Local_currency(java.lang.String IV_Local_currency) {\r\n this.IV_Local_currency = IV_Local_currency;\r\n }", "public void setSFF(java.lang.String param) {\r\n localSFFTracker = param != null;\r\n\r\n this.localSFF = param;\r\n }", "private void updateLocalParameters(){\n Runnable r = new Runnable(){\n public void run(){\n logger.info(\"\\t*** Loading subscriptions and configuration from server...\");\n try{\n setCurrentLocalIP(MiscIP.getPublicIPAddress());\n\n FTPClientWrapper clientFTP = new FTPClientWrapper(FTPServerName, FTPLoginName, FTPPass);\n\n String raw = clientFTP.downloadAsStringWithTimeout(\"/pinger/remoteconf.txt\", 30*1000);\n \n ArrayList<String> lines = Misc.filterEmptyLines(Misc.getLines(raw));\n loadExecutionParameters(lines);\n setSubscriptionNames(Subscription.parseMany(lines));\n logger.info(\"\\tCurrent subscriptions (\"+getSubscriptionNames().size()+\"): \" + Misc.collectionToString(getSubscriptionNames()));\n }catch(Exception e){\n e.printStackTrace();\n }\n }\n };\n Thread t = new Thread(r);\n t.start();\n }", "private synchronized static void setLevelSync(final Logger.LEVEL desiredLevel) {\n if (null == desiredLevel) {\n return;\n }\n level = desiredLevel;\n if (null != context) {\n SharedPreferences prefs = context.getSharedPreferences (SHARED_PREF_KEY, Context.MODE_PRIVATE);\n prefs.edit ().putString (SHARED_PREF_KEY_level, level.toString ()).commit();\n // we still processed the setCapture call, but when SHARED_PREF_KEY_level_from_server is present, it is used for the level field value (it's an override)\n level = Logger.LEVEL.fromString(prefs.getString(SHARED_PREF_KEY_level_from_server, level.toString()));\n }\n }", "private void finalise(int regency, CertifiedDecision lastHighestCID,\n HashSet<SignedObject> signedCollects, byte[] propose, int batchSize, boolean iAmLeader) {\n\n int currentCID = lastHighestCID.getCID() + 1;\n logger.debug(\"Final stage of LC protocol\");\n int me = this.controller.getStaticConf().getProcessId();\n Consensus cons = null;\n Epoch e = null;\n\n if (tom.getLastExec() + 1 < lastHighestCID.getCID()) { // is this a delayed replica?\n\n logger.info(\"NEEDING TO USE STATE TRANSFER!! (\" + lastHighestCID.getCID() + \")\");\n\n tempRegency = regency;\n tempLastHighestCID = lastHighestCID;\n tempSignedCollects = signedCollects;\n tempPropose = propose;\n tempBatchSize = batchSize;\n tempIAmLeader = iAmLeader;\n\n execManager.getStoppedMsgs().add(acceptor.getFactory().createPropose(currentCID, 0, propose));\n stateManager.requestAppState(lastHighestCID.getCID());\n\n return;\n\n } /*else if (tom.getLastExec() + 1 == lastHighestCID.getCID()) { // Is this replica still executing the last decided consensus?\n\n System.out.println(\"(Synchronizer.finalise) I'm still at the CID before the most recent one!!! (\" + lastHighestCID.getCID() + \")\");\n\n cons = execManager.getConsensus(lastHighestCID.getCID());\n e = cons.getLastEpoch();\n \n int ets = cons.getEts();\n \n if (e == null || e.getTimestamp() != ets) {\n e = cons.createEpoch(ets, controller);\n } else {\n e.clear();\n }\n \n byte[] hash = tom.computeHash(lastHighestCID.getCIDDecision());\n e.propValueHash = hash;\n e.propValue = lastHighestCID.getCIDDecision();\n\n e.deserializedPropValue = tom.checkProposedValue(lastHighestCID.getCIDDecision(), false);\n cons.decided(e, true); // pass the decision to the delivery thread\n }*/\n \n // install proof of the last decided consensus\n cons = execManager.getConsensus(lastHighestCID.getCID());\n e = null;\n \n Set<ConsensusMessage> consMsgs = lastHighestCID.getConsMessages();\n if (consMsgs == null) consMsgs = new HashSet();\n \n for (ConsensusMessage cm : consMsgs) {\n \n if (e == null) e = cons.getEpoch(cm.getEpoch(), true, controller);\n if (e.getTimestamp() != cm.getEpoch()) {\n logger.warn(\"Strange... proof of last decided consensus contains messages from more than just one epoch\");\n e = cons.getEpoch(cm.getEpoch(), true, controller);\n }\n e.addToProof(cm);\n \n if (cm.getType() == MessageFactory.ACCEPT) {\n e.setAccept(cm.getSender(), cm.getValue());\n }\n \n else if (cm.getType() == MessageFactory.WRITE) {\n e.setWrite(cm.getSender(), cm.getValue());\n }\n \n \n }\n if (e != null) {\n\n logger.info(\"Installed proof of last decided consensus \" + lastHighestCID.getCID());\n \n byte[] hash = tom.computeHash(lastHighestCID.getDecision());\n e.propValueHash = hash;\n e.propValue = lastHighestCID.getDecision();\n e.deserializedPropValue = tom.checkProposedValue(lastHighestCID.getDecision(), false);\n\n // Is this replica still executing the last decided consensus?\n if (tom.getLastExec() + 1 == lastHighestCID.getCID()) {\n \n logger.info(\"I'm still at the CID before the most recent one!!! (\" + lastHighestCID.getCID() + \")\");\n cons.decided(e, true);\n }\n else {\n cons.decided(e, false);\n }\n\n } else {\n logger.info(\"I did not install any proof of last decided consensus \" + lastHighestCID.getCID());\n }\n \n cons = null;\n e = null;\n \n // get a value that satisfies the predicate \"bind\"\n byte[] tmpval = null;\n HashSet<CollectData> selectedColls = lcManager.selectCollects(signedCollects, currentCID, regency);\n\n tmpval = lcManager.getBindValue(selectedColls);\n logger.debug(\"Trying to find a binded value\");\n\n // If such value does not exist, obtain the value written by the new leader\n if (tmpval == null && lcManager.unbound(selectedColls)) {\n logger.debug(\"Did not found a value that might have already been decided\");\n tmpval = propose;\n } else {\n logger.debug(\"Found a value that might have been decided\");\n }\n\n if (tmpval != null) { // did I manage to get some value?\n\n logger.debug(\"Resuming normal phase\");\n lcManager.removeCollects(regency); // avoid memory leaks\n\n // stop the re-transmission of the STOP message for all regencies up to this one\n removeSTOPretransmissions(regency);\n \n cons = execManager.getConsensus(currentCID);\n\n e = cons.getLastEpoch();\n\n int ets = cons.getEts();\n\n //Update current consensus with latest ETS. This may be necessary\n //if I 'jumped' to a consensus instance ahead of the one I was executing\n \n //int currentETS = lcManager.getETS(currentCID, selectedColls);\n //if (currentETS > ets) {\n if (regency > ets) {\n \n //System.out.println(\"(Synchronizer.finalise) Updating consensus' ETS after SYNC (from \" + ets + \" to \" + currentETS +\")\");\n logger.debug(\"Updating consensus' ETS after SYNC (from \" + ets + \" to \" + regency +\")\");\n\n /*do {\n cons.incEts();\n } while (cons.getEts() != currentETS);*/\n \n cons.setETS(regency);\n \n //cons.createEpoch(currentETS, controller);\n cons.createEpoch(regency, controller);\n \n e = cons.getLastEpoch();\n }\n\n // Make sure the epoch is created\n /*if (e == null || e.getTimestamp() != ets) {\n e = cons.createEpoch(ets, controller);\n } else {\n e.clear();\n }*/\n if (e == null || e.getTimestamp() != regency) {\n e = cons.createEpoch(regency, controller);\n } else {\n e.clear();\n }\n \n /********* LEADER CHANGE CODE ********/\n cons.removeWritten(tmpval);\n cons.addWritten(tmpval);\n /*************************************/\n \n byte[] hash = tom.computeHash(tmpval);\n e.propValueHash = hash;\n e.propValue = tmpval;\n\n e.deserializedPropValue = tom.checkProposedValue(tmpval, false);\n\n if (cons.getDecision().firstMessageProposed == null) {\n if (e.deserializedPropValue != null\n && e.deserializedPropValue.length > 0) {\n cons.getDecision().firstMessageProposed = e.deserializedPropValue[0];\n } else {\n cons.getDecision().firstMessageProposed = new TOMMessage(); // to avoid null pointer\n }\n }\n if (this.controller.getStaticConf().isBFT()) {\n e.setWrite(me, hash);\n } else {\n e.setAccept(me, hash);\n\n /********* LEADER CHANGE CODE ********/\n logger.debug(\"[CFT Mode] Setting consensus \" + currentCID + \" QuorumWrite tiemstamp to \" + e.getConsensus().getEts() + \" and value \" + Arrays.toString(hash));\n \t e.getConsensus().setQuorumWrites(hash);\n /*************************************/\n\n }\n\n // resume normal operation\n execManager.restart();\n //leaderChanged = true;\n tom.setInExec(currentCID);\n if (iAmLeader) {\n logger.debug(\"Waking up proposer thread\");\n tom.imAmTheLeader();\n } // waik up the thread that propose values in normal operation\n\n // send a WRITE/ACCEPT message to the other replicas\n if (this.controller.getStaticConf().isBFT()) {\n logger.info(\"Sending WRITE message for CID \" + currentCID + \", timestamp \" + e.getTimestamp() + \", value \" + Arrays.toString(e.propValueHash));\n communication.send(this.controller.getCurrentViewOtherAcceptors(),\n acceptor.getFactory().createWrite(currentCID, e.getTimestamp(), e.propValueHash));\n e.writeSent();\n } else {\n logger.info(\"Sending ACCEPT message for CID \" + currentCID + \", timestamp \" + e.getTimestamp() + \", value \" + Arrays.toString(e.propValueHash));\n communication.send(this.controller.getCurrentViewOtherAcceptors(),\n acceptor.getFactory().createAccept(currentCID, e.getTimestamp(), e.propValueHash));\n e.acceptSent();\n }\n } else {\n logger.warn(\"Sync phase failed for regency\" + regency);\n }\n }", "default void process_final_updates(MutableBeaconState state) {\n /* current_epoch = get_current_epoch(state)\n next_epoch = current_epoch + 1 */\n EpochNumber current_epoch = get_current_epoch(state);\n EpochNumber next_epoch = current_epoch.increment();\n\n /* Reset eth1 data votes\n if (state.slot + 1) % SLOTS_PER_ETH1_VOTING_PERIOD == 0:\n state.eth1_data_votes = [] */\n if (state.getSlot().increment().modulo(getConstants().getSlotsPerEth1VotingPeriod())\n .equals(SlotNumber.ZERO)) {\n state.getEth1DataVotes().clear();\n }\n\n /* Update effective balances with hysteresis\n for index, validator in enumerate(state.validator_registry):\n balance = state.balances[index]\n HALF_INCREMENT = EFFECTIVE_BALANCE_INCREMENT // 2\n if balance < validator.effective_balance or validator.effective_balance + 3 * HALF_INCREMENT < balance:\n validator.effective_balance = min(balance - balance % EFFECTIVE_BALANCE_INCREMENT, MAX_EFFECTIVE_BALANCE) */\n Gwei half_increment = getConstants().getEffectiveBalanceIncrement().dividedBy(2);\n for (ValidatorIndex index : state.getValidatorRegistry().size()) {\n ValidatorRecord validator = state.getValidatorRegistry().get(index);\n Gwei balance = state.getBalances().get(index);\n if (balance.less(validator.getEffectiveBalance())\n || validator.getEffectiveBalance().plus(half_increment.times(3)).less(balance)) {\n state.getValidatorRegistry().update(index,\n v -> ValidatorRecord.Builder.fromRecord(v)\n .withEffectiveBalance(\n UInt64s.min(\n balance.minus(Gwei.castFrom(balance.modulo(getConstants().getEffectiveBalanceIncrement()))),\n getConstants().getMaxEffectiveBalance()))\n .build());\n }\n }\n\n /* Update start shard\n state.latest_start_shard = (state.latest_start_shard + get_shard_delta(state, current_epoch)) % SHARD_COUNT */\n state.setLatestStartShard(state.getLatestStartShard()\n .plusModulo(get_shard_delta(state, current_epoch), getConstants().getShardCount()));\n\n /* Set active index root\n index_root_position = (next_epoch + ACTIVATION_EXIT_DELAY) % LATEST_ACTIVE_INDEX_ROOTS_LENGTH\n state.latest_active_index_roots[index_root_position] = hash_tree_root(\n get_active_validator_indices(state, next_epoch + ACTIVATION_EXIT_DELAY)\n ) */\n EpochNumber index_root_position = next_epoch.plusModulo(getConstants().getActivationExitDelay(),\n getConstants().getLatestActiveIndexRootsLength());\n state.getLatestActiveIndexRoots().set(index_root_position,\n hash_tree_root(\n get_active_validator_indices(state, next_epoch.plus(getConstants().getActivationExitDelay()))));\n\n /* Set total slashed balances\n state.latest_slashed_balances[next_epoch % LATEST_SLASHED_EXIT_LENGTH] = (\n state.latest_slashed_balances[current_epoch % LATEST_SLASHED_EXIT_LENGTH]\n ) */\n state.getLatestSlashedBalances().set(next_epoch.modulo(getConstants().getLatestSlashedExitLength()),\n state.getLatestSlashedBalances().get(current_epoch.modulo(getConstants().getLatestSlashedExitLength())));\n\n /* Set randao mix\n state.latest_randao_mixes[next_epoch % LATEST_RANDAO_MIXES_LENGTH] = get_randao_mix(state, current_epoch) */\n state.getLatestRandaoMixes().set(next_epoch.modulo(getConstants().getLatestRandaoMixesLength()),\n get_randao_mix(state, current_epoch));\n\n /* Set historical root accumulator\n if next_epoch % (SLOTS_PER_HISTORICAL_ROOT // SLOTS_PER_EPOCH) == 0:\n historical_batch = HistoricalBatch(\n block_roots=state.latest_block_roots,\n state_roots=state.latest_state_roots,\n )\n state.historical_roots.append(hash_tree_root(historical_batch)) */\n if (next_epoch.modulo(getConstants().getSlotsPerHistoricalRoot().dividedBy(getConstants().getSlotsPerEpoch()))\n .equals(EpochNumber.ZERO)) {\n HistoricalBatch historical_batch =\n new HistoricalBatch(state.getLatestBlockRoots().vectorCopy(), state.getLatestStateRoots().vectorCopy());\n state.getHistoricalRoots().add(hash_tree_root(historical_batch));\n }\n\n /* Rotate current/previous epoch attestations\n state.previous_epoch_attestations = state.current_epoch_attestations\n state.current_epoch_attestations = [] */\n state.getPreviousEpochAttestations().replaceAll(state.getCurrentEpochAttestations().listCopy());\n state.getCurrentEpochAttestations().clear();\n }", "private void updateIfStale() {\n if (DateTimeUtils.currentTimeMillis() - globalLastDrainMillis >= maxStaleMillis) {\n synchronized (counterShards) {\n if (DateTimeUtils.currentTimeMillis() - globalLastDrainMillis >= maxStaleMillis) {\n drainThreadToShared();\n globalLastDrainMillis = DateTimeUtils.currentTimeMillis();\n }\n }\n }\n }", "public RelationalStatus checkCurrentVersion() {\n try {\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(url.openStream()));\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n String[] ver = inputLine.split(\"\\\\.\");\n RelationalStatus rs = compareVersions(ver[0], ver[1], ver[2].split(\"-\")[0]);\n if (rs == RelationalStatus.BEHIND) {\n log.log(Level.WARNING, \"[Updater] +------------------------------------------------+\");\n log.log(Level.WARNING, \"[Updater] You are running an outdated version of the plugin!\");\n log.log(Level.WARNING, \"[Updater] Most recent stable version: \" + inputLine);\n log.log(Level.WARNING, \"[Updater] Current version: \" + getVersion());\n log.log(Level.WARNING, \"[Updater] Please update from: \");\n log.log(Level.WARNING, \"[Updater] https://www.spigotmc.org/resources/tradeshop.32762/\");\n log.log(Level.WARNING, \"[Updater] +------------------------------------------------+\");\n in.close();\n return RelationalStatus.BEHIND;\n } else if (rs == RelationalStatus.AHEAD) {\n log.log(Level.WARNING, \"[Updater] +-----------------------------------------------------+\");\n log.log(Level.WARNING, \"[Updater] You are running a developmental version of the plugin!\");\n log.log(Level.WARNING, \"[Updater] Most recent stable version: \" + inputLine);\n log.log(Level.WARNING, \"[Updater] Current version: \" + getVersion());\n log.log(Level.WARNING, \"[Updater] Please notice that the build may contain critical bugs!\");\n log.log(Level.WARNING, \"[Updater] +-----------------------------------------------------+\");\n in.close();\n return RelationalStatus.AHEAD;\n } else {\n log.log(Level.INFO, \"[Updater] You are running the latest version of the plugin!\");\n in.close();\n return RelationalStatus.UP_TO_DATE;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n log.log(Level.WARNING, \"[Updater] +----------------------------------------------------+\");\n log.log(Level.WARNING, \"[Updater] Could not establish a connection to check for updates!\");\n log.log(Level.WARNING, \"[Updater] Current version: \" + getVersion());\n log.log(Level.WARNING, \"[Updater] Please check for new updates from: \");\n log.log(Level.WARNING, \"[Updater] https://www.spigotmc.org/resources/tradeshop.32762/\");\n log.log(Level.WARNING, \"[Updater] +----------------------------------------------------+\");\n }\n return RelationalStatus.UNKNOWN;\n }", "public void run()\n\t{\n\t\tString releaseFilename = null;\n\n\t\t// 1. Find the local release.xml file. Bail with exception if we cannot find it.\n\t\ttry\n\t\t{\n\t\t\treleaseFilename = _util.getLocalReleaseFile().getAbsolutePath();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\ts_log.error(\"Unexpected exception while attempting to find local release file: \"+e.getMessage(), e);\n\t\t\tif (_callback != null) {\n\t\t\t\t_callback.updateCheckFailed(e);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// 2. Load the local release.xml file as a ChannelXmlBean.\n\t\tChannelXmlBean installedChannelBean = _util.getLocalReleaseInfo(releaseFilename);\n\n\t\t// 3. & 3a. Get the release.xml file as a ChannelXmlBean from the server or\n\t\t// filesystem.\n\t\tChannelXmlBean currentChannelBean = getCurrentChannelXmlBean(installedChannelBean);\n\n\t\t// Record now as the last time we checked for updates.\n\t\t_settings.setLastUpdateCheckTimeMillis(\"\" + currentTimeMillis());\n\t\t_app.getSquirrelPreferences().setUpdateSettings(_settings);\n\n\t\t// 5. Is it the same as the local copy, which was placed either by the\n\t\t// installer or the last update?\n\t\tif (currentChannelBean == null)\n\t\t{\n\t\t\ts_log.warn(\"run: currentChannelBean was null - it is inconclusive whether or not the software \"\n\t\t\t\t+ \"is current : assuming that it is for now\");\n\t\t\tif (_callback != null) {\n\t\t\t\t_callback.updateCheckFailed(null);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tisUpToDate = currentChannelBean.equals(installedChannelBean);\n\t\t\tif (_callback != null)\n\t\t\t{\n\t\t\t\t_callback.updateCheckComplete(isUpToDate, installedChannelBean, currentChannelBean);\n\t\t\t}\n\t\t}\n\t}", "public void makeCloudChangelist(final Map<String, String> localSongList) {\n FirebaseDatabase fbd = FirebaseDatabase.getInstance();\n DatabaseReference fbRef = fbd.getReference().child(\"songs\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n fbRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n Log.i(\"CHECK songs Folder\", \"\");\n\n Map<String, String> changeList = new HashMap<>();\n\n for (DataSnapshot song : dataSnapshot.getChildren()) {\n if (!localSongList.containsKey(song.getKey())) {\n changeList.put(song.getKey(), song.getValue(String.class));\n }\n }\n\n for (Map.Entry<String, String> pair : changeList.entrySet()) {\n String songId = pair.getKey();\n String[] parts = songId.split(\"=\");\n Song downloading = new LocalSong(parts[0], parts[1], songId, pair.getValue());\n MainActivity.masterList.add(downloading);\n loader.addSongToAlbum(downloading);\n urlList.addSong(downloading);\n\n new DownloadSongAsync().execute(downloading);\n }\n\n readyForVibe = true;\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.w(\"Failed to read songs.\", databaseError.toException());\n }\n });\n }", "public void setNbrFullGcs(long argNbrFullGcs) {\n nbrFullGcs = argNbrFullGcs;\n }", "public void setDelb(java.lang.String param) {\r\n localDelbTracker = param != null;\r\n\r\n this.localDelb = param;\r\n }", "@Override public void postGlobal() {\n for(int i=1;i<_chkMins.length;++i)\n _chkMins[i] = _chkMins[i-1] < _chkMins[i] ? _chkMins[i-1] : _chkMins[i];\n }", "public void setGetYYT_CTBGResult(java.lang.String param) {\r\n localGetYYT_CTBGResultTracker = param != null;\r\n\r\n this.localGetYYT_CTBGResult = param;\r\n }", "private void laaLLocalAttributeDetected(Metric metric) {\n\t\tLaaData laaData = (LaaData)((Laa)metric).getData();\n\t\tint localAttributesAccessed = laaData.getLocalAttributesAccessed() + 1;\n\t\tlaaData.setLocalAttributesAccessed(localAttributesAccessed);\t\t\n\t}", "private void clearSeenServerToB() {\n if (rspCase_ == 19) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "public void setCOVERING_ACC_GL(BigDecimal COVERING_ACC_GL) {\r\n this.COVERING_ACC_GL = COVERING_ACC_GL;\r\n }", "public void setVoltage(String vol, int upload_stat){//12.8V\n\t\tif(baseAct.serviceConn){\n//\t\t\tvolVal.setText(vol);\n\t\t\tString volDigit = \"\";\n\t\t\tfloat volF;\n\t\t\tlong volExp;\n\t\t\tif(vol.contains(\"v\") || vol.contains(\"V\"))\n\t\t\t\tvolDigit = vol.substring(0, vol.length()-1);\n\t\t\telse\n\t\t\t\tvolDigit = vol;\n\t\t\tvolF = Float.parseFloat(volDigit);\n\t\t\tif(volF < 13.01){\n\t\t\t\tvolExp = Preference.getInstance(baseAct.getApplicationContext()).getVolExp();\n\t\t\t\tif(volExp != 0){\n\t\t\t\t\tdouble volExpD = Double.longBitsToDouble(volExp);\t\t\n\t\t\t\t\tdouble expTime = (volExpD*(volF-10.5));\n\t\t\t\t\tlong expTimeL = (long) expTime;\n\t\t\t\t\tint day = 0, hr = 0;\n\t\t\t\t\tString notice = baseAct.getResources().getString(R.string.bat_expire_time);\n\t\t\t\t\tString expTimeStr = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif((day = (int) (expTimeL/86400)) > 0){\n\t\t\t\t\t\texpTimeStr = expTimeStr + day + baseAct.getResources().getString(R.string.bat_day);\n\t\t\t\t\t\texpTimeL %= 86400;\n\t\t\t\t\t}\n\t\t\t\t\tif((hr = (int) (expTimeL/3600)) > 0){\n\t\t\t\t\t\texpTimeStr = expTimeStr + hr + baseAct.getResources().getString(R.string.bat_hour);\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(!expTimeStr.equals(\"\")){\n\t\t\t\t\t\tint rank = (int) ((volF-10.5)*6/(13-10.5));\n//\t\t\t\t\t\tif(day > 0)\n//\t\t\t\t\t\t\tbaseAct.tips_s.setBatteryInfo(Base.BAT_NORMAL, rank, notice+expTimeStr);\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t\tbaseAct.tips_s.setBatteryInfo(Base.BAT_LOW, rank, notice+expTimeStr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(upload_stat != 0)\n\t\t\t\t\tbaseAct.uploadVoltage(volDigit);\n\t\t\t}\n\t\t\t\n\t\t\tbaseAct.curVoltage = Float.parseFloat(volDigit);\n\t\t}\n\t\telse\n\t\t\tsaveBatteryVol(vol);\n\t}", "public void setGetYYT_XXBGResult(java.lang.String param) {\r\n localGetYYT_XXBGResultTracker = param != null;\r\n\r\n this.localGetYYT_XXBGResult = param;\r\n }", "@CheckForNull\n GlobalUpdateStatus getUpdateStatus();", "public void markLocalConfigApnReplace() throws JNCException {\n markLeafReplace(\"localConfigApn\");\n }", "@Override\n\tpublic boolean callback(LFN_CSD l) {\n\t\tif (!AuthorizationChecker.isOwner(l, user)) {\n\t\t\tlfns_error.add(l);\n\t\t\treturn false;\n\t\t}\n\t\t// chown and add to the final collection of lfns\n\t\tif (!l.owner.equals(new_owner) || (new_group != null && !l.gowner.equals(new_group))) {\n\t\t\tl.owner = new_owner;\n\t\t\tif (new_group != null)\n\t\t\t\tl.gowner = new_group;\n\t\t\tif (!l.update(true, false, null)) {\n\t\t\t\tlfns_error.add(l);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tlfns_ok.add(l);\n\n\t\treturn true;\n\t}", "@Override\n\tpublic long getCurrentCtc() {\n\t\treturn _candidate.getCurrentCtc();\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void downLoadCurrProcess(String Percentage) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public void setBzdm(java.lang.String param) {\r\n localBzdmTracker = param != null;\r\n\r\n this.localBzdm = param;\r\n }", "@Test\n\tpublic void testCurrLoc() \n\t{\n\t\tString id = \"diffCurrLoc\";\n\t\tassertLCVol3NotLopped(id);\n\t\tassertLCVolLopped(id);\n\t\tassertNoUnloppedLCVol1(id);\n\t\tassertNoUnloppedLCVol2(id);\n\t}", "public long getVersion(){\n return localVersion;\n }", "private void updLCMST(){ \n\t\ttry{\n\t\t\t\tM_strSQLQRY = \"Update FG_LCMST set \";\n\t\t\t\tM_strSQLQRY += \"LC_STKQT = LC_STKQT + \"+strISSQT+\",\";\n\t\t\t\tM_strSQLQRY += \"LC_TRNFL = '0',\";\n\t\t\t\tM_strSQLQRY += \"LC_LUSBY = '\"+cl_dat.M_strUSRCD_pbst+\"',\";\n\t\t\t\tM_strSQLQRY += \"LC_LUPDT = '\"+M_fmtDBDAT.format(M_fmtLCDAT.parse(cl_dat.M_strLOGDT_pbst))+\"'\";\n\t\t\t\tM_strSQLQRY += \" where lc_CMPCD = '\"+cl_dat.M_strCMPCD_pbst+\"' and lc_wrhtp = '\"+strWRHTP+\"'\";\n\t\t\t\tM_strSQLQRY += \" and lc_mnlcd = '\"+strMNLCD+\"'\";\n\t\t\t\t\n\t\t\t\tcl_dat.exeSQLUPD(M_strSQLQRY,\"setLCLUPD\");\n\t\t\t\t//System.out.println(M_strSQLQRY);\n\t\t\t\t\n\t\t}catch(Exception L_EX){\n\t\t\tsetMSG(L_EX,\"updLCMST\");\n\t\t}\n\t}", "public boolean isMCOrgLocal() {\n\t\treturn javaNetAddress.isMCOrgLocal();\n\t}", "public void setDylb(java.lang.String param) {\r\n localDylbTracker = param != null;\r\n\r\n this.localDylb = param;\r\n }", "public java.lang.String getNetStatus() {\r\n return localNetStatus;\r\n }", "@DISPID(1611006080) //= 0x60060080. The runtime will prefer the VTID if present\n @VTID(155)\n boolean replaceOnlyAfterCurrent();", "public boolean getDefaultTracking() {\n return (defaultTracking);\n }", "private final void silk_PLC_update(final Jsilk_decoder_control psDecCtrl)\r\n\t{\r\n\t\tfinal Jsilk_PLC_struct psPLC = this.sPLC;\r\n\r\n\t\t/* Update parameters used in case of packet loss */\r\n\t\tthis.prevSignalType = this.indices.signalType;\r\n\t\tint LTP_Gain_Q14 = 0;\r\n\t\tfinal int nb_subfr1 = this.nb_subfr - 1;// java\r\n\t\tif( this.indices.signalType == Jdefine.TYPE_VOICED ) {\r\n\t\t\t/* Find the parameters for the last subframe which contains a pitch pulse */\r\n\t\t\tfor( int j = 0, je = psDecCtrl.pitchL[ nb_subfr1 ], nb_j = nb_subfr1; j * this.subfr_length < je; j++, nb_j-- ) {\r\n\t\t\t\tif( j == this.nb_subfr ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tint temp_LTP_Gain_Q14 = 0;\r\n\t\t\t\tfinal int nb_j_o = nb_j * Jdefine.LTP_ORDER;// java\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tdo {\r\n\t\t\t\t\ttemp_LTP_Gain_Q14 += psDecCtrl.LTPCoef_Q14[ nb_j_o + i ];\r\n\t\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\t\tif( temp_LTP_Gain_Q14 > LTP_Gain_Q14 ) {\r\n\t\t\t\t\tLTP_Gain_Q14 = temp_LTP_Gain_Q14;\r\n\t\t\t\t\tSystem.arraycopy( psDecCtrl.LTPCoef_Q14, nb_j_o, psPLC.LTPCoef_Q14, 0, Jdefine.LTP_ORDER );\r\n\r\n\t\t\t\t\tpsPLC.pitchL_Q8 = psDecCtrl.pitchL[ nb_j ] << 8;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// silk_memset( psPLC.LTPCoef_Q14, 0, Jdefine.LTP_ORDER * sizeof( opus_int16 ) );\r\n\t\t\tint i = 0;\r\n\t\t\tdo {\r\n\t\t\t\tpsPLC.LTPCoef_Q14[i] = 0;\r\n\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\tpsPLC.LTPCoef_Q14[ Jdefine.LTP_ORDER / 2 ] = (short)LTP_Gain_Q14;\r\n\r\n\t\t\t/* Limit LT coefs */\r\n\t\t\tif( LTP_Gain_Q14 < V_PITCH_GAIN_START_MIN_Q14 ) {\r\n\t\t\t\tfinal int tmp = V_PITCH_GAIN_START_MIN_Q14 << 10;\r\n\t\t\t\tfinal int scale_Q10 = ( tmp / ( LTP_Gain_Q14 > 1 ? LTP_Gain_Q14 : 1 ) );\r\n\t\t\t\ti = 0;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tpsPLC.LTPCoef_Q14[ i ] = (short)(((int)psPLC.LTPCoef_Q14[ i ] * scale_Q10) >> 10);\r\n\t\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\t} else if( LTP_Gain_Q14 > V_PITCH_GAIN_START_MAX_Q14 ) {\r\n\t\t\t\tfinal int tmp = V_PITCH_GAIN_START_MAX_Q14 << 14;\r\n\t\t\t\tfinal int scale_Q14 = ( tmp / ( LTP_Gain_Q14 > 1 ? LTP_Gain_Q14 : 1 ) );\r\n\t\t\t\ti = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tpsPLC.LTPCoef_Q14[ i ] = (short)(( (int)psPLC.LTPCoef_Q14[ i ] * scale_Q14 ) >> 14);\r\n\t\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpsPLC.pitchL_Q8 = ( this.fs_kHz * 18 ) << 8;\r\n\t\t\t// silk_memset( psPLC.LTPCoef_Q14, 0, Jdefine.LTP_ORDER * sizeof( opus_int16 ));\r\n\t\t\tint i = 0;\r\n\t\t\tdo {\r\n\t\t\t\tpsPLC.LTPCoef_Q14[i] = 0;\r\n\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t}\r\n\r\n\t\t/* Save LPC coeficients */\r\n\t\tSystem.arraycopy( psDecCtrl.PredCoef_Q12[ 1 ], 0, psPLC.prevLPC_Q12, 0, this.LPC_order );\r\n\t\tpsPLC.prevLTP_scale_Q14 = (short)psDecCtrl.LTP_scale_Q14;\r\n\r\n\t\t/* Save last two gains */\r\n\t\tpsPLC.prevGain_Q16[0] = psDecCtrl.Gains_Q16[ nb_subfr1 - 1 ];\r\n\t\tpsPLC.prevGain_Q16[1] = psDecCtrl.Gains_Q16[ nb_subfr1 ];\r\n\r\n\t\tpsPLC.subfr_length = this.subfr_length;\r\n\t\tpsPLC.nb_subfr = this.nb_subfr;\r\n\t}", "public static ComputationGraph loadLastCheckpointCG(File rootDir){\n Checkpoint last = lastCheckpoint(rootDir);\n return loadCheckpointCG(rootDir, last);\n }", "public synchronized void handle(PBFTRequest r){\n \n Object lpid = getLocalServerID();\n\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \", at time \" + getClockValue() + \", received \" + r);\n\n StatedPBFTRequestMessage loggedRequest = getRequestInfo().getStatedRequest(r);\n \n /* if the request has not been logged anymore and it's a old request, so it was garbage by checkpoint procedure then I must send a null reply */\n if(loggedRequest == null && getRequestInfo().isOld(r)){\n IProcess client = new BaseProcess(r.getClientID());\n PBFTReply reply = new PBFTReply(r, null, lpid, getCurrentViewNumber());\n emit(reply, client);\n return;\n \n }\n \n try{\n /*if the request is new and hasn't added yet then it'll be added */\n if(loggedRequest == null){\n /* I received a new request so a must log it */\n loggedRequest = getRequestInfo().add(getRequestDigest(r), r, RequestState.WAITING);\n loggedRequest.setRequestReceiveTime(getClockValue());\n }\n\n /* if I have a entry in request log but I don't have the request then I must update my request log. */\n if(loggedRequest.getRequest() == null) loggedRequest.setRequest(r);\n \n /*if the request was served the I'll re-send the related reply if it has been logged yet.*/\n if(loggedRequest.getState().equals(RequestState.SERVED)){\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \" has already served \" + r);\n\n /* retransmite the reply when the request was already served */\n PBFTReply reply = getRequestInfo().getReply(r);\n IProcess client = new BaseProcess(r.getClientID());\n emit(reply, client);\n return;\n }\n \n /* If I'm changing then I'll do nothing more .*/\n if(changing()) return;\n\n PBFTPrePrepare pp = getPrePreparebackupInfo().get(getCurrentViewNumber(), getCurrentPrimaryID(), loggedRequest.getDigest());\n\n if(pp != null && !isPrimary()){\n /* For each digest in backuped pre-prepare, I haven't all request then it'll be discarded. */\n DigestList digests = new DigestList();\n for(String digest : pp.getDigests()){\n if(!getRequestInfo().hasRequest(digest)){\n digests.add(digest);\n }\n }\n \n if(digests.isEmpty()){\n handle(pp);\n getPrePreparebackupInfo().rem(pp);\n return;\n } \n }\n\n boolean committed = loggedRequest.getState().equals( RequestState.COMMITTED );\n \n// /* if my request was commit and it hasn't been served yet I must check the stated of the request */\n if(committed){\n tryExecuteRequests();\n return;\n }\n \n /* performs the batch procedure if the server is the primary replica. */\n if(isPrimary()){\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \" (primary) is executing the batch procedure for \" + r + \".\");\n batch();\n }else{\n /* schedules a timeout for the arriving of the pre-prepare message if the server is a secundary replica. */\n scheduleViewChange();\n }//end if is primary\n \n }catch(Exception e){\n e.printStackTrace();\n }\n }" ]
[ "0.50709635", "0.49265188", "0.48355", "0.48273814", "0.46700633", "0.46698782", "0.46591732", "0.46091968", "0.4603446", "0.4599396", "0.45433962", "0.4500395", "0.4497717", "0.4463186", "0.44577447", "0.44379023", "0.44276705", "0.44233802", "0.44171703", "0.440049", "0.43822458", "0.43748918", "0.43686146", "0.43652296", "0.43159276", "0.431516", "0.43125474", "0.4259727", "0.42539963", "0.4250863", "0.42493656", "0.4243948", "0.42400175", "0.42312837", "0.42109185", "0.420201", "0.4194672", "0.41736045", "0.41611606", "0.41588444", "0.41573718", "0.41489986", "0.41478416", "0.41424143", "0.4134134", "0.412822", "0.41215232", "0.4112917", "0.4104067", "0.40979272", "0.40916973", "0.409169", "0.409169", "0.40915528", "0.40890616", "0.4084808", "0.40846455", "0.4067543", "0.40594834", "0.40449935", "0.40364954", "0.4032786", "0.40243313", "0.40229213", "0.40202853", "0.4019632", "0.40144685", "0.40119267", "0.4011443", "0.40088236", "0.39963883", "0.39940503", "0.39937612", "0.3989402", "0.39891648", "0.39859948", "0.39848217", "0.3984469", "0.39801967", "0.39779603", "0.39724988", "0.39697394", "0.3961146", "0.39556962", "0.39449787", "0.3942698", "0.39397728", "0.39335695", "0.39330548", "0.39323327", "0.39267778", "0.39232367", "0.3920649", "0.39181393", "0.39180797", "0.39175105", "0.39168254", "0.3914469", "0.39140344", "0.39130968" ]
0.6968448
0
If the GlobalVLSN is not defunct, initialize the local CBVLSN with the syncup matchpoint, so that the heartbeat responses sent before the node has replayed any log entries are still valid for saving a place in the replication stream. If the GlobalVLSN is defunct, do nothing.
public void registerMatchpoint(VLSN matchpoint) { if (defunct) { return; } this.currentLocalCBVLSN = matchpoint; this.lastSyncableVLSN = matchpoint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic ServerServices duplexstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}", "public static void initialize()\n {\n localPeerIDCount = 0;\n\n }", "private void sendGroupInit() {\n \t\ttry {\n \t\t\tmyEndpt=new Endpt(serverName+\"@\"+vsAddress.toString());\n \n \t\t\tEndpt[] view=null;\n \t\t\tInetSocketAddress[] addrs=null;\n \n \t\t\taddrs=new InetSocketAddress[1];\n \t\t\taddrs[0]=vsAddress;\n \t\t\tview=new Endpt[1];\n \t\t\tview[0]=myEndpt;\n \n \t\t\tGroup myGroup = new Group(\"DEFAULT_SERVERS\");\n \t\t\tvs = new ViewState(\"1\", myGroup, new ViewID(0,view[0]), new ViewID[0], view, addrs);\n \n \t\t\tGroupInit gi =\n \t\t\t\tnew GroupInit(vs,myEndpt,null,gossipServers,vsChannel,Direction.DOWN,this);\n \t\t\tgi.go();\n \t\t} catch (AppiaEventException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (NullPointerException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} catch (AppiaGroupException ex) {\n \t\t\tSystem.err.println(\"EventException while launching GroupInit\");\n \t\t\tex.printStackTrace();\n \t\t} \n \t}", "@Override\n\tpublic ServerServices upstreamGlobalVarsInit(List<String> configList)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "private void init() {\n\t\tsendPacket(new Packet01Login(\"[you have connected to \"+UPnPGateway.getMappedAddress()+\"]\", null));\n\t}", "@Override\n\tpublic ServerServices duplexstreamGlobalVarsInit(List<String> configList)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic ServerServices upstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}", "private void initializeNA(){\n name = \"N/A\";\n key = \"N/A\";\n serverIpString = \"N/A\";\n serverPort = 0;\n clientListenPort = 0;\n }", "public void init() {\n\t\t\n\t\tdebugPrintln(\"Doing init.\");\n\t\t\n\t\t// can sanity check some things by requesting notification when nodes\n\t\t// are created/deleted/etc.\n\t\t// It does not notify when playBufs reach the end of a buffer, though.\n\t\t// Too bad, that. Would have to poll.\n\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\n\t\t//start by cleaning up any detritus from previous runs on the same server:\n\t\tcleanup();\n\n\t\t//sclang creates the default group, not supercollider, so let's follow that convention.\n\t\tcreateGroup(1, 0);\n\n\t\t// create a mother group, under the default group (1),\n\t\t// which will contain all of the SCSoundControl objects.\n\t\t//this is where we would query if another node == _motherGroupID already exists.\n\t\t//if so, would need to choose an alternate groupID (e.g. += 10000)\n\t\tcreateGroup(_motherGroupID, 1);\n\t\t\n\t}", "private void initiatePreElection() {\n\t\tpreElectionInProgress = true;\n\t\tbackupHeartbeatTimer.cancel();\n\t\tif (reElectionTimer != null) {\n\t\t\treElectionTimer.cancel();\n\t\t}\n\t\tif (backupHeartbeatBroadcaster != null) {\n\t\t\tbackupHeartbeatBroadcaster.cancel();\n\t\t}\n\t\t// Broadcast election ordinality and reset isElectedFlag for all nodes\n\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\tif (remoteLoadBalancer.isConnected() && remoteLoadBalancer.getState().equals(LoadBalancerState.PASSIVE)) {\n\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(9);\n\t\t\t\tbuffer.put((byte) MessageType.ELECTION_MESSAGE.getValue());\n\t\t\t\tbuffer.putDouble(averageServerLatency);\t\n\t\t\t\tbuffer.flip();\n\t\t\t\ttry {\n\t\t\t\t\twhile (buffer.hasRemaining()) {\n\t\t\t\t\t\tremoteLoadBalancer.getSocketChannel().write(buffer);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tremoteLoadBalancer.setIsElectedBackup(false);\n\t\t}\n\n\t\t// TimerTask created that will determine the election results after the\n\t\t// timeout occurs.\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tRemoteLoadBalancer lowestLatencyCandidate = null;\n\t\t\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\t\t\tif (remoteLoadBalancer.getState().equals(LoadBalancerState.PASSIVE)\n\t\t\t\t\t\t\t&& remoteLoadBalancer.getCandidacyValue() != null) {\n\t\t\t\t\t\tif (lowestLatencyCandidate == null\n\t\t\t\t\t\t\t\t&& remoteLoadBalancer.getCandidacyValue() < averageServerLatency) {\n\t\t\t\t\t\t\tlowestLatencyCandidate = remoteLoadBalancer;\n\t\t\t\t\t\t} else if (lowestLatencyCandidate != null && remoteLoadBalancer\n\t\t\t\t\t\t\t\t.getCandidacyValue() < lowestLatencyCandidate.getCandidacyValue()) {\n\t\t\t\t\t\t\tlowestLatencyCandidate = remoteLoadBalancer;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Didn't get a lowest latency election message so assume this\n\t\t\t\t// load balancer is now the backup\n\t\t\t\tif (lowestLatencyCandidate == null) {\n\t\t\t\t\tbackupHeartbeatTimer.cancel();\n\t\t\t\t\tisElectedBackup = true;\n\t\t\t\t\tbackupHeartbeatBroadcaster = new HeartbeatBroadcaster(remoteLoadBalancers, backupHeartbeatIntervalMillis,\n\t\t\t\t\t\t\tLoadBalancerState.PASSIVE);\n\t\t\t\t\tnew Thread(backupHeartbeatBroadcaster).start();\n\t\t\t\t\t\n\t\t\t\t\t// Start timer for next pre-election\n\t\t\t\t\tstartReElectionTimer();\n\t\t\t\t\t\n\t\t\t\t\tComponentLogger.getInstance().log(LogMessageType.LOAD_BALANCER_ELECTED_AS_BACKUP);\n\t\t\t\t\tSystem.out.println(\"Elected as backup\");\n\t\t\t\t} else {\n\t\t\t\t\tlowestLatencyCandidate.setIsElectedBackup(true);\n\t\t\t\t\tisElectedBackup = false;\n\t\t\t\t\tresetBackupHeartbeatTimer();\n\t\t\t\t\tSystem.out.println(\"Election winner:\" + lowestLatencyCandidate.getAddress().getHostString());\n\t\t\t\t}\n\n\t\t\t\t// Clear candidacy values for future elections\n\t\t\t\tfor (RemoteLoadBalancer remoteLoadBalancer : remoteLoadBalancers) {\n\t\t\t\t\tremoteLoadBalancer.setCandidacyValue(null);\n\t\t\t\t}\n\t\t\t\tpreElectionInProgress = false;\n\t\t\t}\n\t\t};\n\n\t\tpreElectionTimeoutTimer = new Timer();\n\t\tpreElectionTimeoutTimer.schedule(timerTask, defaultTimeoutMillis);\n\t}", "public static boolean init() {\n threadLocal.set(new Telemetry());\n return true;\n }", "public void track(VLSN newVLSN, long lsn) {\n if (defunct || !allowUpdate) {\n return;\n }\n\n synchronized (this) {\n if (newVLSN.compareTo(lastSyncableVLSN) > 0) {\n VLSN old = lastSyncableVLSN;\n lastSyncableVLSN = newVLSN;\n if (DbLsn.getFileNumber(lsn) != currentFile) {\n currentFile = DbLsn.getFileNumber(lsn);\n currentLocalCBVLSN = old;\n }\n }\n }\n }", "private Globals() {\n\t\treadyToSend=false;\n\t}", "private void vdm_init_DRA () {\n try {\n setSentinel();\n }\n catch (Exception e) {\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n }", "@Override\n\tpublic void teleopInit() {\n\t\tbeenEnabled = true;\n\t\tif(!socket){\n\t\t\tlogger.startSocket(); socket = true;\n\t\t}\n\t}", "void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }", "public void init()\n {\n boolean tHotspot = true;\n // Figures below valid for 1000TPS\n double tGcRateFactor = 1000.0D / ((1000.0D * 1000.0) * cClientTransPerMicro) ;\n if (tHotspot)\n {\n // tax average 6ms, max 65, every 20 seconds\n // me1 27ms, max 83ms, every 20 seconds\n // me1s 27ms, max 87, every 22seconds\n mTaxJvm = new GcService(9908.0D*1000 * tGcRateFactor, 9.0D*1000); \n mMeJvm = new GcService(2509.0D*1000 * tGcRateFactor, 17.0D*1000); \n mMeStandbyJvm = new GcService(2257.0D*1000 * tGcRateFactor, 15.0D*1000);\n }\n else\n {\n // Metronome \n mTaxJvm = new GcService(100*1000, 500);\n mMeJvm = new GcService(100*1000, 500);\n mMeStandbyJvm = new GcService(100*1000, 500);\n }\n\n String tName;\n mClient.init(new ServerConfig(mClient, mClientTaxNwDelay, \"Client\", cClientCount, cClientCount, 0.1));\n {\n mClientTaxNwDelay.init(new ServerConfig(mClientTaxNwDelay, mTaxTcp, \"ClientTaxNwDelay\", 1, 1, 0.1)); \n {\n tName = \"TaxServer\";\n mTaxTcp.init(new ServerConfig(mTaxJvm, mTaxTcp, mTaxPool, tName + \"_Tcp\", 1, 1, 22)); \n mTaxPool.init(new ServerConfig(mTaxJvm, mTaxPool, mTaxMeNwDelay, tName + \"_ServerPool\", 5, 150, 11)); \n\n {\n mTaxMeNwDelay.init(new ServerConfig(mTaxMeNwDelay, mMePrimaryTcp, \"TaxMeNwDelay\", 1, 1, 100)); \n {\n tName=\"MatchingEngine\";\n mMePrimaryTcp.init(new ServerConfig(mMeJvm, mMePrimaryTcp, mMePrimaryServerPool, tName + \"Tcp\", 1, 1, 14));\n mMePrimaryServerPool.init(new ServerConfig(mMeJvm, mMePrimaryServerPool, mMePrimarySorter, tName + \"_ServerPool\", 5, 150, 12)); \n mMePrimarySorter.init(new ServerConfig(mMeJvm, mMePrimarySorter, mMePrimaryChainUnit0, tName + \"_Sorter\", 1, 1, 13));\n mMePrimaryChainUnit0.init(new ServerConfig(mMeJvm, mMePrimaryChainUnit0, mMePrimaryPostChain, tName + \"_ChainUnit0\", 1, 1, 59)); \n mMePrimaryBatchSender.init(new ServerConfig(mMeJvm, mMePrimaryBatchSender, mMeMesNwDelay, tName + \"_BatchSender\", 10, 10, 1)); \n mMePrimaryRecoveryLog.init(new ServerConfig(mMeJvm, mMePrimaryRecoveryLog, mMePrimaryPostChain, tName + \"_RecoveryLog\", 1, 1, 50)); \n mMePrimaryPostChain.init(new ServerConfig(mMeJvm, mMePrimaryPostChain, mMePrimaryResponsePool, tName + \"_PostChain\", 1, 1, 46)); \n mMePrimaryResponsePool.init(new ServerConfig(mMeJvm, mMePrimaryResponsePool, mMeTaxNwDelay, tName + \"_ResponsePool\", 5, 25, 16)); \n\n {\n mMeMesNwDelay.init(new ServerConfig(mMeMesNwDelay, mMeStandbyTcp, \"MeMesNwDelay\", 1, 1, 90)); \n {\n tName=\"MatchingEngineStandby\";\n mMeStandbyTcp.init(new ServerConfig(mMeStandbyJvm, mMeStandbyTcp, mMeStandbyServerPool, tName + \"_Tcp\", 1, 1, 13)); \n mMeStandbyServerPool.init(new ServerConfig(mMeStandbyJvm, mMeStandbyServerPool, mMesMeNwDelay, tName + \"_ServerPool\", 5, 150, 18)); \n }\n mMesMeNwDelay.init(new ServerConfig(mMesMeNwDelay, mMePrimaryPostChain, \"MesMeNwDelay\", 1, 1, 90)); \n }\n }\n mMeTaxNwDelay.init(new ServerConfig(mMeTaxNwDelay, mTaxCollector, \"MeTaxNwDelay\", 1, 1, 100));\n }\n } \n mTaxCollector.init(new ServerConfig(mTaxJvm, mTaxCollector, mTaxClientNwDelay, tName + \"_Collector\", 1, 1, 0.1)); \n mTaxClientNwDelay.init(new ServerConfig(mTaxClientNwDelay, null, \"TaxClientNwDelay\", 1, 1, 0.1));\n }\n }", "private void startSynchronization(int nextReg) {\n\n boolean condition;\n ObjectOutputStream out = null;\n ByteArrayOutputStream bos = null;\n \n if (this.controller.getStaticConf().isBFT()) {\n condition = lcManager.getStopsSize(nextReg) > this.controller.getCurrentViewF();\n } else {\n condition = lcManager.getStopsSize(nextReg) > 0;\n }\n \n // Ask to start the synchronizations phase if enough messages have been received already\n if (condition && lcManager.getNextReg() == lcManager.getLastReg()) {\n \n logger.debug(\"Initialize synch phase\");\n requestsTimer.Enabled(false);\n requestsTimer.stopTimer();\n\n lcManager.setNextReg(lcManager.getLastReg() + 1); // define next timestamp\n\n int regency = lcManager.getNextReg();\n\n // store information about message I am going to send\n lcManager.addStop(regency, this.controller.getStaticConf().getProcessId());\n\n //execManager.stop(); // stop execution of consensus\n\n //Get requests that timed out and the requests received in STOP messages\n //and add those STOPed requests to the client manager\n addSTOPedRequestsToClientManager();\n List<TOMMessage> messages = getRequestsToRelay();\n\n try { // serialize conent to send in the STOP message\n bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n\n // Do I have messages to send in the STOP message?\n if (messages != null && messages.size() > 0) {\n\n //TODO: If this is null, there was no timeout nor STOP messages.\n //What shall be done then?\n out.writeBoolean(true);\n byte[] serialized = bb.makeBatch(messages, 0, 0, controller.getStaticConf().getUseSignatures() == 1);\n out.writeObject(serialized);\n } else {\n out.writeBoolean(false);\n logger.warn(\"Strange... did not include any request in my STOP message for regency \" + regency);\n }\n\n out.flush();\n bos.flush();\n\n byte[] payload = bos.toByteArray();\n out.close();\n bos.close();\n\n // send message STOP\n logger.info(\"Sending STOP message to install regency \" + regency + \" with \" + (messages != null ? messages.size() : 0) + \" request(s) to relay\");\n\n LCMessage stop = new LCMessage(this.controller.getStaticConf().getProcessId(), TOMUtil.STOP, regency, payload);\n requestsTimer.setSTOP(regency, stop); // make replica re-transmit the stop message until a new regency is installed\n communication.send(this.controller.getCurrentViewOtherAcceptors(), stop);\n\n } catch (IOException ex) {\n logger.error(\"Could not deserialize STOP message\", ex);\n }\n }\n \n if (this.controller.getStaticConf().isBFT()) {\n condition = lcManager.getStopsSize(nextReg) > (2 * this.controller.getCurrentViewF());\n } else {\n condition = lcManager.getStopsSize(nextReg) > this.controller.getCurrentViewF();\n }\n \n // Did the synchronization phase really started?\n //if (lcManager.getStopsSize(nextReg) > this.reconfManager.getQuorum2F() && lcManager.getNextReg() > lcManager.getLastReg()) {\n if (condition && lcManager.getNextReg() > lcManager.getLastReg()) {\n \n if (!execManager.stopped()) execManager.stop(); // stop consensus execution if more than f replicas sent a STOP message\n\n logger.debug(\"Installing regency \" + lcManager.getNextReg());\n lcManager.setLastReg(lcManager.getNextReg()); // define last timestamp\n\n int regency = lcManager.getLastReg();\n\n // avoid memory leaks\n lcManager.removeStops(nextReg);\n lcManager.clearCurrentRequestTimedOut();\n lcManager.clearRequestsFromSTOP();\n\n requestsTimer.Enabled(true);\n requestsTimer.setShortTimeout(-1);\n requestsTimer.startTimer();\n\n //int leader = regency % this.reconfManager.getCurrentViewN(); // new leader\n int leader = lcManager.getNewLeader();\n int in = tom.getInExec(); // cid to execute\n int last = tom.getLastExec(); // last cid decided\n\n execManager.setNewLeader(leader);\n\n // If I am not the leader, I have to send a STOPDATA message to the elected leader\n if (leader != this.controller.getStaticConf().getProcessId()) {\n\n try { // serialize content of the STOPDATA message\n\n bos = new ByteArrayOutputStream();\n out = new ObjectOutputStream(bos);\n \n Consensus cons = null;\n \n // content of the last decided CID\n if (last > -1) cons = execManager.getConsensus(last);\n\n //Do I have info on my last executed consensus?\n if (cons != null && cons.getDecisionEpoch() != null && cons.getDecisionEpoch().propValue != null) {\n \n out.writeBoolean(true);\n out.writeInt(last);\n //byte[] decision = exec.getLearner().getDecision();\n\n byte[] decision = cons.getDecisionEpoch().propValue;\n Set<ConsensusMessage> proof = cons.getDecisionEpoch().getProof();\n\n out.writeObject(decision);\n out.writeObject(proof);\n // TODO: WILL BE NECESSARY TO ADD A PROOF!!!\n\n } else {\n out.writeBoolean(false);\n \n ////// THIS IS TO CATCH A BUG!!!!!\n if (last > -1) {\n logger.debug(\"[DEBUG INFO FOR LAST CID #1]\");\n\n if (cons == null) {\n if (last > -1) logger.debug(\"No consensus instance for cid \" + last);\n\n }\n else if (cons.getDecisionEpoch() == null) {\n logger.debug(\"No decision epoch for cid \" + last);\n } else {\n logger.debug(\"epoch for cid: \" + last + \": \" + cons.getDecisionEpoch().toString());\n\n if (cons.getDecisionEpoch().propValue == null) {\n logger.debug(\"No propose for cid \" + last);\n } else {\n logger.debug(\"Propose hash for cid \" + last + \": \" + Base64.encodeBase64String(tom.computeHash(cons.getDecisionEpoch().propValue)));\n }\n }\n }\n\n }\n\n if (in > -1) { // content of cid in execution\n\n cons = execManager.getConsensus(in);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n\n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"(Synchronizer.startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n TimestampValuePair quorumWrites;\n if (cons.getQuorumWrites() != null) {\n\n quorumWrites = cons.getQuorumWrites();\n\n } else {\n\n quorumWrites = new TimestampValuePair(0, new byte[0]);\n }\n\n HashSet<TimestampValuePair> writeSet = cons.getWriteSet();\n\n //CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, ets, quorumWrites, writeSet);\n CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, regency, quorumWrites, writeSet);\n\n SignedObject signedCollect = tom.sign(collect);\n\n out.writeObject(signedCollect);\n\n } else {\n\n cons = execManager.getConsensus(last + 1);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n \n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"(Synchronizer.startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n //CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, ets, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n CollectData collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, regency, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n \n SignedObject signedCollect = tom.sign(collect);\n\n out.writeObject(signedCollect);\n\n }\n\n out.flush();\n bos.flush();\n\n byte[] payload = bos.toByteArray();\n out.close();\n bos.close();\n\n int[] b = new int[1];\n b[0] = leader;\n\n logger.info(\"Sending STOPDATA of regency \" + regency);\n // send message SYNC to the new leader\n communication.send(b,\n new LCMessage(this.controller.getStaticConf().getProcessId(), TOMUtil.STOPDATA, regency, payload));\n\n\t\t//TODO: Turn on timeout again?\n } catch (IOException ex) {\n logger.error(\"Could not deserialize STOPDATA message\", ex);\n }\n\n // the replica might have received a SYNC that was out of context at the time it was received, but now can be processed\n Set<LCMessage> sync = getOutOfContextLC(TOMUtil.SYNC, regency);\n\n logger.debug(\"Checking if there are out of context SYNC for regency \" + regency);\n\n if (sync.size() > 0) {\n logger.info(\"Processing out of context SYNC for regency \" + regency);\n } else {\n logger.info(\"No out of context SYNC for regency \" + regency);\n }\n\n for (LCMessage m : sync) {\n if (m.getSender() == execManager.getCurrentLeader()) {\n processSYNC(m.getPayload(), regency);\n return; // makes no sense to continue, since there is only one SYNC message\n }\n }\n\n } else { // If leader, I will store information that I would send in a SYNC message\n\n logger.debug(\"I'm the leader for this new regency\");\n CertifiedDecision lastDec = null;\n CollectData collect = null;\n\n Consensus cons = null;\n \n //Content of the last decided CID\n if (last > -1) cons = execManager.getConsensus(last);\n \n //Do I have info on my last executed consensus?\n if (cons != null && cons.getDecisionEpoch() != null && cons.getDecisionEpoch().propValue != null) { \n //byte[] decision = exec.getLearner().getDecision();\n\n\n byte[] decision = cons.getDecisionEpoch().propValue;\n Set<ConsensusMessage> proof = cons.getDecisionEpoch().getProof();\n\n lastDec = new CertifiedDecision(this.controller.getStaticConf().getProcessId(), last, decision, proof);\n // TODO: WILL BE NECESSARY TO ADD A PROOF!!!??\n\n } else { \n lastDec = new CertifiedDecision(this.controller.getStaticConf().getProcessId(), last, null, null);\n\n ////// THIS IS TO CATCH A BUG!!!!!\n if (last > -1) {\n logger.debug(\"[DEBUG INFO FOR LAST CID #2]\");\n\n if (cons == null) {\n if (last > -1) logger.debug(\"No consensus instance for cid \" + last);\n\n }\n else if (cons.getDecisionEpoch() == null) {\n logger.debug(\"No decision epoch for cid \" + last);\n } else {\n logger.debug(\"epoch for cid: \" + last + \": \" + cons.getDecisionEpoch().toString());\n }\n if (cons.getDecisionEpoch().propValue == null) {\n logger.debug(\"No propose for cid \" + last);\n } else {\n logger.debug(\"Propose hash for cid \" + last + \": \" + Base64.encodeBase64String(tom.computeHash(cons.getDecisionEpoch().propValue)));\n }\n }\n \n }\n lcManager.addLastCID(regency, lastDec);\n\n if (in > -1) { // content of cid being executed\n cons = execManager.getConsensus(in);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n\n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"(Synchronizer.startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n TimestampValuePair quorumWrites;\n\n if (cons.getQuorumWrites() != null) {\n\n quorumWrites = cons.getQuorumWrites();\n } else {\n quorumWrites = new TimestampValuePair(0, new byte[0]);\n }\n\n HashSet<TimestampValuePair> writeSet = cons.getWriteSet();\n\n //collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, ets, quorumWrites, writeSet);\n collect = new CollectData(this.controller.getStaticConf().getProcessId(), in, regency, quorumWrites, writeSet);\n\n } else {\n\n cons = execManager.getConsensus(last + 1);\n\n //cons.incEts(); // make the consensus advance to the next epoch\n cons.setETS(regency); // make the consensus advance to the next epoch\n\n //int ets = cons.getEts();\n //cons.createEpoch(ets, controller);\n cons.createEpoch(regency, controller);\n //Logger.println(\"startSynchronization) incrementing ets of consensus \" + cons.getId() + \" to \" + ets);\n logger.debug(\"Incrementing ets of consensus \" + cons.getId() + \" to \" + regency);\n\n //collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, ets, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n collect = new CollectData(this.controller.getStaticConf().getProcessId(), last + 1, regency, new TimestampValuePair(0, new byte[0]), new HashSet<TimestampValuePair>());\n }\n\n SignedObject signedCollect = tom.sign(collect);\n\n lcManager.addCollect(regency, signedCollect);\n\n // the replica might have received STOPDATAs that were out of context at the time they were received, but now can be processed\n Set<LCMessage> stopdatas = getOutOfContextLC(TOMUtil.STOPDATA, regency);\n\n logger.debug(\"Checking if there are out of context STOPDATAs for regency \" + regency);\n if (stopdatas.size() > 0) {\n logger.debug(\"Processing \" + stopdatas.size() + \" out of context STOPDATAs for regency \" + regency);\n } else {\n logger.debug(\"No out of context STOPDATAs for regency \" + regency);\n }\n\n for (LCMessage m : stopdatas) {\n processSTOPDATA(m, regency);\n }\n\n }\n\n }\n }", "private void initiateServerInstance(Socket newSocket){\n KVCommunicationModule com = createCommunicationModule(newSocket);\n KVServerInstance instance = createServerInstance(com, master);\n aliveInstances.add(instance);\n Thread aliveinstancethread = new Thread(instance);\n aliveinstancethread.start();\n aliveinstancethreads.add(aliveinstancethread);\n }", "public void contextInitialized(ServletContextEvent event) {\n\t\t sessionid=new Date().getTime();\n\t\t BBSyncDB syncdb=BBSyncDB.getBBSyncDB();\n\t\t try{\t\t\t \n\t\t\t\tsyncdb.connectDB();\n\t\t\t\tsyncdb.peerStarted(P2PService.getComputerName(), P2PServletContextListener.sessionid, new Date());\n\t\t }catch(Exception e){\n\t\t\t e.printStackTrace();\n\t\t }finally{\n\t\t\t try{syncdb.closeDB();}catch(Exception e){}\n\t\t }\n\t\t\n\t\t\n\t\t \n\t}", "public void StartReplicationMgr()\n\t{\n\t\tif( hostIP.equals(m_oElection.GetLeaderIP()))\n\t\t{\n\t\t\tm_oSDFSMaster.StartReplicationMgr();\n\t\t}\n\t}", "protected void init() {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n RosFragmentActivity.this.init(nodeMainExecutorService);\n //Let everyone know that init is called\n synchronized (mNodeInitListeners) {\n for (final NodeInitListener nodeInitListener : mNodeInitListeners) {\n nodeInitListener.onNodeInit(nodeMainExecutorService, getMasterUri());\n }\n mNodeInitListeners.clear();\n }\n return null;\n }\n }.execute();\n }", "public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }", "private void m10989Qx() {\n LbsManagerProxy.init(VivaBaseApplication.m8749FZ().getApplicationContext(), AppStateModel.getInstance().isInChina());\n LbsManagerProxy.setAutoStop(true);\n LbsManagerProxy.recordLocation(false, false);\n LbsManagerProxy.resetLocation();\n LbsManagerProxy.recordLocation(true, false);\n }", "static synchronized public void staticInitialize()\n {\n if (!isInitialized)\n {\n if (!startedInitializing)\n {\n startedInitializing = true;\n\n cm = new ConfigurationManager(SphinxSignalInfoProvider.class.getResource(\"hellongram.config.xml\"));\n\n // allocate the recognizer\n System.out.println(\"Loading spinx recognizer...\");\n recognizer = (Recognizer) cm.lookup(\"recognizer\");\n recognizer.allocate();\n\n //speechClassifier = (SpeechClassifier) cm.lookup(\"speechClassifier\");\n //speechClassifier.initialize();\n\n inMindDataProcessor = (InMindDataProcessor) cm.lookup(\"inMindDataProcessor\");\n\n inMindByteDataSource = (InMindByteDataSource) cm.lookup(\"inMindByteDataSource\");\n\n\n isInitialized = true;\n System.out.println(\"Spinx recognizer loaded.\");\n\n recognizerThread = new Thread(() -> {\n try\n {\n while (true)\n {\n recognizer.recognize();\n }\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n });\n recognizerThread.start();\n }\n }\n }", "protected void initialize() {\n \tsetTimeout(0.0);\n \t\n \tRobot.vision_.setTargetSnapshot(null);\n \t\n \tpreviousTargetTransform = Robot.vision_.getLatestGearLiftTargetTransform();\n \tRobot.vision_.startGearLiftTracker(trackerFPS_);\n }", "public GlobalNodeListener() {\n log.fine(\">>> Initialised\");\n }", "private static void initLog() {\n LogManager.mCallback = null;\n if (SettingsManager.getDefaultState().debugToasts) {\n Toast.makeText(mContext, mContext.getClass().getCanonicalName(), Toast.LENGTH_SHORT).show();\n }\n if (SettingsManager.getDefaultState().debugLevel >= LogManager.LEVEL_ERRORS) {\n new TopExceptionHandler(SettingsManager.getDefaultState().debugMail);\n }\n //Si hubo un crash grave se guardo el reporte en el sharedpreferences, por lo que al inicio\n //levanto los posibles crashes y, si el envio por mail está activado , lo envio\n String possibleCrash = StoreManager.pullString(\"crash\");\n if (!possibleCrash.equals(\"\")) {\n OtherAppsConnectionManager.sendMail(\"Stack\", possibleCrash, SettingsManager.getDefaultState().debugMailAddress);\n StoreManager.removeObject(\"crash\");\n }\n }", "public static void initialize()\n {\n // Initiate election\n Runnable sender = new BullyAlgorithm(\"Sender\",\"election\");\n new Thread(sender).start();\n }", "private void init() {\n healthCheckTimer.newTimeout(\n new TimerTask() {\n @Override\n public void run(Timeout timeout) throws Exception {\n if (!isStop) {\n List<BrpcChannel> newHealthyInstances = new ArrayList<BrpcChannel>();\n Iterator<BrpcChannel> iter = unhealthyInstances.iterator();\n while (iter.hasNext()) {\n BrpcChannel instance = iter.next();\n boolean isHealthy = isInstanceHealthy(instance.getIp(), instance.getPort());\n if (isHealthy) {\n newHealthyInstances.add(instance);\n }\n }\n\n List<BrpcChannel> newUnhealthyInstances = new ArrayList<BrpcChannel>();\n iter = healthyInstances.iterator();\n while (iter.hasNext()) {\n BrpcChannel instance = iter.next();\n boolean isHealthy = isInstanceHealthy(instance.getIp(), instance.getPort());\n if (!isHealthy) {\n newUnhealthyInstances.add(instance);\n }\n }\n\n healthyInstances.addAll(newHealthyInstances);\n unhealthyInstances.removeAll(newHealthyInstances);\n\n healthyInstances.removeAll(newUnhealthyInstances);\n unhealthyInstances.addAll(newUnhealthyInstances);\n notifyInvalidInstance(newUnhealthyInstances);\n\n healthCheckTimer.newTimeout(this,\n rpcClient.getRpcClientOptions().getHealthyCheckIntervalMillis(),\n TimeUnit.MILLISECONDS);\n }\n\n }\n },\n rpcClient.getRpcClientOptions().getHealthyCheckIntervalMillis(),\n TimeUnit.MILLISECONDS);\n }", "private void setupGeneralBroadcastReceiver() {\n generalBroadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.GENERAL_BROADCAST\".equals(intent.getAction())) {\n int status = intent.getIntExtra(\"com.example.loravisual.GENERAL\", 0);\n if (status == -2) {\n if (!connToastsDeactivated)\n Toast.makeText(context, \"LoRa configuration synchronized, experiment ready\", Toast.LENGTH_SHORT).show();\n getSupportActionBar().setSubtitle(getString(R.string.connected));\n ready = true;\n } else if (status == -3) {\n Toast.makeText(context, \"correct response received\", Toast.LENGTH_SHORT).show();\n } else if (status == -4) {\n Toast.makeText(context, \"response received but did not match\", Toast.LENGTH_SHORT).show();\n } else if (status == -7) {\n Toast.makeText(context, \"no response received\", Toast.LENGTH_SHORT).show();\n } else if (status == -5) {\n Toast.makeText(context, \"no ACK received, trying again\", Toast.LENGTH_SHORT).show();\n } else if (status == -6) {\n Toast.makeText(context, \"ACK received\", Toast.LENGTH_SHORT).show();\n startTimers(total, findViewById(R.id.htext), true);\n }\n if(status == -3 || status == -4 || status == -7)\n connToastsDeactivated = false;\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.GENERAL_BROADCAST\");\n registerReceiver(generalBroadcastReceiver, filter);\n }", "protected void initNotificationServiceStub() {\n notificationServiceStub =\n NotificationServiceGrpc.newBlockingStub(\n ManagedChannelBuilder.forTarget(\n StringUtils.isEmpty(currentUri) ? SERVER_URI : currentUri)\n .usePlaintext()\n .build());\n if (enableHa) {\n notificationServiceStub =\n wrapBlockingStub(\n notificationServiceStub,\n StringUtils.isEmpty(currentUri) ? SERVER_URI : currentUri,\n livingMembers,\n enableHa,\n retryIntervalMs,\n retryTimeoutMs);\n }\n }", "protected void bInit()\r\n {\r\n \tSystem.out.println(\"|bInit| : expected_seq_num is: \"+expected_seq_num+\".\"); \r\n \tfor(int i=0;i<5;i++)\r\n \t\t{\r\n \t\t\tisAckedWindow[i] =ACK_NAKed;\r\n \t\t}\r\n \texpected_seq_num = FirstSeqNo;\r\n \tint check = makeCheckSum(FirstSeqNo,ACK_ACKed,DATA_EMPTY);\r\n \tpacketBuffer = new Packet (-1,ACK_ACKed,check,DATA_EMPTY);\r\n \tSystem.out.println(\"|bInit| : packet with seq number:\"+Integer.toString(packetBuffer.getSeqnum())+\" is stored in Buffer\"); \r\n \t//\tstate_receiver = STATE_WAIT_FOR_0_FROM_BELOW;\r\n }", "@PostConstruct\n public void init() {\n System.out.println(\"\\n \\n \\n \\n \\n \\n \\n\");\n System.out.println(\"I AM THE SERVER STARTING BE WAARE :::::::\");\n System.out.println(\"\\n \\n \\n \\n \\n \\n \\n\");\n boolean updateMatches = true;\n if (updateMatches) {\n System.out.println(\"Updating local database...\");\n try {\n System.out.println(\"=====================================\");\n String authTokenRaw = requestToornamentAuthToken();\n String requestURL = \"https://api.toornament.com/v1/tournaments\" + \"?name=\" + URLEncoder.encode(tournamentName, \"UTF-8\");\n String tournamentInfoRaw = getTournamentInfo(authTokenRaw, requestURL);\n String matchesRaw = getTournamentMatches(authTokenRaw, tournamentInfoRaw);\n insertTournamentMatchesToDB(matchesRaw);\n } catch (JSONException | MalformedJsonException | JsonSyntaxException | UnsupportedEncodingException ex) {\n Logger.getLogger(SocketServer.class.getName()).log(Level.SEVERE, null, ex);\n ex.printStackTrace();\n }\n }\n }", "private void initServer() throws IOException {\r\n \t\tLogger.logMessage(\"Binding Server to \" + this.serverIpAddress + \":\" + this.serverPort);\r\n \r\n \t\tthis.isAlive = true;\r\n \t\tthis.serverSocket = new ServerSocket(this.serverPort, this.backLog, this.serverIpAddress);\r\n \t\tthis.dataLayer = DataLayerFactory.getDataLayer();\r\n \r\n \t\t// Generate the grouplist\r\n \t\tCollection<String> dbGroupList = this.dataLayer.getGroups();\r\n \r\n \t\tfor (String group : dbGroupList) {\r\n \t\t\tthis.groupList.addGroup(group);\r\n \t\t}\r\n \r\n \t\tLogger.logMessage(\"Server successfuly bound!\");\r\n \t}", "public synchronized void startUp() {\n if (coordinatingThread == null) {\n\n // force a change event to tell the controller to load handlerConfig\n configChangedQueue.offer(\"Loading RADIUS Config...\");\n\n Thread t = new Thread(this);\n t.setName(MessageFormat.format(Constants.COORDINATION_THREAD_NAME, this.getClass().getSimpleName()));\n t.setDaemon(true);\n t.start();\n coordinatingThread = t;\n } else {\n cLog.log(Level.WARNING, this.getClass().getSimpleName() + \".setServletConfig() called again. Service \"\n + \"already started. Ignoring.\");\n }\n }", "private final void setupLocal() {\n _topLocal = true;\n // Check for global vs local work\n if( _nlo >= 0 && _nlo < _nhi-1 ) { // Have global work?\n // Note: some top-level calls have no other global work, so\n // \"topLocal==true\" does not imply \"nlo < nhi-1\".\n int selfidx = H2O.SELF.index();\n if( _nlo < selfidx ) _nleft = remote_compute(_nlo, selfidx );\n if( selfidx+1 < _nhi ) _nrite = remote_compute(selfidx+1,_nhi);\n }\n _lo = 0; _hi = _fr.firstReadable().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n if( _fr.hasAppendables() )\n _fs = new Futures();\n init(); // Setup any user's shared local structures\n }", "@Override\n\tpublic void startLocalTimer() throws HFModuleException {\n\t\tthis.isAppRunning = true;\n\t\ttry {\n\t\t\tHFConfigration.broudcastIp = InetAddress\n\t\t\t\t\t.getByName(getBroadcastAddress());\n\t\t\tlocalBeatSocket = new DatagramSocket();\n\t\t\tlocalBeatSocket.setBroadcast(true);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_BROADCAST_GET,\n\t\t\t\t\te.getMessage());\n\t\t} catch (SocketException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_BROADCAST_GET,\n\t\t\t\t\te.getMessage());\n\t\t}\n\t\tnew Thread(beatThread).start();\n\t\tnew Thread(recvThread).start();\n\t}", "public static void setUpServer() {\n\t\tList<ServerDefinition> srvToSC0CascDefs = new ArrayList<ServerDefinition>();\r\n\t\tServerDefinition srvToSC0CascDef = new ServerDefinition(TestConstants.COMMUNICATOR_TYPE_PUBLISH, TestConstants.logbackSrv, TestConstants.pubServerName1,\r\n\t\t\t\tTestConstants.PORT_PUB_SRV_TCP, TestConstants.PORT_SC0_TCP, 1, 1, TestConstants.pubServiceName1);\r\n\t\tsrvToSC0CascDefs.add(srvToSC0CascDef);\r\n\t\tSystemSuperTest.srvDefs = srvToSC0CascDefs;\r\n\t}", "@Override\n public void onContextCreated() {\n HeartbeatJob.updateBinaryServiceClusterChanges(serversService);\n registersHeartbeatJob();\n registerCallHomeJob();\n }", "public synchronized void m29984l() {\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeatSlave \");\n }\n f23274i++;\n mo33398h();\n if (C6973b.m29763a().mo33291f(C6973b.m29776f())) {\n if (!C7048a.m30142d(C6973b.m29776f())) {\n C6864a.m29308i(Constants.ServiceLogTag, \"network is unreachable ,give up and go on slave service\");\n } else if (C6973b.m29776f() != null) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n boolean isForeiginPush = XGPushConfig.isForeiginPush(C6973b.m29776f());\n String str = Constants.ACTION_SLVAE_2_MAIN;\n String str2 = Constants.ServiceLogTag;\n if (isForeiginPush) {\n C6864a.m29308i(str2, \"isForeiginPush network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else if (C6979b.m29795a(C6973b.m29776f()).mo33300b()) {\n C6864a.m29308i(str2, \"network is ok , switch to main service\");\n C6973b.m29767a(C6973b.m29776f(), str, 0);\n } else {\n C6864a.m29308i(str2, \"network is error , go on slave service\");\n }\n }\n });\n } else {\n C6864a.m29308i(Constants.ServiceLogTag, \"PushServiceManager.getInstance().getContext() is null\");\n }\n }\n }", "void init() {\n try {\n // Start the send and receive threads and exit\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_SEND_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_RCV_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_GC_THREAD)));\n } catch (IllegalThreadStateException e) {\n Debug.exit(\"Fatal Error: \" + e.toString());\n }\n }", "protected void initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }", "void onLogFragmentReady() {\n\t CreeperContext.init(this);\n\t \n\t CreeperContext.getInstance().controller = new RaspberryPiController();\n\t \n\t // Check that WebRTC stuff is functional\n\t pokeWebRTC();\n\n\t // Run the USB Socket server\n\t\tnew Thread(new Runnable() {\n\t public void run() {\n\t \ttry {\n\t \t\tusbSocketServer = new UsbSocketServer(BootstrapActivity.this);\n\t \t\tusbSocketServer.run();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tCreeperContext.getInstance().error(\"Badness:\", e);\n\t\t\t\t}\n\t }\n\t }).start();\n\n\t // Run the WebServer\n\t\tnew Thread(new Runnable() {\n\t public void run() {\n\t \ttry {\n\t \t\twebSocketServer = new WebSocketServer(BootstrapActivity.this);\n\t \t\twebSocketServer.run();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tCreeperContext.getInstance().error(\"Badness:\", e);\n\t\t\t\t}\n\t }\n\t }).start();\n\t}", "private static void revertAllToDefault() throws Exception {\n \n SoapTransport transport = authZmailAdmin();\n modifyLocalconfigAndReload(transport, LC.autoprov_initial_sleep_ms, DEFAULT_AUTOPROV_INITIAL_SLEEP_MS);\n \n Server localServer = prov.getLocalServer();\n localServer.setAutoProvPollingInterval(DEFAULT_AUTOPROV_POLLING_INTERVAL);\n localServer.unsetAutoProvScheduledDomains();\n }", "public void initialize() {\n final ConfigurationManager config = ConfigurationManager.getInstance();\n boolean overrideLog = System.getProperty(\"azureus.overridelog\") != null;\n\n for (int i = 0; i < ignoredComponents.length; i++) {\n ignoredComponents[i] = new ArrayList();\n }\n\n if (!overrideLog) {\n config.addListener(new COConfigurationListener() {\n public void configurationSaved() {\n checkLoggingConfig();\n }\n });\n }\n\n checkLoggingConfig();\n config.addParameterListener(CFG_ENABLELOGTOFILE, new ParameterListener() {\n public void parameterChanged(String parameterName) {\n FileLogging.this.reloadLogToFileParam();\n }\n });\n }", "protected void initialize() {\n\t\tRobot.sender_.setSendData(vision);\n\n\t\tinitHeading = Robot.drivetrain.getGyroHeading();\n\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartDepth)) {\n\t\t\tinitDistance = Robot.depth_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartCubeSearch)) {\n\t\t\tinitDistance = Robot.cube_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartRFT)) {\n\t\t\tinitDistance = Robot.rft_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\t\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.PlatformBlueSearch) || vision.equalsIgnoreCase(SocketVisionSender.PlatformRedSearch)) {\n\t\t\tinitDistance = Robot.platform_.get_distance();\n\t\t}\n\t}", "private void preSyncConfiguration() {\n customPreSyncConfiguration.accept(caller, listener);\n }", "private void postProcess() {\n for (ClusterData cd : clusters) {\n for (String serverName : cd.serverRefs) {\n if (instanceName.equals(serverName)) {\n cluster = cd;\n return;\n }\n }\n }\n // if we get here that means the instance either \n // does not exist or it is stand-alone\n cluster = new ClusterData();\n cluster.configRef = serverConfigRef;\n cluster.serverRefs.add(instanceName);\n }", "private void initialize(){\n\t\ttry\n\t\t{\n\t\t\tString[] packet = setPacket();\n\t\t\tif (validatePacket(packet))\n\t\t\t{\n\t\t\t\tsend(packet);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.out.println(\"Something went wrong...\");\n\t\t\tresetClient();\n\t\t}\n\t}", "private void initData() {\n boolean monitoring = (boolean) SPUtils.get(this,SPUtils.SP_MONITOR_MONITORING,false);\n boolean boot = (boolean) SPUtils.get(this,SPUtils.SP_MONITOR_BOOT,false);\n\n sw_boot.setChecked(boot);\n sw_speed_noti.setChecked(monitoring);\n if (!monitoring){\n sw_boot.setEnabled(false);\n }else {\n if(!ServiceUtils.isServiceRunning(this,NetMonitorService.class.getName())){\n startMonitorService();\n }\n }\n\n }", "private void init() {\n AdvertisingRequest();// 广告列表请求线程\n setapiNoticeControllerList();\n }", "public static void init() {\n //Reset Flywheel Falcons to factory default\n flywheelMaster.configFactoryDefault();\n flywheelSlave.configFactoryDefault();\n\n //Master settings\n flywheelMaster.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n flywheelMaster.configSelectedFeedbackSensor(FeedbackDevice.IntegratedSensor); //Use Falcon 500 Integrated Encoder\n flywheelMaster.setSelectedSensorPosition(0,0,10); //Reset encoder position\n\n //Slave settings\n flywheelSlave.follow(flywheelMaster); //Follow master mode\n flywheelSlave.setInverted(true); //Invert motor to go along with master controller\n flywheelSlave.setNeutralMode(NeutralMode.Brake); //Set neutral mode to break\n }", "public void initialize() {\n\n getStartUp();\n }", "public void broadcastInit(InitWrapper wrapper) {\n \ttry {\n \t\tString wrapperStr = mapper.writeValueAsString(wrapper);\n \t\tWorkerMessageModel change = new WorkerMessageModel(\n \t\t\t\t\"INIT\",\n \t\t\t\twrapperStr\n \t\t\t);\n \t\tSystem.out.println(\"SimpleSourceBean sending message to all workers\");\n \t\tsource.output().send(MessageBuilder.withPayload(change).build());\n\t\n \t\tSystem.out.println(\"SimpleSourceBean broadCastInit return after send\");\n \t\n \t} catch (JsonProcessingException e) {\n \t\te.printStackTrace();\n \t} \n }", "void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }", "public void initializeStatusFields(NbaUserVO user, NbaLob lob, NbaTXLife aNbaTXLife, RequirementInfo requirementInfo) throws NbaBaseException {\n NbaVpmsAdaptor vpmsProxy = null;\n try {\n NbaOinkDataAccess data = new NbaOinkDataAccess(lob);\n if (aNbaTXLife != null) {\n data.setContractSource(aNbaTXLife);\n } \n vpmsProxy = new NbaVpmsAdaptor(data, NbaVpmsAdaptor.AUTO_PROCESS_STATUS);\n String busFunc = NbaUtils.getBusinessProcessId(user);\n getDeOinkMap().put(NbaVpmsConstants.A_PROCESS_ID, busFunc);\n String mode = NbaServerUtility.getDataStore(lob, null);\n getDeOinkMap().put(NbaVpmsConstants.A_DATASTORE_MODE, mode);\n if (NbaConstants.PROC_APP_SUBMIT.equals(busFunc) || NbaConstants.PROC_GI_APP_SUBMIT.equals(busFunc) ) {\n Category configCategory = NbaConfiguration.getInstance().getIntegrationCategory(lob.getBackendSystem(),\n NbaConfigurationConstants.UNDERWRITINGRISK);\n if (configCategory != null && configCategory.hasValue()) {\n getDeOinkMap().put(NbaVpmsConstants.A_INTEGRATED_CLIENT, configCategory.getValue());\n } else {\n getDeOinkMap().put(NbaVpmsConstants.A_INTEGRATED_CLIENT, \"\");\n }\n }\n //Begin NBA250\n if (NbaConstants.PROC_PRV_FLWUP.equals(busFunc) && aNbaTXLife != null) {//ALII457\n \tRequirementInfo reqInfo = aNbaTXLife.getRequirementInfo(lob.getReqUniqueID());\n \tRequirementInfoExtension reqInfoExt = NbaUtils.getFirstRequirementInfoExtension(reqInfo);\n TrackingInfo trackingInfo = reqInfoExt.getTrackingInfo();\n \tif (trackingInfo != null && trackingInfo.getFollowUpCompleted()) {\n getDeOinkMap().put(NbaVpmsConstants.A_FLWUP_COMPLETD, String.valueOf(trackingInfo.getFollowUpCompleted()));\n } else {\n getDeOinkMap().put(NbaVpmsConstants.A_FLWUP_COMPLETD, \"false\");\n }\n }//End NBA250\n // begin AXAL3.7.20\n\t\tif (NbaConstants.PROC_NBAFORMAL.equalsIgnoreCase(busFunc) ||\n\t\t\t\t//NbaConstants.PROC_AUTO_UNDERWRITING.equalsIgnoreCase(busFunc) || // code commented by ALS3347\n\t\t\t\tNbaConstants.PROC_NBACREATE.equalsIgnoreCase(busFunc)) {\n\t\t\tAxaUtils.deOinkCWAInd(getWork(), (HashMap) getDeOinkMap());\n\t\t}\n\t\t// end AXAL3.7.20\n\t\t//start NBA300\n\t\tif ((NbaConstants.PROC_AUTO_UNDERWRITING.equals(busFunc) || NbaConstants.PROC_TERMCONV.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_AGGREGATE.equals(busFunc) || NbaConstants.PROC_ELECTRONIC_MONEY.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_AGGR_CONTRACT.equals(busFunc)\n\t\t\t\t|| NbaConstants.PROC_PRINT_HOLD.equals(busFunc)) \n\t\t\t\t&& (aNbaTXLife != null)) {//ALII457,APSL2735,APSL4765\n\t\t\tNbaVPMSHelper.deOinkTermConvData(getDeOinkMap(), aNbaTXLife, lob);\n\t\t}\n\t\t\n\t\t//end NBA300\n\t\t//start APSL4412\n\t\tif ((NbaConstants.PROC_AGGR_CONTRACT.equals(busFunc)) && (aNbaTXLife != null)) {\n\t\t\tString rcmTeam = NbaUtils.getRCMTeam(NbaUtils.getAsuCodeForRetail(aNbaTXLife), NbaUtils.getEPGInd(aNbaTXLife));\n\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_RCMTEAM, rcmTeam);\n\t\t}\n\t\t//end APSL4412\n\t\t\n\t\t// Begin NBLXA-2035\n\t\tif ((NbaConstants.PROC_AGGREGATE.equals(busFunc))\n\t\t\t\t&& (lob.getReview() == NbaConstants.REVIEW_USER_REQUIRED || lob.getReview() == NbaConstants.REVIEW_SYSTEMATIC)\n\t\t\t\t&& (aNbaTXLife != null)) {\n\t\t\t\t\tMap resultMap = getAppQueueAndStatus(user, aNbaTXLife.getPolicy().getPolNumber());\n\t\t\t\n\t\t\t\tString appQueue = (String)resultMap.get(\"appQueue\");\n\t\t\t\tString appStatus = (String)resultMap.get(\"appStatus\");\n\t\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_APPLICATION_QUEUE_LOB, appQueue);\n\t\t\t\tgetDeOinkMap().put(NbaVpmsConstants.A_APPLICATION_STATUS, appStatus);\n\t\t}\n\t\t// End NBLXA-2035\n\t\t// NBLXA-2343,NBLXA-2658 deleted switch over logic\n\t\tvpmsProxy.setSkipAttributesMap(getDeOinkMap());\n vpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_WORKITEM_STATUSES);\n if (requirementInfo != null) {\n NbaOinkRequest oinkRequest = new NbaOinkRequest();\n oinkRequest.setRequirementIdFilter(requirementInfo.getId());\n vpmsProxy.setANbaOinkRequest(oinkRequest);\n }\n VpmsComputeResult result = vpmsProxy.getResults();\n updateProcessStatus(result);\n } catch (java.rmi.RemoteException re) {\n throw new NbaBaseException(NbaBaseException.VPMS_AUTOMATED_PROCESS_STATUS, re);\n } catch (Throwable t) {\n throw new NbaBaseException(NbaBaseException.VPMS_AUTOMATED_PROCESS_STATUS, t);\n } finally {\n //begin SPR3362\n try {\n if (vpmsProxy != null) {\n vpmsProxy.remove();\n }\n } catch (Throwable th) {\n LogHandler.Factory.LogError(this, NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n //end SPR3362\n }\n}", "void initializeVrf(String vrfName, Configuration vpcCfg) {\n Vrf vrf =\n vrfName.equals(DEFAULT_VRF_NAME)\n ? vpcCfg.getDefaultVrf()\n : Vrf.builder().setOwner(vpcCfg).setName(vrfName).build();\n _cidrBlockAssociations.forEach(cb -> vrf.getStaticRoutes().add(staticRouteToVpcPrefix(cb)));\n }", "public void initOldStream() {\n ContextHolder.getInstance().setContext();\n if(oldStream == null) {\n /* try {\n oldStream = ContextHolder.getInstance().getOldStreamPool().borrowObject();\n } catch (Exception e) {\n oldStreamFromPool = false;\n oldStream = new cudaStream_t();\n JCuda.cudaStreamCreate(oldStream);\n\n }*/\n\n oldStreamFromPool = false;\n oldStream = new cudaStream_t();\n JCuda.cudaStreamCreate(oldStream);\n\n // oldEvent = new cudaEvent_t();\n // JCuda.cudaEventCreate(oldEvent);\n // oldEventDestroyed = false;\n }\n\n }", "public void setServerInitialized(boolean initializedIn)\n {\n initialized = initializedIn;\n }", "private SingletonSyncBlock() {}", "public void syncPositionSilent() {\n MathUtil.setVector(this.syncAbsPos, this.liveAbsPos);\n this.syncYaw = this.liveYaw;\n this.syncPitch = this.livePitch;\n this.syncVel = this.liveVel;\n }", "public void mo133093b() throws NotYetConnectedException {\n if (this.f113323v == null) {\n this.f113323v = new PingFrame();\n }\n sendFrame(this.f113323v);\n }", "protected void init()\n {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n timestampCreated = now;\n timestampModified = now;\n createdByAgent = AppContextMgr.getInstance() == null? null : (AppContextMgr.getInstance().hasContext() ? Agent.getUserAgent() : null);\n modifiedByAgent = null;\n }", "public Intermediary()\r\n\t{\r\n\t\ttry {\r\n\t\t\treceiveSocket = new DatagramSocket(68);\r\n\t\t\tsendReceiveSocket = new DatagramSocket();\t\t\t\r\n\t\t\t\r\n\t\t} catch (SocketException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t} \r\n\t\t\r\n\t\treqID = 1;\r\n\t\tSystem.out.println(\"===== INTERMEDIATE HOST STARTED =====\\n\");\r\n\t}", "public boolean isvSync() {\n return vSync;\n }", "private void clearSeenServerToB() {\n if (rspCase_ == 19) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "protected void initialize() {\r\n Robot.driveTrain.resetRangefinder();\r\n }", "@Override\n public void teleopInit()\n {\n System.out.println(\"Initializing teleop mode...\");\n\n commonInit();\n\n\n System.out.println(\"Teleop initialization complete.\");\n }", "protected void aInit()\r\n {\r\n \t\t//state_sender = STATE_WAIT_FOR_CALL_0_FROM_ABOVE;\r\n \t\tpacketBufferAry = new Packet[LimitSeqNo];\r\n \t\twindow_base = FirstSeqNo;\r\n \t\tnext_seq_num = FirstSeqNo;\r\n \t\tSystem.out.println(\"|aInit| : window_base: \"+Integer.toString(window_base));\r\n \t\tSystem.out.println(\"|aInit| : next_seq_num: \"+Integer.toString(next_seq_num)); \t\t\r\n }", "public static void initialize() {\r\n\t\tif (!connectionByProjectIdMap.isEmpty()) {\r\n\t\t\tcloseAllMsiDb();\r\n\t\t\tconnectionByProjectIdMap.clear();\r\n\t\t}\r\n\t\tif (udsDbConnection != null) {\r\n\t\t\tinitializeUdsDb();\r\n\t\t}\r\n\t}", "protected void initialize() {\r\n\t\tsubscribeBroadcast(TerminateBroadcast.class, terminate->{\r\n\t\t\tfTimer.cancel();\r\n\t\t\tthis.terminate();\r\n\t\t});\r\n\t\ttry {\r\n\t\t\tfCount.await();\r\n\t\t} catch (InterruptedException e) {\r\n\t\t}\r\n\t\tfTimer.schedule(new TimerTask(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tif(fTick < fDuration){\r\n\t\t\t\t\tfTick++;\r\n\t\t\t\t\tSystem.out.println(\"++++++++++++++++++++++++++++++++++ \"+\"Tick \"+fTick +\" ++++++++++++++++++++++++++++++++++++++\");\r\n\t\t\t\t\tsendBroadcast((Broadcast) new TickBroadcast(fTick));\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsendBroadcast((Broadcast) new TerminateBroadcast());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}, 0, fSpeed);\r\n\t}", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "private void initEngine() {\n // This is our usual steps for joining a channel and starting a call.\n try {\n // Initialize the Agora RtcEngine.\n mRtcEngine = RtcEngine.create(getBaseContext(), getString(R.string.agora_app_id), mRtcEventHandler);\n\n // Set the channel profile to Live Broadcast and role to Broadcaster (in order to be heard by others).\n mRtcEngine.setChannelProfile(Constants.CHANNEL_PROFILE_LIVE_BROADCASTING);\n mRtcEngine.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);\n\n // Enable video capturing and rendering once at the initialization step.\n // Note: audio recording and playing is enabled by default.\n mRtcEngine.enableVideo();\n\n // Disable the local video capturer.\n mRtcEngine.enableLocalVideo(false);\n\n /*\n // This is only needed if capturing local camera, which we currently are not.\n // Please go to this page for detailed explanation\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af5f4de754e2c1f493096641c5c5c1d8f\n mRtcEngine.setVideoEncoderConfiguration(new VideoEncoderConfiguration(\n VideoEncoderConfiguration.VD_640x360,\n VideoEncoderConfiguration.FRAME_RATE.FRAME_RATE_FPS_15,\n VideoEncoderConfiguration.STANDARD_BITRATE,\n VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_FIXED_PORTRAIT));\n // This is used to set a local preview.\n // The steps setting local and remote view are very similar.\n // But note that if the local user do not have a uid or do\n // not care what the uid is, he can set his uid as ZERO.\n // The Agora server will assign one and return the uid via the event\n // handler callback function (onJoinChannelSuccess) after\n // joining the channel successfully.\n mLocalView = RtcEngine.CreateRendererView(getBaseContext());\n mLocalView.setZOrderMediaOverlay(true);\n mRemoteCameraContainer.addView(mLocalView);\n mRtcEngine.setupLocalVideo(new VideoCanvas(mLocalView, VideoCanvas.RENDER_MODE_HIDDEN, 0));\n */\n } catch (Exception e) {\n Log.e(TAG, Log.getStackTraceString(e));\n throw new RuntimeException(\"FATAL ERROR! Check rtc sdk init\\n\" + Log.getStackTraceString(e));\n }\n }", "private static void init() {\n System.setProperty(\"java.net.preferIPv4Stack\", \"true\");\r\n }", "private VerbBridge() {\r\n\t\tvB = null;\r\n\t}", "void initSafeties(){\n gyroSafety();\n tensorFlowSafety();\n\n telemetry.addLine(\"Init finalized successfully\");\n telemetry.update();\n }", "protected void initReplanners() {\n\n\t\tTravelTime travelTime = this.lookupTravelTime;\n\t\t\n\t\tOnlyTimeDependentTravelDisutilityFactory travelCostFactory = new OnlyTimeDependentTravelDisutilityFactory();\n\t\t\n\t\tLinkReplanningMap linkReplanningMap = this.withinDayControlerListener.getLinkReplanningMap();\n\t\tMobsimDataProvider mobsimDataProvider = this.withinDayControlerListener.getMobsimDataProvider();\n\t\tthis.duringLegIdentifier = new LeaveLinkIdentifierFactory(linkReplanningMap, mobsimDataProvider).createIdentifier();\n\t\tthis.selector.addIdentifier(duringLegIdentifier, pDuringLegReplanning);\n\t\tthis.duringLegReplannerFactory = new CostNavigationRouteFactory(this.scenario, this.lookupNetwork, this.withinDayControlerListener.getWithinDayEngine(), \n\t\t\t\tcostNavigationTravelTimeLogger, travelCostFactory, travelTime, this.withinDayControlerListener.getLeastCostPathCalculatorFactory());\n\t\tthis.duringLegReplannerFactory.addIdentifier(this.duringLegIdentifier);\n\t\tthis.withinDayControlerListener.getWithinDayEngine().addDuringLegReplannerFactory(this.duringLegReplannerFactory);\n\t}", "public static void init() {\r\n\t\tsetPolicy(BPF.getInstance().getConfig().routes_setting()\r\n\t\t\t\t.getQueuing_policy());\r\n\t}", "protected void checkInitialized() {\n \tcheckState(this.breeder!=null && this.threads!=null, \"Local state was not correctly set after being deserialized.\");\n }", "@Override\n public void preStart() {\n cluster.subscribe(self(), ClusterEvent.MemberUp.class);\n }", "protected void initialize() {\n \tthis.running= false;\n }", "synchronized void ensureInitialized() {\n\t\tsynchronized (syncLock) {\n\t\t\tfinal long var2 = StatCollector\n\t\t\t\t\t.getLastTranslationUpdateTimeInMilliseconds();\n\n\t\t\tif (var2 == lastTranslationUpdateTimeInMilliseconds)\n\t\t\t\treturn;\n\n\t\t\tlastTranslationUpdateTimeInMilliseconds = var2;\n\t\t\tchildren.clear();\n\t\t}\n\n\t\ttry {\n\t\t\tinitializeFromFormat(StatCollector.translateToLocal(key));\n\t\t} catch (final ChatComponentTranslationFormatException var6) {\n\t\t\tchildren.clear();\n\n\t\t\ttry {\n\t\t\t\tinitializeFromFormat(StatCollector.translateToFallback(key));\n\t\t\t} catch (final ChatComponentTranslationFormatException var5) {\n\t\t\t\tthrow var6;\n\t\t\t}\n\t\t}\n\t}", "private static void init() {\n\t\ttry {\n\t\t\tlocalAddr = InetAddress.getLocalHost();\n\t\t\tlogger.info(\"local IP:\" + localAddr.getHostAddress());\n\t\t} catch (UnknownHostException e) {\n\t\t\tlogger.info(\"try again\\n\");\n\t\t}\n\t\tif (localAddr != null) {\n\t\t\treturn;\n\t\t}\n\t\t// other way to get local IP\n\t\tEnumeration<InetAddress> localAddrs;\n\t\ttry {\n\t\t\t// modify your network interface name\n\t\t\tNetworkInterface ni = NetworkInterface.getByName(networkInterface);\n\t\t\tif (ni == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlocalAddrs = ni.getInetAddresses();\n\t\t\tif (localAddrs == null || !localAddrs.hasMoreElements()) {\n\t\t\t\tlogger.error(\"choose NetworkInterface\\n\" + getNetworkInterface());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (localAddrs.hasMoreElements()) {\n\t\t\t\tInetAddress tmp = localAddrs.nextElement();\n\t\t\t\tif (!tmp.isLoopbackAddress() && !tmp.isLinkLocalAddress() && !(tmp instanceof Inet6Address)) {\n\t\t\t\t\tlocalAddr = tmp;\n\t\t\t\t\tlogger.info(\"local IP:\" + localAddr.getHostAddress());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Failure when init ProxyUtil\", e);\n\t\t\tlogger.error(\"choose NetworkInterface\\n\" + getNetworkInterface());\n\t\t}\n\t}", "public void init() {\n // These data structures are initialized here because other\n // module's startUp() might be called before ours\n this.systemStartTime = System.currentTimeMillis();\n }", "static public PresenceServer getInstance(FSM f, LinkedList<ChangeStatus> initDB) {\r\n\t\tif (server == null)\r\n\t\t\tserver = new PresenceServer(f, initDB);\r\n\t\t\r\n\t\treturn server;\r\n\t}", "protected void initialize() {\n \tRobot.telemetry.setAutonomousStatus(\"Starting \" + commandName + \": \" + distance);\n \tRobot.drivetrain.resetEncoder();\n \t\n \tRobot.driveDistancePID.setSetpoint(distance);\n \tRobot.driveDistancePID.setRawTolerance(RobotPreferences.drivetrainTolerance());\n \tRobot.driveDistancePID.enable();\n \t\n \texpireTime = timeSinceInitialized() + (RobotPreferences.timeOut());\n }", "@Override\n public void preStart() {\n //#subscribe\n cluster.subscribe(getSelf(), ClusterEvent.initialStateAsEvents(),\n ClusterEvent.MemberEvent.class, ClusterEvent.UnreachableMember.class);\n //#subscribe\n }", "public void autonomousInit() {\n \tNetworkCommAssembly.start();\n }", "public void initialize() throws InterruptedException, UnknownHostException;", "private void initEngineAndJoinChannel() {\n // Join and start call\n initializeEngine();\n setupVideoConfig();\n setupLocalVideo();\n joinChannel();\n }", "public void EngineInit() {\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[] {};\n }\n\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n } };\n\n try {\n\n\n //取得SSL的SSLContext实例\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(null,trustAllCerts,new java.security.SecureRandom());\n sslEngine = sslContext.createSSLEngine();\n sslEngine.setUseClientMode(true);\n\n } catch(NoSuchAlgorithmException e) {\n } catch(KeyManagementException e) {\n }\n SSLSession session = sslEngine.getSession();\n int appBufferMax = session.getApplicationBufferSize();\n int netBufferMax = session.getPacketBufferSize();\n Log.i(\"123\", \"EngineInit: appBufferMax:\"+appBufferMax + \"netBufferMax:\"+netBufferMax);\n ByteBuffer mTunSSRAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer mTunSSRWrapData = ByteBuffer.allocate(netBufferMax);\n ByteBuffer peerAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer peerNetData = ByteBuffer.allocate(netBufferMax);\n }", "public void init() throws ServletException {\n\t\trunnable=new UDPReceive();\n\t}", "public void init(){\n\t\tmultiplexingClientServer = new MultiplexingClientServer(selectorCreator);\n\t}", "private void initialize()\r\n {\r\n this.workspace = null;\r\n this.currentUser = null;\r\n this.created = new Date();\r\n this.securityInfo = null;\r\n }", "public static void vu0Start() { }", "public void setSyncreplLookup( boolean syncreplLookup )\n {\n this.syncreplLookup = syncreplLookup;\n }", "private void init() {\n\t\t/* Add the DNS of your database instances here */\n\t\tdatabaseInstances[0] = \"ec2-52-0-167-69.compute-1.amazonaws.com\";\n\t\tdatabaseInstances[1] = \"ec2-52-0-247-64.compute-1.amazonaws.com\";\n\t}", "public static void initGenerateOfflineTestData(){\n dbInstance = Database.newInstance();\n initPlayer();\n initMatches();\n }", "private void syncWithServer() {\n if (!mIsActivityResumedFromSleep) {\n LogHelper\n .log(TAG, \"Activity is not resuming from sleep. So service initialization will handle xmpp login.\");\n return;\n }\n RobotCommandServiceManager.loginXmppIfRequired(getApplicationContext());\n }" ]
[ "0.54224545", "0.53833354", "0.5316355", "0.52565396", "0.5251307", "0.52152073", "0.5175884", "0.50674057", "0.5061739", "0.50227034", "0.50213045", "0.50066525", "0.49351722", "0.49214247", "0.49078634", "0.4905479", "0.49002984", "0.4878639", "0.48574308", "0.48041338", "0.48026514", "0.47986224", "0.4798453", "0.47704002", "0.4751616", "0.47420546", "0.4720913", "0.4720553", "0.47188002", "0.46970046", "0.46884966", "0.46830848", "0.46635684", "0.46552894", "0.46271598", "0.46269646", "0.46238336", "0.45971578", "0.45853502", "0.45814744", "0.4576265", "0.4573991", "0.45734686", "0.45620355", "0.45538548", "0.45382977", "0.45365158", "0.453637", "0.45358285", "0.45293477", "0.4526997", "0.45263255", "0.45255616", "0.4512607", "0.4490324", "0.44880342", "0.44855615", "0.4484586", "0.44839558", "0.44816393", "0.4478501", "0.44779807", "0.44710073", "0.4463378", "0.4457864", "0.44502485", "0.4449031", "0.44390237", "0.44349724", "0.44252053", "0.44147962", "0.4405723", "0.4402861", "0.4399615", "0.43994224", "0.43932307", "0.43894723", "0.4382112", "0.4379378", "0.43759364", "0.4374737", "0.4357835", "0.43547332", "0.43494514", "0.4347897", "0.434588", "0.4343061", "0.43392107", "0.43383", "0.43380415", "0.4336297", "0.43290937", "0.43285444", "0.43277043", "0.43264294", "0.43260303", "0.43208426", "0.43198285", "0.4313259", "0.43117595" ]
0.5564671
0
Author: DaoTQ1 Description: This function testing Paging ShowDate Movie Result: The test is pass. This function return ResponseEntity with status 200 and Date Movies List, totalPages,totalElement and current Page
@Test public void testFindAll_multiRecord() throws Exception { // Setup // Configure MovieService.findAll(...). final List<MovieDTO> movieDTOS = Arrays.asList( new MovieDTO(0, "Kiendo", "justice league", "zack snyder", 0.0f, LocalDate.of(2020, 1, 1), LocalDate.of(2020, 1, 1), "movieCompany", "version", "justice league", "nameVN", "avatar", "image"), new MovieDTO(1, "actor", "content", "director", 0.0f, LocalDate.of(2020, 1, 1), LocalDate.of(2020, 1, 1), "movieCompany", "version", "nameEng", "nameVN", "avatar", "image") ); when(mockMovieService.findAll()).thenReturn(movieDTOS); // Run the test final MockHttpServletResponse response = mockMvc.perform(get("/api/movies") .accept(MediaType.APPLICATION_JSON)) .andReturn().getResponse(); // Verify the results String jsonExpected = "[{\"cinemaRoom\":null,\"id\":0,\"actor\":\"Kiendo\",\"content\":\"justice league\",\"director\":\"zack snyder\",\"duration\":0.0,\"fromDate\":\"2020-01-01\",\"toDate\":\"2020-01-01\",\"movieCompany\":\"movieCompany\",\"version\":\"version\",\"nameEng\":\"justice league\",\"nameVN\":\"nameVN\",\"avatar\":\"avatar\",\"image\":\"image\",\"scheduleMovies\":null,\"typeMovies\":null,\"tickets\":null,\"scheduleSeats\":null},{\"cinemaRoom\":null,\"id\":1,\"actor\":\"actor\",\"content\":\"content\",\"director\":\"director\",\"duration\":0.0,\"fromDate\":\"2020-01-01\",\"toDate\":\"2020-01-01\",\"movieCompany\":\"movieCompany\",\"version\":\"version\",\"nameEng\":\"nameEng\",\"nameVN\":\"nameVN\",\"avatar\":\"avatar\",\"image\":\"image\",\"scheduleMovies\":null,\"typeMovies\":null,\"tickets\":null,\"scheduleSeats\":null}]"; assertEquals(HttpStatus.OK.value(), response.getStatus()); assertEquals(jsonExpected, response.getContentAsString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void getAllMoviesByTitle_Test() throws Exception {\n\n //Set up\n List<Movie> movies = new ArrayList<>();\n Movie movie = new Movie();\n movie.getTitle();\n movies.add(movie);\n\n //Exercise\n when(movieService.getAllMoviesByTitle(movie.getTitle())).thenReturn(movies);\n mockMvc.perform(get(baseUrl).accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk());\n// .andExpect(jsonPath(\"$\", hasSize(movies.size())));\n\n }", "@Test\n public void given_devEnvironmentAndListStudent_when_callEndPointShowStudentByPage_then_returnStatus200ListStudentWithByPageAndSize() throws Exception {\n Page<Student> studentPage = new PageImpl<>(STUDENT_LIST);\n when(studentRepo.findAll(any(PageRequest.class))).thenReturn(studentPage);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students/paging\")\n .accept(MediaType.APPLICATION_JSON)\n .param(\"page\", \"1 \")\n .param(\"size\", \"4\");\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(studentPage.getContent())))\n .andDo(MockMvcResultHandlers.print())\n .andReturn();\n\n }", "@Test\n void getAllMoviesTest() throws Exception {\n\n //Set Up\n List<Movie> movies = new ArrayList<>();\n Movie movie = new Movie();\n movies.add(movie);\n\n //Exercise\n when(movieService.getAllMovies()).thenReturn(movies);\n mockMvc.perform(get(baseUrl).accept(MediaType.APPLICATION_JSON))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\", hasSize(movies.size())));\n\n }", "private void loadNextPageOfTopRatedMovies() {\n\t\ttry {\n\t\t\tMovieApiClient movieApiClient = MovieDbApi.getRetrofitClient().create(MovieApiClient.class);\n\t\t\tCall<TopRatedMovies> call = movieApiClient.getTopRatedMovies(getString(R.string.api_key), \"en_US\", currentPage);\n\t\t\tcall.enqueue(new Callback<TopRatedMovies>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onResponse(Call<TopRatedMovies> call, Response<TopRatedMovies> response) {\n\t\t\t\t\tif (response.isSuccessful()) {\n\t\t\t\t\t\tadapter.removeLoadingFooter();\n\t\t\t\t\t\tisLoading = false;\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tTopRatedMovies topRatedMovies = response.body();\n\t\t\t\t\t\tList<TopRatedMovieResults> topRatedMovieResults = topRatedMovies.getResults();\n\t\t\t\t\t\tadapter.addAll(topRatedMovieResults);\n\n\t\t\t\t\t\tif (currentPage != TotalPages)\n\t\t\t\t\t\t\tadapter.addLoadingFooter();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tisLastPage = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Call<TopRatedMovies> call, Throwable t) {\n\t\t\t\t\tif (t instanceof SocketTimeoutException || t instanceof IOException) {\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.no_netowrk), t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.error), t);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tprogress.setVisibility(View.GONE);\n\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "@Test\n public void testGetMovieInfo() throws Exception {\n System.out.println(\"getMovieInfo\");\n JSONObject movieJSON = new JSONObject();\n int pubID = 1;\n int prodID = 2;\n String name = \"Name\";\n int age = 12;\n String desc = \"This is my description\";\n int runtime = 12;\n String genre = \"Action\";\n double price = 22.22;\n movieJSON.put(\"productID\", prodID);\n movieJSON.put(\"name\", name);\n movieJSON.put(\"price\", price);\n movieJSON.put(\"ageRating\",age);\n movieJSON.put(\"description\", desc);\n movieJSON.put(\"runtime\", runtime);\n movieJSON.put(\"genre\", genre);\n movieJSON.put(\"publisherID\", pubID);\n MovieStorePageInfoFactory instance = new MovieStorePageInfoFactory();\n StoreListing result = instance.getMovieInfo(movieJSON);\n assertEquals(prodID, result.getProductID());\n assertEquals(name, result.getName());\n }", "@Test\r\n\tpublic void test_getAllEmployeesPage2() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t.queryParam(\"page\", \"2\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"number\", equalTo(2))//\r\n\t\t\t\t.body(\"content.size()\", equalTo(10));\r\n\r\n\t}", "LiveData<PagedList<Response>> pagedList();", "@Nullable\n MoviePage getMovies();", "private void getFirsTopRatedMovies() {\n\t\ttry {\n\t\t\tMovieApiClient movieApiClient = MovieDbApi.getRetrofitClient().create(MovieApiClient.class);\n\t\t\tCall<TopRatedMovies> call = movieApiClient.getTopRatedMovies(getString(R.string.api_key), \"en_US\", currentPage);\n\t\t\tcall.enqueue(new Callback<TopRatedMovies>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onResponse(Call<TopRatedMovies> call, Response<TopRatedMovies> response) {\n\t\t\t\t\tif (response.isSuccessful()) {\n\t\t\t\t\t\tTopRatedMovies topRatedMovies = response.body();\n\t\t\t\t\t\tList<TopRatedMovieResults> topRatedMovieResults = topRatedMovies.getResults();\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tadapter.addAll(topRatedMovieResults);\n\n\t\t\t\t\t\tif (currentPage <= TotalPages)\n\t\t\t\t\t\t\tadapter.addLoadingFooter();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tisLastPage = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tlayout_nothing_to_show.setVisibility(View.VISIBLE);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Call<TopRatedMovies> call, Throwable t) {\n\t\t\t\t\tif (t instanceof SocketTimeoutException || t instanceof IOException) {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.no_netowrk), t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.error), t);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@ApiOperation(value = \"Find all movies per page\", notes = \"Find all movies per page\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Successfully retrieved list\", response = MovieDto[].class),\n })\n @CrossOrigin\n @GetMapping(value = \"/paginated\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity findPaginated(\n @PageableDefault(value = 25, page = 0, direction = Sort.Direction.ASC, sort = {\"id\"}) Pageable pageable) {\n Page<MovieDto> movies = movieService.findPaginated(pageable);\n return new ResponseEntity<>(movies, HttpStatus.OK);\n }", "@Test\n\tpublic void testPaginate() throws Exception {\n\t}", "@Test\n\tpublic void test_get_product_pagination_return_200() throws Exception {\n\t\tPrincipal mockPrincipal = Mockito.mock(Principal.class);\n\t\tMockito.when(mockPrincipal.getName()).thenReturn(\"1\");\n\t\tProductDTO expected = DummyData.getProductDto1();\n\t\tMockHttpServletRequestBuilder mockRequest = MockMvcRequestBuilders.request(HttpMethod.GET, \"/?name=Gucci&brand=gucci&color=blue&priceFrom=400&priceTo=500&sort=name,asc&page=0&size=10\")\n\t\t\t\t.principal(mockPrincipal)\n\t\t\t\t.contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON);\n\n\t\t// Setup when\n\t\twhen(productService.getProductPage(ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(Arrays.asList(expected));\n\t\t\n\t\t// Execute the POST request\n\t\tmockMvc.perform(mockRequest)\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t// Validate the response code and content type\n\t\t\t\t.andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t// Validate the returned fields\n\t\t\t\t.andExpect(jsonPath(\"$\").isArray())\n\t\t\t\t.andExpect(jsonPath(\"$[0].brand\", Is.is(expected.getBrand())))\n\t\t\t\t.andExpect(jsonPath(\"$[0].color\", Is.is(expected.getColor())))\n\t\t\t\t.andExpect(jsonPath(\"$[0].name\", Is.is(expected.getName()))).andReturn();\n\n\t\t// verify\n\t\tverify(productService).getProductPage(ArgumentMatchers.any(), ArgumentMatchers.any());\n\t}", "private static void fetchNextPage(Context context) {\n\n /* Get pages info */\n int currentPage = PageUtils.getCurrentPage(context);\n int totalPages = PageUtils.getTotalPages(context);\n\n /* Get uri of data for current show mode */\n Uri uri;\n int showMode = MoviesPreferences.getMoviesShowMode(context);\n if (showMode == MoviesPreferences.SHOW_MODE_MOST_POPULAR) {\n uri = MoviesContract.MovieEntry.CONTENT_URI_MOST_POPULAR;\n } else {\n uri = MoviesContract.MovieEntry.CONTENT_URI_TOP_RATED;\n }\n\n /* If last update time expired, set current page to 0 and clean cache table */\n boolean isDataActual = DateUtils.isMoviesListLastUpdateActual(context);\n if (!isDataActual) {\n context.getContentResolver().delete(uri, null, null);\n currentPage = 0;\n PageUtils.setCurrentPage(context, currentPage);\n }\n\n /* If all pages already loaded, we don't need to do anything */\n if (currentPage == totalPages) {\n return;\n }\n\n URL moviesListUrl = NetworkUtils.getMoviesListUrl(context, currentPage + 1);\n ContentValues[] movieContentValues = null;\n int requestedTotalPages = 1;\n\n try {\n String response = NetworkUtils.getResponseFromHttpUrl(moviesListUrl);\n movieContentValues = TmdbJsonUtils.getMovieContentValuesFromJson(response);\n requestedTotalPages = TmdbJsonUtils.getTotalPagesFromJson(response);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n if (movieContentValues == null) {\n return;\n }\n\n int insertedRows = context.getContentResolver()\n .bulkInsert(uri, movieContentValues);\n\n if (insertedRows > 0) {\n currentPage++;\n PageUtils.setCurrentPage(context, currentPage);\n\n if (currentPage == 1) {\n PageUtils.setTotalPages(context, requestedTotalPages);\n long currentTime = System.currentTimeMillis();\n DateUtils.setMoviesListLastUpdateTime(context, currentTime);\n }\n }\n\n }", "private void loadTopRatedMovies() {\n\n try {\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getTopRatedMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@Test\n public void testGetAllPageIdsOfMetsDocument() throws Exception {\n System.out.println(\"getAllPageIdsOfMetsDocument\");\n String resourceId = \"id_0017\";\n String items[] = {\"PAGE-0001\", \"PAGE-0002\"};\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/pageid\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(2)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*]\", Matchers.hasItems(items)))\n .andReturn();\n }", "@Test\n\tpublic void getAirportsTest() {\n\t\twebTestClient.get().uri(\"/airports\").accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isOk()\n\t\t\t\t.expectBody(Embedded.class)\n\t\t\t\t.consumeWith(res -> assertTrue(res.getResponseBody().getPage().getTotalPages() > 0));\n\t}", "@Test\n void createMovieTest() throws Exception {\n\n\n// String date = \"16-Aug-2016\";\n// LocalDate released = LocalDate.parse(date);\n\n List<String> actors = new ArrayList<>();\n actors.add(\"larry\");\n actors.add(\"kay\");\n actors.add(\"rob\");\n\n\n //setup\n Movie movie = new Movie(1L, \"imdbid\", \"sam\", \"lets make a movie\", \"2020\",\"2020-10-10\" );\n\n ObjectMapper mapper = new ObjectMapper();\n\n String newMapper = mapper.writeValueAsString(movie);\n\n when(movieService.createMovie(ArgumentMatchers.any(Movie.class))).thenReturn(movie);\n mockMvc.perform(post(baseUrl).content(newMapper).contentType(MediaType.APPLICATION_JSON))\n .andDo(print())\n .andExpect(status().isOk())\n .andDo(print())\n .andExpect(jsonPath(\"$.movieId\").value(movie.getMovieId()))\n .andExpect(jsonPath(\"$.imdbId\").value(movie.getImdbId()));\n\n }", "@Test\n\tpublic void getAllMovies() throws Exception {\n\t\tfinal ImmutableList<Movie> movies = ImmutableList.of(this.movie);\n\t\twhen(DAO.findAll()).thenReturn(movies);\n\n\t\tfinal Map<String, Object> paramMap = new HashMap<String, Object>();\n\t\tfinal RPCMessage req = new RPCMessage(MovieRPCServer.GET_ACTION, paramMap, null);\n\n\t\tfinal String response = this.RESOURCE.getValue(req.toString());\n\n\t\tfinal RPCMessage responseObj = RPCMessage.fromString(response);\n\t\tassertThat(responseObj).isNotNull();\n\t\tassertThat(responseObj.getObj()).isEqualTo(MovieBusterUtils.serializeMovieList(movies));\n\n\t\tverify(DAO).findAll();\n\t\tassertThat(MovieBusterUtils.movieFromStringArray(responseObj.getObj())).containsAll(movies);\n\t}", "@GET(\"list_movies.json\")\n Call<MoviesResponse> getMoviesList(\n @Query(\"genre\") String genre,\n @Query(\"sort_by\") String sortBy,\n @Query(\"page\") int page);", "void movieScreenData(MovieStoreResponse movieStoreResponse, boolean isFirstPage);", "@Test\n public void pageSizeTest() {\n // TODO: test pageSize\n }", "private void loadPopularMovies() {\n\n try {\n\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getPopularMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@Test\n public void employeeGetsAllTransactionsWithOffsetAndLimitShouldReturnOk() throws Exception{\n mvc.perform(get(\"/transactions?offset=1&limit=4\")\n .header(\"ApiKeyAuth\", \"1234-abcd-5678-efgh\"))\n .andExpect(status().isOk());\n }", "@Test\n public void testGetAllFilesOfMetsDocumentWithPageId() throws Exception {\n System.out.println(\"getAllFilesOfMetsDocument\");\n String resourceId = \"id_0015\";\n String pageId = \"PAGE-0001\";\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/files\")\n .param(\"pageId\", pageId))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(4)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*].resourceId\", Matchers.hasItem(resourceId)))\n .andReturn();\n }", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "@Test\n public void getListingsPages_1() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_1);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(10));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(5)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(10)))));\n }", "@Test\r\n public void testSearchMovie() throws MovieDbException {\r\n LOG.info(\"searchMovie\");\r\n \r\n // Try a movie with less than 1 page of results\r\n List<MovieDb> movieList = tmdb.searchMovie(\"Blade Runner\", 0, \"\", true, 0);\r\n // List<MovieDb> movieList = tmdb.searchMovie(\"Blade Runner\", \"\", true);\r\n assertTrue(\"No movies found, should be at least 1\", movieList.size() > 0);\r\n \r\n // Try a russian langugage movie\r\n movieList = tmdb.searchMovie(\"О чём говорят мужчины\", 0, \"ru\", true, 0);\r\n assertTrue(\"No 'RU' movies found, should be at least 1\", movieList.size() > 0);\r\n \r\n // Try a movie with more than 20 results\r\n movieList = tmdb.searchMovie(\"Star Wars\", 0, \"en\", false, 0);\r\n assertTrue(\"Not enough movies found, should be over 15, found \" + movieList.size(), movieList.size() >= 15);\r\n }", "public interface TMDbService {\n\n public static final String BASE_URL = \"http://api.themoviedb.org/\";\n\n //https://api.themoviedb.org/3/movie/popular?api_key=<<api_key>>&language=en-US&page=1\n @GET(\"3/movie/{category}\")\n Call<MovieResultSet> getMoviesList(@Path(\"category\") @MovieFilterDescriptor.MovieFilterDef String category, @Query(\"api_key\") String apiKey, @Query(\"language\")String language, @Query(\"page\") int page);\n\n //https://api.themoviedb.org/3/movie/328111?api_key=<<api_key>>&language=en-U\n @GET(\"3/movie/{movie_id}\")\n Call<DetailedMovie> getMovieDetail(@Path(\"movie_id\") int movieId, @Query(\"api_key\") String apiKey, @Query(\"language\")String language);\n\n //https://api.themoviedb.org/3/movie/{movie_id}/videos?api_key=<<api_key>>&language=en-US\n @GET(\"3/movie/{movie_id}/videos\")\n Call<VideoResultSet> getMovieVideos(@Path(\"movie_id\") int movieId, @Query(\"api_key\") String apiKey, @Query(\"language\")String language);\n\n //https://api.themoviedb.org/3/movie/{movie_id}/reviews?api_key=<<api_key>>&language=en-US&page=1\n @GET(\"3/movie/{movie_id}/reviews\")\n Call<ReviewResultSet> getMovieReviews(@Path(\"movie_id\") int movieId, @Query(\"api_key\") String apiKey, @Query(\"language\")String language, @Query(\"page\") int page);\n\n}", "@org.junit.Test\n public void testFilmAnnee2000() {\n WebTarget target = c.target(\"http://\"+BASE_URI.getHost()+\":\"+BASE_URI.getPort()+\"/film?annee=1940&titre=Fantasia\");\n String responseMsg = target.request().get(String.class);\n Assert.assertEquals(\"[{\\\"id\\\":\\\"tt0032455\\\",\\\"title\\\":\\\"Fantasia\\\",\\\"year\\\":1940,\\\"url\\\":\\\"http://www.omdbapi.com/?i=tt0032455&r=xml\\\"},{\\\"id\\\":\\\"tt0027606\\\",\\\"title\\\":\\\"Fantasia sottomarina\\\",\\\"year\\\":1940,\\\"url\\\":\\\"http://www.omdbapi.com/?i=tt0027606&r=xml\\\"}]\", responseMsg);\n }", "@Override\n public void onResponse(Call<MovieList> call, Response<MovieList> response) {\n MovieList movieList = response.body();\n List<MovieItem> listMovieItem = movieList.results;\n adapter.setDataFilm(new ArrayList<MovieItem>(listMovieItem));\n\n getSupportActionBar().setTitle(\"Upcoming\");\n\n //progressBar.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n }", "@Test\r\n public void testGetUpcoming() throws Exception {\r\n LOG.info(\"getUpcoming\");\r\n List<MovieDb> results = tmdb.getUpcoming(LANGUAGE_DEFAULT, 0);\r\n assertTrue(\"No upcoming movies found\", !results.isEmpty());\r\n }", "@Test\n public void test_sort_pagination() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_sort_pagination_req.xml\",\n \"PWDDIC_testSearch_sort_pagination_res.xml\");\n }", "@Test\n public void test() {\n InformationPageParam param = new InformationPageParam();\n param.setPage(2);\n param.setPageSize(10);\n\n informationServiceI.list(param);\n }", "@GetMapping(\"/recommendations\")\n public ResponseEntity<?> getMovies() {\n Movie[] result = restTemplate.getForObject(\"http://movie-service/movies\", Movie[].class);\n System.out.println(result);\n return new ResponseEntity<>(result, HttpStatus.OK);\n }", "@Test\n public void testFindMovieListAll() throws Exception {\n Client client = new JaxWsClient();\n MovieService movieService =\n (MovieService) client.getClient(new ClientInfo(MovieService.class,\n \"http://localhost:9002/Movie\", false, true));\n\n // 1. find movie list all\n List<Movie> movieList = movieService.findMovieListAll();\n\n // 2. check the movie list count\n Assert.assertEquals(2, movieList.size());\n }", "public interface PagedResult<T> {\r\n\r\n\t/*\r\n\t * Result code\r\n\t */\r\n\t\r\n\tpublic static final int RESULT_CODE_OK = 0;\r\n\t\r\n\tpublic static final int RESULT_CODE_KO = -1;\r\n\t\r\n\tpublic static final int FIRST_PAGE_INDEX = 1;\r\n\t\r\n\t/**\r\n\t * The method getElementCount() returns this value if the element count is unavalable\r\n\t */\r\n\tpublic final static Integer ELEMENT_COUNT_UNAVAILABLE = -1;\r\n\t\r\n\t/**\r\n\t * <p>The position of the first element of the current pages ( (currentPage-1) * perPage )</p> \r\n\t * \r\n\t * @return\toffset of the first element in this page\r\n\t */\r\n\tpublic Integer getOffset();\r\n\t\r\n\t/**\r\n\t * <p>Maximum number of elements in a page</p>\r\n\t * \r\n\t * @return\tmaximum number of elements in a page\r\n\t */\r\n\tpublic Integer getPerPage();\r\n\r\n\t/**\r\n\t * <p>Total number of elements in all pages</p>\r\n\t * \r\n\t * @return\ttotal number of elements in all pages\r\n\t */\r\n\tpublic Long getElementCount();\r\n\t\r\n\t/**\r\n\t * <p>Position of current page ( in the range 1 - n )</p>\r\n\t * \r\n\t * @return\tposition of current page\r\n\t */\r\n\tpublic Integer getCurrentPage();\t\r\n\t\r\n\t/**\r\n\t * <p>Total number of pages</p>\r\n\t * \r\n\t * @return\ttotal number of pages\r\n\t */\r\n\tpublic Integer getPageCount();\t\r\n\t\r\n\t/**\r\n\t * <p>Number of elements in current page</p>\r\n\t * \r\n\t * @return\tthe size of the current page\r\n\t */\r\n\tpublic Integer getCurrentPageSize();\r\n\t\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic Iterator<T> getPageElements();\r\n\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic List<T> getPageElementsList();\r\n\t\r\n\t/**\r\n\t * <p>Iterator over page numbers ( 1 - n )</p>\r\n\t * \r\n\t * @return\titerator over page numbers ( 1 - n )\r\n\t */\r\n\tpublic Iterator<Integer> getPageCountIterator();\r\n\t\r\n\t/**\r\n\t * Result code for this page\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic int getResultCode();\r\n\t\r\n\t/**\r\n\t * Additional info of this page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Map<String, Object> getInfo();\r\n\t\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isLastPage();\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFirstPage();\t\r\n\t\r\n\t\r\n\t// ******* additiona method for virtual paging *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * VIRTUAL PAGING IS A METHOD WHERE A VIRTUAL PAGE IS MAPPED INTO A BIGGER PAGE *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * Virtual search key\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String getVirtualSearchKey();\r\n\t\r\n\tpublic Integer getRealPerPage();\r\n\t\r\n\tpublic Integer getRealCurrentPage();\r\n\t\r\n\tpublic PagedResult<T> getVirtualPage( int currentPage );\r\n\t\r\n\tpublic boolean isSupportVirtualPaging();\r\n\t\r\n\t\r\n\t// ******* additiona method for full result *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * FULL RESULT IS A METHOD OF ACCESS PAGE WHERE ALL ELEMENTS ARE ACCESSIBLE ONLY ITERATING *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * <code>true</code> if the the page contains the full result\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFullResult();\r\n\r\n}", "@Test\n public void given_devEnvironmentWithParamPageAndSizeIsNegativeInteger_when_callEndPointStudentByPage_then_returnStatus400AndMessageDetail() throws Exception {\n String url = \"/students/paging\";\n String jsonResult = \"{\\n\" +\n \" \\\"message\\\": \\\"Valid param!\\\",\\n\" +\n \" \\\"status\\\": false,\\n\" +\n \" \\\"details\\\": {\\n\" +\n \" \\\"size\\\": \\\"must be greater than or equal to 0\\\",\\n\" +\n \" \\\"page\\\": \\\"must be greater than or equal to 1\\\"\\n\" +\n \" }\\n\" +\n \"}\";\n RequestBuilder request = MockMvcRequestBuilders\n .get(url)\n .accept(MediaType.APPLICATION_JSON)\n .param(\"page\", \"-1\")\n .param(\"size\", \"-1\");\n\n mockMvc.perform(request)\n .andExpect(MockMvcResultMatchers.status().isBadRequest())\n .andExpect(MockMvcResultMatchers.content().json(jsonResult, true))\n .andDo(MockMvcResultHandlers.print())\n .andReturn();\n }", "@Test\n @DisplayName(\"list returns list of anime inside page object when successful\")\n void list_ReturnsListOfAnimesInsidePageObject_WhenSuccessful() {\n Anime savedAnime = animeRepository.save(AnimeCreator.createAnimeToBeSaved());\n\n // creating a user in the in memory database\n devDojoRepository.save(USER);\n\n String expectedName = savedAnime.getName();\n\n // PageableResponse is a wrapper created for the PageImpl class\n PageableResponse<Anime> animePage = testRestTemplateRoleUser.exchange(\"/animes\", HttpMethod.GET, null, \n new ParameterizedTypeReference<PageableResponse<Anime>>(){\n }).getBody();\n\n Assertions.assertThat(animePage).isNotNull();\n \n Assertions.assertThat(animePage.toList())\n .isNotEmpty()\n .hasSize(1);\n\n Assertions.assertThat(animePage.toList().get(0).getName()).isEqualTo(expectedName);\n\n }", "@Test\r\n public void testGetTopRatedMovies() throws MovieDbException {\r\n LOG.info(\"getTopRatedMovies\");\r\n List<MovieDb> results = tmdb.getTopRatedMovies(LANGUAGE_DEFAULT, 0);\r\n assertTrue(\"No top rated movies found\", !results.isEmpty());\r\n }", "@Test\n\tpublic void testWithQueryParametersAndList() {\n\t\tgiven().accept(ContentType.JSON)\n\t\t.and().params(\"limit\",100)\n\t\t.when().get(ConfigurationReader.getProperty(\"hrapp.baseurl\")+\"/employees\")\n\t\t.then().assertThat().statusCode(200)\n\t\t.and().contentType(ContentType.JSON)\n\t\t.and().assertThat().body(\"items.employee_id\", hasSize(100));\n\t\t\n\t}", "public ResponseEntity<List<Movie>> getAllMovies() {\n List<Movie> movies = movieRepository.findAll();\n return new ResponseEntity<>(movies, HttpStatus.OK);\n }", "@Override\r\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tint pageSize = 10; // 한 페이지 당 출력될 글의 개수 지정\r\n\t\t\r\n\t\tString pageNum = request.getParameter(\"pageNum\"); // 페이지 번호를 받아온다.\r\n\t\tif(pageNum == null) {\r\n\t\t\tpageNum = \"1\"; // 페이지 번호를 눌러서 들어오지 않으면 게시판 1page를 보여준다.\r\n\t\t}\r\n\t\t\r\n\t\t// 페이지 번호를 사용해서 페이징 처리 시 연산을 수행할 것이므로\r\n\t\t// 페이지 번호값을 정수타입으로 변경\r\n\t\tint currentPage = Integer.parseInt(pageNum);\r\n\t\t\r\n\t\t// 해당 페이지에 출력되는 글들 중 가장 먼저 출력되는 글의 레코드 번호\r\n\t\tint startRow = (currentPage - 1) * pageSize + 1;\r\n\t\t// 현재 페이지 : 1\r\n\t\t// (1 - 1) * pageSize + 1 ---------> 1\r\n\t\t// 현재 페이지 : 2\r\n\t\t// (2 - 1) * pageSize + 1 ---------> 11\r\n\t\t\r\n\t\tint count = 0;\r\n\t\t// count : 총 글의 개수를 저장할 변수\r\n\t\tint number = 0;\r\n\t\t// number : 해당 페이지에 가장 먼저 출력되는 글의 번호\r\n\t\t\r\n\t\tList<ReservationInfo> reservationList = null; // 글 정보를 저장할 리스트\r\n\t\t// 해당 페이지에 출력되는 글 목록을 저장할 컬렉션\r\n\t\t\r\n\t\t// 비지니스 로직 처리를 위해 서비스 객체 생성\r\n\t\tReservationListService reservationListService = new ReservationListService();\r\n\t\t\r\n\t\tcount = reservationListService.getReservationCount(); // 총 예약의 개수를 가져온다.\r\n\t\tif(count > 0) { \r\n\t\t\t// 예약이 하나라도 있으면 리스팅할 예약 정보 얻어오기\r\n\t\t\treservationList = reservationListService.getReservationList(startRow, pageSize); // 해당 페이지의 레코드 10개씩 가져온다.\r\n\t\t}\r\n\t\t\r\n\t\t// 전체 페이지에서 현재페이지 -1을 해서 pageSize를 곱한다.\r\n\t\tnumber = count - (currentPage - 1) * pageSize;\r\n\t\t// 총 글의 개수 : 134\r\n\t\t// 현재 페이지 : 1\r\n\t\t// 134 - (1 - 1) * 10 -------> 134\r\n\t\t\r\n\t\tint startPage = 0;\r\n\t\tint pageCount = 0;\r\n\t\tint endPage = 0;\r\n\t\t\r\n\t\tif(count > 0) { // 글이 하나라도 존재하면...\r\n\t\t\tpageCount = count / pageSize + (count % pageSize == 0 ? 0 : 1);\r\n\t\t\t// 총 페이지 개수를 구함.\r\n\t\t\t// ex) 총 글의 개수 13개이면 페이지는 2개 필요..\r\n\t\r\n\t\t\tstartPage = ((currentPage -1) / pageSize) * pageSize + 1;\r\n\t\t\t// 현재 페이지 그룹의 첫번째 페이지를 구함.\r\n\t\t\t// [1][2][3][4][5][6][7]...[10] -------> 처음 페이지 그룹\r\n\t\t\t// 다음 페이지 스타트 페이지 : [11][12][13]....[20]\r\n\t\t\t\t\t\r\n\t\t\tint pageBlock = 10;\r\n\t\t\tendPage = startPage + pageBlock - 1;\r\n\t\t\t\r\n\t\t\t// 마지막 페이지 그룹인 경우..\r\n\t\t\tif(endPage > pageCount) endPage = pageCount;\r\n\t\t}\r\n\t\t\r\n\t\t// 포워딩 하기 전, 가져 온 글 공유\r\n\t\trequest.setAttribute(\"reservationList\", reservationList);\r\n\t\tPageInfo pageInfo = new PageInfo(); // 페이지에 관한 정보를 처리하는 객체 생성\r\n\t\tpageInfo.setCount(count);\r\n\t\tpageInfo.setCurrentPage(currentPage);\r\n\t\tpageInfo.setEndPage(endPage);\r\n\t\tpageInfo.setNumber(number);\r\n\t\tpageInfo.setPageCount(pageCount);\r\n\t\tpageInfo.setStartPage(startPage);\r\n\t\t\r\n\t\trequest.setAttribute(\"pageInfo\", pageInfo);\r\n\t\tActionForward forward = new ActionForward();\r\n\t\tforward.setUrl(\"/pc/reservationList.jsp\"); // list.jsp 페이지 포워딩\r\n\t\t\r\n\t\treturn forward;\r\n\t}", "@Test\n\tpublic void testQueryPage() {\n\n\t}", "@Test\n public void getListingsPages_2() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_2);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(16));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(5)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(10)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(16)))));\n }", "public interface MovieApiService {\n\n @GET(\"movie/popular\")\n Call<MoviesResponse> getPopularMovies(@Query(\"page\") int page);\n\n @GET(\"movie/top_rated\")\n Call<MoviesResponse> getTopRatedMovies(@Query(\"page\") int page);\n\n @GET(\"movie/{id}\")\n Call<MoviesResponse> getMovieDetails(@Path(\"id\") long id);\n}", "List<Movie> getAllMovies(String name, String director, String movieId);", "@Test //make sure it comes from testNG\n public void testWithQueryParameterAndList(){\n given().accept(ContentType.JSON)\n .and().params(\"limit\",100)\n .when().get(ConfigurationReader.getProperty(\"hrapp.baseresturl\")+\"/employees\")\n .then().assertThat().statusCode(200)\n .and().assertThat().contentType(ContentType.JSON)\n .and().assertThat().body(\"items.employee_id\", hasSize(100));\n }", "public void paging(ModelAndView mav);", "public List<Movie> getMovies();", "@PostMapping(\"/tlb-trade/pageList\")\n @Timed\n public ResponseEntity<ResponseResult> pageList(@RequestBody HashMap<String, Object> params) {\n log.debug(\"REST request to get a page of TlbTrades\");\n HashMap<String,Object> response = tlbTradeService.pageList(params);\n //HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/tbl-user\");\n ResponseResult json = new ResponseResult();\n HashMap<String, Object> retMap = new HashMap<>();\n Page<TlbTradeDTO> page=(Page<TlbTradeDTO>)response.get(\"page\");\n retMap.put(\"list\", page.getContent());\n retMap.put(\"total\", page.getTotalElements());\n retMap.put(\"totalPage\", page.getTotalPages());\n retMap.put(\"sumLots\", response.get(\"sumLots\"));\n retMap.put(\"sumAmount\", response.get(\"sumAmount\"));\n json.setData(retMap);\n json.setStatusCode(ResponseResult.SUCCESS_CODE);\n return new ResponseEntity<>(json, null, HttpStatus.OK);\n }", "@Test\r\n public void testGetPopularMovieList() throws MovieDbException {\r\n LOG.info(\"getPopularMovieList\");\r\n List<MovieDb> results = tmdb.getPopularMovieList(LANGUAGE_DEFAULT, 0);\r\n assertTrue(\"No popular movies found\", !results.isEmpty());\r\n }", "@Test\n public void getOneMovieByimdbId() throws Exception {\n Movie expected = new Movie();\n expected.setMovieId(1L);\n when(movieService.findMovieByImdbId(\"tt0241\")).thenReturn(expected);\n mockMvc.perform(get(baseUrl + \"/imdbId/tt0241\"))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.imdbId\").value(expected.getImdbId()))\n .andExpect(jsonPath(\"$.movieId\").value(expected.getMovieId()));\n }", "@GetMapping\n\tpublic ResponseEntity<List<Movie>> fetchAllMovies(){\n\t\treturn new ResponseEntity<List<Movie>>(movieService.listAllMovies(), HttpStatus.OK);\n\t}", "@Test\n public void test2POJOWriteWithPojoPage() {\n PojoRepository<Artifact, Long> products = client.newPojoRepository(Artifact.class, Long.class);\n // Load more than 110 objects into different collections\n products.deleteAll();\n Long[] ids = new Long[111];\n int j = 0;\n for (int i = 222; i < 333; i++) {\n ids[j] = (long) i;\n j++;\n if (i % 2 == 0) {\n products.write(this.getArtifact(i), \"even\", \"numbers\");\n }\n else {\n products.write(this.getArtifact(i), \"odd\", \"numbers\");\n }\n }\n assertEquals(\"Total number of object recods\", 111, products.count(\"numbers\"));\n assertEquals(\"Collection even count\", 56, products.count(\"even\"));\n assertEquals(\"Collection odd count\", 55, products.count(\"odd\"));\n\n System.out.println(\"Default Page length setting on docMgr :\" + products.getPageLength());\n assertEquals(\"Default setting for page length\", 50, products.getPageLength());\n products.setPageLength(100);\n assertEquals(\"explicit setting for page length\", 100, products.getPageLength());\n PojoPage<Artifact> p = products.search(1, \"numbers\");\n // test for page methods\n assertEquals(\"Number of records\", 100, p.size());\n // System.out.println(\"Page size\"+p.size());\n assertEquals(\"Starting record in first page \", 1, p.getStart());\n // System.out.println(\"Starting record in first page \"+p.getStart());\n\n assertEquals(\"Total number of estimated results:\", 111, p.getTotalSize());\n // System.out.println(\"Total number of estimated results:\"+p.getTotalSize());\n assertEquals(\"Total number of estimated pages :\", 2, p.getTotalPages());\n // System.out.println(\"Total number of estimated pages :\"+p.getTotalPages());\n System.out.println(\"is this firstPage or LastPage:\" + p.isFirstPage() + \" \" + p.isLastPage() + \"has previous page\" + p.hasPreviousPage());\n assertTrue(\"Is this First page :\", p.isFirstPage());// this is bug\n assertFalse(\"Is this Last page :\", p.isLastPage());\n assertTrue(\"Is this First page has content:\", p.hasContent());\n // Need the Issue #75 to be fixed\n assertFalse(\"Is first page has previous page ?\", p.hasPreviousPage());\n long pageNo = 1, count = 0;\n do {\n count = 0;\n p = products.search(pageNo, \"numbers\");\n if (pageNo > 1) {\n assertFalse(\"Is this first Page\", p.isFirstPage());\n assertTrue(\"Is page has previous page ?\", p.hasPreviousPage());\n }\n Iterator<Artifact> itr = p.iterator();\n while (itr.hasNext()) {\n this.validateArtifact(p.iterator().next());\n count++;\n }\n // assertEquals(\"document count\", p.size(),count);\n System.out.println(\"Is this Last page :\" + p.hasContent() + p.isLastPage() + p.getPageNumber());\n pageNo = pageNo + p.getPageSize();\n } while (pageNo < p.getTotalSize());\n assertTrue(\"Page has previous page ?\", p.hasPreviousPage());\n assertEquals(\"page size\", 11, p.size());\n assertEquals(\"document count\", 111, p.getTotalSize());\n assertTrue(\"Page has any records ?\", p.hasContent());\n\n products.deleteAll();\n // see any document exists\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i));\n }\n // see if it complains when there are no records\n }", "@Override\r\n\tpublic IndexViewModel getArticlePage(String blogID, int page,\r\n\t\t\tint pageSize, String categoryID, String tagID, int year, int month)\r\n\t\t\tthrows Exception {\n\t\tIndexViewModel model = new IndexViewModel();\r\n\t\tString basesql = XmlHelper.GetXmlSql(\"getArticlePage\");\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\t//置顶文章的sql\r\n String topsql = basesql + \" AND articleIsTop = 1 ORDER BY articleDatetime DESC ; \";\r\n sb.append(topsql);\r\n String limit = ((page - 1) * pageSize) + \",\" + pageSize;\r\n if(tagID!=null&&!tagID.equals(\"\"))\r\n {\r\n \tsb.append(basesql+XmlHelper.GetXmlSql(\"tagPage\"));\r\n }\r\n \r\n else if (year > 0 && month > 0)\r\n {\r\n \tsb.append(basesql+XmlHelper.GetXmlSql(\"monthPage\"));\r\n }\r\n \r\n else if(categoryID!=null&&!categoryID.equals(\"\"))\r\n {\r\n \tsb.append(basesql+XmlHelper.GetXmlSql(\"categoryPage\"));\r\n }\r\n else\r\n {\r\n \tsb.append(basesql+XmlHelper.GetXmlSql(\"indexPage\"));\r\n }\r\n \r\n String sql=sb.toString().replace(\"{0}\", limit);\r\n \r\n PreparedStatement ps = this.getIDbHelper().getCurrentConnection()\r\n\t\t\t\t.prepareStatement(sql);\r\n \r\n if(tagID!=null&&!tagID.equals(\"\"))\r\n {\r\n \tps.setObject(1, blogID);\r\n \tps.setObject(2, blogID);\r\n \t\tps.setObject(3, tagID);\r\n \t\tps.setObject(4, tagID);\r\n \t\tps.setObject(5, tagID);\r\n }\r\n \r\n else if (year > 0 && month > 0)\r\n {\r\n \tps.setObject(1, blogID);\r\n \tps.setObject(2, blogID);\r\n \tps.setObject(3, year);\r\n \tps.setObject(4, month);\r\n \tps.setObject(5, year);\r\n \tps.setObject(6, month);\r\n \tps.setObject(7, blogID);\r\n \tps.setObject(8, year);\r\n \tps.setObject(9, month);\r\n \tps.setObject(10, blogID);\r\n }\r\n \r\n else if(categoryID!=null&&!categoryID.equals(\"\"))\r\n {\r\n \tps.setObject(1, blogID);\r\n \tps.setObject(2, blogID);\r\n \t\tps.setObject(3, categoryID);\r\n \t\tps.setObject(4, categoryID);\r\n \t\tps.setObject(5, categoryID);\r\n }\r\n else\r\n {\r\n \tps.setObject(1, blogID);\r\n \tps.setObject(2, blogID);\r\n \t\tps.setObject(3, blogID);\r\n \t\tps.setObject(4, blogID);\r\n }\r\n \r\n ps.execute();\r\n \r\n ResultSet rs = ps.getResultSet();\r\n\r\n\t\tmodel.setTopArticles(EntityHelper.GetEntityList(ArticleModel.class, rs));\r\n\r\n\t\tint index = 1;\r\n\t\twhile (ps.getMoreResults()) {\r\n\t\t\trs = ps.getResultSet();\r\n\t\t\tif (index == 1) {\r\n\t\t\t\tmodel.setIndexArticles(EntityHelper.GetEntityList(\r\n\t\t\t\t\t\tArticleModel.class, rs));\r\n\t\t\t}\r\n\r\n\t\t\tif (index == 2) {\r\n\t\t\t\tint recordCount=0;\r\n\t\t\t\tif(rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\trecordCount=rs.getInt(1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmodel.setRecordCount(recordCount);\r\n\t\t\t}\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tthis.getIDbHelper().closeResultSet(rs);\r\n \r\n\t\treturn model;\r\n\t}", "@Test\n public void testResponseGivenAStartDate() throws HTTPException, HttpClientErrorException, HttpServerErrorException,ParseException {\n String dateValue = \"2021-10-04\";\n String startDateParamExtension = \"&start_date=\" + dateValue;\n response = restTemplate.getForObject(templateUrl + apiKey + startDateParamExtension, String.class);\n JSONParser parser = new JSONParser();\n JSONArray object = (JSONArray) parser.parse(response);\n Assert.assertEquals(\"Response should return \" + 2 + \"images information\", 2, object.size());\n }", "@Test\n public void getListingsPages_3() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_ABSENT);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(1));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_ABSENT.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n }", "@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}", "@Test\r\n\tpublic void testGetBatchComparisonAvg(){\r\n\t\tString date = \"Wed Sep 21 15:48:45 EDT 2016\";\r\n\t\tlog.debug(\"Here it is testGetBatchComparisonAvg Test\");\r\n\t\tgiven().spec(requestSpec).header(AUTH, accessToken).contentType(ContentType.JSON)\r\n\t\t.when().get(baseUrl+\"all/reports/compare/skill/(All)/training/(All)/date/\"+date).then()\r\n\t\t.assertThat().statusCode(200);\r\n\t}", "@Test(enabled=true)\npublic void getRequest() {\n\t\tString url = \"https://reqres.in/api/users?page=2\";\n\t\t\n\t\t//create an object of response class\n\t\t\n\t\t//Restassured will send get request to the url and store response in response object\n\t\tResponse response = RestAssured.get(url);\n\t\t\n\t\t//We have to put assertion in response code and response data\n\t\tAssert.assertEquals(response.getStatusCode(), 200 , \"Response code Mismatch\");\n\t\t\n\t\tint total_pages = response.jsonPath().get(\"total_pages\");\n\t\tAssert.assertEquals(total_pages, 2 , \"Total Pages value Mismatch\");\n \n}", "@RelatedIssue(issueID = \"DE-4379\", comment = \"If fails, notify DE team.\")\n @Test\n public void wam_003_verifyPaginationByNextButton() {\n wam.verifyWamIndexPageFirstColumnInOrder(1, wam.DEFAULT_WAM_INDEX_ROWS);\n wam.clickNextPaginator();\n wam.verifyWamIndexPageFirstColumnInOrder(\n wam.DEFAULT_WAM_INDEX_ROWS + 1,\n 2 * wam.DEFAULT_WAM_INDEX_ROWS\n );\n wam.clickNextPaginator();\n wam.verifyWamIndexPageFirstColumnInOrder(\n 2 * wam.DEFAULT_WAM_INDEX_ROWS + 1,\n 3 * wam.DEFAULT_WAM_INDEX_ROWS\n );\n wam.clickNextPaginator();\n wam.verifyWamIndexPageFirstColumnInOrder(\n 3 * wam.DEFAULT_WAM_INDEX_ROWS + 1,\n 4 * wam.DEFAULT_WAM_INDEX_ROWS\n );\n }", "@Test\n public void paginationTest() throws InterruptedException {\n SearchNavigation.gotoSearchResultsPage(index, \" \");\n assertTrue(\"Pagination does not Exist\", AssistanceListingSearchPage.resultsPageCount() > 1);\n System.out.println(\"Search results and Pagination exists\");\n }", "@Test\n public void GetMEthod() {\n\n RestAssured.baseURI = \"http://www.omdbapi.com/\";\n\n RequestSpecification request = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response = request\n\n .when()\n\n .get(\"/?apikey=5148dbc1&s=Harry Potter\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n int responseCode = response.getStatusCode();\n ResponseBody responseBody = response.getBody();\n ArrayList<String> list=new ArrayList<String>();\n\n //System.out.println(response.asString());\n Gson gson=new Gson();\n String json=response.asString();\n Search obj=gson.fromJson(json,Search.class);\n String imdb=\"\";\n for (Element e:obj.Search\n ) {\n String title=e.getTitle();\n if (title.equals(\"Harry Potter and the Sorcerer's Stone\")){\n imdb=e.getimdbID();\n }\n }\n System.out.println(\"imdbID:\"+imdb);\n //http://www.omdbapi.com/?apikey=5148dbc1&i=tt0241527&type=movie\n RequestSpecification request1 = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response1 = request1\n\n .when()\n\n .get(\"/?apikey=5148dbc1&i=\"+imdb+\"&type=movie\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n String json1=response1.asString();\n Movie obj1=gson.fromJson(json1,Movie.class);\n\n System.out.println(\"Title:\" +obj1.getTitle() + \" Year: \" + obj1.getYear()+ \" Released: \"+obj1.getReleased());\n\n System.out.println(\"---------------------\");\n\n\n\n\n\n }", "@GetMapping(\"/movies\")\n @Timed\n public List<Movie> getAllMovies() {\n log.debug(\"REST request to get all Movies\");\n List<Movie> movies = movieRepository.findAll();\n return movies;\n }", "@Test\n void getVotesForToday() throws Exception {\n TestUtil.print(mockMvc.perform(get(REST_URL + \"restaurantVotes\")\n .with(userHttpBasic(USER1))))\n .andExpect(status().isOk())\n .andExpect(content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))\n .andExpect(getToMatcher(RESTAURANT_TO_CURRENT_DATE));\n }", "public GetMovieChangesResponse getMovieChanges(int movieId, LocalDate endDate, Integer page, LocalDate startDate) {\n // /movie/{movie_id}/changes\n String path = String.format(\"/movie/%s/changes\", movieId);\n Map<String, Object> requestParams = new HashMap<>();\n requestParams.put(\"end_date\", endDate);\n requestParams.put(\"page\", page);\n requestParams.put(\"start_date\", startDate);\n return restClient.get(path, requestParams, new TypeReference<>() {\n\n\n }\n );\n }", "@Test\n public void queryByPage() {\n List<Album> albums = albumDao.SelectByPage(1, 5);\n for (Album album : albums) {\n System.out.println(album);\n }\n }", "@Test\n\t \n\t public void getApi() {\n\t\t \n\t\t Response getIt=get(\"https://reqres.in/api/users?page=2\");\n\t\t getIt.prettyPrint();\n\t\t System.out.println(getIt.getStatusCode());\n\t\t System.out.println(getIt.getTime());\n\t\t \n\t\t //to validate\n\t\t int validGstatus=getIt.getStatusCode();\n\t\t Assert.assertEquals(validGstatus,200);\n\t\t \n\t }", "@Test \r\n\tpublic void testOSFNodeApiTransformWithPagination() throws Exception{\r\n\t\tString[] args = {\"osf_node\",\"-src\", \"api\",\"-n\",\"12\", \"-o\", \"testnodepagedosf/\"};\r\n\t\tRMapTransformerCLI.main(args);\r\n\t\t//check output files\r\n\t\tInteger numfiles = new File(\"testnodepagedosf\").list().length;\r\n\t\t//assertTrue(numfiles.equals(2)); //one root Public Project, one partial\r\n\t\tassertTrue(numfiles>0);\r\n\t}", "private List<SearchMovieListItem> preparePage(List<MovieDto> moviesInPage) {\n List<SearchMovieListItem> page = new ArrayList<>();\n ImagesConfigurationDto imagesConfiguration = getContext().getRemoteConfiguration().getImagesConfiguration();\n for (MovieDto movie : moviesInPage) {\n String posterUrl = imagesConfiguration.getPosterImageBaseUrl()\n + imagesConfiguration.getDefaultPosterSize() + movie.getPosterPath();\n SearchMovieListItem item = new SearchMovieListItem(movie, posterUrl);\n page.add(item);\n }\n return page;\n }", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@GetMapping(\"/produtos\")\n @Timed\n public ResponseEntity<List<Produto>> getAllProdutos(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Produtos\");\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (!PrivilegioService.podeVer(cargoRepository, ENTITY_NAME)) {\n log.error(\"TENTATIVA DE VISUALIZAR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME);\n return null;\n }\n\n//////////////////////////////////REQUER PRIVILEGIOS\n Page<Produto> page = produtoRepository.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/produtos\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "@GET(\"movie/top_rated\")\n Call<MovieResponse>getTopRatedMovies(@Query(\"api_key\") String apiKey);", "public interface DemandSearchMapper {\n /**\n * 微信搜索\n */\n @Select(\"select count(1) from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \")\n int getWapSearchDemandCount(@Param(\"content\")String content);\n\n @Select(\"<script>\" +\n \" select * from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \" +\n \" order by id desc \" +\n \" <choose><when test='anchor==null or anchor==\\\"\\\"'>limit #{pageQuery.pagesize} offset #{pageQuery.indexNum}</when><otherwise>limit ${pageQuery.rowNum} offset 0</otherwise></choose>\" +\n \"</script>\")\n List<Demand> getWapSearchDemandList(@Param(\"content\")String content,\n @Param(\"pageQuery\") PageQueryParam param,\n @Param(\"anchor\") String scrtop);\n\n public default PageQueryParam getWapSearchDemandTotalList(String content, PageQueryParam param, String scrtop) {\n content = Where.$like$(content);\n int totalCount = getWapSearchDemandCount(content);\n List<Demand> demandList = getWapSearchDemandList(content, param, scrtop);\n int totalPage = totalCount / param.getPagesize();\n totalPage = totalCount % param.getPagesize() == 0 ? totalPage : totalPage + 1;\n param.setTotalCount(totalCount);\n param.setTotalPage(totalPage);\n param.setList(demandList);\n //如果有锚点,加载完数据,告诉前台当前是第几页\n if (org.apache.commons.lang3.StringUtils.isNotBlank(scrtop)) {\n param.setPage(param.getIndexNum() / param.getPagesize());\n }\n return param;\n }\n\n}", "public void getNewsFromIDataAPIByPageToken2(String pageToken,String catId) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString url = \"http://api01.bitspaceman.com:8000/news/toutiao?apikey=np5SpQ7QGzm7HgvX8Aw8APA5NDq6Bpj5m4eo4hX5qJFLm0G0Oqt31xJzjIEeJFTv&catid=\"+catId+\"&pageToken=\"+pageToken;\r\n\t\t\t\t\tString json = IDataAPI.getRequestFromUrl(url);\r\n\t\t\t\t\tlog.info(json);\r\n\t\t\t\t\tGson gson=new Gson();\r\n\t\t\t\t\t\r\n\t\t\t\t\tToutiaoResponseDto toutiaoResponseDto=gson.fromJson(json, ToutiaoResponseDto.class);\r\n\t\t\t\t\tList<NewsInfo> newsInfoArray=new ArrayList<NewsInfo>();\r\n\t\t\t\t\tfor(ToutiaoDataResponseDto toutiao :toutiaoResponseDto.getData()) {\r\n\t\t\t\t\t\tnewsInfoArray.add(new NewsInfo(toutiao,catId));\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\tList<NewsInfo> iter=(List<NewsInfo>) newsInfoRepository.saveAll(newsInfoArray);\r\n\t\t\t\t\t}catch(Exception e) {\r\n\t\t\t\t\t\tlog.info(e.getMessage());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(\"true\".equals(toutiaoResponseDto.getHasNext())) {\r\n\t\t\t\t\t\tgetNewsFromIDataAPIByPageToken(toutiaoResponseDto.getPageToken(),catId);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t}", "@Override\n public MovieListing getMovies() {\n // inventory.whatsAvailable()\n // inventory.whatIsUnavailable();\n return movieRepo.getMovies();\n }", "@Test\r\n\tpublic void test_getAllEmployeesPage_notfound() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t.queryParam(\"page\", \"6\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(404);\r\n\t}", "public interface Api {\n @GET(\"ikds.do\")\n Call<List<Movie>> getMovies(@Query(\"since\") int since, @Query(\"pagesize\") int pagesize);\n}", "@Test\r\n\tpublic void test_getAllEmployees() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t// .pathParam(\"page\", \"0\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"number\", equalTo(0))//\r\n\t\t\t\t.body(\"content.size()\", equalTo(10));\r\n\r\n\t}", "@GetMapping(\"/getShows/{movieId}\")\r\n\tResponseEntity<List<Show>> findShows(@PathVariable(\"movieId\") int movieId){\r\n\t\tList<Show> selectedShows = new ArrayList<Show>();\r\n\t\tString movieName=\"\";\r\n\t\tList<Movie> selectedMovies = getMovies();\r\n\t\tfor(Movie movie:selectedMovies){\r\n\t\t\tif(movie.getMovieId()==movieId){\r\n\t\t\t\tmovieName=movie.getMovieName();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tList<Show> showList = getShows();\r\n\t\tfor (Show show : showList) {\r\n\t\t\tif(show.getMovieName().equals(movieName)) {\r\n\t\t\t\tselectedShows.add(show);\r\n\t\t\t}\r\n\t\t}\r\n\t\tResponseEntity<List<Show>> response = new ResponseEntity<List<Show>>(selectedShows,HttpStatus.OK);\r\n\t\treturn response;\r\n\t}", "@Test\n public void givenPersons_whenGetPersons_thenReturnJsonArray() throws Exception{\n List<Person> list = this.returnListPerson();\n Page<Person> personPage = new PageImpl<Person>(list);\n\n when(personRepository.findAll(ArgumentMatchers.isA(Pageable.class))).thenReturn(personPage);\n\n mvc.perform(get(\"/persons\")\n .accept(MediaType.APPLICATION_JSON))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.content\", hasSize(2)))\n .andExpect(jsonPath(\"$.content[0].name\").value(list.get(0).getName()))\n .andExpect(jsonPath(\"$.content[0].id\").value(list.get(0).getId()))\n .andExpect(jsonPath(\"$.content[0].profile_path\").value(list.get(0).getProfile_path()))\n .andExpect(jsonPath(\"$.content[0].place_of_birth\").value(list.get(0).getPlace_of_birth()))\n .andExpect(jsonPath(\"$.content[0].gender\").value(list.get(0).getGender().toString()));\n\n }", "@GET\n public List<JsonMovie> getAllWithParams(@Context HttpServletRequest request, \n\t\t\t@QueryParam(\"from\") int from, @QueryParam(\"limit\") int limit,\n\t\t\t@QueryParam(\"orderBy\") String orderBy, @QueryParam(\"orderDir\") String orderDir) {\n\t\tList<Movie> movies = movieDao.getMoviesForList(from, limit, orderBy, orderDir);\n \tLOGGER.info(\"find \"+movies.size()+\" movies in the database\");\n \tArrayList<JsonMovie> lm = new ArrayList<JsonMovie>();\n\t\tString artistName = \"\";\n\t\tInteger artistId = 0;\n \tfor (Movie m : movies) {\n\t\t\tif (!m.getMovieartists().isEmpty()) {\n\t\t\t\tartistName = m.getMovieartists().get(0).getArtistBean()\n\t\t\t\t\t\t.getName()\n\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t+ m.getMovieartists().get(0).getArtistBean()\n\t\t\t\t\t\t\t\t.getFirstname();\n\t\t\t\tartistId = m.getMovieartists().get(0).getArtistBean().getId();\n\t\t\t} else {\n\t\t\t\tartistName = \"\";\n\t\t\t\tartistId = 0;\n\t\t\t}\n\t\t\tUsermovie mym = usermovieDAO.getUsermovie(m.getId(), request.getHeader(Constants.HTTP_HEADER_TOKEN));\n\t\t\tlm.add(new JsonMovie(m.getId(), m.getTitle(), m.getDescription(),\n\t\t\t\t\tm.getReleasedate(), m.getCover(), m.getSupportBean().getName(), m.getSupportBean().getId(),\n\t\t\t\t\tm.getStorygenre().getName(), m.getStorygenre().getId(), m.getLength(), m.getIscollector(), \n\t\t\t\t\tartistName, artistId, \"\", null, \"\", null, new ArrayList<JsonLang>(), new ArrayList<JsonLang>(),\n\t\t\t\t\t(mym!=null)?true:false, (mym!=null)?mym.getRating():0));\n \t}\n \treturn lm;\n }", "public static void testQuery() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"VchicleServlet.json?action=pagequery\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"pageSize\", \"2\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"currPage\", \"3\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t}", "@GetMapping(\"/movies\")\n public List<Movie> getAllMovies() {\n movies = new ArrayList<Movie>();\n movies.add(new Movie(1,\"The Godfather\",\"Crime/Thriller\"));\n movies.add(new Movie(2,\"Star Wars\",\"Sci-Fi\"));\n movies.add(new Movie(3,\"The Mask\",\"Comedy\"));\n movies.add(new Movie(4,\"Die Hard\",\"Action\"));\n movies.add(new Movie(5,\"The Exorcist\",\"Horror\"));\n movies.add(new Movie(6,\"The Silence of the Lambs\",\"Drama\"));\n\n return movies;\n }", "public void getWantedPageFromPagination()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n List<WebElement> pageOrderList = pageFactory.searchPagePaginationList;\r\n WebElement wantedPageOrder = pageOrderList.get(1);\r\n clickElement(wantedPageOrder, Constant.explicitTime);\r\n }", "@Override\n public void onResponse(Call<MovieList> call, Response<MovieList> response) {\n MovieList movieList = response.body();\n List<MovieItem> listMovieItem = movieList.results;\n adapter.setDataFilm(new ArrayList<MovieItem>(listMovieItem));\n\n getSupportActionBar().setTitle(\"Now Playing\");\n\n //progressBar.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n }", "public static String paginate(HttpServletRequest request, HttpServletResponse response) {\n List page = FastList.newInstance();\n Paginator paginator = PaginatorFactory.getPaginator(request);\n String action = UtilCommon.getParameter(request, \"action\");\n String pageNumberString = UtilCommon.getParameter(request, \"pageNumber\");\n \n if (paginator != null) {\n try {\n if (pageNumberString != null) {\n try {\n long pageNumber = Long.parseLong(pageNumberString);\n page = paginator.getPageNumber(pageNumber);\n }\n catch (NumberFormatException e) {\n Debug.logWarning(\"Failed to get page numer [\" + pageNumberString + \"] to to format error: \" + e.getMessage(), module);\n page = paginator.getCurrentPage();\n }\n }\n else if (action == null || \"getCurrentPage\".equals(action)) {\n page = paginator.getCurrentPage();\n }\n else if (\"getNextPage\".equals(action)) {\n page = paginator.getNextPage();\n }\n else if (\"getPreviousPage\".equals(action)) {\n page = paginator.getPreviousPage();\n }\n else if (\"getFirstPage\".equals(action)) {\n page = paginator.getFirstPage();\n }\n else if (\"getLastPage\".equals(action)) {\n page = paginator.getLastPage();\n }\n else {\n Debug.logWarning(\"Paginate action [\" + action + \"] not supported.\", module);\n page = paginator.getCurrentPage();\n }\n }\n catch (ListBuilderException e) {\n return doListBuilderExceptionResponse(request, response, paginator, e);\n }\n }\n return doPaginationResponse(request, response, paginator, page);\n }", "@Test\n public void testDAM30504001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n TodoListPage todoListPage = dam3IndexPage.dam30504001Click();\n\n // Assert the todo record count from DB table\n // These count are computed from the list returned and not fetched using query.\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // by default the radio button for incomplete todos is selected for retrievingits count.\n todoListPage = todoListPage.clickCountByStatusBtn();\n\n String todoCnt = todoListPage.getTodoCountwithStatus();\n\n // This count is fetched from db using count query : status in-complete.\n assertThat(todoCnt, equalTo(\"InComplete : 7\"));\n\n // Status selected as complete now\n todoListPage.selectCompleteStatRadio();\n\n todoListPage = todoListPage.clickCountByStatusBtn();\n todoCnt = todoListPage.getTodoCountwithStatus();\n\n // This count is fetched from db using count query : status complete.\n assertThat(todoCnt, equalTo(\"Completed : 3\"));\n\n }", "@Test\n\tpublic void shouldGetCustomersByCustomerListIdWithPaging()\n\t{\n\t\tfinal Response getWithPaging = getWsSecuredRequestBuilder(OAUTH_USERNAME, OAUTH_PASSWORD).path(CUSTOMER_SEARCH_URI)\n\t\t\t\t.queryParam(CUSTOMER_LIST_PARAM, TEMP_CUSTOMER_LIST_ID).queryParam(BASE_SITE_PARAM, BASE_SITE_ID)\n\t\t\t\t.queryParam(PAGE_SIZE, \"1\").queryParam(CURRENT_PAGE, \"0\").build().accept(MediaType.APPLICATION_JSON).get();\n\t\tgetWithPaging.bufferEntity();\n\t\tassertResponse(Status.OK, getWithPaging);\n\t\tfinal CustomerSearchPageWsDTO entity = getWithPaging.readEntity(CustomerSearchPageWsDTO.class);\n\t\tfinal List<String> uids = entity.getEntries().stream().map(UserWsDTO::getUid).collect(Collectors.toList());\n\t\tassertThat(uids.contains(\"user2\")).isTrue();\n\t\tassertThat(entity.getPagination().getPageSize() == NumberUtils.INTEGER_ONE).isTrue();\n\t\tassertThat(entity.getPagination().getSort().equalsIgnoreCase(\"byOrderDateDesc\")).isTrue();\n\t}", "@Test\n public void shouldReturnUserCabinetViewAndSessionWithExpectedAttributes_whenPassRequestWithNumberPage() throws Exception\n {\n Principal principal = Mockito.mock(Principal.class);\n Mockito.when(principal.getName()).thenReturn(\"login\");\n List<Order> expectedResult = Collections.singletonList(new Order());\n MockHttpSession session = new MockHttpSession();\n session.setAttribute(\"usersOrders\", new PagedListHolder<>());\n Mockito.when(userServiceMock.getUsersOrders(\"login\"))\n .thenReturn(expectedResult);\n mockMvc.perform(MockMvcRequestBuilders.get(\"/user/1\").session(session).principal(principal))\n .andExpect(MockMvcResultMatchers.view().name(\"user_cabinet\"));\n Assert.assertNotNull(session.getAttribute(\"usersOrders\"));\n }", "public interface FilmService {\n @Headers(\"Cache-Control:public ,max-age=3600\")\n @GET(\"v2/movie/search\")\n Call<FilmRoot> getFilm(@Query(\"tag\") String tag, @Query(\"start\") String start,@Query(\"count\") String count);\n\n\n @GET(\"v2/movie/subject/{id}\")\n Call<MainFilmRoot> getFilmItem(@Path(\"id\") String id);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.activity_main, container, false);\n\n recyclerView = view.findViewById(R.id.recycler_view);\n progressBar = view.findViewById(R.id.pb_movies_list);\n\n moviesPaginationAdapter = new MoviesPaginationAdapter(getContext());\n\n linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);\n recyclerView.setLayoutManager(linearLayoutManager);\n\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n\n recyclerView.setAdapter(moviesPaginationAdapter);\n //checkConnection();\n recyclerView.addOnScrollListener(new PaginationScrollListener(linearLayoutManager) {\n @Override\n protected void loadMoreItems() {\n isLoading = true;\n currentPage += 1;\n\n loadNextPage();\n }\n @Override\n public int getTotalPageCount() {\n return TOTAL_PAGES;\n }\n\n @Override\n public boolean isLastPage() {\n return isLastPage;\n }\n\n @Override\n public boolean isLoading() {\n return isLoading;\n }\n });\n\n // initialize service amd load data\n movieService = ApiClient.getClient().create(ApiInterface.class);\n loadFirstPage();\n\n return view;\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n Pair<String, List<MovieDto>> resolvedMovieList = defineMovies(req);\n\n //info\n String infoAboutResolveMoviesList = resolvedMovieList.getKey();\n //movies we want\n List<MovieDto> movieDtos = resolvedMovieList.getValue();\n //movieOutput is container for use in jsp\n List<MovieOutput> movieOutputs = new ArrayList<>(movieDtos.size());\n\n for (MovieDto movie : movieDtos) {\n\n //get actor's ids only\n Set<ActorDto> actors = movie.getActors();\n //with fields' value\n Set<ActorDto> fullActors = new LinkedHashSet<>();\n //get info\n for (ActorDto actorDto : actors) {\n Long idActor = actorDto.getId();\n ActorDto actorWithData = actorService.getById(idActor);\n fullActors.add(actorWithData);\n }\n\n //define comments\n List<CommentDto> comments = movie.getComments();\n List<Long> commentsIds = new LinkedList<>();\n comments.forEach(commentDto -> commentsIds.add(commentDto.getId()));\n String codeForShowComments = util.defineHtmlCodeForCommentsView(commentsIds);\n\n MovieOutput movieOutput = new MovieOutput();\n movieOutput.setData(movie);\n movieOutput.setActors(fullActors);\n movieOutput.setHtmlCodeComments(codeForShowComments);\n\n movieOutputs.add(movieOutput);\n }\n\n String path = \"jsp/movie.jsp\";\n req.setAttribute(\"infoAboutMoviesList\",infoAboutResolveMoviesList);\n req.setAttribute(\"movies\", movieOutputs);\n req.getRequestDispatcher(path).forward(req, resp);\n }", "@Override\n protected String doInBackground(String... params) {\n String sortBy = params[0];\n String pageNo = params[1];\n String urlString = \"https://api.themoviedb.org/3/discover/movie?api_key=\" + API_KEY + \"&language=en-US&sort_by=\" + sortBy + \"&include_adult=false&include_video=false&page=\" + pageNo;\n\n HttpURLConnection urlConnection = null;\n InputStream in;\n String data;\n\n try {\n // Establish a connection with themoviedb.org.\n URL url = new URL(urlString);\n urlConnection = (HttpURLConnection)url.openConnection();\n urlConnection.connect();\n\n // Reads input stream in bytes and decodes into characters.\n in = new BufferedInputStream(urlConnection.getInputStream());\n data = readStream(in);\n\n // Result is the returned value, which is onPostExecute's parameter.\n return data;\n } catch (MalformedURLException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } finally {\n // Closes the connection.\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n\n loadingMore = false;\n }\n }", "public interface MovieInfoService extends IService<MovieInfoEntity> {\n Response insertMovieInfo(MovieInfoEntity movieInfoEntity);\n\n Response getAllInfoList();\n\n\n /**\n * 查看每周收入,整体和每部电影\n * @return\n */\n Response getThisWeekMoney();\n\n\n /**\n * 根据关键字检索电影\n * @param keyWord\n * @return\n */\n Response getMovieByKeyWord(String keyWord);\n\n /**\n * 根据日期检索电影\n * @param date\n * @return\n */\n Response getMovieByDate(String date);\n\n\n /**\n * 查看指定时间段内段电影\n * @param startTime\n * @param endTime\n * @return\n */\n Response getMovieByTime(String startTime,String endTime);\n\n\n /**\n * 根据id查询电影\n * @param id\n * @return\n */\n Response getMovieById(long id);\n\n\n\n\n /**\n * 更新电影信息\n * @return\n */\n Response updateMovieById(MovieInfoEntity movieInfoEntity);\n\n\n /**\n * 删除电影\n * @return\n */\n Response deleteMovieById(long id);\n}", "@Test\n public void testDAM31303001() {\n\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam31301001Click();\n\n TodoDetailsPage todoDetailsPage = todoListPage.displayTodoDetail(\n \"0000000010\");\n\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 10\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000010\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA5\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/29\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // completion date is of timeStamp in DB whereas in entity its of type or.joda.time.DateTime\n // type handler converts appropriately timeStamp to DateTime\n assertThat(todoDetailsPage.getTodoCompleteDate(), equalTo(\n \"2016/12/30\"));\n }", "@GET(\"top_rated\")\n Call<MoviesClass> listTopRated(@Query(\"api_key\") String api_key);", "private static void listMovies(){\n\n\t\ttry{\n\t\t\tURL url = new URL(\"http://localhost:8080/listMovies\");\n\t\t\tString rawJSONList = getHTTPResponse(url);\n\t\t\tJSONArray JSONList = new JSONArray(rawJSONList);\n\t\t\tStringBuilder list = new StringBuilder();\n\t\t\t\n\t\t\tfor (int i=0 ; i<JSONList.length() ; i++){\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tJSONObject temp = JSONList.getJSONObject(i);\n\t\t\t\tsb.append(temp.getInt(\"id\"));\n\t\t\t\tsb.append(\". \");\n\t\t\t\tsb.append(temp.getString(\"name\"));\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\n\t\t\t\tlist.append(sb.toString());\n\t\t\t}\n\t\t\tSystem.out.println(list.toString());\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t}", "public void getNewsFromIDataAPIByPageToken(String pageToken,String catId) {\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString url = \"http://api01.bitspaceman.com:8000/news/toutiao?apikey=np5SpQ7QGzm7HgvX8Aw8APA5NDq6Bpj5m4eo4hX5qJFLm0G0Oqt31xJzjIEeJFTv&catid=\"+catId+\"&pageToken=\"+pageToken;\r\n\t\t\t\t\t\tString json = IDataAPI.getRequestFromUrl(url);\r\n\t\t\t\t\t\tlog.info(json);\r\n\t\t\t\t\t\tGson gson=new Gson();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tToutiaoResponseDto toutiaoResponseDto=gson.fromJson(json, ToutiaoResponseDto.class);\r\n\t\t\t\t\t\tList<NewsInfo> newsInfoArray=new ArrayList<NewsInfo>();\r\n\t\t\t\t\t\tfor(ToutiaoDataResponseDto toutiao :toutiaoResponseDto.getData()) {\r\n\t\t\t\t\t\t\tnewsInfoArray.add(new NewsInfo(toutiao,catId));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tList<NewsInfo> iter=(List<NewsInfo>) newsInfoRepository.saveAll(newsInfoArray);\r\n\t\t\t\t\t\t}catch(Exception e) {\r\n\t\t\t\t\t\t\tlog.info(e.getMessage());\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(\"true\".equals(toutiaoResponseDto.getHasNext())) {\r\n\t\t\t\t\t\t\tgetNewsFromIDataAPIByPageToken2(toutiaoResponseDto.getPageToken(),catId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//不能批量添加还需要判断视频重复问题\r\n\t\t\t\t\t\t//videosInfoRepository.saveAll(videosInfoArray);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t}", "public void testGetWithLimit() throws Exception\n {\n Log.log(\"TEST\", \"[GetFileTypeListActionTest.testGetWithLimit] Enter \");\n\n// for (int i=0; i<LIST_COUNT; i++)\n// createTestData(_FILE_TYPE+i, _DESCRIPTION+i);\n\n Long[] uIDs = (Long[])findFileTypesKeys(_FILTER).toArray(new Long[_LIST_COUNT]);\n\n _event = createTestEvent(_FILTER, _MAX_PAGE_ENTRIES);\n try\n {\n _response = performEvent(_event);\n }\n catch (Exception ex)\n {\n Log.err(\"TEST\", \"[GetUserAccountListActionTeset.testGetWithLimit] Error Exit \", ex);\n assertTrue(\"Event Exception\", false);\n }\n\n //check response\n assertNotNull(\"response is null\", _response);\n assertTrue(\"event is not successful\", _response.isEventSuccessful());\n assertEquals(\"Msg code incorrect\", IErrorCode.NO_ERROR, _response.getMessageCode());\n\n Object returnData = _response.getReturnData();\n assertNotNull(\"responsedata is null\", returnData);\n assertTrue(\"response data type incorrect\", returnData instanceof EntityListResponseData);\n\n EntityListResponseData listData = (EntityListResponseData)returnData;\n\n assertEquals(\"Rows remaining is incorrect\", _LIST_COUNT-_MAX_PAGE_ENTRIES, listData.getRowsRemaining());\n assertEquals(\"start row is incorrect\", 0, listData.getStartRow());\n assertNotNull(\"List ID is null\", listData.getListID());\n\n Collection entityList = listData.getEntityList();\n assertNotNull(\"Entity list is null\", entityList);\n assertEquals(\"Entity list count is incorrect\", _MAX_PAGE_ENTRIES, entityList.size());\n\n Object[] entityObjs = entityList.toArray();\n for (int i=0; i<_MAX_PAGE_ENTRIES; i++ )\n {\n assertNotNull(\"Entity is null\", entityObjs[i]);\n assertTrue(\"Entity is not Map\", entityObjs[i] instanceof Map);\n\n Map fileTypeMap = (Map)entityObjs[i];\n\n assertEquals(\"UID is incorrect\", uIDs[i], fileTypeMap.get(IFileType.UID));\n assertEquals(\"FileType incorrect\", _FILE_TYPE+i, fileTypeMap.get(IFileType.FILE_TYPE));\n assertEquals(\"Description incorrect\", _DESCRIPTION+i, fileTypeMap.get(IFileType.DESCRIPTION));\n assertEquals(\"ProgramName is incorrect\", _PROGRAM_NAME+i, fileTypeMap.get(IFileType.PROGRAM_NAME));\n assertEquals(\"ProgramPath is incorrect\", _PROGRAM_PATH+i, fileTypeMap.get(IFileType.PROGRAM_PATH));\n assertEquals(\"Parameters is incorrect\", _PARAMETERS+i, fileTypeMap.get(IFileType.PARAMETERS));\n assertEquals(\"WorkingDirectory is incorrect\", _WORKING_DIR+i, fileTypeMap.get(IFileType.WORKING_DIR));\n }\n Log.log(\"TEST\", \"[GetFileTypeListActionTest.testGetWithLimit] Exit \");\n }" ]
[ "0.6423744", "0.63635504", "0.6256357", "0.62498415", "0.62265176", "0.621253", "0.6076213", "0.6027989", "0.60205376", "0.5981488", "0.59711915", "0.5939453", "0.5894045", "0.5887469", "0.587942", "0.585426", "0.58125997", "0.5763112", "0.5748663", "0.5716427", "0.57120854", "0.56964606", "0.5682274", "0.56601316", "0.56562096", "0.56414104", "0.56357694", "0.56350887", "0.562641", "0.5614313", "0.56046134", "0.55944246", "0.55921584", "0.55920357", "0.55691797", "0.5559723", "0.5557179", "0.55549026", "0.5552355", "0.5524831", "0.5509579", "0.548595", "0.5475199", "0.5469956", "0.54682684", "0.5468144", "0.54581815", "0.54525685", "0.5448555", "0.5440384", "0.5439872", "0.5436688", "0.5416959", "0.54143643", "0.541204", "0.54021853", "0.540216", "0.54009706", "0.53970313", "0.5389217", "0.5386097", "0.5384244", "0.53824455", "0.5374178", "0.5359421", "0.53570765", "0.53560835", "0.5342104", "0.53372294", "0.53362745", "0.5335555", "0.5329617", "0.532426", "0.5315451", "0.53139997", "0.53090185", "0.5288462", "0.5288328", "0.52873427", "0.52865607", "0.5285148", "0.5267094", "0.52657807", "0.5265094", "0.5253107", "0.52461404", "0.5236051", "0.5231454", "0.5228158", "0.522117", "0.52144784", "0.5210363", "0.52100873", "0.52070665", "0.52067435", "0.5198923", "0.51941496", "0.51926893", "0.51905763", "0.51861084" ]
0.54566073
47
TODO Autogenerated method stub
@Override public int af() { System.out.println("ddddd"); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public int af() { System.out.println("dsdfdghbd"); return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private void info3(int i) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Invoked when an action occurs.
@Override public void actionPerformed(ActionEvent e) { if (e.getActionCommand() == "button1"){ JOptionPane.showMessageDialog(null,"Button1 hit"); }else { JOptionPane.showMessageDialog(null,"Button2 hit"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "public abstract void onAction();", "public void action() {\n action.action();\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}", "public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\n }", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }", "@Override\n\tpublic void HandleEvent(int action) {\n\t\tsetActiveAction(action);\n\t\tSystem.out.println(\"action is :\" + action);\n\t\t\n\t}", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "@Override\n\tpublic void action() {\n\n\t}", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);", "public void performAction();", "void actionCompleted(ActionLookupData actionLookupData);", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "public void doAction(){}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "void actionChanged( final ActionAdapter action );", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "@Override\n public void action() {\n System.out.println(\"do some thing...\");\n }", "@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.out.print(\"Action: \" + e.getActionCommand() + \"\\n\");\n\t\t\t\t}", "@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "public void executeAction( String actionInfo );", "abstract public void performAction();", "public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}", "@Override\r\n\tpublic void performAction(Event e) {\n\r\n\t}", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "public void action() {\n }", "@Override\n\tpublic void newAction() {\n\t\t\n\t}", "@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "public void doInitialAction(){}", "@Override\n public void actionOccured(Perspective perspective, ActionDescription action) {\n\n }", "void handleActionEvent(ActionEvent event);", "public void actionPerformed(ActionEvent e) {\n\t\t\t\taddAction();\n\t\t\t}", "public void processAction(CIDAction action);", "public void postActionEvent() {\n fireActionPerformed();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tSystem.out.println(\"Got an M\");\n\t}", "public void notifyNewAction(Action action){\n\t\tnotifyObservers(action);\n\t}", "protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }", "@Override\n public void onPressed(Action action) {\n // pass the message on\n notifyOnPress(action);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void handleEventAgentAction(Agent agent, Action action) {\n\t\t// TODO: verify the agent is \"authorised\" to execute this action\n\t\tengine.submitAction(action);\n\t\t\n\t\t// TODO: handle response to Action, ie. callback... direct it back to the Agent.\n\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }", "@Override\n protected void doAct() {\n }", "public void run(IAction action) {\n\t\tMessageDialog.openInformation(window.getShell(), \"AccTrace\",\n\t\t\t\t\"Hello, Eclipse world\");\n\t}", "public void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}", "@Override\n\tpublic void setAction() {\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void onAction(RPObject player, RPAction action) {\n }", "@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}", "@Override\n public void accept(Action action) {\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t}", "public abstract void action();", "public abstract void action();", "public abstract void action();", "public abstract void action();", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "public void performAction(HandlerData actionInfo) throws ActionException;", "public void actionPerformed( ActionEvent event )\n {\n \n }", "@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}", "String getOnAction();", "public void act() \n {\n // Add your action code here.\n tempoUp();\n }", "public void setAction(String action) { this.action = action; }", "@Override\n\t public void actionPerformed(ActionEvent e){\n\t }", "@Override\n public void act() {\n }", "public void actionStarted(ActionStreamEvent action);", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t{\n\t\t\t\n\t\t}", "@Override\n\tpublic void actionHandler(Actions action, int arg1, int arg2) {\n\t\tlogic.actionHandler(action, arg1, arg2);\n\t}", "private void entryAction() {\n\t}", "@Override public void handle(ActionEvent e)\n\t {\n\t }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.out.println(\"156161\");\r\n\t\t\t}" ]
[ "0.7907701", "0.7775921", "0.7644247", "0.76119846", "0.76119846", "0.76119846", "0.751699", "0.74891174", "0.74193674", "0.7412826", "0.7402896", "0.738321", "0.7359403", "0.7359403", "0.73438245", "0.73412704", "0.73412704", "0.73412704", "0.73412704", "0.73412704", "0.73412704", "0.73412704", "0.73412704", "0.7208963", "0.71728235", "0.7165464", "0.7162891", "0.71325284", "0.71145105", "0.70986086", "0.7091996", "0.70612967", "0.70496726", "0.7043273", "0.7006072", "0.7002117", "0.6977562", "0.69654745", "0.6932325", "0.6932325", "0.6928806", "0.6926541", "0.69240624", "0.6922733", "0.69181263", "0.6888793", "0.68870175", "0.68602604", "0.6845913", "0.6845913", "0.68433756", "0.68317664", "0.68244517", "0.68170506", "0.68149835", "0.6813531", "0.68060344", "0.6801481", "0.67974603", "0.6794913", "0.67716646", "0.6756334", "0.67541665", "0.6749117", "0.6739969", "0.67390776", "0.67382175", "0.6736006", "0.6734406", "0.672872", "0.672872", "0.6727953", "0.6725088", "0.6712174", "0.67117023", "0.67117023", "0.6708787", "0.6708787", "0.6708787", "0.6708787", "0.67001283", "0.67001283", "0.67001283", "0.67001283", "0.67001283", "0.67001283", "0.66688913", "0.66625386", "0.6661826", "0.6661063", "0.6659918", "0.6655469", "0.66447055", "0.6643573", "0.6635867", "0.66298044", "0.66291845", "0.66095674", "0.6593642", "0.65925467", "0.6591968" ]
0.0
-1
Created by balaji on 1/1/18.
public interface Calculator { long add(int number1, int number2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void strin() {\n\n\t}", "private void m50366E() {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public void method_4270() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void mo12628c() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "private void init() {\n\n\n\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo6081a() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public void memoria() {\n \n }" ]
[ "0.5928732", "0.58210576", "0.5817531", "0.5801082", "0.57672226", "0.57672226", "0.5766683", "0.5732634", "0.5708449", "0.5680293", "0.5671327", "0.56616294", "0.56525534", "0.5635601", "0.5601708", "0.55991346", "0.55955267", "0.5586667", "0.55818415", "0.5581494", "0.55716884", "0.5553906", "0.55513334", "0.55495816", "0.55495816", "0.55495816", "0.55495816", "0.55495816", "0.5546473", "0.55453414", "0.5531253", "0.55109435", "0.5503844", "0.54902905", "0.54773366", "0.5476061", "0.54542315", "0.5433452", "0.54315627", "0.5429851", "0.541053", "0.5407342", "0.54031307", "0.5395053", "0.5393914", "0.5393914", "0.5393914", "0.5384986", "0.5381769", "0.5381769", "0.5381769", "0.53816396", "0.53816396", "0.53816396", "0.5380703", "0.53779167", "0.53779167", "0.53666097", "0.5366051", "0.53589517", "0.53509575", "0.53418094", "0.53342533", "0.5332981", "0.5331188", "0.5331188", "0.5329845", "0.5328452", "0.5325031", "0.5323108", "0.5322072", "0.5322072", "0.5322072", "0.5322072", "0.5322072", "0.5322072", "0.5322072", "0.53210145", "0.53210145", "0.5318271", "0.5308105", "0.528125", "0.5276114", "0.5272912", "0.5269722", "0.5269722", "0.5269722", "0.5269722", "0.5269722", "0.5269722", "0.52662086", "0.52649754", "0.52643", "0.52561414", "0.52525264", "0.524593", "0.5245321", "0.52447754", "0.5244472", "0.5239243", "0.5232001" ]
0.0
-1
Use MuleClient to test Remote Server by RemoteDispatcher tcp://ip:port on vm://vmQueueObjectArray
public final void testCall() throws Exception { Logger.getLogger(this.getClass()).info("waiting for Remote message..."); Logger.getLogger(this.getClass()).info("press enter to shutdown server"); //TODO raffaele.picardi: report this class out of this test and remain only Monitor.onWait for itnegration test // Monitor.waitOn(WAIT); //Init section to transfer in External system UMOMessage result=null; MuleClient client; while (true) { try { client = new MuleClient(); RemoteDispatcher rd = client.getRemoteDispatcher(MessagesTest.getString("EHelloServiceObjectArrayTest.10")); //$NON-NLS-1$ /* SoapMethod method = new SoapMethod(new QName("", Messages.getString("SOAP_METHOD_NAME"))); method.addNamedParameter(new QName( Messages.getString("NAMED_PARAMETER")), new javax.xml.namespace.QName( Messages.getString("SERVICE_NAMESPACE_URI"), Messages.getString("RETURN_QNAME")), "in"); method.setReturnType( new javax.xml.namespace.QName(Messages.getString("SERVICE_NAMESPACE_URI"), Messages.getString("RETURN_QTYPE_NAME"))); method.setReturnClass(Class.forName(Messages.getString("RETURN_CLASSNAME"))); */ Map props = new HashMap(); props.put("style", "wrapped"); props.put("use", "literal"); //props.put(MuleProperties.MULE_SOAP_METHOD, method); props.put("resourceKey", MessagesTest.getString("RESOURCE_KEY")); props.put(WSRFParameter.SERVICE_NAMESPACE , MessagesTest.getString("SERVICE_NAMESPACE_URI")); props.put(WSRFParameter.RESOURCE_KEY_NAME , MessagesTest.getString("RESOURCE_KEY_NAME")); props.put(WSRFParameter.RETURN_QNAME, MessagesTest.getString("RETURN_QNAME")); /* props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString("SERVICE_NAMESPACE_URI"), Messages.getString("RETURN_QTYPE_NAME"))); props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString("SERVICE_NAMESPACE_URI"), Messages.getString("RETURN_QTYPE_NAME"))); props.put(WSRFParameter.RETURN_QTYPE, new javax.xml.namespace.QName(Messages.getString("SERVICE_NAMESPACE_URI"), Messages.getString("RETURN_QTYPE_NAME"))); */ props.put(WSRFParameter.RETURN_CLASS, Class.forName(MessagesTest.getString("RETURN_CLASSNAME"))); props.put(WSRFParameter.SOAP_ACTION_URI, MessagesTest.getString("SOAP_ACTION_URI")); result = rd.sendRemote("vm://vmQueue", new Integer(2), props); //result = rd.sendRemote(Messages.getString("EHelloServiceObjectArrayTest.11"),"", null); //$NON-NLS-1$ //logger.info(this, "invoke done.",""); //$NON-NLS-1$ System.out.println("invoke done."); Thread.sleep(5000); } catch (UMOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } finally { if (result != null) { System.out.println(result.getPayload().toString()); //$NON-NLS-1$ } else { System.out.println("result is null"); } } //end section to transfer in External system } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void testIBMMQSendData(){\n\n MQParam param = new MQParam();\n param.setHost(\"10.86.92.194\");\n param.setPort(30099);\n param.setCcsid(1208);\n param.setChannel(\"SVRCONN_GW_OUT\");\n param.setQueueManager(\"ESB_OUT\");\n param.setQueueName(\"EIS.QUEUE.REQUEST.OUT.GCDCHZWMES\");\n param.setUserId(\"mqm\");\n param.setPassword(\"mqm\");\n new Thread(new IBMReceiverThread(param)).run();\n }", "@Remote\npublic interface PublisherQueueProxySessionRemote {\n\n void addQueueData(int publisherId, int publishType, String fingerprint,\n PublisherQueueVolatileInformation queueData, int publishStatus) throws CreateException;\n\n void removeQueueData(java.lang.String pk);\n\n void updateData(java.lang.String pk, int status, int tryCounter);\n\n Collection<PublisherQueueData> getEntriesByFingerprint(String fingerprint);\n\n int[] getPendingEntriesCountForPublisherInIntervals(int publisherId, int[] lowerBounds, int[] upperBounds);\n\n int getPendingEntriesCountForPublisher(int publisherId);\n\n Collection<PublisherQueueData> getPendingEntriesForPublisher(int publisherId);\n \n PublishingResult plainFifoTryAlwaysLimit100EntriesOrderByTimeCreated(AuthenticationToken admin, BasePublisher publisher);\n\n /** Removes all entries in PublisherQueueData for a given publishers. Used in tests only */\n void removePublisherQueueEntries(String publisherName);\n}", "@Test\n public void testEvent() throws EventDeliveryException, MQBrokerException, MQClientException, InterruptedException, UnsupportedEncodingException, RemotingException {\n DefaultMQProducer producer = new DefaultMQProducer(producerGroup);\n producer.setNamesrvAddr(nameServer);\n String sendMsg = \"\\\"Hello Flume\\\"\" + \",\" + DateFormatUtils.format(new Date(), \"yyyy-MM-dd hh:mm:ss\");\n producer.start();\n Message msg = new Message(TOPIC_DEFAULT, tag, sendMsg.getBytes(\"UTF-8\"));\n SendResult sendResult = producer.send(msg);\n\n // start source\n Context context = new Context();\n context.put(NAME_SERVER_CONFIG, nameServer);\n context.put(TAG_CONFIG, tag);\n Channel channel = new MemoryChannel();\n Configurables.configure(channel, context);\n List<Channel> channels = new ArrayList<>();\n channels.add(channel);\n ChannelSelector channelSelector = new ReplicatingChannelSelector();\n channelSelector.setChannels(channels);\n ChannelProcessor channelProcessor = new ChannelProcessor(channelSelector);\n\n RocketMQSource source = new RocketMQSource();\n source.setChannelProcessor(channelProcessor);\n Configurables.configure(source, context);\n\n source.start();\n\n // wait for rebalanceImpl start\n Thread.sleep(2000);\n\n sendMsg = \"\\\"Hello Flume\\\"\" + \",\" + DateFormatUtils.format(new Date(), \"yyyy-MM-dd hh:mm:ss\");\n msg = new Message(TOPIC_DEFAULT, tag, sendMsg.getBytes(\"UTF-8\"));\n sendResult = producer.send(msg);\n log.info(\"publish message : {}, sendResult:{}\", sendMsg, sendResult);\n\n PollableSource.Status status = source.process();\n if (status == PollableSource.Status.BACKOFF) {\n fail(\"Error\");\n }\n /*\n wait for processQueueTable init\n */\n Thread.sleep(1000);\n\n producer.shutdown();\n source.stop();\n\n\n /*\n mock flume sink\n */\n Transaction transaction = channel.getTransaction();\n transaction.begin();\n Event event = channel.take();\n if (event == null) {\n transaction.commit();\n fail(\"Error\");\n }\n byte[] body = event.getBody();\n String receiveMsg = new String(body, \"UTF-8\");\n log.info(\"receive message : {}\", receiveMsg);\n\n assertEquals(sendMsg, receiveMsg);\n }", "@Ignore(\"Надо переделать!!\")\n @Test\n public void testFull() throws Exception {\n // SYSTEM.DEF.SVRCONN/TCP/vs338(1414)\n // SYSTEM.ADMIN.SVRCONN/TCP/vs338(1414)\n // UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\n\n MQQueueConnectionFactory cf = new MQQueueConnectionFactory();\n\n\n // Config\n cf.setHostName(\"vs338\");\n cf.setPort(1414);\n cf.setTransportType(WMQConstants.WMQ_CM_CLIENT);\n cf.setQueueManager(\"QM_MBROKER10_TEST\");\n cf.setChannel(\"SYSTEM.ADMIN.SVRCONN\");\n\n SingleActionJob job =\n SingleActionJobBuilder.create()\n .withClass(MovementCreateTask.class)\n\n// .withProps(\n// \"mq.type = queue\\n\" +\n// \"mq.host = vs338\\n\" +\n// \"mq.port = 1414\\n\" +\n// \"mq.queueManager = QM_MBROKER10_TEST\\n\" +\n// \"mq.channel = SYSTEM.DEF.SVRCONN\\n\" +\n// \"mq.batchSize = 1\\n\" + //todo\n// \"mq.topics = LIRQ!!!!:UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF:UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\"+\n// \";BALIRQ:UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF:UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\\n\"+\n// \"mq.user=er22228\\n\" +\n// \"mq.password=Vugluskr6\"\n//\n// )//;MIDAS_UPDATE:UCBRU.ADP.BARSGL.V4.ACDENO.MDSUPD.NOTIF\n\n .build();\n jobService.executeJob(job);\n \n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.MDSOPEN.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n// receiveFromQueue(cf,\"UCBRU.ADP.BARSGL.V4.ACDENO.FCC.NOTIF\");\n\n }", "public static void testIBMMQReceiveData(){\n\n MQParam param = new MQParam();\n param.setHost(\"10.86.92.194\");\n param.setPort(30099);\n param.setCcsid(1208);\n param.setChannel(\"SVRCONN_GW_OUT\");\n param.setQueueManager(\"ESB_OUT\");\n param.setQueueName(\"EIS.QUEUE.REQUEST.OUT.GCDCHZWMES\");\n param.setReplyToQueueName(\"EIS.QUEUE.RESPONSE.IN.GCDCHZWMES\");\n param.setUserId(\"mqm\");\n param.setPassword(\"mqm\");\n\n new Thread(new IBMSenderThread(param,\"data1\")).run();\n new Thread(new IBMSenderThread(param,\"datata22\")).run();\n new Thread(new IBMSenderThread(param,\"datatatata333\")).run();\n }", "public interface UMOMessageReceiver extends Lifecycle, UMOConnectable\n{\n /**\n * @return the receivers endpoint\n */\n UMOImmutableEndpoint getEndpoint();\n\n /**\n * @param message\n * @param exception\n */\n // void handleException(Object message, Throwable exception);\n /**\n * @return the component associated with the receiver\n */\n UMOComponent getComponent();\n\n /**\n * @param endpoint the endpoint to listen on\n * @see UMOImmutableEndpoint\n */\n void setEndpoint(UMOImmutableEndpoint endpoint);\n\n /**\n * @param component the component to associate with the receiver. When data is\n * received the component <code>dispatchEvent</code> or\n * <code>sendEvent</code> is used to dispatch the data to the\n * relivant UMO.\n */\n void setComponent(UMOComponent component);\n\n void setConnector(UMOConnector connector);\n\n UMOConnector getConnector();\n\n /**\n * The endpointUri that this receiver listens on\n * \n * @return\n */\n UMOEndpointURI getEndpointURI();\n\n String getReceiverKey();\n\n void setReceiverKey(String key);\n\n UMOMessage routeMessage(UMOMessage message) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, boolean synchronous) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, UMOTransaction trans, boolean synchronous)\n throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, OutputStream outputStream) throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message, boolean synchronous, OutputStream outputStream)\n throws UMOException;\n\n UMOMessage routeMessage(UMOMessage message,\n UMOTransaction trans,\n boolean synchronous,\n OutputStream outputStream) throws UMOException;\n\n}", "@JmsListener(destination = \"itineraries-destination\", containerFactory = \"myJmsContainerFactory\")\n public void receiveObjectMessage(Object flightItineraryResponse) {\n System.out.println(\"Received <\" + flightItineraryResponse + \">\");\n }", "@Ignore\n @Test\n public void testSetupReciever() throws JMSException {\n System.out.println(\"setupReciever\");\n PooledConnection MQConn = null;\n String QueueName = \"\";\n MessageListener listener = null;\n String messageSelector = \"\";\n JMSUtil.setupReciever(MQConn, QueueName, listener, messageSelector);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "interface ICubeletsConnection {\n public int[] getCubeletValues();\n\n /* In case anonymous subclassing, you can override this. It is called\n * when cubelet values change. */\n public void messageHandle(int[] cubeletValues);\n}", "@Test\r\n public void simpleFlowAndJMX() throws Exception {\r\n ModuleURN instanceURN = new ModuleURN(PROVIDER_URN, \"mymodule\");\r\n //Set up the data\r\n Object []requestParm = {BigDecimal.ONE, 2, \"three\"};\r\n CopierModule.SynchronousRequest req =\r\n new CopierModule.SynchronousRequest(requestParm);\r\n req.semaphore.acquire();\r\n //Set up the sink listener\r\n BlockingSinkDataListener listener = new BlockingSinkDataListener();\r\n mManager.addSinkListener(listener);\r\n //Create the data flow.\r\n DataFlowID flowID = mManager.createDataFlow(new DataRequest[]{\r\n new DataRequest(CopierModuleFactory.INSTANCE_URN,\r\n req),\r\n new DataRequest(instanceURN, null)\r\n });\r\n //wait for the data to be emitted.\r\n req.semaphore.acquire();\r\n //wait for the data to be received\r\n for(Object o: requestParm) {\r\n assertEquals(o, listener.getNextData());\r\n }\r\n //verify the flow info\r\n DataFlowInfo flowInfo = mManager.getDataFlowInfo(flowID);\r\n assertFlowInfo(flowInfo, flowID, 3, true, false, null, null);\r\n //verify the last 2 flow steps\r\n assertFlowStep(flowInfo.getFlowSteps()[1], instanceURN, true, 3, 0,\r\n null, true, 3, 0, null, instanceURN, null);\r\n assertFlowStep(flowInfo.getFlowSteps()[2],\r\n SinkModuleFactory.INSTANCE_URN, false, 0, 0, null, true, 3, 0,\r\n null, SinkModuleFactory.INSTANCE_URN, null);\r\n //verify the module info to double check that it's auto-created.\r\n assertModuleInfo(mManager, instanceURN, ModuleState.STARTED, null,\r\n new DataFlowID[]{flowID}, true, true, true, true, false);\r\n //verify JMX MXBean Info\r\n final ObjectName on = instanceURN.toObjectName();\r\n final MBeanServer beanServer = getMBeanServer();\r\n assertTrue(beanServer.isRegistered(on));\r\n MBeanInfo beanInfo = beanServer.getMBeanInfo(on);\r\n assertEquals(SimpleAsyncProcessor.class.getName(), beanInfo.getClassName());\r\n assertEquals(Messages.JMX_MXBEAN_DESCRIPTION.getText(), beanInfo.getDescription());\r\n assertEquals(0, beanInfo.getOperations().length);\r\n assertEquals(0, beanInfo.getConstructors().length);\r\n assertEquals(0, beanInfo.getNotifications().length);\r\n assertEquals(0, beanInfo.getDescriptor().getFieldNames().length);\r\n MBeanAttributeInfo[] attributeInfos = beanInfo.getAttributes();\r\n assertEquals(1, attributeInfos.length);\r\n final String validAttribute = SimpleAsyncProcessor.ATTRIB_PREFIX + flowID;\r\n assertEquals(validAttribute, attributeInfos[0].getName());\r\n assertEquals(Integer.class.getName(), attributeInfos[0].getType());\r\n assertEquals(Messages.JMX_ATTRIBUTE_FLOW_CNT_DESCRIPTION.getText(flowID), attributeInfos[0].getDescription());\r\n assertEquals(0, attributeInfos[0].getDescriptor().getFieldNames().length);\r\n assertFalse(attributeInfos[0].isIs());\r\n assertFalse(attributeInfos[0].isWritable());\r\n assertTrue(attributeInfos[0].isReadable());\r\n \r\n //verify Attributes\r\n Object value = beanServer.getAttribute(on, SimpleAsyncProcessor.ATTRIB_PREFIX + flowID);\r\n assertEquals((Integer)0, (Integer)value);\r\n final String invalidAttribute = SimpleAsyncProcessor.ATTRIB_PREFIX + 1;\r\n new ExpectedFailure<AttributeNotFoundException>(invalidAttribute){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.getAttribute(on, invalidAttribute);\r\n }\r\n };\r\n new ExpectedFailure<AttributeNotFoundException>(\"blah\"){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.getAttribute(on, \"blah\");\r\n }\r\n };\r\n AttributeList attribList = beanServer.getAttributes(on,\r\n new String[]{validAttribute, invalidAttribute});\r\n assertEquals(1, attribList.size());\r\n assertEquals(new Attribute(validAttribute, 0), attribList.get(0));\r\n new ExpectedFailure<AttributeNotFoundException>(){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.setAttribute(on, new Attribute(validAttribute, 34));\r\n }\r\n };\r\n new ExpectedFailure<AttributeNotFoundException>(){\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.setAttribute(on, new Attribute(invalidAttribute, 34));\r\n }\r\n };\r\n AttributeList list = new AttributeList(Arrays.asList(\r\n new Attribute(validAttribute, 12),\r\n new Attribute(invalidAttribute, 13)\r\n ));\r\n assertEquals(0, beanServer.setAttributes(on, list).size());\r\n //verify no operations can be performed\r\n ReflectionException excpt = new ExpectedFailure<ReflectionException>() {\r\n @Override\r\n protected void run() throws Exception {\r\n beanServer.invoke(on, \"getQueueSizes\", null, null);\r\n }\r\n }.getException();\r\n assertTrue(excpt.toString(), excpt.getCause() instanceof NoSuchMethodException);\r\n\r\n //stop the flow\r\n mManager.cancel(flowID);\r\n //verify that the module is deleted.\r\n List<ModuleURN> instances = mManager.getModuleInstances(PROVIDER_URN);\r\n assertTrue(instances.toString(), instances.isEmpty());\r\n //remove the listener\r\n mManager.removeSinkListener(listener);\r\n }", "public interface BrokerInterface extends Remote {\n /**\n * Subscribes to a game\n * @param subscriber the interface on which the broker calls the dispatch message method\n * @param clientId the unique id of the client to find in which game it belongs\n * @throws RemoteException\n */\n public void subscribe(SubscriberInterface subscriber, UUID clientId) throws RemoteException;\n}", "@Test \n public void testRouteSuccessful() throws Exception {\n // 1. Arrange.. get the mock endpoint and set an assertion\n MockEndpoint mockOutput = getMockEndpoint(\"mock:output\");\n mockOutput.expectedMessageCount(1);\n\n // 2. Act.. send a message to the start component\n \tString jsonInput= \"{\\\"name\\\": \\\"Sunrise\\\",\\\"quantity\\\": 2}\";\n template.sendBody(\"direct:remote\", jsonInput);\n\n // 3. Assert.. verify that the mock component received 1 message\n assertMockEndpointsSatisfied();\n }", "public void testDispatchTypes() {\n startActivity();\n \n Log.v(TAG,\"testDispatchTypes\");\n SystemDispatcher.Listener listener = new SystemDispatcher.Listener() {\n\n public void onDispatched(String type , Map message) {\n Log.v(TAG,\"testDispatchTypes - received: \" + type);\n\n if (!type.equals(\"Automater::response\")) {\n return;\n }\n\n Payload payload = new Payload();\n payload.name = type;\n payload.message = message;\n\n lastPayload = payload;\n }\n };\n\n SystemDispatcher.addListener(listener);\n\n Map message = new HashMap();\n message.put(\"field1\",\"value1\");\n message.put(\"field2\",10);\n message.put(\"field3\",true);\n message.put(\"field4\",false);\n \n List field5 = new ArrayList(3);\n field5.add(23);\n field5.add(true);\n field5.add(\"stringValue\");\n message.put(\"field5\",field5);\n field5 = new ArrayList(10);\n\n Map field6 = new HashMap();\n field6.put(\"sfield1\", \"value1\");\n field6.put(\"sfield2\", 10);\n field6.put(\"sfield3\", true);\n field6.put(\"sfield4\", false);\n message.put(\"field6\", field6);\n \n assertTrue(lastPayload == null);\n\n SystemDispatcher.dispatch(\"Automater::echo\",message);\n sleep(500);\n\n assertTrue(lastPayload != null);\n assertTrue(lastPayload.message.containsKey(\"field1\"));\n assertTrue(lastPayload.message.containsKey(\"field2\"));\n assertTrue(lastPayload.message.containsKey(\"field3\"));\n assertTrue(lastPayload.message.containsKey(\"field4\"));\n assertTrue(lastPayload.message.containsKey(\"field5\"));\n assertTrue(lastPayload.message.containsKey(\"field6\"));\n\n String field1 = (String) lastPayload.message.get(\"field1\");\n assertTrue(field1.equals(\"value1\"));\n\n int field2 = (int) (Integer) lastPayload.message.get(\"field2\");\n assertEquals(field2,10);\n\n boolean field3 = (boolean)(Boolean) lastPayload.message.get(\"field3\");\n assertEquals(field3,true);\n\n boolean field4 = (boolean)(Boolean) lastPayload.message.get(\"field4\");\n assertEquals(field4,false);\n \n List list = (List) lastPayload.message.get(\"field5\");\n assertEquals(list.size(),3);\n assertEquals(list.get(0), 23);\n assertEquals(list.get(1), true);\n assertTrue((((String) list.get(2)).equals(\"stringValue\")));\n\n Map map = (Map) lastPayload.message.get(\"field6\");\n assertTrue(map.containsKey(\"sfield1\"));\n assertTrue(((String) map.get(\"sfield1\")).equals(\"value1\"));\n assertTrue(map.containsKey(\"sfield2\"));\n assertEquals(map.get(\"sfield2\"), 10);\n assertTrue(map.containsKey(\"sfield3\"));\n assertTrue(map.containsKey(\"sfield4\"));\n \n SystemDispatcher.removeListener(listener);\n }", "@Override\r\n\tpublic void run() {\n\t\ttry {\r\n\t\t\tObjectInputStream objectInput = new ObjectInputStream(\r\n\t\t\t\t\tclsock.getInputStream());\r\n\t\t\tObject object = objectInput.readObject();\r\n\t\t\ttask = (String) object;// reading URLs from client\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"The task Batch has not come from the Client\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tString clientId = task.split(\",\")[0];\r\n\r\n\t\tRemoteScheduler remoteScheduler = new RemoteScheduler(clientId,\r\n\t\t\t\ttask);\r\n\t\tremoteScheduler.sendTaskToQueue();\r\n\t\tExecutorService remoteService = Executors.newFixedThreadPool(1);\r\n\t\ttry {\r\n\t\t\tFuture<String> remoteResult = remoteService\r\n\t\t\t\t\t.submit(remoteScheduler);\r\n\t\t\tString clientResult = remoteResult.get();\r\n\t\t\tObjectOutputStream outputStream = new ObjectOutputStream(\r\n\t\t\t\t\tclsock.getOutputStream());\r\n\t\t\toutputStream.writeObject(clientResult);\r\n\t\t\toutputStream.close();\r\n\t\t} catch (InterruptedException | ExecutionException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tclsock.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void runClient() {\n\t\tString clientID = \"d:quickstart:MyDevice:\" + deviceId;\r\n\t\tSystem.out.println( \"deviceId=\" + deviceId );\r\n\t\tconnOpt = new MqttConnectOptions();\r\n\t\t\r\n\t\tconnOpt.setCleanSession( true );\r\n\t\tconnOpt.setKeepAliveInterval( 30 );\r\n\r\n\t\t// Connect to Broker\r\n\t\ttry{\r\n\t\t\tmyClient = new MqttClient( BROKER_URL, clientID );\r\n\t\t\tmyClient.setCallback( this );\r\n\t\t\tmyClient.connect( connOpt );\r\n\t\t}catch( MqttException e ){\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit( -1 );\r\n\t\t}\r\n\r\n\t\tString myTopic = \"iot-2/evt/estado_\" + dc + \"/fmt/json\";\r\n\t\tMqttTopic topic = myClient.getTopic( myTopic );\r\n\t\t\r\n\t\twhile( true ){\r\n\t\t\ttry{\r\n\t\t\t\tCalendar c = Calendar.getInstance();\r\n\t\t\t\tTimeZone tz = TimeZone.getTimeZone( \"Asia/Tokyo\" );\r\n\t\t\t\tc.setTimeZone( tz );;\r\n\t\t\t\tint y = c.get( Calendar.YEAR );\r\n\t\t\t\tint m = c.get( Calendar.MONTH ) + 1;\r\n\t\t\t\tint d = c.get( Calendar.DAY_OF_MONTH );\r\n\t\t\t\tint h = c.get( Calendar.HOUR_OF_DAY );\r\n\t\t\t\tint n = c.get( Calendar.MINUTE );\r\n\t\t\t\tint s = c.get( Calendar.SECOND );\r\n\t\t\t\tString dt = y\r\n\t\t\t\t\t\t+ \"/\" + ( m < 10 ? \"0\" : \"\" ) + m\r\n\t\t\t\t\t\t+ \"/\" + ( d < 10 ? \"0\" : \"\" ) + d\r\n\t\t\t\t\t\t+ \"T\" + ( h < 10 ? \"0\" : \"\" ) + h\r\n\t\t\t\t\t\t+ \":\" + ( n < 10 ? \"0\" : \"\" ) + n\r\n\t\t\t\t\t\t+ \":\" + ( s < 10 ? \"0\" : \"\" ) + s\r\n\t\t\t\t\t\t+ \"+09:00\";\r\n\r\n\t\t\t\tString out = \"\";\r\n\t\t\t\tHttpClient client = new HttpClient();\r\n\t\t\t\tGetMethod get = new GetMethod( \"http://estado.\" + dc + \".bluemix.net/\" );\r\n\r\n\t\t\t\tint sc = client.executeMethod( get );\r\n\t\t\t\tString html = get.getResponseBodyAsString();\r\n\t\t\t\tint x = html.indexOf( \"<table\" );\r\n\t\t\t\twhile( x > -1 ){\r\n//\t\t\t\tif( x > -1 ){\r\n\t\t\t\t\tint td1 = html.indexOf( \"<td>\", x + 1 );\r\n\t\t\t\t\tint td2 = html.indexOf( \"</td>\", td1 + 4 );\r\n\t\t\t\t\tint td3 = html.indexOf( \"<td>\", td2 + 1 );\r\n\t\t\t\t\tint td4 = html.indexOf( \"</td>\", td3 + 4 );\r\n\t\t\t\t\tif( td1 > -1 && td2 > -1 && td3 > -1 && td4 > -1 ){\r\n\t\t\t\t\t\tString name = html.substring( td1 + 4, td2 );\r\n\t\t\t\t\t\tString svalue = html.substring( td3 + 4, td4 );\r\n\r\n\t\t\t\t\t\tif( svalue.equals( \"down\" ) ){\r\n\t\t\t\t\t\t\tString line = \"\\\"\" + name + \"\\\"\";\r\n\t\t\t\t\t\t\tif( out.length() > 0 ){\r\n\t\t\t\t\t\t\t\tline = \",\" + line;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tout += line;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tx = td4;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = html.indexOf( \"<tr \", x + 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tout = \"{\\\"datetime\\\":\\\"\" + dt + \"\\\",\\\"error_services\\\":[\" + out + \"]}\";\r\n\t\t\t\t//System.out.println( \"out = \" + out );\r\n\t\t\t\t\r\n\t\t\t\t//. MQTT Publish\r\n\t\t \t\tint pubQoS = 0;\r\n\t\t\t\tMqttMessage message = new MqttMessage( out.getBytes() );\r\n\t\t \tmessage.setQos( pubQoS );\r\n\t\t \tmessage.setRetained( false );\r\n\r\n\t\t \t// Publish the message\r\n\t\t \t//System.out.println( \"Publishing to topic \\\"\" + topic + \"\\\" qos \" + pubQoS );\r\n\t\t \tMqttDeliveryToken token = null;\r\n\t\t \ttry{\r\n\t\t \t\t// publish message to broker\r\n\t\t\t\t\ttoken = topic.publish( message );\r\n\t\t\t \t// Wait until the message has been delivered to the broker\r\n\t\t\t\t\ttoken.waitForCompletion();\r\n\t\t\t\t\tThread.sleep( 1000 );\r\n\t\t\t\t}catch( Exception e ){\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//. 次の実行タイミングを待つ\r\n\t\t\t\tCalendar c0 = Calendar.getInstance();\r\n\t\t\t\tint s0 = ( c0.get( Calendar.SECOND ) % interval );\r\n\t\t\t\tint w = 1000 * ( interval - s0 );\r\n\t\t\t\tThread.sleep( w );\r\n\t\t\t}catch( Exception e ){\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws MqttException, InterruptedException {\n\r\n\r\n\t client = new MqttClient(\"tcp://test.mosquitto.org:1883\",\"F0B5D1A4A5040004\",persistence);\r\n\t MqttConnectOptions mqOptions=new MqttConnectOptions();\r\n\t mqOptions.setCleanSession(true);\r\n\t client.connect(mqOptions);\r\n\t //client.subscribe(\"sensor/1\"); //subscribing to the topic name test/topic\r\n\t \r\n\t MqttMessage message = new MqttMessage(\"2\".getBytes());\r\n\t message.setQos(1);\r\n\t while(true) {\r\n\t client.publish(\"sensor\",message);\r\n\t Thread.sleep(1000);\r\n\t }\r\n \r\n\t}", "public static void main(String[] args) {\n // Set MessageDispatcher.\n // /////////////////////////////////////\n MessageDispatcher dispatcher = new MessageDispatcher(\n SYSTEM_MGR_ID,\n DISPATCHER_IP,\n Integer.parseInt(DISPATCHER_PORT));\n dispatcher.start();\n\n // /////////////////////////////////////\n // // Set SystemManager Interface\n // /////////////////////////////////////\n SystemManagerInterface systemMngInterface =\n new SystemManagerInterface(dispatcher);\n \n // /////////////////////////////////////\n // Set NetworkIntece\n // /////////////////////////////////////\n NetworkInterface originalNwInterface =\n new NetworkInterface(dispatcher, ORIGINAL_NW_ID);\n NetworkInterface aggregatedNwInterface =\n new NetworkInterface(dispatcher, AGGREGATED_NW_ID);\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (1) Delete All Flows.\");\n outMsg(\"//////////////////////////////////////////////////\");\n List<Response> rsps = originalNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n\n rsps = aggregatedNwInterface.deleteAllFlow(); \n for (Response rsp : rsps) {\n outMsg(\" -DELETE FLow. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (2) Delete Topology.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsps = originalNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n }\n wait(WAIT_TIME * 2);\n \n rsps = aggregatedNwInterface.deleteTopology();\n for (Response rsp : rsps) {\n outMsg(\" -PUT (empty)Topology (Delete Topology). \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n } \n wait(WAIT_TIME * 2);\n \n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (3) Delete Connections.\");\n outMsg(\"//////////////////////////////////////////////////\");\n Response rsp = systemMngInterface.delConnection(\"conn1\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delConnection(\"conn2\");\n outMsg(\" -DELETE Connection. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n\n outMsg(\"//////////////////////////////////////////////////\");\n outMsg(\"//// (4) Delete Components.\");\n outMsg(\"//////////////////////////////////////////////////\");\n rsp = systemMngInterface.delComponent(ORIGINAL_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n rsp = systemMngInterface.delComponent(AGGREGATED_NW_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n \n rsp = systemMngInterface.delComponent(AGGREGATOR_ID);\n outMsg(\" -DELETE Component. \");\n outMsg(\" -Received: \" + rsp.statusCode + \" \" + rsp.getBodyValue());\n wait(WAIT_TIME * 2);\n\n dispatcher.close();\n System.exit(0);\n\n }", "@Test\n public void testJmsDirect() {\n\n // Construction never throws, so it can be done outside the try..catch.\n // This doesn't use JNDI, so we specify the exact queue name.\n JmsConnector jmsConn = new JmsConnector(\"tcp://localhost:61616\", \"users\");\n\n try {\n\n // Send a text message.\n jmsConn.sendTextMessage(\"This is a text message!!\");\n\n // Build and send a map message:\n jmsConn.startMapMessage()\n .addMapString(\"name\", \"luke\")\n .addMapInt(\"age\", 29)\n .sendMapMessage();\n\n // Consume the text message - wait forever.\n Message msg1 = jmsConn.consume();\n Assert.assertTrue(msg1 instanceof TextMessage);\n\n // Consume the map message - wait only 5 seconds.\n Message msg2 = jmsConn.consume(5);\n Assert.assertTrue(msg2 instanceof MapMessage);\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Always close the connection in a finally block:\n jmsConn.close();\n }\n }", "String addReceiveQueue();", "public interface MsgSenderInterface {\n\n public boolean sendMsgToMQ(String jsonStr);\n\n}", "private static GenericContainer jmxService() {\n GenericContainer container = new GenericContainer<>(\"testserver:latest\")\n .withExposedPorts(4567, 7199)\n .withEnv(\"JAVA_OPTS\", \"-Dcom.sun.management.jmxremote.port=7199 \" +\n \"-Dcom.sun.management.jmxremote.rmi.port=7199 \" +\n \"-Dcom.sun.management.jmxremote.local.only=false\" +\n \"-Djava.rmi.server.hostname=0.0.0.0 \" +\n \"-Dcom.sun.management.jmxremote=true \" +\n \"-Dcom.sun.management.jmxremote.authenticate=false \" +\n \"-Dcom.sun.management.jmxremote.ssl=false \");\n container.setPortBindings(Arrays.asList(\"7199:7199\", \"4567:4567\"));\n Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(LoggerFactory.getLogger(\"TESTCONT\"));\n container.setLogConsumers(Collections.singletonList(logConsumer));\n return container;\n }", "@Ignore\n @Test\n public void testGetConnection() {\n System.out.println(\"getConnection\");\n Util.commonServiceIPs = \"127.0.0.1\";\n PooledConnection expResult = null;\n try {\n long ret = JMSUtil.getQueuePendingMessageCount(\"127.0.0.1\",\"localhost\",CommonKeys.INDEX_REQUEST);\n fail(\"The test case is a prototype.\");\n }\n catch(Exception e)\n {\n \n } \n }", "@Test\n public void testMock() throws InterruptedException {\n\n template.sendBody(\"jms:queue:testQueue\",\"Another mock\");\n template.sendBody(\"jms:queue:testQueue\",\"Camel Mock\");\n\n //TODO: invoke mock's assertIsSatisfied\n }", "@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }", "public void handleMessageFromClient(Object msg) {\n\n }", "public BrokerSubscriptionTestConsole(String url)\n {\n try\n {\n System.out.println(\"** Starting BrokerSubscriptionTestConsole used to test subscription behaviour **\");\n \n Connection connection = ConnectionHelper.createConnection(url, \"{reconnect: true}\");\n _console = new Console(this);\n _console.addConnection(connection);\n\n // Wait until the broker Agent has been discovered\n _broker = _console.findAgent(\"broker\");\n if (_broker == null)\n {\n System.out.println(\"broker Agent not found\");\n System.exit(1);\n }\n\n System.out.println(\"Creating Query for objects whose name property has a value that starts with 'a'\");\n\n SubscribeParams params;\n QmfQuery query = new QmfQuery(QmfQueryTarget.OBJECT, \"['re_match', 'name', ['quote', '^a']]\");\n\n // Create a subscription, response returned synchronously\n params = _console.createSubscription(_broker, query, \"consoleHandle1\", \"{publishInterval:5}\");\n System.out.println(\"duration = \" + params.getLifetime());\n System.out.println(\"interval = \" + params.getPublishInterval());\n System.out.println(\"subscriptionId = \" + params.getSubscriptionId());\n System.out.println(\"consoleHandle = \" + params.getConsoleHandle());\n\n // Sleep a while, getting query result as they become available\n try\n {\n Thread.sleep(20000);\n }\n catch (InterruptedException ie)\n {\n }\n\n // Refresh the subscription getting results asynchronously, just for variety\n System.out.println(\"Calling refreshSubscription on \" + params.getSubscriptionId());\n _console.refreshSubscription(params.getSubscriptionId(), \"{replyHandle:ignoredReplyHandle}\");\n\n\n // Create a subscription for _class_name = queue\n System.out.println(\"Creating Query for all queue objects\");\n query = new QmfQuery(QmfQueryTarget.OBJECT, \"['eq', '_class_name', ['quote', 'queue']]\");\n params = _console.createSubscription(_broker, query, \"queues\");\n\n while (_objectId == null)\n {\n System.out.println(\"Waiting for ObjectId to be set\");\n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException ie)\n {\n }\n }\n\n // Cancel the query for all queue objects\n System.out.println(\"Cancelling Query for all queue objects\");\n _console.cancelSubscription(params.getSubscriptionId());\n\n // Create a subscription for _object_id\n System.out.println(\"Creating Query for _object_id = \" + _objectId);\n query = new QmfQuery(QmfQueryTarget.OBJECT, _objectId);\n params = _console.createSubscription(_broker, query, \"queues\");\n\n }\n catch (QmfException qmfe)\n {\n System.err.println(\"QmfException \" + qmfe.getMessage() + \": BrokerSubscriptionTestConsole failed\");\n System.exit(1);\n }\n }", "@Test\n\tpublic void sendMessagesToOneServer() throws URISyntaxException, InterruptedException {\n\t\t// CONFIG //\n\t\t////////////\n\n\t\tint messagesCountPerClient = 500;\n\t\tint clientsCount = 20;\n\t\tint sendPoolSize = 40;\n\t\tint totalMessagesCount = messagesCountPerClient * clientsCount;\n\n\t\tint messageSize = 307200;\n\n\t\twebSocketHandler.expectMessagesCount(totalMessagesCount);\n\t\twebSocketHandler.expectMessageSize(messageSize);\n\n\t\tString serverEndpoint = String.format(\"ws://localhost:%d/%s\", getServerPort(), endpoint);\n\t\tbyte[] message = new byte[messageSize];\n\t\tArrays.fill(message, (byte) 8);\n\n\t\t///////////\n\t\t// SETUP //\n\t\t///////////\n\n\t\tMap<Integer, DemoClient> clients = new HashMap<>();\n\n\t\tfor (int i = 0; i < clientsCount; i++) {\n\t\t\tURI uri = new URI(serverEndpoint);\n\t\t\tDemoClient client = new DemoClient(uri);\n\t\t\tclient.connectBlocking();\n\n\t\t\tclients.put(i, client);\n\t\t}\n\n\t\tThreadPoolExecutor tpe = new ThreadPoolExecutor(sendPoolSize, sendPoolSize, 1, TimeUnit.MINUTES, new LinkedBlockingQueue<>());\n\t\ttpe.prestartAllCoreThreads();\n\n\t\tlogger.info(\"Ready\");\n\n\t\t// Get some time to start visualvm\n// Thread.sleep(5);\n\n\t\tmonitorWebSocketHandler(webSocketHandler, 1, TimeUnit.SECONDS);\n\n\t\t/////////\n\t\t// RUN //\n\t\t/////////\n\n\t\tLocalDateTime startTime = LocalDateTime.now();\n\n\t\tfor (int i = 0; i < messagesCountPerClient; i++) {\n\t\t\tfor (int c = 0; c < clientsCount; c++) {\n\t\t\t\tDemoClient client = clients.get(c);\n\n\t\t\t\ttpe.submit(() -> {\n\t\t\t\t\tclient.send(message);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\ttpe.shutdown();\n\t\ttpe.awaitTermination(1, TimeUnit.MINUTES);\n\n\t\twebSocketHandler.awaitExpectation();\n\n\t\tLocalDateTime endTime = LocalDateTime.now();\n\n\t\tlong duration = ChronoUnit.MILLIS.between(startTime, endTime);\n\n\t\tint messagesPerSecond = (int) (totalMessagesCount * 1000 / duration);\n\n\t\tBigInteger bandwidth = BigInteger.valueOf(messageSize)\n\t\t\t\t.multiply(BigInteger.valueOf(totalMessagesCount))\n\t\t\t\t.multiply(BigInteger.valueOf(1000))\n\t\t\t\t.divide(BigInteger.valueOf(duration))\n\t\t\t\t.divide(BigInteger.valueOf(1024*1024))\n\t\t\t\t;\n\n\t\tlogger.info(\"Test duration : {} ms\", duration);\n\t\tlogger.info(\"{} messages per second\", messagesPerSecond);\n\t\tlogger.info(\"{} MB/s total\", bandwidth);\n\t\tlogger.info(\"{} MB/s per connection\", bandwidth.divide(BigInteger.valueOf(clientsCount)));\n\t}", "@Test\n public void startedSenderReceivingEventsWhileStartingShouldDrainQueues()\n throws Exception {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n AsyncInvocation<Void> inv =\n vm2.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 1000));\n startSenderInVMsAsync(\"ny\", vm2, vm4);\n inv.await();\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "public interface StuAnswerDataToMqService {\n\n /**\n * 向RabbitMq推送已做对的、未批改的习题数据\n * @param dataList\n * @throws Exception\n */\n void sendExerciseData2Mq(List<StudentWorkAnswer> dataList) throws BizLayerException;\n\n\n}", "@Test\n public void testJmsJndi() {\n\n // Construction never throws, so it can be done outside the try..catch.\n // In jndi.properties you'll have something like: queue.MyQueue = myqueue\n // Here you want to specify the \"MyQueue\" part.\n JmsConnector jmsConn = new JmsConnector(\"UserQueue\");\n\n try {\n\n // Send a text message.\n jmsConn.sendTextMessage(\"This is a text message!!\");\n\n // Build and send a map message:\n jmsConn.startMapMessage()\n .addMapString(\"name\", \"luke\")\n .addMapInt(\"age\", 29)\n .sendMapMessage();\n\n // Consume the text message - wait forever.\n Message msg1 = jmsConn.consume();\n Assert.assertTrue(msg1 instanceof TextMessage);\n\n // Consume the map message - wait only 5 seconds.\n Message msg2 = jmsConn.consume(5);\n Assert.assertTrue(msg2 instanceof MapMessage);\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Always close the connection in a finally block:\n jmsConn.close();\n }\n }", "@Test\n public void startedSenderReceivingEventsWhileStoppingShouldDrainQueues()\n throws Exception {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n AsyncInvocation<Void> inv =\n vm2.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 1000));\n stopSenderInVMsAsync(\"ny\", vm2, vm4);\n inv.await();\n\n startSenderInVMsAsync(\"ny\", vm2, vm4);\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "public interface ILamportServer extends Remote {\n public String SERVICE_NAME = \"LAMPORT_RMI\"; // Nom du service\n \n /**\n * Envoie un Message REQUEST aux autres serveurs pour annoncer le fait de \n * vouloir rentrer dans la section critique\n * @param message Le message envoyé avec une requête\n * @throws RemoteException \n */\n public void request(Message message) throws RemoteException;\n \n /**\n * Envoi du Message RESPONSE après avoir Reçu le Message REQUEST\n * @param message Le message envoyé avec une réponse\n * @throws RemoteException \n */\n public void response(Message message) throws RemoteException;\n \n /**\n * Envoie du message FREE pour indiquer aux autres serveur que l'on sort de\n * la section critique\n * @param message Le message envoyé pour libérer la section critique\n * @throws RemoteException \n */\n public void freeSC(Message message) throws RemoteException;\n \n /**\n * Métode pour modifier la variable globalle dans tous les serveurs\n * @param newValue La nouvelle valeur de la variable\n * @throws RemoteException \n */\n public void setVariableGlobally(int newValue) throws RemoteException;\n}", "@Test\n public void stoppedSenderShouldNotAddEventsToTmpDroppedEventsButStillDrainQueuesWhenStarted() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n stopSenderInVMsAsync(\"ny\", vm2, vm4);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 0, 100));\n\n // verify tmpDroppedEvents is 0 at site-ny\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 0));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 0));\n\n\n startSenderInVMsAsync(\"ny\", vm2, vm4);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 1000));\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 900));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 900));\n\n // verify the secondary's queues are drained at site-ny\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "String getQueueManagerPort();", "void handleMessage(EndpointPort from, EndpointPort to, Object message);", "public static void main(String[] args) throws JMSException, IOException {\n JmsFactoryFactory jmsFact = JmsFactoryFactory.getInstance();\n\n // Create a JMS destination\n Destination dest;\n\n // Create JMS queue\n JmsQueue queue = jmsFact.createQueue(QUEUE_NAME);\n dest = queue;\n\n // Create a unified JMS connection factory\n JmsConnectionFactory connFact = jmsFact.createConnectionFactory();\n\n // Configure the connection factory\n connFact.setBusName(BUS_NAME);\n connFact.setProviderEndpoints(JMS_ENDPOINT);\n\n // Create the connection\n Connection conn = connFact.createConnection();\n\n Session session = null;\n MessageProducer producer = null;\n MessageConsumer consumer = null;\n try {\n\n // Create a session\n session = conn.createSession(false, // Not transactional\n Session.AUTO_ACKNOWLEDGE);\n\n // Create a message producer\n producer = session.createProducer(dest);\n consumer = session.createConsumer(dest);\n\n // Loop reading lines of text from the console to send\n System.out.println(\"Ready to send to \" + dest + \" on bus \" + BUS_NAME);\n BufferedReader lineInput = new BufferedReader(new InputStreamReader(System.in));\n String line = lineInput.readLine();\n\n TextMessage message = session.createTextMessage();\n message.setText(line);\n\n // Send the message\n producer.send(message,\n Message.DEFAULT_DELIVERY_MODE,\n Message.DEFAULT_PRIORITY,\n Message.DEFAULT_TIME_TO_LIVE);\n\n // should start the connection to receive messages\n conn.start();\n Message msg = consumer.receiveNoWait();\n System.out.println(\"Consumed a message from queue\");\n if (msg != null) {\n msg.acknowledge();\n System.out.println(msg.toString());\n } else System.out.println(\"null msg\");\n\n }\n // Finally block to ensure we close our JMS objects\n finally {\n\n // Close the message producer\n try {\n if (producer != null) producer.close();\n if (consumer != null) consumer.close();\n } catch (JMSException e) {\n System.err.println(\"Failed to close message producer: \" + e);\n }\n\n // Close the session\n try {\n if (session != null) session.close();\n } catch (JMSException e) {\n System.err.println(\"Failed to close session: \" + e);\n }\n\n // Close the connection\n try {\n conn.close();\n } catch (JMSException e) {\n System.err.println(\"Failed to close connection: \" + e);\n }\n\n }\n }", "public static void main(String[] args) {\n\t\tClientResource resource = new ClientResource(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"http://shironambd.com/api/v1/receiver/?access_key=529a2d308333d14178f5c54d&format=json\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"&mapId=0\");\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tRepresentation representation = resource.get();\r\n\t\t\tresponse = representation.getText();\r\n\t\t} catch (ResourceException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tList<Receiver> receivers = new ArrayList<Receiver>();\r\n\t\ttry {\r\n\t\t\tJsonElement jelement = new JsonParser().parse(response);\r\n\t\t\tJsonObject jobject = jelement.getAsJsonObject();\r\n\t\t\tJsonArray jarray = jobject.getAsJsonArray(\"objects\");\r\n\r\n\t\t\tint receiverId = 0;\r\n\r\n\t\t\tint arrayLength = jarray.size();\r\n\t\t\tfor (int i = 0; i < arrayLength; i++) {\r\n\t\t\t\tjobject = jarray.get(i).getAsJsonObject();\r\n\t\t\t\treceiverId = Integer.parseInt(jobject.get(\"receiverId\").toString().trim());\r\n\t\t\t\tint x = jobject.get(\"x\").getAsInt();\r\n\t\t\t\tint y = jobject.get(\"y\").getAsInt();\r\n\t\t\t\tint mapId = jobject.get(\"mapId\").getAsInt();\r\n\t\t\t\tReceiver receiver = new Receiver(receiverId);\r\n\t\t\t\treceiver.setxPos(x);\r\n\t\t\t\treceiver.setyPos(y);\r\n\t\t\t\treceivers.add(receiver);\r\n\t\t\t\tSystem.out.println(receiver);\r\n\t\t\t\tSystem.out.println(mapId);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void test_run_5() throws IOException, InterruptedException {\n\t\t\n\t\t// bind server socket and start TCPserver\n\t\tmockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));\n\t\tmockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());\n\t\tmockServerThread.start();\n\t\t\n\t\tTCPclientSocket = new Socket(serverHostName, port_1);\n\t\twhen(mockTCPclientTest.getClientSocket()).thenReturn(TCPclientSocket);\t\n\t\t\n\t\tclientManager_1 = clientManager_1.initClientManager(mockTCPclientTest.getClientSocket(), sensor_ID_1);\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the client side that is responsible for listening messages sent by TCPserver and re-sending particular responses that are verified in the consecutive test runs\n\t\t// method under test messagesHandler() is called in this thread\n\t\ttestThread_client.start();\n\t\tThread.sleep(20);\n\t\t\n\t\tint sensorID = 1;\n\t\tfloat[][] sensor_coordinates_array_1 = {{11.0f, 14.0f}};\n\t\tString softwareImageID_1 = \"Release X\";\n\t\tint measurement_limit_1 = 5;\n\t\tSensorState sens_state_1 = SensorState.OPERATIONAL;\n\t\tdouble sens_watchdog_scale_factor_1 = 0.1;\n\t\tdouble received_Local_1h_watchdog = Local_1h_Watchdog.getInstance().getExpiration() * 0.25;\n\t\twhen(mockComputeEngine_Runnable.getLocal_1h_watchdog()).thenReturn(received_Local_1h_watchdog);\n\t\t\n\t\tSensorImpl temp_sens_sent_1 = new SensorImpl(sensorID, new Point2D.Float(sensor_coordinates_array_1[0][0], sensor_coordinates_array_1[0][1]), softwareImageID_1, measurement_limit_1);\n\t\ttemp_sens_sent_1.setSensorState(sens_state_1);\n\t\ttemp_sens_sent_1.setSensor_watchdog_scale_factor(sens_watchdog_scale_factor_1);\n\t\t\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_SensorInfoUpdate(temp_sens_sent_1.getSensorID(), temp_sens_sent_1.getCoordinates(), temp_sens_sent_1.getSoftwareImageID(), \n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getSensorState(),\n\t\t\t\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable.getLocal_1h_watchdog(), mockComputeEngine_Runnable.getLocal_24h_watchdog(),\n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getLocal_watchdog_scale_factor(), temp_sens_sent_1.getSensor_m_history_array_size()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(20);\n\t\t\n\t\tassertFalse(clientManager_1.isClientManagerRunning());\n\t\tThread.sleep(20);\n\t}", "public static void main(String[] args) throws Exception{\n ZMQ.Context context = ZMQ.context(1);\n ZMQ.Socket socket = context.socket(ZMQ.REP);\n\n System.out.println(\"Binding hello world server\");\n socket.bind (\"tcp://*:5555\");\n\n while (true) {\n\n // Wait for next request from client\n byte[] reply = socket.recv(0);\n System.out.println(\"Received \" + reply.length );\n System.out.println(\"Received \" + \": [\" + new String(reply) + \"]\");\n\n Thread.sleep(1000);\n // Create a \"Hello\" message.\n // Ensure that the last byte of our \"Hello\" message is 0 because\n // our \"Hello World\" server is expecting a 0-terminated string:\n String requestString = \"Hello\" ;\n byte[] request = requestString.getBytes();\n //request[request.length-1]=0; //Sets the last byte to 0\n // Send the message\n System.out.println(\"Sending response \" + requestString );\n socket.send(request, 0);\n\n // Get the reply.\n }\n }", "public void multiReceivePackage(Queue<String> inQueue) {\n InputStream in = null;\n\n try {\n byte[] receiveBuf = new byte[BUFSIZE];\n //socket = server.accept();\n //System.out.println(\"Receive: Connected to socket:\" + socket.getRemoteSocketAddress() + \"...sending echo string\");\n //System.out.println(socket.getRemoteSocketAddress());\n logger.info(\"Receive: Connected to socket:\" + socket.getRemoteSocketAddress().toString() + \"...sending echo string\");\n in = socket.getInputStream();\n String temp = \"\";\n while (in.read(receiveBuf) != -1) {\n temp += new String(receiveBuf);\n receiveBuf = new byte[BUFSIZE];\n if (temp.indexOf(\"#E\") >= 0) {\n break;\n }\n }\n logger.info(\"Message received: \" + temp.trim());\n\n inQueue.offer(temp.trim() + \"|\" + socket.getRemoteSocketAddress().toString());\n //System.out.println(\"Message and IP received: \" + temp.trim() + \"|\" + socket.getRemoteSocketAddress().toString());\n logger.debug(\"Message and IP received: \" + temp.trim() + \"|\" + socket.getRemoteSocketAddress().toString());\n socket.close();\n //Thread.sleep(500);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n\n }\n }", "@Ignore \n @Test\n public void testReceiveMessage() throws Exception {\n System.out.println(\"receiveMessage\");\n PooledConnection MQConn = null;\n String QueueName = \"\";\n String messageSelector = \"\";\n long timeout = 0L;\n ObjectMessage expResult = null;\n ObjectMessage result = JMSUtil.receiveMessage(MQConn, QueueName, messageSelector, timeout);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testReceiver() throws Exception\n {\n }", "@Test\n public void testAddingSinkEventInnerVlanEnabled() throws InterruptedException {\n init(true, VlanId.vlanId(\"4000\"), VlanId.vlanId(\"1000\"));\n\n Set<ConnectPoint> sinks2Cp = new HashSet<ConnectPoint>(Arrays.asList(CONNECT_POINT_B));\n Map<HostId, Set<ConnectPoint>> sinks2 = ImmutableMap.of(HOST_ID_NONE, sinks2Cp);\n\n //Adding the details to create different routes\n previousSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks);\n currentSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks2);\n // Creating new mcast event for adding sink\n McastEvent event = new McastEvent(McastEvent.Type.SINKS_ADDED, previousSubject, currentSubject);\n cordMcast.listener.event(event);\n synchronized (forwardMap) {\n forwardMap.wait(WAIT_TIMEOUT);\n }\n\n // ForwardMap will contain the operation \"Add\" in the flowObjective. None -> CP_B\n assertNotNull(forwardMap.get(DEVICE_ID_OF_A));\n assertEquals(forwardMap.get(DEVICE_ID_OF_A).op(), Objective.Operation.ADD);\n\n // Output port number will be PORT_B i.e. 16\n Collection<TrafficTreatment> traffictreatMentCollection =\n nextMap.get(DEVICE_ID_OF_A).next();\n assertEquals(1, traffictreatMentCollection.size());\n OutputInstruction output = null;\n for (TrafficTreatment trafficTreatment : traffictreatMentCollection) {\n output = outputPort(trafficTreatment);\n }\n assertNotNull(output);\n assertEquals(PORT_B, output.port());\n // Checking the group ip address\n TrafficSelector trafficSelector = forwardMap.get(DEVICE_ID_OF_A).selector();\n IPCriterion ipCriterion = ipAddress(trafficSelector);\n assertNotNull(ipCriterion);\n assertEquals(MULTICAST_IP, ipCriterion.ip().address());\n //checking the vlan criteria\n TrafficSelector meta = forwardMap.get(DEVICE_ID_OF_A).meta();\n VlanIdCriterion vlanIdCriterion = vlanId(meta, Criterion.Type.VLAN_VID);\n assertNotNull(vlanIdCriterion); //since vlanEnabled flag is true\n assertEquals(cordMcast.assignedVlan(), vlanIdCriterion.vlanId());\n VlanIdCriterion innerVlanIdCriterion = vlanId(meta, Criterion.Type.INNER_VLAN_VID);\n assertNotNull(innerVlanIdCriterion);\n assertEquals(cordMcast.assignedInnerVlan(), innerVlanIdCriterion.vlanId());\n }", "void receive(String watcher) throws ProtocolExecutionException;", "@Test\n\tpublic void test_run_4() throws IOException, InterruptedException {\n\t\t\n\t\t// bind server socket and start TCPserver\n\t\tmockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));\n\t\tmockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());\n\t\tmockServerThread.start();\n\t\t\n\t\tTCPclientSocket = new Socket(serverHostName, port_1);\n\t\twhen(mockTCPclientTest.getClientSocket()).thenReturn(TCPclientSocket);\t\n\t\t\n\t\tclientManager_1 = clientManager_1.initClientManager(mockTCPclientTest.getClientSocket(), sensor_ID_1);\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the client side that is responsible for listening messages sent by TCPserver and re-sending particular responses that are verified in the consecutive test runs\n\t\t// method under test messagesHandler() is called in this thread\n\t\ttestThread_client.start();\n\t\tThread.sleep(20);\n\t\t\n\t\tint sensorID = 1;\n\t\tfloat[][] sensor_coordinates_array_1 = {{11.0f, 14.0f}};\n\t\tString softwareImageID_1 = \"Release X\";\n\t\tint measurement_limit_1 = 5;\n\t\tSensorState sens_state_1 = SensorState.PRE_OPERATIONAL;\n\t\tdouble sens_watchdog_scale_factor_1 = 0.01;\n\t\tdouble received_Local_1h_watchdog = 1300;\n\t\twhen(mockComputeEngine_Runnable.getLocal_1h_watchdog()).thenReturn(received_Local_1h_watchdog);\n\t\t\n\t\tSensorImpl temp_sens_sent_1 = new SensorImpl(sensorID, new Point2D.Float(sensor_coordinates_array_1[0][0], sensor_coordinates_array_1[0][1]), softwareImageID_1, measurement_limit_1);\n\t\ttemp_sens_sent_1.setSensorState(sens_state_1);\n\t\ttemp_sens_sent_1.setSensor_watchdog_scale_factor(sens_watchdog_scale_factor_1);\n\t\t\n\t\tassertFalse(Local_1h_Watchdog.getInstance().getEnabled());\n\t\t\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_SensorInfoUpdate(temp_sens_sent_1.getSensorID(), temp_sens_sent_1.getCoordinates(), temp_sens_sent_1.getSoftwareImageID(), \n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getSensorState(),\n\t\t\t\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable.getLocal_1h_watchdog(), mockComputeEngine_Runnable.getLocal_24h_watchdog(),\n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getLocal_watchdog_scale_factor(), temp_sens_sent_1.getSensor_m_history_array_size()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t\t\n\t\tassertEquals(sens_watchdog_scale_factor_1, \t\t\tTCPclient.watchdogs_scale_factor, 0.01);\n\t\tassertEquals(measurement_limit_1, \t\t\t\t\tTCPclient.measurements_limit, 0.01);\n\t\tassertEquals(received_Local_1h_watchdog, \t\t\tLocal_1h_Watchdog.getInstance().getTimeLeftBeforeExpiration(), 0.5);\n\t\tassertTrue(Local_1h_Watchdog.getInstance().getEnabled());\n\t\t\n\t\t// send ServerMessage_ACK message with respective watchdog values to close TCP connection - it is required to close ClientManager with no ConnectException thrown\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_ACK(sensorID, mockComputeEngine_Runnable.getLocal_1h_watchdog() ,mockComputeEngine_Runnable.getLocal_24h_watchdog()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t}", "public LiveRef(ObjID paramObjID, int paramInt, RMIClientSocketFactory paramRMIClientSocketFactory, RMIServerSocketFactory paramRMIServerSocketFactory) {\n/* 103 */ this(paramObjID, TCPEndpoint.getLocalEndpoint(paramInt, paramRMIClientSocketFactory, paramRMIServerSocketFactory), true);\n/* */ }", "@Test \n public void testRouteFailWithInvalidQuantityField() throws Exception {\n // 1. Arrange.. get the mock endpoint and set an assertion\n MockEndpoint mockOutput = getMockEndpoint(\"mock:validationFailed\");\n mockOutput.expectedMessageCount(1);\n\n // 2. Act.. send a message to the start component\n \tString jsonInput= \"{\\\"name\\\": \\\"Sunset\\\",\\\"quantity\\\": \\\"abc\\\"}\";\n template.sendBody(\"direct:remote\", jsonInput);\n\n // 3. Assert.. verify that the mock component received 1 message\n assertMockEndpointsSatisfied();\n }", "@SuppressWarnings(\"static-access\")\n\t@Test\n\tpublic void test_run_1() throws IOException, InterruptedException {\n\t\t\n\t\t// bind server socket and start TCPserver\n\t\tmockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));\n\t\tmockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());\n\t\tmockServerThread.start();\n\t\t\n\t\tTCPclientSocket = new Socket(serverHostName, port_1);\n\t\twhen(mockTCPclientTest.getClientSocket()).thenReturn(TCPclientSocket);\t\n\t\t\n\t\tclientManager_1 = clientManager_1.initClientManager(mockTCPclientTest.getClientSocket(), sensor_ID_1);\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the server side that is responsible for listening messages sent by TCPclient\n\t\ttestThread_server.start();\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the client side that is responsible for listening messages sent by TCPserver and re-sending particular responses that are verified in the consecutive test runs\n\t\t// method under test messagesHandler() is called in this thread\n\t\ttestThread_client.start();\n\t\tThread.sleep(20);\n\t\t\n\t\tint sensorID = 1;\n\t\tfloat[][] sensor_coordinates_array_1 = {{18.0f, 15.0f}};\n\t\tString softwareImageID_1 = \"Release XX\";\n\t\tint measurement_limit_1 = 48;\n\t\tSensorState sens_state_1 = SensorState.MAINTENANCE;\n\t\tdouble sens_watchdog_scale_factor_1 = 0.25;\n\t\t\n\t\tSensorImpl temp_sens_sent_1 = new SensorImpl(sensorID, new Point2D.Float(sensor_coordinates_array_1[0][0], sensor_coordinates_array_1[0][1]), softwareImageID_1, measurement_limit_1);\n\t\ttemp_sens_sent_1.setSensorState(sens_state_1);\n\t\ttemp_sens_sent_1.setSensor_watchdog_scale_factor(sens_watchdog_scale_factor_1);\n\t\t\n\t\tSensorImpl temp_sens_received_1 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertNotEquals(temp_sens_sent_1.getCoordinates(),\t\t\t\t\ttemp_sens_received_1.getCoordinates());\n\t\tassertNotEquals(temp_sens_sent_1.getLocal_watchdog_scale_factor(),\ttemp_sens_received_1.getLocal_watchdog_scale_factor(), 0.01);\n\t\tassertNotEquals(temp_sens_sent_1.getSoftwareImageID(),\t\t\t\ttemp_sens_received_1.getSoftwareImageID());\n\t\tassertNotEquals(temp_sens_sent_1.getSensor_m_history_array_size(),\ttemp_sens_received_1.getSensor_m_history_array_size());\n\t\t\n\t\t// add measurement to prove that the sensor has been reset (senor reset removes all measurement from a sensor's memory)\n\t\ttemp_sens_sent_1.addMeasurement(1.0, 1.0, 1, 1, 1);\n\t\tint number_of_measurements = 1;\n\t\tassertEquals(number_of_measurements, temp_sens_sent_1.getNumberOfMeasurements());\n\t\t\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_SensorInfoUpdate(temp_sens_sent_1.getSensorID(), temp_sens_sent_1.getCoordinates(), temp_sens_sent_1.getSoftwareImageID(), \n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getSensorState(),\n\t\t\t\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable.getLocal_1h_watchdog(), mockComputeEngine_Runnable.getLocal_24h_watchdog(),\n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getLocal_watchdog_scale_factor(), temp_sens_sent_1.getSensor_m_history_array_size()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t\t\n\t\ttemp_sens_received_1 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertTrue(receivedMessage instanceof ClientMessage_BootUp);\n\t\t\n\t\tint number_of_measurements_after_reset = 0;\n\t\tassertNotEquals(number_of_measurements, \t\t\t\t\t\t\ttemp_sens_received_1.getNumberOfMeasurements());\n\t\tassertEquals(number_of_measurements_after_reset, \t\t\t\t\ttemp_sens_received_1.getNumberOfMeasurements());\n\t\tassertEquals(temp_sens_sent_1.getSensorState(),\t\t\t\t\t\ttemp_sens_sent_1.getSensorState());\n\t\tassertEquals(temp_sens_sent_1.getCoordinates(),\t\t\t\t\t\ttemp_sens_received_1.getCoordinates());\n\t\tassertEquals(temp_sens_sent_1.getLocal_watchdog_scale_factor(),\t\ttemp_sens_received_1.getLocal_watchdog_scale_factor(), 0.01);\n\t\tassertEquals(temp_sens_sent_1.getSensorID(),\t\t\t\t\t\ttemp_sens_received_1.getSensorID());\n\t\tassertEquals(temp_sens_sent_1.getSoftwareImageID(),\t\t\t\t\ttemp_sens_received_1.getSoftwareImageID());\n\t\tassertEquals(temp_sens_sent_1.getSensor_m_history_array_size(),\t\ttemp_sens_received_1.getSensor_m_history_array_size());\n\t\t\n\t\tfloat[][] sensor_coordinates_array_2 = {{18.0f, 13.0f}};\n\t\tString softwareImageID_2 = \"Release XY\";\n\t\tint measurement_limit_2 = 36;\n\t\tSensorState sens_state_2 = SensorState.PRE_OPERATIONAL;\n\t\tdouble sens_watchdog_scale_factor_2 = 0.18;\n\t\t\n\t\tSensorImpl temp_sens_sent_2 = new SensorImpl(sensorID, new Point2D.Float(sensor_coordinates_array_2[0][0], sensor_coordinates_array_2[0][1]), softwareImageID_2, measurement_limit_2);\n\t\ttemp_sens_sent_1.setSensorState(sens_state_2);\n\t\ttemp_sens_sent_1.setSensor_watchdog_scale_factor(sens_watchdog_scale_factor_2);\n\t\t\n\t\tSensorImpl temp_sens_received_2 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertNotEquals(temp_sens_sent_2.getCoordinates(),\t\t\t\t\ttemp_sens_received_2.getCoordinates());\n\t\tassertNotEquals(temp_sens_sent_2.getSensorState(),\t\t\t\t\ttemp_sens_received_2.getSensorState());\n\t\tassertNotEquals(temp_sens_sent_2.getLocal_watchdog_scale_factor(),\ttemp_sens_received_2.getLocal_watchdog_scale_factor(), 0.01);\n\t\tassertNotEquals(temp_sens_sent_2.getSoftwareImageID(),\t\t\t\ttemp_sens_received_2.getSoftwareImageID());\n\t\tassertNotEquals(temp_sens_sent_2.getSensor_m_history_array_size(),\ttemp_sens_received_2.getSensor_m_history_array_size());\n\t\t\n\t\t// add measurement to prove that the sensor has been reset (senor reset removes all measurement from a sensor's memory)\n\t\ttemp_sens_sent_2.addMeasurement(1.0, 1.0, 1, 1, 1);\n\t\tassertEquals(number_of_measurements, temp_sens_sent_1.getNumberOfMeasurements());\n\t\t\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_SensorInfoUpdate(temp_sens_sent_2.getSensorID(), temp_sens_sent_2.getCoordinates(), temp_sens_sent_2.getSoftwareImageID(), \n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_2.getSensorState(),\n\t\t\t\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable.getLocal_1h_watchdog(), mockComputeEngine_Runnable.getLocal_24h_watchdog(),\n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_2.getLocal_watchdog_scale_factor(), temp_sens_sent_2.getSensor_m_history_array_size()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t\t\n\t\ttemp_sens_received_2 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertTrue(receivedMessage instanceof ClientMessage_BootUp);\n\t\t\n\t\tassertNotEquals(number_of_measurements, \t\t\t\t\t\t\ttemp_sens_received_2.getNumberOfMeasurements());\n\t\tassertEquals(number_of_measurements_after_reset, \t\t\t\t\ttemp_sens_received_2.getNumberOfMeasurements());\n\t\tassertEquals(temp_sens_sent_2.getSensorState(),\t\t\t\t\t\ttemp_sens_received_2.getSensorState());\n\t\tassertEquals(temp_sens_sent_2.getCoordinates(),\t\t\t\t\t\ttemp_sens_received_2.getCoordinates());\n\t\tassertEquals(temp_sens_sent_2.getLocal_watchdog_scale_factor(),\t\ttemp_sens_received_2.getLocal_watchdog_scale_factor(), 0.01);\n\t\tassertEquals(temp_sens_sent_2.getSensorID(),\t\t\t\t\t\ttemp_sens_received_2.getSensorID());\n\t\tassertEquals(temp_sens_sent_2.getSoftwareImageID(),\t\t\t\t\ttemp_sens_received_2.getSoftwareImageID());\n\t\tassertEquals(temp_sens_sent_2.getSensor_m_history_array_size(),\t\ttemp_sens_received_2.getSensor_m_history_array_size());\n\n\t\t// send ServerMessage_ACK message with respective watchdog values to close TCP connection - it is required to close ClientManager with no ConnectException thrown\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_ACK(sensorID, mockComputeEngine_Runnable.getLocal_1h_watchdog() ,mockComputeEngine_Runnable.getLocal_24h_watchdog()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t}", "@Test\n public void stoppedPrimarySenderShouldNotAddEventsToTmpDroppedEventsButStillDrainQueuesWhenStarted() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n stopSenderInVMsAsync(\"ny\", vm2);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 0, 100));\n\n // verify tmpDroppedEvents is 0 at site-ny\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 50));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 50));\n\n startSenderInVMsAsync(\"ny\", vm2);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 1000));\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 950));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 950));\n\n // verify the secondary's queues are drained at site-ny\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "public InMemoryQueueService(){\n this.ringBufferQueue = new QueueMessage[10000];\n }", "private ObservableOnSubscribe<Object> receiveLoop() {\n return emitter -> {\n Message message;\n try {\n while ( ( message = consumer.receive( jmsDelegate.receiveTimeout ) ) != null ) {\n streamStep.logDebug( message.toString() );\n emitter.onNext( message.getBody( Object.class ) );\n }\n } catch ( JMSRuntimeException jmsException ) {\n emitter.onError( jmsException );\n }\n emitter.onComplete();\n };\n }", "public static void main(String[] args) throws Exception {\n DefaultMQProducer producer = new\n DefaultMQProducer(\"producer1\");\n //Launch the instance.\n producer.setNamesrvAddr(\"192.168.0.159:9876\");\n\n producer.start();\n for (int i = 0; i < 2000; i++) {\n //Create a message instance, specifying topic, tag and message body.\n Message msg = new Message(\"test111\" /* Topic */,\n \"TagA\" /* Tag */,\n (\"{\\\"_db_\\\":\\\"order_service\\\",\\\"_table_\\\":\\\"order_base\\\",\\\"_event_\\\":\\\"row_insert\\\",\\\"order_id\\\":\\\"1\" + i +\"\\\",\\\"order_from\\\":\\\"rocketmq\\\",\\\"order_no\\\":\\\"P12311111\\\",\" +\n \"\\\"category\\\":\\\"1\\\",\\\"serve_type\\\":\\\"2\\\",\\\"account_id\\\":\\\"\\\",\\\"account_type\\\":\\\"\\\",\\\"order_status\\\":\\\"\\\",\\\"region_id\\\":\\\"\\\",\\\"appoint_method\\\":\\\"\\\",\\\"sp_type\\\":\\\"\\\",\\\"order_type\\\":\\\"\\\",\\\"is_delete\\\":\\\"\\\",\\\"refund_status\\\":\\\"\\\",\\\"order_pay_status\\\":\\\"\\\",\\\"is_logistics\\\":\\\"\\\",\\\"repair_type\\\":\\\"\\\",\\\"is_return\\\":\\\"\\\",\\\"create_time\\\":\\\"\\\",\\\"update_time\\\":\\\"\\\"}\").getBytes(RemotingHelper.DEFAULT_CHARSET) /* Message body */\n );\n //Call send message to deliver message to one of brokers.\n SendResult sendResult = producer.send(msg);\n System.out.printf(\"%s%n\", sendResult);\n }\n //Shut down once the producer instance is not longer in use.\n producer.shutdown();\n }", "public MHLMobileIOClient(BandAccelerometerAppActivity a, MHLBlockingSensorReadingQueue q, String ip, int port, String id){\n this.parentActivity = a;\n this.sensorReadingQueue = q;\n this.ip = ip;\n this.port = port;\n this.userID = id;\n this.startClient();\n }", "String getQueueManagerHost();", "@Test\n public void testAddingSinkEventVlanEnabled() throws InterruptedException {\n init(true, VlanId.vlanId(\"4000\"), null);\n\n Set<ConnectPoint> sinks2Cp = new HashSet<ConnectPoint>(Arrays.asList(CONNECT_POINT_B));\n Map<HostId, Set<ConnectPoint>> sinks2 = ImmutableMap.of(HOST_ID_NONE, sinks2Cp);\n\n //Adding the details to create different routes\n previousSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks);\n currentSubject = McastRouteUpdate.mcastRouteUpdate(route1, sources, sinks2);\n // Creating new mcast event for adding sink\n McastEvent event = new McastEvent(McastEvent.Type.SINKS_ADDED, previousSubject, currentSubject);\n cordMcast.listener.event(event);\n synchronized (forwardMap) {\n forwardMap.wait(WAIT_TIMEOUT);\n }\n // ForwardMap will contain the operation \"Add\" in the flowObjective. None -> CP_B\n assertNotNull(forwardMap.get(DEVICE_ID_OF_A));\n assertEquals(forwardMap.get(DEVICE_ID_OF_A).op(), Objective.Operation.ADD);\n\n // Output port number will be PORT_B i.e. 16\n Collection<TrafficTreatment> traffictreatMentCollection =\n nextMap.get(DEVICE_ID_OF_A).next();\n assertEquals(1, traffictreatMentCollection.size());\n OutputInstruction output = null;\n for (TrafficTreatment trafficTreatment : traffictreatMentCollection) {\n output = outputPort(trafficTreatment);\n }\n assertNotNull(output);\n assertEquals(PORT_B, output.port());\n // Checking the group ip address\n TrafficSelector trafficSelector = forwardMap.get(DEVICE_ID_OF_A).selector();\n IPCriterion ipCriterion = ipAddress(trafficSelector);\n assertNotNull(ipCriterion);\n assertEquals(MULTICAST_IP, ipCriterion.ip().address());\n //checking the vlan criteria\n TrafficSelector meta = forwardMap.get(DEVICE_ID_OF_A).meta();\n VlanIdCriterion vlanIdCriterion = vlanId(meta, Criterion.Type.VLAN_VID);\n assertNotNull(vlanIdCriterion); //since vlanEnabled flag is true\n assertEquals(cordMcast.assignedVlan(), vlanIdCriterion.vlanId());\n VlanIdCriterion innerVlanIdCriterion = vlanId(meta, Criterion.Type.INNER_VLAN_VID);\n assertNull(innerVlanIdCriterion);\n }", "public MsvmLANEndPoint(IJIDispatch objectDispatcher, SWbemServices service) {\n\t\tsuper(objectDispatcher, service);\n\t}", "QueueDto lookupClientQueue(long clientId) throws IOException, MlmqException;", "public static void main (String[] args) throws Exception {\n ZMQ.Context context = ZMQ.context(1);\n\n ZMQ.Socket socket = context.socket(ZMQ.REP);\n socket.bind(\"tcp://*:5556\");\n\n\t\t\t\twhile (!Thread.currentThread().isInterrupted()) {\n // Wait for next request from the client\n String string = socket.recvStr(0).trim();\n System.out.println(\"Received \"+string);\n\n // Send reply back to client\n String reply = \"true\";\n socket.send(reply.getBytes(), 0);\n }\n socket.close();\n context.term();\n\n\t}", "public static void main(String[] args) {\n\n\n final KafkaProducer<String, String> kafkaProducer = new KafkaProducer<String, String>(getKafkaProducerProperties());\n\n // kafka\n final String topic = \"test-4\";\n\n // queue manager.\n String PARAM_QUEUE_NAME = \"DEV.QUEUE.1\";\n String PARAM_USERNAME = \"app\";\n String PARAM_PASSWORD = \"passw0rd\";\n String PARAM_QMGR_CHANNEL_NAME = \"DEV.APP.SVRCONN\";\n String PARAM_QMGR_NAME = \"QM1\";\n int PARAM_QMGR_PORT = 1414;\n String PARAM_QMGR_HOST_NAME = \"localhost\";\n\n Connection conn = null;\n\n try {\n\n // Set up the connection factory to connect to the queue manager,\n // populating it with all the properties we have been provided.\n MQConnectionFactory cf = new MQQueueConnectionFactory();\n cf.setTransportType(WMQConstants.WMQ_CM_CLIENT);\n cf.setHostName(PARAM_QMGR_HOST_NAME);\n cf.setPort(PARAM_QMGR_PORT);\n cf.setQueueManager(PARAM_QMGR_NAME);\n cf.setChannel(PARAM_QMGR_CHANNEL_NAME);\n\n // Create the connection to the queue manager\n conn = cf.createConnection(PARAM_USERNAME, PARAM_PASSWORD);\n\n // Create a session and a queue object to enable us to interact with the\n // queue manager. By creating a transactional session we can roll back\n // the message onto the queue if the processing fails.\n Session session = conn.createSession(true, 0);\n Queue q = session.createQueue(\"queue:///\"+PARAM_QUEUE_NAME);\n\n // For testing purposes we can put some messages onto the queue using this\n\n // Set up the consumer to read from the queue\n MessageConsumer consumer = session.createConsumer(q);\n\n // Don't forget to start the connection before trying to receive messages!\n conn.start();\n\n try {\n\n // Read messages from the queue and process them until there\n // are none left to read.\n while (true) {\n Message receivedMsg = consumer.receiveNoWait();\n if (receivedMsg != null) {\n // use final -> multithreading env\n final TextMessage rcvTxtMsg = (TextMessage) receivedMsg;\n final String txt = rcvTxtMsg.getText();\n final ProducerRecord<String, String> objectStringProducerRecord = new ProducerRecord<>(topic, null, txt);\n kafkaProducer.send(objectStringProducerRecord, (recordMetadata, e) -> {\n if (e!=null){\n logger.warn(\"Producer call back end up with exception\");\n try {\n session.rollback();\n logger.warn(\"Ibm mq session rollback\");\n } catch (JMSException ex) {\n logger.warn(\"Ibm mq session failed to rollback\");\n ex.printStackTrace();\n }\n } else {\n try {\n session.commit();\n logger.info(\"Transaction success: Message was committed by IBM MQ Session and was delivered by Kafka-producer to kafka topic: {}, with offset: {}\", recordMetadata.topic(), recordMetadata.offset());\n } catch (JMSException ex) {\n logger.info(\"Transaction failed: Message was not committed by IBM MQ Session\");\n throw new RuntimeException(e);\n }\n }\n });\n\n\n // Since we returned from processing the message without\n // an exception being thrown we have successfully\n // processed the message, so increment our success count\n // and commit the transaction so that the message is\n // permanently removed from the queue.\n// messagesProcessed++;\n// session.commit();\n }\n\n }\n\n } catch (JMSException jmse2)\n {\n // This block catches any JMS exceptions that are thrown during\n // the business processing of the message.\n jmse2.printStackTrace();\n\n // Roll the transaction back so that the message can be put back\n // onto the queue ready to have its proessing retried next time\n // the action is invoked.\n session.rollback();\n throw new RuntimeException(jmse2);\n\n } catch (RuntimeException e) {\n e.printStackTrace();\n\n // Roll the transaction back so that the message can be put back\n // onto the queue ready to have its proessing retried next time\n // the action is invoked.\n session.rollback();\n throw e;\n }\n\n // Indicate to the caller how many messages were successfully processed.\n\n } catch (JMSException jmse) {\n // This block catches any JMS exceptions that are thrown before the\n // message is retrieved from the queue, so we don't need to worry\n // about rolling back the transaction.\n jmse.printStackTrace();\n\n // Pass an indication about the error back to the caller.\n throw new RuntimeException(jmse);\n\n } finally {\n if (conn != null) {\n try {\n conn.close();\n } catch (JMSException jmse2) {\n // Swallow final errors.\n }\n }\n }\n\n }", "@Test\n public void testAZMQ() {\n try {\n if (ZMQ.context(1) != null) {\n System.out.println(\"ZMQ Binding successful\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Unable to bind ZMQ\");\n }\n }", "@Test\n public void unstartedSenderShouldNotAddReceivedEventsIntoTmpDropped() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n // create receiver on site-ln and site-ny\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n // create senders on site-ny, Note: sender-id is its destination, i.e. ny\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n\n // create senders on site-ln, Note: sender-id is its destination, i.e. ln\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n\n // create PR on site-ny\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n // create PR on site-ln\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n // start sender on site-ny\n startSenderInVMs(\"ny\", vm2, vm4);\n\n // do 100 puts on site-ln\n vm3.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 0, 100));\n\n // verify site-ny have 100 entries\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n // verify tmpDroppedEvents should be 100 at site-ln, because the sender is not started yet\n vm3.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ln\", 100));\n vm5.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ln\", 100));\n\n // verify site-ln has not received the events from site-ny yet\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 0));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 0));\n\n // start sender on site-ln\n startSenderInVMsAsync(\"ln\", vm3, vm5);\n\n // verify tmpDroppedEvents should be 0 now at site-ny\n vm3.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ln\", 0));\n vm5.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ln\", 0));\n\n vm3.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ln\"));\n vm5.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ln\"));\n }", "@Override\n public void beforeAll(ExtensionContext context) {\n localServer = RSocketFactory.receive()\n .acceptor((setupPayload, rSocket) -> Mono.just(new SimpleResponderImpl(setupPayload, rSocket)))\n .transport(LocalServerTransport.create(\"test\"))\n .start()\n .block();\n }", "@SuppressWarnings(\"empty-statement\")\n public void runClient() {\n // setup MQTT Client\n String clientID = \"apto01\";\n String pass = \"1234\";\n connOpt = new MqttConnectOptions();\n\n connOpt.setCleanSession(true);\n connOpt.setKeepAliveInterval(30);\n connOpt.setUserName(\"isis2503\");\n connOpt.setPassword(pass.toCharArray());\n\n alertaLogic = new AlertLogic();\n\n // Connect to Broker\n try {\n myClient = new MqttClient(BROKER_URL, clientID);\n myClient.setCallback(this);\n myClient.connect(connOpt);\n } catch (MqttException e) {\n e.printStackTrace();\n System.exit(-1);\n }\n\n System.out.println(\"Connected to \" + BROKER_URL);\n\n // setup topic\n // topics on m2m.io are in the form <domain>/<stuff>/<thing>\n // subscribe to topic if subscriber\n if (subscriber) {\n try {\n int subQoS = 0;\n myClient.subscribe(infoInoTopic, subQoS);\n } catch (MqttException e) {\n e.printStackTrace();\n }\n }\n // disconnect\n try {\n // wait to ensure subscribed messages are delivered\n while (subscriber);\n myClient.disconnect();\n } catch (MqttException e) {\n e.printStackTrace();\n }\n }", "public interface IMulticastObject<T> extends Serializable {\n\n public T refreshMachineData();\n\n public String getMulticastIp();\n public void setMulticastIp(String multicastIp);\n\n public int getMulticastPort();\n public void setMulticastPort(int multicastPort);\n}", "@Override\n public void run() {\n ZMQ.Context context = ZMQ.context(2);\n\n ZMQ.Socket publisher = context.socket(ZMQ.PUB);\n publisher.setAffinity(1);\n publisher.setHWM(0);\n publisher.bind(\"tcp://*:5556\");\n //publisher.bind(\"ipc://weather\");\n\n ZMQ.Socket incoming = context.socket(ZMQ.PULL);\n incoming.setHWM(0);\n incoming.setAffinity(2);\n incoming.bind(\"tcp://*:5557\");\n\n System.out.println(\"Sequencer is alive\");\n\n ZMQ.proxy(incoming, publisher, null);\n // while (! Thread.currentThread().isInterrupted()) {\n // byte[] data = incoming.recv(0);\n // //System.out.printf(\"Received message with %d bytes\\n\", data.length);\n // publisher.send(data, 0);\n // }\n\n publisher.close();\n incoming.close();\n context.term();\n }", "List<Command> receive(final String receiveQueueId) throws ZigBeeException;", "public static void main(String[] args) {\n try (BufferedReader br = new BufferedReader(new FileReader(\"src/main/resources/jel.log\"))) {\n String line = br.readLine();\n\n JsonNode root;\n JsonNode event;\n if (line != null) {\n //prepare the connection\n OtpNode node = new OtpNode(\"java\");\n OtpMbox mbox = node.createMbox(\"myMailbox\");\n String defaultServerNodeName = \"myserver@\" + node.host();\n System.out.format(\"Server Node to contact [%s]> \", defaultServerNodeName);\n OtpErlangTuple serverPidTuple = new OtpErlangTuple(new OtpErlangObject[]{new OtpErlangAtom(\"server\"), new OtpErlangAtom(defaultServerNodeName)});\n if (!node.ping(defaultServerNodeName, 1000)) {\n System.out.println(\"Erlang node is not available: \" + defaultServerNodeName);\n return;\n }\n\n root = mapper.readTree(line);\n event = root.get(\"Event\");\n\n //prepare the representation expected by Erlang and send\n OtpErlangList erlangStruct = convertObjectNode(event);\n sendMessage(mbox, \"server\", defaultServerNodeName, serverPidTuple, erlangStruct);\n\n while ((line = br.readLine()) != null) {\n root = mapper.readTree(line);\n event = root.get(\"Event\");\n\n //prepare the representation expected by Erlang and send\n erlangStruct = convertObjectNode(event);\n sendMessage(mbox, \"server\", defaultServerNodeName, serverPidTuple, erlangStruct);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testGetServerLocal() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_LOCAL_CONNECTOR);\n String result = instance.getServer(\"localhost\").getClass().getName();\n assertEquals(expResult, result);\n }", "public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}", "public final void mo27572a() {\n this.f19763c.f19791a.f19852n.f19828q = this.f19763c.m21468g();\n ArrayList<Client> arrayList = this.f19762b;\n int size = arrayList.size();\n int i = 0;\n while (i < size) {\n Object obj = arrayList.get(i);\n i++;\n ((Client) obj).getRemoteService(this.f19763c.f19805o, this.f19763c.f19791a.f19852n.f19828q);\n }\n }", "@SuppressWarnings(\"static-access\")\n\t@Before\n\tpublic void before() throws IOException {\n\t\tclientManager_1 = new ClientManager();\n\t\t\n \tif (mockTCPclientTest.Client_Sensors_LIST == null) {\n \t\tmockTCPclientTest.Client_Sensors_LIST = new ArrayList<>();\n \t}\n \tif (mockTCPclientTest.searchInClientSensorList(sensor_ID_1) == null) {\n \t\tmockTCPclientTest.Client_Sensors_LIST = mockTCPclientTest.updateClientSensorList(new SensorImpl(sensor_ID_1));\n \t}\n\t\t// mocked objects \n\t\tmockTCPserverTest = mock(TCPserver.class);\n\t\tmockTCPclientTest = mock(TCPclient.class);\n\t\tmockClientSocket = mock(Socket.class);\n\t\tmockComputeEngine_Runnable = mock(ComputeEngine_Runnable.class);\n\t\t\n\t\t// create a real Server Socket for the TCPserver mock to enable the Client Socket to set up the TCP connection\t\t\n\t\ttempServerSocket_1 = new ServerSocket();\n\t\twhen(mockTCPserverTest.getServerSocket()).thenReturn(tempServerSocket_1);\n\t\t\n\t\t/* To avoid \"remote deadlock\" - there is a need to submit mockComputeEngine_Runnable to ThreadPoolExecutor \n\t\t * The ObjectInputStream on the client is waiting for the object stream from the server before proceeding, but the server isn't going to send that, \n\t\t * because its ObjectInputStream is waiting for the header from the client before proceeding... \n\t\t*/\n\t\tMockito.doAnswer(new Answer<Thread>() {\n @Override\n public Thread answer(InvocationOnMock invocation) throws Throwable {\n Object[] arguments = invocation.getArguments();\n if (arguments != null && arguments.length > 0 && arguments[0] != null ) {\n \tfinal ServerSocket servSocket = (ServerSocket) arguments[0];\n \tmockServerThread = new Thread(new Runnable() {\n \t\tpublic void run() {\n \t\t\twhile(!servSocket.isClosed()) {\n\t\t \t\ttry {\n\t\t\t\t\t\t\t\t\tmockClientSocket = servSocket.accept();\n\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable = Mockito.spy(new ComputeEngine_Runnable(mockClientSocket, 1.0, false));\n\t\t\t\t\t\t\t\t\tauxiliaryServerThreadExecutor.submit(mockComputeEngine_Runnable);\n\t\t\t\t\t\t\t\t} catch (IOException IOex) {\n\t\t\t\t\t\t\t\t\tmockServerThread.interrupt();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Server Thread Stopped.\");\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Server\" + IOex.getMessage());\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n \t\t\t}\n \t\t}\n \t});\n }\n return mockServerThread;\n }\n\t\t}).when(mockTCPserverTest).startServer(Matchers.any(ServerSocket.class)); \n\t\t// Mockito.doAnswer - to mock void method to do something (mock the behavior despite being void) - in this case it is used for TCPserver.startServer();\n\t\t\n\t\t// there is not need to verify messages sent by the Client Manager in the last 2 test runs\n\t\tif(MessagesHandler_ServerMessage_SensorInfoUpdateTest.testID < 4) {\n\t\t\t// test thread that listens for messages on the server side\n\t\t\ttestThread_server = new Thread(new Runnable() {\n\t\t\t//Runnable serverTask = new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(clientManager_1.isClientManagerRunning()) {\n\t\t\t\t\t\t\treceivedMessage = (Message_Interface) (mockComputeEngine_Runnable.readMessage(mockComputeEngine_Runnable.getInputReaderStream()));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\t// To prove that exception's stack trace reported by JUnit caught ClassNotFoundException\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// To prove that exception's stack trace reported by JUnit caught IOException\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t// test thread that listens for messages on the client side and resends particular responses for the received messages\n\t\ttestThread_client = new Thread(new Runnable() {\n\t\t\t//Runnable serverTask = new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tclientManager_1.messagesHandler(clientManager_1.getOutputStream(), clientManager_1.getInputReaderStream());\n\t\t\t}\n\t\t});\n\t\t\n\t\tSystem.out.println(\"\\t\\tTest Run \"+MessagesHandler_ServerMessage_SensorInfoUpdateTest.testID+\" Purpose:\");\n\t\tSystem.out.println(testPurpose[(MessagesHandler_ServerMessage_SensorInfoUpdateTest.testID-1)]);\n\t\tSystem.out.println(\"\\t\\tTest Run \"+MessagesHandler_ServerMessage_SensorInfoUpdateTest.testID+\" Logic:\");\n\t}", "@Test\n public void testErrOnMaxPayloadLimit() {\n long expectedMaxPayload = 10;\n String serverInfo =\n \"INFO {\\\"server_id\\\":\\\"foobar\\\",\\\"version\\\":\\\"0.6.6\\\",\\\"go\\\":\\\"go1.5.1\\\",\\\"host\\\":\\\"%s\\\",\\\"port\\\":%d,\\\"auth_required\\\":false,\\\"ssl_required\\\":false,\\\"max_payload\\\":%d}\\r\\n\";\n\n TCPConnectionFactoryMock mcf = new TCPConnectionFactoryMock();\n String infoString = (String.format(serverInfo, \"mockserver\", 2222, expectedMaxPayload));\n // System.err.println(infoString);\n mcf.setServerInfoString(infoString);\n ConnectionFactory cf = new ConnectionFactory();\n try (Connection c = cf.createConnection(mcf)) {\n // Make sure we parsed max payload correctly\n assertEquals(c.getMaxPayload(), expectedMaxPayload);\n\n // Check for correct exception\n boolean exThrown = false;\n try {\n c.publish(\"hello\", \"hello world\".getBytes());\n } catch (IllegalArgumentException e) {\n assertEquals(ERR_MAX_PAYLOAD, e.getMessage());\n exThrown = true;\n } finally {\n assertTrue(\"Should have generated a IllegalArgumentException.\", exThrown);\n }\n\n // Check for success on less than maxPayload\n\n } catch (IOException | TimeoutException e) {\n fail(\"Connection to mock server failed: \" + e.getMessage());\n }\n }", "@Test\n public void testReconnectPacket() throws Exception {\n ConnectionFactory failoverFactory = new ActiveMQConnectionFactory(\"failover:(tcp://localhost:61616)\");\n ActiveMQConnection connection = (ActiveMQConnection)failoverFactory.createConnection();\n\n\n try {\n ActiveMQSession session = (ActiveMQSession)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n Queue tempQueue = session.createTemporaryQueue();\n MessageProducer producer = session.createProducer(tempQueue);\n server.getRemotingService().getConnections().forEach(r -> {\n NettyConnection nettyConnection = (NettyConnection) r.getTransportConnection();\n ChannelFuture future = nettyConnection.getChannel().close();\n try {\n while (!future.isDone()) {\n Thread.sleep(10);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n });\n for (int i = 0; i < 10; i++) {\n producer.send(session.createTextMessage(\"hello\"));\n }\n connection.start();\n MessageConsumer consumer = session.createConsumer(tempQueue);\n for (int i = 0; i < 10; i++) {\n TextMessage message = (TextMessage) consumer.receive(1000);\n Assert.assertNotNull(message);\n Assert.assertEquals(\"hello\", message.getText());\n }\n } finally {\n connection.close();\n }\n Wait.assertEquals(0, () -> server.getSessions().size());\n }", "@Test\n public void testServerTask(){\n for(Double current : sampleLatLngs.keySet()) {\n tmp = current;\n try {\n runTestOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n byte[] returnedMessage = new ServerTask().execute(URL, String.valueOf(tmp), String.valueOf(sampleLatLngs.get(tmp)), \"N/A\", \"N/A\", \"N/A\").get();\n ByteArrayInputStream in = new ByteArrayInputStream(returnedMessage);\n ObjectInputStream is = new ObjectInputStream(in);\n Message convertedMessage = (Message) is.readObject();\n ensureMessageArraySizes(convertedMessage);\n } catch (Exception e) {\n assertFalse(\"Reached an exception: \" + e.getMessage(), true);\n }\n }\n });\n } catch (Throwable throwable) {\n assertFalse(\"Reached an exception: \" + throwable.getMessage(), true);\n }\n }\n }", "public void invokeNotification(){\r\n\t\tApplication application = eurekaClient.getApplication(\"NOTIFICATION-SERVICE\");\r\n\t InstanceInfo instanceInfo = application.getInstances().get(0);\r\n\t String url = \"http://\"+instanceInfo.getIPAddr()+ \":\"+instanceInfo.getPort()+\"/notification-service/notify\";\r\n\t System.out.println(\"URL\" + url); \r\n\t Notification notificationMockObject = new Notification();\r\n\t String notificationId = restTemplate.postForObject(url, notificationMockObject, String.class);\r\n\t System.out.println(\"RESPONSE \" + notificationId);\r\n\t}", "@SuppressWarnings(\"static-access\")\n\t@Test\n\tpublic void test_run_3() throws IOException, InterruptedException {\n\t\t\n\t\t// bind server socket and start TCPserver\n\t\tmockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));\n\t\tmockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());\n\t\tmockServerThread.start();\n\t\t\n\t\tTCPclientSocket = new Socket(serverHostName, port_1);\n\t\twhen(mockTCPclientTest.getClientSocket()).thenReturn(TCPclientSocket);\t\n\t\t\n\t\tclientManager_1 = clientManager_1.initClientManager(mockTCPclientTest.getClientSocket(), sensor_ID_1);\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the server side that is responsible for listening messages sent by TCPclient\n\t\ttestThread_server.start();\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the client side that is responsible for listening messages sent by TCPserver and re-sending particular responses that are verified in the consecutive test runs\n\t\t// method under test messagesHandler() is called in this thread\n\t\ttestThread_client.start();\n\t\tThread.sleep(20);\n\t\t\n\t\tint sensorID = 1;\n\t\tfloat[][] sensor_coordinates_array_1 = {{11.0f, 14.0f}};\n\t\tString softwareImageID_1 = \"Release X\";\n\t\tint measurement_limit_1 = 12;\n\t\tSensorState sens_state_1 = SensorState.DEAD;\n\t\tdouble sens_watchdog_scale_factor_1 = 0.15;\n\t\t\n\t\tSensorImpl temp_sens_sent_1 = new SensorImpl(sensorID, new Point2D.Float(sensor_coordinates_array_1[0][0], sensor_coordinates_array_1[0][1]), softwareImageID_1, measurement_limit_1);\n\t\ttemp_sens_sent_1.setSensorState(sens_state_1);\n\t\ttemp_sens_sent_1.setSensor_watchdog_scale_factor(sens_watchdog_scale_factor_1);\n\t\t\n\t\tSensorImpl temp_sens_received_1 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertNotEquals(temp_sens_sent_1.getSensorState(),\t\t\t\ttemp_sens_received_1.getSensorState());\n\t\t\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_SensorInfoUpdate(temp_sens_sent_1.getSensorID(), temp_sens_sent_1.getCoordinates(), temp_sens_sent_1.getSoftwareImageID(), \n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getSensorState(),\n\t\t\t\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable.getLocal_1h_watchdog(), mockComputeEngine_Runnable.getLocal_24h_watchdog(),\n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getLocal_watchdog_scale_factor(), temp_sens_sent_1.getSensor_m_history_array_size()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t\t\n\t\ttemp_sens_received_1 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertTrue(receivedMessage instanceof ClientMessage_ACK);\n\n\t\tassertEquals(temp_sens_sent_1.getSensorState(),\t\t\t\t\ttemp_sens_received_1.getSensorState());\n\t\t\n\t\tassertFalse(clientManager_1.isClientManagerRunning());\n\t}", "private void connect() throws IOException\n {\n JMXServiceURL jmxUrl = new JMXServiceURL(String.format(fmtUrl, host, port));\n JMXConnector jmxc = JMXConnectorFactory.connect(jmxUrl, null);\n mbeanServerConn = jmxc.getMBeanServerConnection();\n \n try\n {\n ObjectName name = new ObjectName(ssObjName);\n ssProxy = JMX.newMBeanProxy(mbeanServerConn, name, StorageServiceMBean.class);\n } catch (MalformedObjectNameException e)\n {\n throw new RuntimeException(\n \"Invalid ObjectName? Please report this as a bug.\", e);\n }\n \n memProxy = ManagementFactory.newPlatformMXBeanProxy(mbeanServerConn, \n ManagementFactory.MEMORY_MXBEAN_NAME, MemoryMXBean.class);\n runtimeProxy = ManagementFactory.newPlatformMXBeanProxy(\n mbeanServerConn, ManagementFactory.RUNTIME_MXBEAN_NAME, RuntimeMXBean.class);\n }", "@Test\n public void testPersistentPR_Restart_one_server_while_clean_queue() throws InterruptedException {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n // create locator on remote site\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n\n // create cache in remote site\n createCacheInVMs(nyPort, vm2, vm3);\n\n // create cache in local site\n createCacheInVMs(lnPort, vm4, vm5, vm6, vm7);\n\n // create senders with disk store\n String diskStore1 = vm4.invoke(() -> WANTestBase.createSenderWithDiskStore(\"ln\", 2,\n true, 100, 10, false, true, null, null, true));\n String diskStore2 = vm5.invoke(() -> WANTestBase.createSenderWithDiskStore(\"ln\", 2,\n true, 100, 10, false, true, null, null, true));\n String diskStore3 = vm6.invoke(() -> WANTestBase.createSenderWithDiskStore(\"ln\", 2,\n true, 100, 10, false, true, null, null, true));\n String diskStore4 = vm7.invoke(() -> WANTestBase.createSenderWithDiskStore(\"ln\", 2,\n true, 100, 10, false, true, null, null, true));\n\n logger\n .info(\"The DS are: \" + diskStore1 + \",\" + diskStore2 + \",\" + diskStore3 + \",\" + diskStore4);\n\n // create PR on remote site\n vm2.invoke(\n () -> WANTestBase.createPartitionedRegion(getTestMethodName(), null, 1, 100, isOffHeap()));\n vm3.invoke(\n () -> WANTestBase.createPartitionedRegion(getTestMethodName(), null, 1, 100, isOffHeap()));\n\n // create PR on local site\n vm4.invoke(createPartitionedRegionRunnable());\n vm5.invoke(createPartitionedRegionRunnable());\n vm6.invoke(createPartitionedRegionRunnable());\n vm7.invoke(createPartitionedRegionRunnable());\n\n\n // start the senders on local site\n startSenderInVMs(\"ln\", vm4, vm5, vm6, vm7);\n\n // wait for senders to become running\n vm4.invoke(waitForSenderRunnable());\n vm5.invoke(waitForSenderRunnable());\n vm6.invoke(waitForSenderRunnable());\n vm7.invoke(waitForSenderRunnable());\n\n logger.info(\"All senders are running.\");\n\n // start puts in region on local site\n vm4.invoke(() -> WANTestBase.doPuts(getTestMethodName(), 3000));\n logger.info(\"Completed puts in the region\");\n\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));\n logger.info(\"Check that no events are propagated to remote site\");\n\n vm7.invoke(killSenderRunnable());\n\n logger.info(\"Killed vm7 sender.\");\n // --------------------close and rebuild local site\n // -------------------------------------------------\n // stop the senders\n\n vm4.invoke(() -> WANTestBase.stopSender(\"ln\"));\n vm5.invoke(() -> WANTestBase.stopSender(\"ln\"));\n vm6.invoke(() -> WANTestBase.stopSender(\"ln\"));\n\n logger.info(\"Stopped all the senders.\");\n\n // wait for senders to stop\n vm4.invoke(waitForSenderNonRunnable());\n vm5.invoke(waitForSenderNonRunnable());\n vm6.invoke(waitForSenderNonRunnable());\n\n // create receiver on remote site\n createReceiverInVMs(vm2, vm3);\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));\n\n logger.info(\"Start all the senders.\");\n\n AsyncInvocation<Void> startSenderwithCleanQueuesInVM4 =\n vm4.invokeAsync(() -> startSenderwithCleanQueues(\"ln\"));\n\n AsyncInvocation<Void> startSenderwithCleanQueuesInVM5 =\n vm5.invokeAsync(() -> startSenderwithCleanQueues(\"ln\"));\n AsyncInvocation<Void> startSenderwithCleanQueuesInVM6 =\n vm6.invokeAsync(() -> startSenderwithCleanQueues(\"ln\"));\n\n\n startSenderwithCleanQueuesInVM4.await();\n startSenderwithCleanQueuesInVM5.await();\n startSenderwithCleanQueuesInVM6.await();\n\n logger.info(\"Waiting for senders running.\");\n // wait for senders running\n vm4.invoke(waitForSenderRunnable());\n vm5.invoke(waitForSenderRunnable());\n vm6.invoke(waitForSenderRunnable());\n\n logger.info(\"All the senders are now running...\");\n\n // restart the vm\n vm7.invoke(\"Create back the cache\", () -> createCache(lnPort));\n\n // create senders with disk store\n vm7.invoke(\"Create sender back from the disk store.\",\n () -> WANTestBase.createSenderWithDiskStore(\"ln\", 2, true, 100, 10, false, true,\n null, diskStore4, false));\n\n // create PR on local site\n vm7.invoke(\"Create back the partitioned region\",\n () -> WANTestBase.createPartitionedRegion(getTestMethodName(), \"ln\", 1,\n 100, isOffHeap()));\n\n // wait for senders running\n // ----------------------------------------------------------------------------------------------------\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName(), 0));\n\n }", "PayloadCommunicator getPayloadCommunicator();", "public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}", "public static void main(String[] args) {\n// System.out.println(testQueue.getQueueElement());\n// System.out.println(testQueue.getQueueElement());\n }", "@Test(timeout = 4000)\n public void test72() throws Throwable {\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, true);\n QueueConnectionFactory queueConnectionFactory0 = new QueueConnectionFactory();\n connectionFactories0.addQueueConnectionFactory(queueConnectionFactory0);\n QueueConnectionFactory[] queueConnectionFactoryArray0 = connectionFactories0.getQueueConnectionFactory();\n assertEquals(1, queueConnectionFactoryArray0.length);\n }", "@Test\n\tpublic void testPublisherAndSubscriber() throws Exception {\n\t\tString address = \"kafka://[localhost:9092]&topic=junk\";\n\n\t\tZPublisher z = new ZPublisher(address);\n CountDownLatch latch = new CountDownLatch(2);\n\n List list = new ArrayList();\n\n com.jacamars.dsp.rtb.jmq.RTopic channel = new com.jacamars.dsp.rtb.jmq.RTopic(\"kafka://[localhost:9092]&topic=junk\");\n channel.addListener(new com.jacamars.dsp.rtb.jmq.MessageListener<String>() {\n @Override\n public void onMessage(String channel, String data) {\n System.out.println(\"<<<<<<<<<<<<<<<<<\" + data);\n list.add(data);\n // latch.countDown();\n }\n });\n\n com.jacamars.dsp.rtb.jmq.RTopic channel2= new com.jacamars.dsp.rtb.jmq.RTopic(\"kafka://[localhost:9092]&topic=junk\");\n channel2.addListener(new com.jacamars.dsp.rtb.jmq.MessageListener<String>() {\n @Override\n public void onMessage(String channel, String data) {\n System.out.println(\"================\" + data);\n list.add(data);\n\n }\n });\n\n\n z.add(\"Hello world\");\n z.add(\"Another Hello world\");\n\n Thread.sleep(15000);\n\t}", "public interface PoolingQueueService {\n\n void setIMessageProcessor(final IMessageProcessor iMessageProcessor) throws PoolingQueueException;\n\n MessageMapper cconn(String serialNumber, String contentType, MessageMapper messageMapper);\n\n MessageMapper cpull(String serialNumber);\n\n MessageMapper cpush(String serialNumber, String applicationID, String broadcast, String contentType, MessageMapper messageMapper);\n\n MessageMapper aconn(String serialNumber, String applicationID, String contentType, MessageMapper messageMapper);\n\n MessageMapper apull(String serialNumber, String applicationID, String messageAmount);\n\n MessageMapper apush(String serialNumber, String applicationID, String contentType, MessageMapper messageMapper);\n\n}", "public interface Connector {\n Object send(String serviceName, Object... params) throws Exception;\n Object send(String serviceName, List params) throws Exception;\n}", "@Before\n\tpublic void setup() {\n\t\tthis.messaging.receive(\"output\", 100, TimeUnit.MILLISECONDS);\n\t}", "public interface IMqService {\n /*发送消息到队列的方法,其中TerminalStateProtoBuf是proto格式的消息,根据实际情况更改*/\n /*\n void reportTerminalState(String restaurantId,TerminalStateProtoBuf.TerminalState.StateType stateType);\n */\n}", "@Test\n public void testExternalNodeType() throws Exception {\n\n /* create and verify a replication group */\n prepareTestEnv();\n\n ReplicatedEnvironment masterEnv = repEnvInfo[0].getEnv();\n /* populate some data and verify */\n populateDataAndVerify(masterEnv);\n\n final MockClientNode mockClientNode =\n new MockClientNode(NodeType.EXTERNAL, masterEnv, logger);\n\n /* handshake with feeder */\n mockClientNode.handshakeWithFeeder();\n\n /* sync up with feeder */\n final VLSN startVLSN = mockClientNode.syncupWithFeeder(VLSN.FIRST_VLSN);\n\n /* verify */\n assertTrue(\"Mismatch start vlsn \", startVLSN.equals(VLSN.FIRST_VLSN));\n\n /* receive 10K keys */\n mockClientNode.consumeMsgLoop(numKeys);\n assertTrue(\"Expect receive \" + numKeys + \" keys while actually \" +\n \"receiving \" + mockClientNode.getReceivedMsgs().size() +\n \" keys.\",\n mockClientNode.getReceivedMsgs().size() == numKeys);\n\n mockClientNode.shutdown();\n }", "public interface NotificationProxy extends Remote {\n \n /**\n * Registers the calling client, allocating an auto-generate clientId through which \n * this server will reach the client in the future. \n * @param clientSocket \n * @return clientId - the auto-generated client id\n * @throws java.rmi.RemoteException\n */\n public String registerClient(String clientSocket) throws RemoteException;\n \n /**\n * Unregisters the client identified by the given client id\n * @param clientId \n * @throws java.rmi.RemoteException \n */\n public void unregisterClient(String clientId) throws RemoteException;\n \n \n /**\n * Subscribe the client to the specified topic.\n * If the topic does not exist, a new one is create\n * @param name the name of the topic\n * @param clientId\n * @throws Exception\n * @throws java.rmi.RemoteException\n */\n public void subscribe(String name, String clientId) throws Exception, RemoteException;\n \n /**\n * Unsubscribe the client from the specified topic.\n * If the topic does not exists, nothing happens\n * @param name the name of the topic\n * @param clientId\n * @throws java.rmi.RemoteException\n */\n public void unsubscribe(String name, String clientId) throws RemoteException;\n \n /**\n * Deletes the specified topic, without notifying the subscribers \n * that they were unsubscribed\n * @param nume the name of the topic\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException - if the topic does not exist\n */\n public void deleteTopic(String nume) throws RemoteException;\n \n /**\n * Deletes the specified topic, and may be notifying all the subscribers \n * that they were unsubscribed\n * @param nume the name of the topic\n * @param notifySubscribers\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException - if the topic does not exist\n */\n public void deleteTopic(String nume, boolean notifySubscribers) throws RemoteException;\n \n /**\n * Deletes the specified topic, notifying all the subscribers with the specified data\n * that they were unsubscribed\n * @param nume the name of the topic\n * @param data data for the subscribers\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException - if the topic does not exist\n */\n public void deleteTopic(String nume, Object data) throws RemoteException;\n \n /**\n * Notifies all the subscribers of this topic that something happened\n * @param name - the name of the topic\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException\n */\n public void notifyTopic(String name) throws RemoteException;\n \n /**\n * Send this data to all subscribers of specified topic\n * @param data - the data to be sent to the listeners\n * @param name - the name of the topic\n * @throws java.rmi.RemoteException\n * @throws TopicDoesNotExistException\n */\n public void dataNotifyTopic(Object data, String name) throws RemoteException;\n \n /**\n * Tests if the specified topic exists\n * @param topicName - the name of the topic\n * @return true - if the topic exists, false otherwise\n * @throws java.rmi.RemoteException\n */\n public boolean exists(String topicName) throws RemoteException;\n \n /**\n * \n * @param name - the name of the topic\n * @return the subscribers count of the specified topic\n * @throws java.rmi.RemoteException\n */\n public int getSubscribersCount(String name) throws RemoteException;\n \n}", "public interface IRemoteInvoke {\n\n void invoke(JSONObject paramJson);\n\n}", "@SuppressWarnings(\"static-access\")\n\t@Test\n\tpublic void test_run_2() throws IOException, InterruptedException {\n\t\t\n\t\t// bind server socket and start TCPserver\n\t\tmockTCPserverTest.getServerSocket().bind(new java.net.InetSocketAddress(port_1));\n\t\tmockTCPserverTest.startServer(mockTCPserverTest.getServerSocket());\n\t\tmockServerThread.start();\n\t\t\n\t\tTCPclientSocket = new Socket(serverHostName, port_1);\n\t\twhen(mockTCPclientTest.getClientSocket()).thenReturn(TCPclientSocket);\t\n\t\t\n\t\tclientManager_1 = clientManager_1.initClientManager(mockTCPclientTest.getClientSocket(), sensor_ID_1);\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the server side that is responsible for listening messages sent by TCPclient\n\t\ttestThread_server.start();\n\t\tThread.sleep(20);\n\t\t\n\t\t// start test Thread on the client side that is responsible for listening messages sent by TCPserver and re-sending particular responses that are verified in the consecutive test runs\n\t\t// method under test messagesHandler() is called in this thread\n\t\ttestThread_client.start();\n\t\tThread.sleep(20);\n\t\t\n\t\tint sensorID = 1;\n\t\tfloat[][] sensor_coordinates_array_1 = {{11.0f, 14.0f}};\n\t\tString softwareImageID_1 = \"Release X\";\n\t\tint measurement_limit_1 = 12;\n\t\tSensorState sens_state_1 = SensorState.OPERATIONAL;\n\t\tdouble sens_watchdog_scale_factor_1 = 0.15;\n\t\t\n\t\tSensorImpl temp_sens_sent_1 = new SensorImpl(sensorID, new Point2D.Float(sensor_coordinates_array_1[0][0], sensor_coordinates_array_1[0][1]), softwareImageID_1, measurement_limit_1);\n\t\ttemp_sens_sent_1.setSensorState(sens_state_1);\n\t\ttemp_sens_sent_1.setSensor_watchdog_scale_factor(sens_watchdog_scale_factor_1);\n\t\t\n\t\tSensorImpl temp_sens_received_1 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertNotEquals(temp_sens_sent_1.getLocal_watchdog_scale_factor(),\ttemp_sens_received_1.getLocal_watchdog_scale_factor(), 0.01);\n\t\tassertNotEquals(temp_sens_sent_1.getSensorState(),\t\t\t\t\t\ttemp_sens_received_1.getSensorState());\n\t\t\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_SensorInfoUpdate(temp_sens_sent_1.getSensorID(), temp_sens_sent_1.getCoordinates(), temp_sens_sent_1.getSoftwareImageID(), \n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getSensorState(),\n\t\t\t\t\t\t\t\t\t\t\t\tmockComputeEngine_Runnable.getLocal_1h_watchdog(), mockComputeEngine_Runnable.getLocal_24h_watchdog(),\n\t\t\t\t\t\t\t\t\t\t\t\ttemp_sens_sent_1.getLocal_watchdog_scale_factor(), temp_sens_sent_1.getSensor_m_history_array_size()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t\t\n\t\ttemp_sens_received_1 = mockTCPclientTest.searchInClientSensorList(sensorID);\n\t\t\n\t\tassertTrue(receivedMessage instanceof ClientMessage_ACK);\n\n\t\tassertEquals(temp_sens_sent_1.getLocal_watchdog_scale_factor(),\t\ttemp_sens_received_1.getLocal_watchdog_scale_factor(), 0.01);\n\t\tassertEquals(temp_sens_sent_1.getSensorState(),\t\t\t\t\t\ttemp_sens_received_1.getSensorState());\n\t\t\n\t\t// send ServerMessage_ACK message with respective watchdog values to close TCP connection - it is required to close ClientManager with no ConnectException thrown\n\t\tmockComputeEngine_Runnable.sendMessage(new ServerMessage_ACK(sensorID, mockComputeEngine_Runnable.getLocal_1h_watchdog() ,mockComputeEngine_Runnable.getLocal_24h_watchdog()), mockComputeEngine_Runnable.getOutputStream());\n\t\tThread.sleep(50);\n\t}", "static public void main(String[] args) throws IOException {\n port = (int) (Math.random() * ((65535 - 49152) + 1) + 49152);\n server = new ServerSocket(port);\n System.out.println(InetAddress.getLocalHost());\n System.out.println(\"Port: \" + port);\n while (true) {\n try {\n Socket socket = server.accept();\n MqttClient client = new MqttClient(socket);\n clients.add(client);\n client.start();\n } catch (IOException e) {\n System.out.println(\"Something failed.\");\n server.close();\n System.exit(0);\n }\n }\n }", "public Connection invoke(final PeerClient remoteClient) {\n final RemoteMedia remoteMedia = new RemoteMedia(context, enableH264, !enableAudioReceive, !enableVideoReceive, aecContext);\n final AudioStream audioStream = new AudioStream(enableAudioSend ? localMedia.getAudioTrack().getOutputs() : null, enableAudioReceive ? remoteMedia.getAudioTrack().getInputs() : null);\n final VideoStream videoStream = new VideoStream(enableVideoSend ? localMedia.getVideoTrack().getOutputs() : null, enableVideoReceive ? remoteMedia.getVideoTrack().getInputs() : null);\n\n final Connection connection;\n\n // Add the remote view to the layout.\n layoutManager.addRemoteView(remoteMedia.getId(), remoteMedia.getView());\n\n mediaTable.put(remoteMedia.getView(), remoteMedia);\n fragment.registerForContextMenu(remoteMedia.getView());\n remoteMedia.getView().setOnTouchListener(fragment);\n\n if (enableDataChannel) {\n DataChannel channel = new DataChannel(\"mydatachannel\") {{\n setOnReceive(new IAction1<DataChannelReceiveArgs>() {\n @Override\n public void invoke(DataChannelReceiveArgs dataChannelReceiveArgs) {\n android.util.Log.w(\"--ICELINK LIB--\",\"\\n------- About to get 'name' bounds records 1 [App.java]...\");\n /*\n String name = remoteClient.getBoundRecords().get(\"name\").getValueJson();\n name = name.substring(1, name.length() - 1);\n */\n textListener.onReceivedText(ProviderName, dataChannelReceiveArgs.getDataString());\n }\n });\n\n addOnStateChange(new IAction1<DataChannel>() {\n @Override\n public void invoke(DataChannel dataChannel) {\n android.util.Log.w(\"--ICELINK LIB--\",\"\\n------- About to get 'name' bounds records 2 [App.java]...\");\n /*\n String name = remoteClient.getBoundRecords().get(\"name\").getValueJson();\n name = name.substring(1, name.length() - 1);\n */\n if (dataChannel.getState() == DataChannelState.Connected) {\n synchronized (channelLock)\n {\n dataChannels.add(dataChannel);\n }\n textListener.onPeerJoined(ProviderName);\n } else if (dataChannel.getState() == DataChannelState.Closed || dataChannel.getState() == DataChannelState.Failed) {\n synchronized (channelLock)\n {\n dataChannels.remove(dataChannel);\n }\n\n textListener.onPeerLeft(ProviderName);\n }\n }\n });\n }};\n\n DataStream dataStream = new DataStream(channel);\n connection = new Connection(new Stream[]{audioStream, videoStream, dataStream});\n } else {\n connection = new Connection(new Stream[]{audioStream, videoStream});\n }\n\n connection.setIceServers(iceServers);\n\n connection.addOnStateChange(new fm.icelink.IAction1<Connection>() {\n public void invoke(Connection c) {\n // Remove the remote view from the layout.\n if (c.getState() == ConnectionState.Closing ||\n c.getState() == ConnectionState.Failing) {\n if (layoutManager.getRemoteView(remoteMedia.getId()) != null) {\n layoutManager.removeRemoteView(remoteMedia.getId());\n remoteMedia.destroy();\n }\n }\n }\n });\n\n return connection;\n }", "@POST\n @Path(\"server/receiver\")\n @Counted(\"quarkus_wsserver_handle_message_rest_counter\")\n @Timed(\"quarkus_wsserver_handle_message_rest\")\n public void receive(@Valid MessageExchange mmx) {\n LOGGER.warnf(\"(%s) Message [%s] received for [%s]\", getClass().getSimpleName(), mmx.message, mmx.client.getSmartClientKey());\n if (datagridUsage) {\n datagrid.store(mmx.client.user.name, mmx.client.id, mmx.message);\n } else {\n wsServer.send(mmx.client.getSmartClientKey(), mmx.message);\n }\n }", "ManagedEndpoint next();", "@Override\r\n\tpublic void messageReceived(Object obj) {\n\t\t\r\n\t}", "@Test\n public void testPassingFootstepData() throws IOException\n {\n Random random = new Random(5642769L);\n\n // setup comms\n NetworkPorts port = NetworkPorts.createRandomTestPort(random);\n // QueueBasedStreamingDataProducer<FootstepData> queueBasedStreamingDataProducer = new QueueBasedStreamingDataProducer<FootstepData>(\"FootstepData\");\n PacketCommunicator tcpServer = createAndStartStreamingDataTCPServer(port);\n FootstepDataConsumer footstepDataConsumer = new FootstepDataConsumer();\n PacketCommunicator tcpClient = createStreamingDataConsumer(FootstepDataMessage.class, footstepDataConsumer, port);\n ThreadTools.sleep(SLEEP_TIME);\n // queueBasedStreamingDataProducer.startProducingData();\n\n // create test footsteps\n ArrayList<Footstep> sentFootsteps = createRandomFootsteps(50);\n for (Footstep footstep : sentFootsteps)\n {\n FootstepDataMessage footstepData = HumanoidMessageTools.createFootstepDataMessage(footstep);\n tcpServer.send(footstepData);\n // queueBasedStreamingDataProducer.queueDataToSend(footstepData);\n }\n\n ThreadTools.sleep(SLEEP_TIME);\n\n tcpClient.disconnect();\n tcpServer.disconnect();\n\n // verify received correctly\n ArrayList<Footstep> receivedFootsteps = footstepDataConsumer.getReconstructedFootsteps();\n\n compareFootstepsSentWithReceived(sentFootsteps, receivedFootsteps);\n }", "@Override\n public void setUp() throws Exception {\n transport = new TFramedTransport(new TSocket(\"123.56.206.195\", 1982));\n\n\n\n TProtocol protocol = new TBinaryProtocol(transport);\n client = new SubjectServ.Client(protocol);\n transport.open();\n }", "@Before\r\n public void setUp() throws Exception\r\n {\r\n\tmss = new MServerSocket(LOCAL_PORT, 0, InetAddress.getByName(LOCALHOST));\r\n\t\r\n \tSystem.out.println(\"MServerSocket created\");\r\n EchoServerThread accepterThread = new EchoServerThread(mss);\r\n accepterThread.start();\r\n }", "@Test\n public void multipleNetServers() throws Exception {\n String gNode1 = \"graphNode1\";\n String gNode2 = \"graphNode2\";\n\n Map<String, String> rcaConfTags = new HashMap<>();\n rcaConfTags.put(\"locus\", RcaConsts.RcaTagConstants.LOCUS_DATA_NODE);\n IntentMsg msg = new IntentMsg(gNode1, gNode2, rcaConfTags);\n wireHopper2.getSubscriptionManager().setCurrentLocus(RcaConsts.RcaTagConstants.LOCUS_DATA_NODE);\n\n wireHopper1.sendIntent(msg);\n\n WaitFor.waitFor(() ->\n wireHopper2.getSubscriptionManager().getSubscribersFor(gNode2).size() == 1,\n 10,\n TimeUnit.SECONDS);\n GenericFlowUnit flowUnit = new SymptomFlowUnit(System.currentTimeMillis());\n DataMsg dmsg = new DataMsg(gNode2, Lists.newArrayList(gNode1), Collections.singletonList(flowUnit));\n wireHopper2.sendData(dmsg);\n wireHopper1.getSubscriptionManager().setCurrentLocus(RcaConsts.RcaTagConstants.LOCUS_DATA_NODE);\n\n WaitFor.waitFor(() -> {\n List<FlowUnitMessage> receivedMags = wireHopper1.getReceivedFlowUnitStore().drainNode(gNode2);\n return receivedMags.size() == 1;\n }, 10, TimeUnit.SECONDS);\n }" ]
[ "0.5561779", "0.5441916", "0.5382026", "0.5346336", "0.53033227", "0.51517385", "0.509908", "0.5078192", "0.5058452", "0.5036253", "0.49921036", "0.49840853", "0.497542", "0.49642807", "0.49260762", "0.48742917", "0.48723045", "0.4872036", "0.48556796", "0.484779", "0.48353285", "0.4813785", "0.4812344", "0.4755296", "0.47548229", "0.47494358", "0.47420177", "0.47419393", "0.47368833", "0.47358945", "0.4734399", "0.47326872", "0.47261795", "0.47198755", "0.47198477", "0.47184932", "0.47137856", "0.4699975", "0.4699559", "0.46923903", "0.46754873", "0.4672991", "0.46548915", "0.4654428", "0.46492016", "0.4648141", "0.4642717", "0.46426433", "0.4619897", "0.46136484", "0.46073428", "0.4606982", "0.4606331", "0.46023637", "0.45990604", "0.45988336", "0.45945182", "0.45913073", "0.45823544", "0.45814645", "0.4578979", "0.45747954", "0.45688558", "0.4568569", "0.456634", "0.45653313", "0.45644844", "0.4555408", "0.4546896", "0.45408767", "0.45398733", "0.4535754", "0.45336312", "0.4533507", "0.4531723", "0.4530133", "0.45284975", "0.45058724", "0.4503723", "0.44952822", "0.4489172", "0.44884712", "0.4486976", "0.44810295", "0.44727954", "0.44697684", "0.44692373", "0.4458844", "0.4455578", "0.44448182", "0.44435143", "0.44394735", "0.44349474", "0.44298658", "0.4425725", "0.4425086", "0.44240445", "0.44201905", "0.4418966", "0.44188076" ]
0.71026
0
Test to make sure the "direct" raster path and the "nondirect" raster path produce matching results. This test was originally created after fixes to GEOS7270 where there were issues with images generated during the direct raster path but not in the normal path, stemming from not setting the background color the same way
@Test public void testDirectVsNonDirectRasterRender() throws Exception { Catalog catalog = getCatalog(); CoverageInfo ci = catalog.getCoverageByName(MULTIBAND.getPrefix(), MULTIBAND.getLocalPart()); final Envelope env = ci.boundingBox(); RenderedImageMapOutputFormatTest.LOGGER.info(("about to create map ctx for BasicPolygons with bounds " + env)); GetMapRequest request = new GetMapRequest(); CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84; ReferencedEnvelope bbox = new ReferencedEnvelope(new Envelope((-116.90673461649858), (-114.30988665660261), 32.070937282184026, 33.8903284734844), crs); request.setBbox(bbox); request.setSRS("urn:x-ogc:def:crs:EPSG:4326"); request.setFormat("image/png"); final WMSMapContent map = new WMSMapContent(request); map.setMapWidth(300); map.setMapHeight(300); map.setBgColor(Color.red); map.setTransparent(false); map.getViewport().setBounds(bbox); StyleBuilder builder = new StyleBuilder(); GridCoverage2DReader reader = ((GridCoverage2DReader) (ci.getGridCoverageReader(null, null))); reader.getCoordinateReferenceSystem(); Layer l = new org.geoserver.wms.CachedGridReaderLayer(reader, builder.createStyle(builder.createRasterSymbolizer())); map.addLayer(l); RenderedImageMap imageMap = this.rasterMapProducer.produceMap(map); ImageAssert.assertEquals(new File("src/test/resources/org/geoserver/wms/map/direct-raster-expected.tif"), imageMap.getImage(), 0); imageMap.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void assertRasterEquals(final GridCoverage expected, final GridCoverage actual) {\n assertNotNull(\"Expected coverage\", expected);\n assertNotNull(\"Actual coverage\", actual);\n Assert.assertRasterEquals(expected.render(null),\n actual.render(null));\n }", "@Test\n public void rectContainsImageWriteTest() {\n final Rectangle rect = new Rectangle(-10, -10, 150, 80);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n public void testMosaicExpansion() throws Exception {\n File red1 = URLs.urlToFile(this.getClass().getResource(\"red_footprint_test/red1.tif\"));\n File source = red1.getParentFile();\n File testDataDir = getResourceLoader().getBaseDirectory();\n File directory1 = new File(testDataDir, \"redHarvest1\");\n File directory2 = new File(testDataDir, \"redHarvest2\");\n if (directory1.exists()) {\n FileUtils.deleteDirectory(directory1);\n }\n FileUtils.copyDirectory(source, directory1);\n // move all files except red3 to the second dir\n directory2.mkdirs();\n for (File file : FileUtils.listFiles(directory1, new RegexFileFilter(\"red[^3].*\"), null)) {\n Assert.assertTrue(file.renameTo(new File(directory2, file.getName())));\n }\n // create the first reader\n URL harvestSingleURL = URLs.fileToUrl(directory1);\n ImageMosaicReader reader = new ImageMosaicReader(directory1, null);\n // now create a second reader that won't be informed of the harvesting changes\n // (simulating changes over a cluster, where the bbox information won't be updated from one\n // node to the other)\n ImageMosaicReader reader2 = new ImageMosaicReader(directory1, null);\n try {\n // harvest the other files with the first reader\n for (File file : directory2.listFiles()) {\n Assert.assertTrue(file.renameTo(new File(directory1, file.getName())));\n }\n reader.harvest(null, directory1, null);\n // now use the render to paint a map not hitting the original envelope of reader2\n ReferencedEnvelope renderEnvelope = new ReferencedEnvelope(991000, 992000, 216000, 217000, reader2.getCoordinateReferenceSystem());\n Rectangle rasterArea = new Rectangle(0, 0, 10, 10);\n GetMapRequest request = new GetMapRequest();\n request.setBbox(renderEnvelope);\n request.setSRS(\"EPSG:6539\");\n request.setFormat(\"image/png\");\n final WMSMapContent map = new WMSMapContent(request);\n map.setMapWidth(10);\n map.setMapHeight(10);\n map.setBgColor(Color.BLACK);\n map.setTransparent(false);\n map.getViewport().setBounds(renderEnvelope);\n StyleBuilder builder = new StyleBuilder();\n Style style = builder.createStyle(builder.createRasterSymbolizer());\n Layer l = new org.geoserver.wms.CachedGridReaderLayer(reader2, style);\n map.addLayer(l);\n RenderedImageMap imageMap = this.rasterMapProducer.produceMap(map);\n File reference = new File(\"src/test/resources/org/geoserver/wms/map/red10.png\");\n ImageAssert.assertEquals(reference, imageMap.getImage(), 0);\n // now again, but with a rendering transformation, different code path\n style.featureTypeStyles().get(0).setTransformation(new IdentityCoverageFunction());\n RenderedImageMap imageMap2 = this.rasterMapProducer.produceMap(map);\n ImageAssert.assertEquals(reference, imageMap2.getImage(), 0);\n imageMap.dispose();\n } finally {\n reader.dispose();\n reader2.dispose();\n }\n }", "@Test\n public void rectEqualImageWriteWithinReadImageTest() {\n final Rectangle rect = new Rectangle(10, 10, 5, 2);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n final SampleModel sampleMW = new PixelInterleavedSampleModel(getDataBufferType(), tilesWidth, tilesHeight, numBand, tilesWidth*numBand, new int[]{0, 1, 2});\n final WritableRenderedImage rendWriteImage = new TiledImage(rect.x, rect.y, rect.width, rect.height, renderedImage.getTileGridXOffset(), renderedImage.getTileGridYOffset(), sampleMW, null);\n setPixelIterator(renderedImage, rendWriteImage, rect);\n while (pixIterator.next()) pixIterator.setSample(1);\n setPixelIterator(rendWriteImage);\n while (pixIterator.next()) assertTrue(pixIterator.getSampleDouble() == 1);\n }", "@Test\n public void imageContainsRectWriteTest() {\n final Rectangle rect = new Rectangle(20, 10, 70, 30);\n minx = -5;\n miny = 7;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n public void unappropriateRenderedImageTest() {\n final int dataType = getDataBufferType();\n final BandedSampleModel sampleMR = new BandedSampleModel(dataType, 100, 50, 3);\n final RenderedImage rendReadImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMR, null);\n\n BandedSampleModel sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n WritableRenderedImage rendWriteImage = new TiledImage(0, 0, 100, 500, 15, 25, sampleMW, null);\n\n //test : different image dimension.\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //test : different tiles dimension.\n sampleMW = new BandedSampleModel(dataType, 10, 5, 3);\n rendWriteImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //test : different datas type.\n final int dataTypeTest = (dataType == DataBuffer.TYPE_INT) ? DataBuffer.TYPE_BYTE : DataBuffer.TYPE_INT;\n sampleMW = new BandedSampleModel(dataTypeTest, 100, 50, 3);\n rendWriteImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //out of rectangle\n final Rectangle subArea = new Rectangle(10, 10, 200, 100);\n sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n rendWriteImage = new TiledImage(0, 0, 200, 100, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //bad tiles size\n sampleMW = new BandedSampleModel(dataType, 10, 50, 3);\n rendWriteImage = new TiledImage(10, 10, 200, 100, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //bad tilesgridOffset\n sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n rendWriteImage = new TiledImage(10, 10, 200, 100, 1, 2, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n }", "@Test\n public void testEqualsTrue() {\n Rectangle r5 = new Rectangle(7, 4, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 255),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, -75));\n Rectangle r8 = new Rectangle(0, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n\n assertEquals(r1, r5);\n assertEquals(r2, r6);\n assertEquals(r3, r7);\n assertEquals(r4, r8);\n }", "@org.junit.Test\r\n public void testPaint() {\r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n \r\n node.invertColor();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.invertColor();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n }", "@Test\n public void testTwoIndexedSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, with palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n null, new Range[] { noDataBlue, noDataBlue }, null);\n\n // it has been expanded\n assertByteIndexed(mosaic);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[1];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0 }, pixel);\n // check top right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom left quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n\n }", "@Test\n public void testEqualsFalse() {\n Rectangle r5 = new Rectangle(7, 5, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 254),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(0, 4, new Color(255, 155, 255),\n new Position2D(-50, 75));\n Rectangle r8 = new Rectangle(0, 4, new Color(0, 255, 255),\n new Position2D(-50, 75));\n Rectangle r9 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, 75));\n Rectangle r10 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(51, -75));\n Rectangle r11 = new Rectangle(1, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n Rectangle r12 = new Rectangle(1, 100, new Color(199, 155, 13),\n new Position2D(50, 0));\n\n assertNotEquals(r1, r5);\n assertNotEquals(r2, r6);\n assertNotEquals(r2, r7);\n assertNotEquals(r2, r8);\n assertNotEquals(r3, r9);\n assertNotEquals(r3, r10);\n assertNotEquals(r4, r11);\n assertNotEquals(r4, r12);\n }", "@Test\n public void testPathAlongBorder() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(4, 0), Maze.position(4, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(4, 1), Maze.position(4, 2));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(4, 2), Maze.position(4, 3));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(4, 3), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<2, 0>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<3, 0>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<4, 0>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<4, 1>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<4, 2>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<4, 3>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(9, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "@Test\n public void rectLowerRightWriteTest() {\n final Rectangle rect = new Rectangle(80, 30, 50, 50);\n minx = 3;\n miny = -7;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n public void notConnectedDueToRestrictions() {\n int sourceNorth = graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10).getEdge();\n int sourceSouth = graph.edge(0, 3).setDistance(2).set(speedEnc, 10, 10).getEdge();\n int targetNorth = graph.edge(1, 2).setDistance(3).set(speedEnc, 10, 10).getEdge();\n int targetSouth = graph.edge(3, 2).setDistance(4).set(speedEnc, 10, 10).getEdge();\n\n assertPath(calcPath(0, 2, sourceNorth, targetNorth), 0.4, 4, 400, nodes(0, 1, 2));\n assertNotFound(calcPath(0, 2, sourceNorth, targetSouth));\n assertNotFound(calcPath(0, 2, sourceSouth, targetNorth));\n assertPath(calcPath(0, 2, sourceSouth, targetSouth), 0.6, 6, 600, nodes(0, 3, 2));\n }", "public void testEquals() {\r\n\t\t// direct circle\r\n\t\tCircleArc2D arc0 = new CircleArc2D();\r\n\t\tCircle2D circle = new Circle2D(0, 0, 1, true);\r\n\t\tCircleArc2D arc1 = new CircleArc2D(circle, 0, PI/2);\r\n\t\tCircleArc2D arc2 = new CircleArc2D(circle, 0, PI/2, true);\r\n\t\tCircleArc2D arc3 = new CircleArc2D(0, 0, 1, 0, PI/2);\r\n\t\tCircleArc2D arc4 = new CircleArc2D(0, 0, 1, 0, PI/2, true);\r\n\t\tassertTrue(arc1.equals(arc0));\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\r\n\t\t// direct circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, PI, true);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, PI, true);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t\t\r\n\t\t// indirect circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, -PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, 2*PI, false);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, -PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, 2*PI, false);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t}", "@Test\n public void testGetGradient() throws GeoTessException {\n // set the active region and get a set of layers for which gradients are to\n // be calculated\n int[] layers = {2, 3, 4, 5, 6, 7, 8};\n model.setActiveRegion();\n\n // set grid node location index\n int attributeIndex = 0;\n\n // define the linear and natural-neighbor gradients for both nominal and\n // reciprocal attributes and initialize the true result\n\n double[] gradLin = new double[3];\n double[] gradNN = new double[3];\n double[] gradLinTrue = {4.6692626774685944E-5, 4.502074915240648E-6, 4.543854613827687E-6};\n double[] gradNNTrue = {4.666681310690614E-5, 4.4985383090366614E-6, 4.544030614580206E-6};\n double[] gradLinRecip = new double[3];\n double[] gradNNRecip = new double[3];\n double[] gradLinRecipTrue = {-0.003672532846243307, -3.547138101101814E-4,\n -3.5962254850115913E-4};\n double[] gradNNRecipTrue = {-0.0036705409599509485, -3.5443843094769983E-4,\n -3.5962403554295927E-4};\n\n // get the linear and natural-neighbor interpolators\n GeoTessPosition gtpLin, gtpNN;\n gtpLin = GeoTessPosition.getGeoTessPosition(model, InterpolatorType.LINEAR,\n InterpolatorType.LINEAR);\n gtpNN = GeoTessPosition.getGeoTessPosition(model, InterpolatorType.NATURAL_NEIGHBOR,\n InterpolatorType.LINEAR);\n\n // compute and store non-reciprocal gradients and set the linear position\n // ... interpolate the linear result and compare against the true values\n model.computeGradients(attributeIndex, false, layers);\n gtpLin.set(5.5, 5.5, 369.0);\n gtpLin.getGradient(0, false, gradLin);\n assertEquals(gradLin[0], gradLinTrue[0], 1e-12);\n assertEquals(gradLin[1], gradLinTrue[1], 1e-12);\n assertEquals(gradLin[2], gradLinTrue[2], 1e-12);\n\n // set the natural-neighbor position ... interpolate the natural-neighbor\n // result and compare against the true values\n gtpNN.set(5.5, 5.5, 369.0);\n gtpNN.getGradient(0, false, gradNN);\n assertEquals(gradNN[0], gradNNTrue[0], 1e-12);\n assertEquals(gradNN[1], gradNNTrue[1], 1e-12);\n assertEquals(gradNN[2], gradNNTrue[2], 1e-12);\n\n // compute and store reciprocal gradients ... interpolate the linear\n // result and compare against the true values\n model.computeGradients(attributeIndex, true, layers);\n gtpLin.getGradient(0, true, gradLinRecip);\n assertEquals(gradLinRecip[0], gradLinRecipTrue[0], 1e-12);\n assertEquals(gradLinRecip[1], gradLinRecipTrue[1], 1e-12);\n assertEquals(gradLinRecip[2], gradLinRecipTrue[2], 1e-12);\n\n // interpolate the natural-neighbor result and compare against the true\n // values\n gtpNN.getGradient(0, true, gradNNRecip);\n assertEquals(gradNNRecip[0], gradNNRecipTrue[0], 1e-12);\n assertEquals(gradNNRecip[1], gradNNRecipTrue[1], 1e-12);\n assertEquals(gradNNRecip[2], gradNNRecipTrue[2], 1e-12);\n }", "public boolean paintRable(Graphics2D g2d) {\n/* 204 */ Composite c = g2d.getComposite();\n/* 205 */ if (!SVGComposite.OVER.equals(c)) {\n/* 206 */ return false;\n/* */ }\n/* 208 */ ColorSpace g2dCS = GraphicsUtil.getDestinationColorSpace(g2d);\n/* 209 */ if (g2dCS == null || g2dCS != ColorSpace.getInstance(1000))\n/* */ {\n/* */ \n/* 212 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 216 */ GraphicsNode gn = getGraphicsNode();\n/* 217 */ if (getUsePrimitivePaint()) {\n/* 218 */ gn.primitivePaint(g2d);\n/* */ } else {\n/* */ \n/* 221 */ gn.paint(g2d);\n/* */ } \n/* */ \n/* */ \n/* 225 */ return true;\n/* */ }", "public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }", "public void testFindBorders() {\n System.out.println(\"findBorders\");\n RasterImage rImage = new RasterImage(20,21);\n int expResult[] = {16777215, 0, 0, 0, 0, 0, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 16777215, 16777215, 16777215, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 0, 16777215, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215,\n 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0,\n 16777215, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 0, 16777215, 0, 0, 0, 16777215,\n 16777215, 16777215, 0, 0, 0, 0, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0, 0, 16777215,\n 16777215, 16777215, 16777215};\n int pixels[] = {16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,0,0,0,\n 0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,16777215,16777215,\n 16777215,0,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215};\n for(int i=0;i<420;i++){\n int x = i%20;\n int y = i/20;\n rImage.setRGB(x, y, pixels[i]);\n }\n\n\n\n RasterImage result = CutCharacter.findBorders(rImage);\n for(int i=0;i<168;i++)\n assertEquals(expResult[i], result.getRGB(i));\n \n }", "@Test\n public void testTwoIndexedNoSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, the different nodata will force a palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n Range noDataRed = RangeFactory.create((byte) 1, (byte) 1);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0, 0, 0 }, new Range[] { noDataBlue, noDataRed }, null);\n\n // it has been expanded\n assertRGB(mosaic, false);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0, 0, 255 }, pixel);\n // check top right quadrant, should be red (red is data in the first image)\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n // check bottom left quadrant, should be black, it's no data in both\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 0, 0, 0 }, pixel);\n // check bottom right quadrant, should be red, it's red in the first image\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n }", "@Test\n public void nearestObjectHighlighted() {\n radar.loop();\n assertTrue(world.getPasslist().get(0).isHighlightedWhenRadarIsOn());\n }", "private boolean importDirectMappedImage(BufferedImage img) {\n \t\tif (format == Format.COLOR256_1x1 || isMono)\n \t\t\treturn false;\n \t\t\n \t\tint numColors = format == Format.COLOR4_1x1 ? 4\n \t\t\t\t: 16;\n \t\t\n \t\t// effective minimum distance for any mode\n \t\tint maxDist = 0xf*0xf * 3;\n \t\tint numPixels = img.getWidth() * img.getHeight();\n \t\t\n \t\tboolean matched = false;\n \t\tHistogram hist = new Histogram(img);\n \t\t\n \t\tList<byte[][]> palettes = new ArrayList<byte[][]>();\n \t\tpalettes.add(thePalette);\n \t\tif (isStandardPalette)\n \t\t\tpalettes.addAll(Arrays.asList(VdpCanvas.palettes()));\n \t\t\n \t\tfor (byte[][] palette : palettes) {\n \t\t\tint matchedC = hist.generate(new FixedPaletteMapColor(palette, firstColor, numColors), maxDist, ~0); \n \t\t\tif (matchedC == numPixels) {\n \t\t\t\tmatched = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\tif (matched) {\n \t\t\tfor (int c = 0; c < numColors; c++) {\n \t\t\t\treplaceColor(img, hist, c, rgb8ToPixel(thePalette[c]), Integer.MAX_VALUE);\n \t\t\t}\n \t\t\t\n \t\t\treturn true;\n \t\t}\n \t\t\n \t\treturn false;\n \t}", "private static boolean isMirrorImage(Tree left, Tree right){\n if(left==null || right == null){\n return (left==null && right==null);\n }\n\n return left.data==right.data && isMirrorImage(left.left,right.right) && isMirrorImage(left.right,right.left);\n}", "@Test\n\tpublic void testImageFromPaintNet() throws IOException, URISyntaxException {\n\t\tfinal String filePath = \"img_orientation/view_20170929_124415.jpg\";\n\t\tURL url = this.getClass().getClassLoader().getResource(filePath);\n\t\tFile imgFile = new File(url.toURI());\n\t\tlogger.debug(\"File '{}' exists = {}\", filePath, imgFile.isFile());\n\t\tBufferedImage bi = TrpImageIO.read(imgFile);\n\t\t\n\t\tif(bi instanceof RotatedBufferedImage) {\n\t\t\t//if we are here this is broken\n\t\t\tAssert.fail(\"Image was erroneously rotated!\");\n\t\t}\n\t}", "public Map<String, Object> getMapRaster(Map<String, Double> params) {\n Map<String, Object> results = new HashMap<>();\n double lrlon = params.get(\"lrlon\");\n double ullon = params.get(\"ullon\");\n double w = params.get(\"w\");\n double h = params.get(\"h\");\n double ullat = params.get(\"ullat\");\n double lrlat = params.get(\"lrlat\");\n int depth = computeDepth(lrlon, ullon, w);\n boolean query_success = true;\n if (lrlat >= ullat || lrlon <= ullon || lrlat >= ROOT_ULLAT || lrlon <= ROOT_ULLON || ullat <= ROOT_LRLAT ||ullon >= ROOT_LRLON) {\n query_success = false;\n }\n int numImg = (int) Math.pow(2, depth);\n double wPerImg = W / Math.pow(2.0, depth);\n double hPerImg = H / Math.pow(2.0, depth);\n int xSt = (int) Math.floor(Math.abs(ullon - ROOT_ULLON) / wPerImg);\n int ySt = (int) Math.floor(Math.abs(ullat - ROOT_ULLAT) / hPerImg);\n int xEn = (int) Math.floor(Math.abs(lrlon - ROOT_ULLON) / wPerImg);\n int yEn = (int) Math.floor(Math.abs(lrlat - ROOT_ULLAT) / hPerImg);\n String[][] render_grid = new String[yEn - ySt + 1][xEn - xSt + 1];\n double raster_ul_lon = ROOT_ULLON + xSt * wPerImg;\n double raster_ul_lat = ROOT_ULLAT - ySt * hPerImg;\n double raster_lr_lon = ROOT_ULLON + (xEn + 1) * wPerImg;\n double raster_lr_lat = ROOT_ULLAT - (yEn + 1) * hPerImg;\n if (ullon < ROOT_ULLON) {\n xSt = 0;\n raster_ul_lon = ROOT_ULLON;\n }\n if (ullat > ROOT_ULLAT) {\n ySt = 0;\n raster_ul_lat = ROOT_ULLAT;\n }\n if (lrlon > ROOT_LRLON) {\n xEn = numImg - 1;\n raster_lr_lon = ROOT_LRLON;\n }\n if (lrlat < ROOT_LRLAT) {\n yEn = numImg - 1;\n raster_lr_lat = ROOT_LRLAT;\n }\n for (int i = 0; i < xEn - xSt + 1; ++i) {\n for (int j = 0; j < yEn - ySt + 1; ++j) {\n int x = i + xSt;\n int y = j + ySt;\n render_grid[j][i] = \"d\" + depth + \"_x\" + x + \"_y\" + y + \".png\";\n }\n }\n results.put(\"render_grid\", render_grid);\n results.put(\"raster_ul_lon\", raster_ul_lon);\n results.put(\"raster_ul_lat\", raster_ul_lat);\n results.put(\"raster_lr_lon\", raster_lr_lon);\n results.put(\"raster_lr_lat\", raster_lr_lat);\n results.put(\"depth\", depth);\n results.put(\"query_success\", query_success);\n return results;\n }", "@Test\n public void testIndexedNoDataRBG() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED, icm);\n Graphics2D gr = bi.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // create a ROI, split vertically between black and white\n BufferedImage biROI = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_BINARY);\n gr = biROI.createGraphics();\n gr.setColor(Color.BLACK);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.WHITE);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // create a RGB Image, yellow\n BufferedImage yellow = buildBGR(Color.YELLOW);\n\n // mosaic them, with palette expansion\n RenderedOp mosaic = MosaicDescriptor.create(new RenderedImage[] { bi, yellow },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null,\n new ROI[] { new ROI(biROI), null }, null, null,\n new Range[] { RangeFactory.create((byte) 0, (byte) 0), null }, null);\n\n // it has been expanded\n assertRGB(mosaic, false);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be yellow, we have both nodata and outside of ROI\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check top right quadrant, should be yellow, we have data but outside of ROI\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom left quadrant, should be yellow, we have nodata even if inside the ROI\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom right quadrant, should be red, we have data and it's inside the ROI\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n\n }", "private void matchOnlyCurrentGraphState(TaskMonitor monitor) {\r\n\t\t// make a new list of the matched nodes, to avoid concurrent\r\n\t\t// modification problems\r\n\t\tList matchedNodes = getMatchedNodesOrdered();\r\n\r\n\t\tint total = matchedNodes.size();\r\n\t\tint count = 0;\r\n\r\n\t\tfor (Iterator nodeIt = matchedNodes.iterator(); nodeIt.hasNext();) {\r\n\t\t\tcount++;\r\n\t\t\tmonitor.report(count, total, \"Paths tested\");\r\n\t\t\tif (monitor.isCancelRequested())\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tRoadNode subNode = (RoadNode) nodeIt.next();\r\n\t\t\tif (subNode.isMatched()) {\r\n\t\t\t\tRoadNode matchNode = subNode.getMatch();\r\n\t\t\t\tNodeMatching matching = subNode.getMatching();\r\n\t\t\t\tmatchPathsFromNodes(matching);\r\n\t\t\t}\r\n\t\t}\r\n\t\tDebugFeature.saveFeatures(MATCH,\r\n\t\t\t\t\"Y:\\\\jcs\\\\testUnit\\\\roads\\\\pathMatches.jml\");\r\n\t\tDebugFeature.saveFeatures(SPLIT,\r\n\t\t\t\t\"Y:\\\\jcs\\\\testUnit\\\\roads\\\\pathSplits.jml\");\r\n\t\tDebug.println(\"paths matched = \" + pathMatchCount);\r\n\t\tDebug.println(\"splits matched = \" + splitMatchCount);\r\n\t}", "@Test\n public void testDataV1OverpaintedArc() throws IOException, InterruptedException {\n PICTImageReader reader = createReader();\n reader.setInput(new ByteArrayImageInputStream(DATA_V1_OVERPAINTED_ARC));\n reader.read(0);\n BufferedImage image = reader.read(0);\n\n if (!GraphicsEnvironment.isHeadless()) {\n PICTImageReader.showIt(image, \"dataV1CopyBits\");\n Thread.sleep(10000);\n }\n }", "@Test\n public void testNearest() {\n for (int dx = -5; dx <= 5; dx++) {\n for (int dy = -5; dy <= 5; dy++) {\n if (dy > 0 && Math.abs(dx) < Math.abs(dy))\n assertEquals(Direction.SOUTH, Direction.nearest(dx, dy));\n else if (dy < 0 && Math.abs(dx) < Math.abs(dy))\n assertEquals(Direction.NORTH, Direction.nearest(dx, dy));\n else if (dx > 0 && Math.abs(dy) < Math.abs(dx))\n assertEquals(Direction.EAST, Direction.nearest(dx, dy));\n else if (dx < 0 && Math.abs(dy) < Math.abs(dx))\n assertEquals(Direction.WEST, Direction.nearest(dx, dy));\n else if (Math.abs(dx) == Math.abs(dy))\n assertEquals(null, Direction.nearest(dx, dy));\n else\n fail(\"Case not covered: dx=\" + dx + \", dy=\" + dy + \".\");\n }\n }\n }", "@Test\n public void equality() {\n ImageReference expected = createSampleImage();\n\n assertEquals(expected, createSampleImage());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(\"content://bar\")\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(1, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, 1)\n .build());\n\n assertEquals(expected.hashCode(), new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build()\n .hashCode());\n }", "@Test\n public void rectLowerLeftWriteTest() {\n final Rectangle rect = new Rectangle(-20, 30, 50, 50);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n public void testStyleUsingChannelsFromCoverageView() throws Exception {\n GetMapRequest request = new GetMapRequest();\n CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;\n ReferencedEnvelope bbox = new ReferencedEnvelope(new Envelope((-116.90673461649858), (-114.30988665660261), 32.070937282184026, 33.8903284734844), crs);\n request.setBbox(bbox);\n request.setSRS(\"urn:x-ogc:def:crs:EPSG:4326\");\n request.setFormat(\"image/png\");\n final WMSMapContent map = new WMSMapContent(request);\n map.setMapWidth(300);\n map.setMapHeight(300);\n map.setTransparent(false);\n map.getViewport().setBounds(bbox);\n StyleBuilder styleBuilder = new StyleBuilder();\n Catalog catalog = getCatalog();\n // Source image\n CoverageInfo ci = catalog.getCoverageByName(MULTIBAND.getPrefix(), MULTIBAND.getLocalPart());\n GridCoverage2DReader reader = ((GridCoverage2DReader) (ci.getGridCoverageReader(null, null)));\n reader.getCoordinateReferenceSystem();\n Layer sl = new org.geoserver.wms.CachedGridReaderLayer(reader, styleBuilder.createStyle(styleBuilder.createRasterSymbolizer()));\n map.addLayer(sl);\n RenderedImageMap srcImageMap = this.rasterMapProducer.produceMap(map);\n RenderedImage srcImage = srcImageMap.getImage();\n // CoverageView band creation. We create a coverage view with 6 bands, using\n // the original bands from the multiband coverage\n // Note that first three bands are int reverse order of the bands of the source coverage\n final InputCoverageBand ib0 = new InputCoverageBand(\"multiband\", \"2\");\n final CoverageBand b0 = new CoverageBand(Collections.singletonList(ib0), \"multiband@2\", 0, CompositionType.BAND_SELECT);\n final InputCoverageBand ib1 = new InputCoverageBand(\"multiband\", \"1\");\n final CoverageBand b1 = new CoverageBand(Collections.singletonList(ib1), \"multiband@1\", 1, CompositionType.BAND_SELECT);\n final InputCoverageBand ib2 = new InputCoverageBand(\"multiband\", \"0\");\n final CoverageBand b2 = new CoverageBand(Collections.singletonList(ib2), \"multiband@0\", 2, CompositionType.BAND_SELECT);\n final InputCoverageBand ib3 = new InputCoverageBand(\"multiband\", \"0\");\n final CoverageBand b3 = new CoverageBand(Collections.singletonList(ib3), \"multiband@0\", 0, CompositionType.BAND_SELECT);\n final InputCoverageBand ib4 = new InputCoverageBand(\"multiband\", \"1\");\n final CoverageBand b4 = new CoverageBand(Collections.singletonList(ib4), \"multiband@1\", 1, CompositionType.BAND_SELECT);\n final InputCoverageBand ib5 = new InputCoverageBand(\"multiband\", \"2\");\n final CoverageBand b5 = new CoverageBand(Collections.singletonList(ib5), \"multiband@2\", 2, CompositionType.BAND_SELECT);\n final List<CoverageBand> coverageBands = new ArrayList<CoverageBand>(1);\n coverageBands.add(b0);\n coverageBands.add(b1);\n coverageBands.add(b2);\n coverageBands.add(b3);\n coverageBands.add(b4);\n coverageBands.add(b5);\n CoverageView multiBandCoverageView = new CoverageView(\"multiband_select\", coverageBands);\n CoverageStoreInfo storeInfo = catalog.getCoverageStoreByName(\"multiband\");\n CatalogBuilder builder = new CatalogBuilder(catalog);\n // Reordered bands coverage\n CoverageInfo coverageInfo = multiBandCoverageView.createCoverageInfo(\"multiband_select\", storeInfo, builder);\n coverageInfo.getParameters().put(\"USE_JAI_IMAGEREAD\", \"false\");\n catalog.add(coverageInfo);\n final LayerInfo layerInfoView = builder.buildLayer(coverageInfo);\n catalog.add(layerInfoView);\n final Envelope env = ci.boundingBox();\n RenderedImageMapOutputFormatTest.LOGGER.info((\"about to create map ctx for BasicPolygons with bounds \" + env));\n RasterSymbolizer symbolizer = styleBuilder.createRasterSymbolizer();\n ChannelSelection cs = new ChannelSelectionImpl();\n SelectedChannelType red = new SelectedChannelTypeImpl();\n SelectedChannelType green = new SelectedChannelTypeImpl();\n SelectedChannelType blue = new SelectedChannelTypeImpl();\n // We want to create an image where the RGB channels are in reverse order\n // regarding the band order of the input coverage view\n // Note that channel names start with index \"1\"\n red.setChannelName(\"3\");\n green.setChannelName(\"2\");\n blue.setChannelName(\"1\");\n cs.setRGBChannels(new SelectedChannelType[]{ red, green, blue });\n symbolizer.setChannelSelection(cs);\n reader = ((GridCoverage2DReader) (coverageInfo.getGridCoverageReader(null, null)));\n reader.getCoordinateReferenceSystem();\n Layer dl = new org.geoserver.wms.CachedGridReaderLayer(reader, styleBuilder.createStyle(symbolizer));\n map.removeLayer(sl);\n map.addLayer(dl);\n RenderedImageMap dstImageMap = this.rasterMapProducer.produceMap(map);\n RenderedImage destImage = dstImageMap.getImage();\n int dWidth = destImage.getWidth();\n int dHeight = destImage.getHeight();\n int[] destImageRowBand0 = new int[dWidth * dHeight];\n int[] destImageRowBand1 = new int[destImageRowBand0.length];\n int[] destImageRowBand2 = new int[destImageRowBand0.length];\n destImage.getData().getSamples(0, 0, dWidth, dHeight, 0, destImageRowBand0);\n destImage.getData().getSamples(0, 0, dWidth, dHeight, 1, destImageRowBand1);\n destImage.getData().getSamples(0, 0, dWidth, dHeight, 2, destImageRowBand2);\n int sWidth = srcImage.getWidth();\n int sHeight = srcImage.getHeight();\n int[] srcImageRowBand0 = new int[sWidth * sHeight];\n int[] srcImageRowBand2 = new int[srcImageRowBand0.length];\n srcImage.getData().getSamples(0, 0, sWidth, sHeight, 0, srcImageRowBand0);\n // Source and result image first bands should be the same. We have reversed the order\n // of the three first bands of the source coverage and then we re-reversed the three\n // first bands using channel selection on the raster symbolizer used for rendering.\n Assert.assertTrue(Arrays.equals(destImageRowBand0, srcImageRowBand0));\n // Result band 0 should not be equal to source image band 2\n Assert.assertFalse(Arrays.equals(destImageRowBand0, srcImageRowBand2));\n srcImageMap.dispose();\n dstImageMap.dispose();\n map.dispose();\n }", "@Test\n\tvoid testToPixel() {\n\t\t\n\t\t// read the image map of ariel \n\t\tBufferedImage map = null;\n\t\ttry {\n\t\t\tmap = ImageIO.read(new File(\"Ariel1.png\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMap m= new Map(map,Width,Height,start,end);\n\n\n\t\tPoint3D ans1 =m.toPixel(start);\n\t\tassertTrue(ans1.equals(pixelStart));\n\n\t\tPoint3D ans2 =m.toPixel(end);\n\t\tassertTrue(ans2.equals(pixelEnd));\n\n\n\t\tPoint3D ans3 = m.toPixel(p);\n\t\tassertTrue(ans3.equals(p1));\n\n\t}", "public void testEquals() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n r1.setBlockHeight(2.0);\n r2.setBlockHeight(2.0);\n r1.setBlockWidth(2.0);\n r2.setBlockWidth(2.0);\n r1.setPaintScale(new GrayPaintScale(0.0, 1.0));\n r2.setPaintScale(new GrayPaintScale(0.0, 1.0));\n }", "private void checkPaths(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\tif(leftIsClear()){\r\n\t\t\t\tif(frontIsBlocked()&&rightIsBlocked()&&cornerColorIs(RED)){\r\n\t\t\t\t\tturnLeft(); \r\n\t\t\t\t\tmakeMove();\r\n\t\t\t\t\tpaintCorner(RED);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tturnLeft(); \r\n\t\t\t\t\tcheckColors();\r\n\t\t\t\t}\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t\tif(frontIsClear()){\r\n\t\t\t\tcheckColors();\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t\tif(rightIsClear()){\r\n\t\t\t\tif(frontIsBlocked()&&leftIsBlocked()&&cornerColorIs(RED)){\r\n\t\t\t\t\tturnRight();\r\n\t\t\t\t\tmakeMove();\r\n\t\t\t\t\tpaintCorner(RED);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tturnRight();\r\n\t\t\t\t\tcheckColors();\r\n\t\t\t\t}\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\r\n public void testDirectMatPainting8SC1() {\n Mat m = new Mat(width, height, CV_8SC1);\r\n assertEquals(1, m.channels());\r\n assertEquals(1, m.capacity());\r\n assertEquals(width, m.step());\r\n assertEquals(width, m.cols());\r\n assertEquals(height, m.rows());\r\n\r\n ByteBuffer bb = m.createBuffer();\r\n for (long i = 0; i < width * height; i++) {\r\n long x = i % width, y = i / width;\r\n // blue to gray:\r\n byte gray = (byte) (pixelFunc(x, y) & 0xff);\r\n bb.put(gray);\r\n }\r\n\r\n // negative gray values get ignored/mapped to black/0. The total\r\n // (Java byte -> gray value) mapping is then:\r\n // -128..127 -> 128x 0, 0..127\r\n imwrite(new File(TEMP_DIR, \"testDirectMatPainting8SC1.png\").getAbsolutePath(), m);\r\n // @insert:image:testDirectMatPainting8SC1.png@\r\n }", "public boolean intersects(RMPath aPath)\n{\n // Get line width to be used in intersects test\n float lineWidth = getStrokeWidth();\n \n // Get bounds, adjusted for line width\n RMRect bounds = getBoundsInside();\n bounds.inset(-lineWidth/2, -lineWidth/2);\n\n // If paths don't even intersect bounds, just return false\n if(!aPath.getBounds2D().intersectsRectEvenIfEmpty(bounds))\n return false;\n \n // Get path in bounds\n RMPath path = getPathInBounds();\n \n // Return whether path intersects given path\n return path.intersects(aPath, lineWidth);\n}", "@Test\n public void testIsValidonNotConnectedMap() {\n mapModel.removeLink(\"TerritoryD\", \"TerritoryC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }", "@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }", "@Test\n public void testInterpolationAtEdges() {\n // Following constant is pixel size (in degrees).\n // This constant must be identical to the one defined in 'createRandomCoverage()'\n final double PIXEL_SIZE = 0.25;\n createRandomCoverage();\n coverage = coverage.view(ViewType.GEOPHYSICS);\n coverage = Interpolator2D.create(coverage, Interpolation.getInstance(Interpolation.INTERP_BILINEAR));\n assertTrue(coverage instanceof Interpolator2D);\n assertTrue(coverage.view(ViewType.GEOPHYSICS) instanceof Interpolator2D);\n assertTrue(coverage.view(ViewType.PACKED) instanceof Interpolator2D);\n final int band = 0; // Band to test.\n double[] buffer = null;\n final Raster data = coverage.getRenderedImage().getData();\n final Envelope envelope = coverage.getEnvelope();\n final GridExtent range = coverage.getGridGeometry().getExtent();\n final double left = envelope.getMinimum(0);\n final double upper = envelope.getMaximum(1);\n final Point2D.Double point = new Point2D.Double(); // Will maps to pixel upper-left corner\n for (long j=range.getSize(1); --j>=1;) {\n for (long i=range.getSize(0); --i>=1;) {\n point.x = left + PIXEL_SIZE*i;\n point.y = upper - PIXEL_SIZE*j;\n buffer = coverage.evaluate(point, buffer);\n double t = buffer[band];\n\n // Computes the expected value:\n double r00 = data.getSampleDouble((int) i-0, (int) j-0, band);\n double r01 = data.getSampleDouble((int) i-0, (int) j-1, band);\n double r10 = data.getSampleDouble((int) i-1, (int) j-0, band);\n double r11 = data.getSampleDouble((int) i-1, (int) j-1, band);\n double r = (r00 + r01 + r10 + r11) / 4;\n assertEquals(r, t, SAMPLE_TOLERANCE);\n }\n }\n }", "@Override\n public boolean hasPossibleCapture(final Coordinate destination) {\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (destination.equals(tempCoordinate1)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (destination.equals(tempCoordinate2)) {\n return true;\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (destination.equals(tempCoordinate3)) {\n return true;\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (destination.equals(tempCoordinate4)) {\n return true;\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (destination.equals(tempCoordinate5)) {\n return true;\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (destination.equals(tempCoordinate6)) {\n return true;\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (destination.equals(tempCoordinate7)) {\n return true;\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n return destination.equals(tempCoordinate8);\n }", "@Suppress\n @TargetApi(Build.VERSION_CODES.KITKAT)\n public void testDocumentUri () throws Throwable {\n\n final Path path1 = selected.resolve(\"test1\");\n final Uri uri1 = fs.getTreeDocumentUri(path1);\n assertNotNull(uri1);\n assertTrue(DocumentsContract.isDocumentUri(getContext(), uri1));\n assertEquals(path1, fs.getPath(uri1));\n\n final Path path2 = path1.resolve(\"test2\");\n final Uri uri2 = fs.getTreeDocumentUri(path2);\n assertNotNull(uri2);\n assertTrue(DocumentsContract.isDocumentUri(getContext(), uri2));\n assertEquals(path2, fs.getPath(uri2));\n }", "@Test\n public void isONGroundTestTrue(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,24,22);\n assertEquals(true, tileMap.isOnGround(cBox));\n }", "boolean testDrawShip(Tester t) {\n return t.checkExpect(ship3.draw(), new CircleImage(10, OutlineMode.SOLID, Color.CYAN))\n && t.checkExpect(ship1.draw(), new CircleImage(10, OutlineMode.SOLID, Color.CYAN));\n }", "@Test\n\tpublic void testGetPathIntegral() throws GeoTessException\n\t{\n\t\tdouble[] pointA = new double[3];\n\t\tdouble[] pointB = new double[3];\n\t\t\n\t\tVectorGeo.getVectorDegrees(0., 0., pointA);\n\t\tVectorGeo.getVectorDegrees(0., 30., pointB);\n\n\t\tGreatCircle greatCircle = new GreatCircle(pointA, pointB);\n\t\t\n\t\tArrayList<double[]> rayPath = greatCircle.getPoints(31, false);\n\n\t\t// radii will the radius of each of the points along the rayPath.\n\t\tdouble[] radii = new double[rayPath.size()];\n\t\tArrays.fill(radii, 6300.);\n\t\t\n\t\tdouble dkm = model.getPathIntegral(-1, rayPath, radii, null,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR);\n\t\t\n\t\tassertEquals(greatCircle.getDistance()*6300., dkm, 0.1);\n\t\n\t\tdouble tt = model.getPathIntegral(0, rayPath, radii, null,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR);\n\t\t\n\t\tassertEquals(408.216, tt, 0.1);\n\t\n\t}", "public boolean canConnectRedstone(ym iba, int i, int j, int k, int dir)\r\n/* 24: */ {\r\n/* 25:31 */ if (dir < 0) {\r\n/* 26:31 */ return false;\r\n/* 27: */ }\r\n/* 28:33 */ IRedPowerConnectable irp = (IRedPowerConnectable)CoreLib.getTileEntity(iba, i, j, k, IRedPowerConnectable.class);\r\n/* 29:36 */ if (irp == null) {\r\n/* 30:36 */ return false;\r\n/* 31: */ }\r\n/* 32:37 */ int s = RedPowerLib.mapLocalToRot(irp.getConnectableMask(), 2);\r\n/* 33:38 */ return (s & 1 << dir) > 0;\r\n/* 34: */ }", "@Test\n public void testGetShareResourceStringValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n\n filter.isResourceAccess(mtch);\n\n assertEquals(\"share resource string differs\", SHARE_RES_STRING, filter.getShareResourceString(mtch));\n }", "private void renderPath(Node n)\n {\n\tGraphics g = getGraphics();\n\tboolean painting;\n\tColor nc,lc;\n\n\tpainting = (n.paths_passing==0);\n\twhile (n != null) {\n\t if (painting)\n\t\tn.paths_passing++;\n\t else {\n\t\tn.paths_passing--;\n\t }\n\t \n// \t nc = (n.paths_passing > 0)?hilitcolor:normalcolor;\n// \t lc = (n.paths_passing > 0)?hilitcolor:linecolor;\n\t nc = (n.paths_passing > 0)?n.path_color:normalcolor;\n\t lc = (n.paths_passing > 0)?n.path_color:linecolor;\n\t \n\t if (n.parent == null) {\n\t\tsetRenderColor(g,nc);\n\t\trenderNode(g,n);\n\t\tbreak;\n\t }\n\n\t // Double line width\n\t //setRenderColor(g,(n.paths_passing>0)?hilitcolor:Color.white);\n\t setRenderColor(g,(n.paths_passing>0)?n.path_color:Color.white);\n\t renderLine(g,n.x-1,n.y,n.parent.x-1,n.parent.y);\t\n\n\t setRenderColor(g,lc);\n\t renderLine(g,n.x,n.y,n.parent.x,n.parent.y);\n\n\t setRenderColor(g,nc);\n\t renderNode(g,n);\n\t n = n.parent;\n\t}\n }", "public Map<String, Object> getMapRaster(Map<String, Double> params) {\n //System.out.println(params);\n Map<String, Object> results = new HashMap<>();\n //System.out.println(\"Since you haven't implemented getMapRaster, nothing is displayed in \"\n // + \"your browser.\");\n double lrLon = params.get(\"lrlon\");\n double ulLon = params.get(\"ullon\");\n double w = params.get(\"w\");\n double h = params.get(\"h\");\n double lrLat = params.get(\"lrlat\");\n double ulLat = params.get(\"ullat\");\n if (lrLon <= ROOT_ULLON || ulLon >= ROOT_LRLON || lrLat >= ROOT_ULLAT\n || ulLat <= ROOT_LRLAT || lrLon <= ulLon || lrLat >= ulLat) {\n querySuccess = false;\n return null;\n }\n\n double lonDpp = (lrLon - ulLon) / w;\n int dep = (int) Math.ceil(Math.log(ROOT_LON_DPP / lonDpp) / Math.log(2.0));\n depth = Math.min(dep, MAX_DEPTH);\n int num = (int) Math.pow(2, depth);\n\n //System.out.println(\"lonDpp=\" + lonDpp + \" dep=\" + dep + \" depth=\" + depth);\n int xnUl = getXnYp(ROOT_ULLON, ulLon, ROOT_WIDTH, num, 1);\n int ypUl = getXnYp(ulLat, ROOT_ULLAT, ROOT_HEIGHT, num, 1);\n int xnLr = getXnYp(lrLon, ROOT_LRLON, ROOT_WIDTH, num, 0);\n int ypLr = getXnYp(ROOT_LRLAT, lrLat, ROOT_HEIGHT, num, 0);\n //System.out.println(\"xnUl:\" + xnUl + \" ypUl:\" + ypUl\n // + \" xnLr:\" + xnLr + \" ypLr:\" + ypLr);\n\n rasterUlLon = ROOT_ULLON + xnUl * ROOT_WIDTH / num;\n rasterUlLat = ROOT_ULLAT - ypUl * ROOT_HEIGHT / num;\n rasterLrLon = ROOT_LRLON - (num - xnLr - 1) * ROOT_WIDTH / num;\n rasterLrLat = ROOT_LRLAT + (num - ypLr - 1) * ROOT_HEIGHT / num;\n int nCols = xnLr - xnUl + 1;\n int nRows = ypLr - ypUl + 1;\n //System.out.println(\"numColumns:\" + nCols + \" numRows:\" + nRows);\n\n renderGrid = new String[nRows][nCols];\n\n for (int row = ypUl; row <= ypLr; row += 1) {\n int j = row - ypUl;\n for (int col = xnUl; col <= xnLr; col += 1) {\n int i = col - xnUl;\n renderGrid[j][i] = \"d\" + depth + \"_x\" + col + \"_y\" + row + \".png\";\n }\n }\n querySuccess = true;\n\n results.put(\"raster_ul_lon\", rasterUlLon);\n results.put(\"raster_ul_lat\", rasterUlLat);\n results.put(\"raster_lr_lon\", rasterLrLon);\n results.put(\"raster_lr_lat\", rasterLrLat);\n results.put(\"depth\", depth);\n results.put(\"render_grid\", renderGrid);\n results.put(\"query_success\", querySuccess);\n\n return results;\n }", "@Test\n public void testDoWork() {\n MapMatching mapMatching = new MapMatching(hopper, algoOptions);\n List<GPXEntry> inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.358735, 12.360574),\n new GHPoint(51.358594, 12.360032));\n MatchResult mr = mapMatching.doWork(inputGPXEntries);\n\n // make sure no virtual edges are returned\n int edgeCount = hopper.getGraphHopperStorage().getAllEdges().length();\n for (EdgeMatch em : mr.getEdgeMatches()) {\n assertTrue(\"result contains virtual edges:\" + em.getEdgeState().toString(),\n em.getEdgeState().getEdge() < edgeCount);\n }\n\n // create street names\n assertEquals(Arrays.asList(\"Platnerstraße\", \"Platnerstraße\", \"Platnerstraße\"),\n fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 1.5);\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis());\n\n PathWrapper matchGHRsp = new PathWrapper();\n new PathMerger().doWork(matchGHRsp, Collections.singletonList(mr.getMergedPath()), translationMap.get(\"en\"));\n InstructionList il = matchGHRsp.getInstructions();\n\n assertEquals(il.toString(), 2, il.size());\n assertEquals(\"Platnerstraße\", il.get(0).getName());\n\n inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.33099, 12.380267),\n new GHPoint(51.330689, 12.380776));\n mr = mapMatching.doWork(inputGPXEntries);\n\n assertEquals(Arrays.asList(\"Windmühlenstraße\", \"Windmühlenstraße\", \"Bayrischer Platz\",\n \"Bayrischer Platz\", \"Bayrischer Platz\"), fetchStreets(mr.getEdgeMatches()));\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), .1);\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 1);\n\n matchGHRsp = new PathWrapper();\n new PathMerger().doWork(matchGHRsp, Collections.singletonList(mr.getMergedPath()), translationMap.get(\"en\"));\n il = matchGHRsp.getInstructions();\n\n assertEquals(il.toString(), 3, il.size());\n assertEquals(\"Windmühlenstraße\", il.get(0).getName());\n assertEquals(\"Bayrischer Platz\", il.get(1).getName());\n\n // full path\n inputGPXEntries = createRandomGPXEntries(\n new GHPoint(51.377781, 12.338333),\n new GHPoint(51.323317, 12.387085));\n mapMatching = new MapMatching(hopper, algoOptions);\n mapMatching.setMeasurementErrorSigma(20);\n mr = mapMatching.doWork(inputGPXEntries);\n\n assertEquals(mr.getGpxEntriesLength(), mr.getMatchLength(), 0.5);\n assertEquals(mr.getGpxEntriesMillis(), mr.getMatchMillis(), 200);\n assertEquals(138, mr.getEdgeMatches().size());\n\n // TODO full path with 20m distortion\n // TODO full path with 40m distortion\n }", "@Test\n public void rectUpperLeftWriteTest() {\n final Rectangle rect = new Rectangle(-10, -20, 40, 30);\n minx = -2;\n miny = 4;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n\tpublic void testIsAxesMatchingSpatialCalibrationDifferentUnits()\n\t\tthrows Exception\n\t{\n\t\tfinal double scale = 0.75;\n\t\tfinal DefaultLinearAxis xAxis = new DefaultLinearAxis(Axes.X, \"cm\", scale);\n\t\tfinal DefaultLinearAxis yAxis = new DefaultLinearAxis(Axes.Y, \"mm\", scale);\n\t\tfinal Img<BitType> img = ArrayImgs.bits(1, 1);\n\t\tfinal ImgPlus<BitType> imgPlus = new ImgPlus<>(img, \"Test image\", xAxis,\n\t\t\tyAxis);\n\n\t\tfinal boolean result = IsosurfaceWrapper.isAxesMatchingSpatialCalibration(\n\t\t\timgPlus);\n\n\t\tassertFalse(\n\t\t\t\"Different units in axes should mean that calibration doesn't match\",\n\t\t\tresult);\n\t}", "private boolean _no_transformation_needed(int[] src_size, double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double xres = (dst_bbox[2]-dst_bbox[0])/dst_size[0];\n double yres = (dst_bbox[3]-dst_bbox[1])/dst_size[1];\n\n\n return (equals(src_size, dst_size) &&\n equals(this.src_srs, this.dst_srs) &&\n SRS.bbox_equals(src_bbox, dst_bbox, xres/10, yres/10));\n /*\n xres = (dst_bbox[2]-dst_bbox[0])/dst_size[0]\n yres = (dst_bbox[3]-dst_bbox[1])/dst_size[1]\n return (src_size == dst_size and\n self.src_srs == self.dst_srs and\n bbox_equals(src_bbox, dst_bbox, xres/10, yres/10))\n */\n }", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "@Test\n public void basicRenderTwoColorTest() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(Point3D.zero, new Vector(0, -1, 0), new Vector(0, 0, 1)));\n scene.setDistance(100);\n scene.setBackground(new Color(75, 127, 90));\n scene.setAmbientLight(new AmbientLight(new java.awt.Color(255, 191, 191), 1));\n\n scene.addGeometries(new Sphere(50, new Point3D(0, 0, 100)));\n\n scene.addGeometries(\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, 100, 100), new Point3D(100, 100, 100)),\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, -100, 100), new Point3D(100, -100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, 100, 100), new Point3D(-100, 100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, -100, 100), new Point3D(-100, -100, 100)));\n\n ImageWriter imageWriter = new ImageWriter(\"new render test\", 500, 500, 500, 500);\n Render render = new Render(scene , imageWriter);\n\n render.renderImage();\n render.printGrid(50, java.awt.Color.YELLOW);\n render.writeToImage();\n }", "@Test\n\tpublic void testGetGradients() throws GeoTessException\n\t{\n\t\t// set the active region and get a set of layers for which gradients are to\n\t\t// be calculated\n\t\tint[] layers = {2, 3, 4, 5, 6, 7, 8};\n\t\tmodel.setActiveRegion();\n\n\t\t// set grid node location indices and compute the gradients\n\t\tint attributeIndex = 0;\n\t\tboolean reciprocal = true; \n int layerId = 4;\n int nodeIndex = 1;\n int vertexIndex = 0;\n int pointIndex = 94;\n double radius = 6002.0;\n\t\tmodel.computeGradients(attributeIndex, reciprocal, layers);\n\n\t\t// set the previously evaluated truth for the gradients at the requested\n\t\t// location and create the vectors to hold the gradients\n\t\tdouble[] gradRadiusTrue = {1.9839115843623915E-6, -4.022375220857291E-6, -0.003656604048942139};\n\t\tdouble[] gradNodeTrue = {4.756547818175395E-6, -9.62857379398759E-6, -0.0033950085275608875};\n\t\tdouble[] gradPointTrue = {4.756547818175395E-6, -9.62857379398759E-6, -0.0033950085275608875};\n \n\t\tdouble[] gradRadius = new double [3];\n\t\tdouble[] gradNode = new double [3];\n\t\tdouble[] gradPoint = new double [3];\n\n\t\t// perform the vertexIndex/layerId/nodeIndex gradient method and test for\n\t\t// the true result\n\t\tmodel.getGradient(vertexIndex, layerId, nodeIndex, attributeIndex, reciprocal, gradNode);\n\t\tassertEquals(gradNode[0], gradNodeTrue[0], 1e-12);\n\t\tassertEquals(gradNode[1], gradNodeTrue[1], 1e-12);\n\t\tassertEquals(gradNode[2], gradNodeTrue[2], 1e-12);\n\n\t\t// perform the pointIndex gradient method and test for\n\t\t// the true result\n\t\tmodel.getPointGradient(pointIndex, attributeIndex, reciprocal, gradPoint);\n\t\tassertEquals(gradPoint[0], gradPointTrue[0], 1e-12);\n\t\tassertEquals(gradPoint[1], gradPointTrue[1], 1e-12);\n\t\tassertEquals(gradPoint[2], gradPointTrue[2], 1e-12);\n\n\t\t// perform the vertexIndex/layerId/radius gradient method and test for\n\t\t// the true result\n\t\tmodel.getGradient(vertexIndex, layerId, radius, attributeIndex, reciprocal, gradRadius);\n\t\tassertEquals(gradRadius[0], gradRadiusTrue[0], 1e-12);\n\t\tassertEquals(gradRadius[1], gradRadiusTrue[1], 1e-12);\n\t\tassertEquals(gradRadius[2], gradRadiusTrue[2], 1e-12);\n\t}", "public boolean validPath(int curRow, int curCol, int movRow, int movCol) {\n if (curRow + 2 == movRow || curRow - 2 == movRow){\n if (curCol + 2 == movCol || curCol - 2 == movCol){\n return true;\n }\n }\n return false;\n }", "@Test\n\tpublic void testGetPathIntegralLayerIdsAndWeights2() throws GeoTessException\n\t{\n\t\tdouble[] pointA = new double[3];\n\t\tdouble[] pointB = new double[3];\n\t\t\n\t\tVectorGeo.getVectorDegrees(0., 0., pointA);\n\t\tVectorGeo.getVectorDegrees(0., 30., pointB);\n\n\t\tGreatCircle greatCircle = new GreatCircle(pointA, pointB);\n\t\t\n\t\tArrayList<double[]> rayPath = greatCircle.getPoints(31, false);\n\n\t\t// radii will the radius of each of the points along the rayPath.\n\t\tdouble[] radii = new double[rayPath.size()];\n\t\tint[] layerIds = new int[rayPath.size()];\n\t\t\n\t\tArrays.fill(radii, 6371.);\n\t\tArrays.fill(layerIds, -1);\n\t\t\n\t\tHashMapIntegerDouble weights = new HashMapIntegerDouble();\n\t\t\n\t\tdouble dkm = model.getPathIntegral(-1, rayPath, radii, layerIds,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR, weights);\n\t\t\n\t\tassertEquals(greatCircle.getDistance()*6371., dkm, 0.1);\n\t\t\n\t\t// initialize the sum of the weights to zero. The sum of the weights\n\t\t// should equal the length of rayPath measured in km.\n\t\tdouble sumWeights = 0;\n\n\t\tIterator it = weights.iterator();\n\t\twhile (it.hasNext())\n\t\t{\n\t\t\tEntry e = it.nextEntry();\n\t\t\tsumWeights += e.getValue();\n\t\t}\n\n\t\tassertEquals(greatCircle.getDistance()*6371., sumWeights, .1);\n\n\t\tArrays.fill(layerIds, 4);\n\n\t\tdouble tt = model.getPathIntegral(0, rayPath, radii, layerIds,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR, weights);\n\t\t\n\t\tassertEquals(8.04, dkm/tt, 0.01);\n\t\n\t\tArrays.fill(layerIds, 5);\n\t\t\n\t\ttt = model.getPathIntegral(0, rayPath, radii, layerIds,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR, weights);\n\t\t\n\t\tassertEquals(7.158, dkm/tt, 0.01);\n\t\n\t}", "@Test\n public void testMatchValid() {\n Matcher mtch = filter.getMatcher(FULL_URI);\n assertTrue(\"no match\", filter.isResourceAccess(mtch));\n }", "@Test\n\tpublic void testGetPathIntegralLayerIdsAndWeights() throws GeoTessException\n\t{\n\t\tdouble[] pointA = new double[3];\n\t\tdouble[] pointB = new double[3];\n\t\t\n\t\tVectorGeo.getVectorDegrees(0., 0., pointA);\n\t\tVectorGeo.getVectorDegrees(0., 30., pointB);\n\n\t\tGreatCircle greatCircle = new GreatCircle(pointA, pointB);\n\t\t\n\t\tArrayList<double[]> rayPath = greatCircle.getPoints(31, false);\n\n\t\t// radii will the radius of each of the points along the rayPath.\n\t\tdouble[] radii = new double[rayPath.size()];\n\t\tint[] layerIds = new int[rayPath.size()];\n\t\t\n\t\tArrays.fill(radii, 6371.);\n\t\tArrays.fill(layerIds, -1);\n\t\t\n\t\tHashMap<Integer, Double> weights = new HashMap<Integer, Double>();\n\t\t\n\t\tdouble dkm = model.getPathIntegral(-1, rayPath, radii, layerIds,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR, weights);\n\t\t\n\t\tassertEquals(greatCircle.getDistance()*6371., dkm, 0.1);\n\t\t\n\t\t// initialize the sum of the weights to zero. The sum of the weights\n\t\t// should equal the length of rayPath measured in km.\n\t\tdouble sumWeights = 0;\n\n\t\tfor (Double w : weights.values()) sumWeights += w;\n\n\t\tassertEquals(greatCircle.getDistance()*6371., sumWeights, 0.1);\n\n\t\tArrays.fill(layerIds, 4);\n\n\t\tdouble tt = model.getPathIntegral(0, rayPath, radii, layerIds,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR, weights);\n\t\t\n\t\tassertEquals(8.04, dkm/tt, 0.01);\n\t\n\t\tArrays.fill(layerIds, 5);\n\t\t\n\t\ttt = model.getPathIntegral(0, rayPath, radii, layerIds,\n\t\t\t\tInterpolatorType.NATURAL_NEIGHBOR, InterpolatorType.LINEAR, weights);\n\t\t\n\t\tassertEquals(7.158, dkm/tt, 0.01);\n\t\n\t}", "public Map<String, Object> getMapRaster(Map<String, Double> params) {\n// System.out.println(params);\n //query box info\n double tar_lrlon, tar_ullon, tar_ullat, tar_lrlat, tar_w, tar_h, tar_LonDPP;\n tar_lrlon = params.get(\"lrlon\");\n tar_ullon = params.get(\"ullon\");\n tar_ullat = params.get(\"ullat\");\n tar_lrlat = params.get(\"lrlat\");\n tar_w = params.get(\"w\");\n tar_h = params.get(\"h\");\n tar_LonDPP = (tar_lrlon - tar_ullon) / tar_w;\n Map<String, Object> results = new HashMap<>();\n //check if query box make sense\n QuadTree rootTree = new QuadTree(\"root\", ROOT_ULLON, ROOT_ULLAT, ROOT_LRLON, ROOT_LRLAT, 0);\n QuadTree targetTree = new QuadTree(\"target\", tar_ullon, tar_ullat, tar_lrlon, tar_lrlat, 0);\n if (tar_ullon >= tar_lrlon || tar_ullat <= tar_lrlat || !rootTree.checkOverlap(targetTree)) {\n results.put(\"raster_ul_lon\", 0);\n results.put(\"raster_ul_lat\", 0);\n results.put(\"raster_lr_lon\", 0);\n results.put(\"raster_lr_lat\", 0);\n results.put(\"query_success:\", false);\n } else {\n work(rootTree, targetTree, results, tar_LonDPP);\n }\n return results;\n }", "private boolean isPathH(Board B, Move M, Graph G, int row, int column, Tile tile) {\n\n Tile t = tile;\n\n boolean result = true;\n boolean tempa = true;\n\n int sourceid = 0;\n\n\n int c = M.getX(), r = M.getY();\n\n if (r <= 0 && c <= 0) {\n\n\n } else if (r <= 0 && c >= 0) {\n\n\n } else if (r >= 0 && c >= 0) {\n\n for (int y = 0; y != 2; y++) {\n\n sourceid = (row * B.width) + column;\n\n // System.out.println(\"source id: \" + sourceid);\n\n if (y == 0) {\n\n\n //aab\n for (int i = 0; i != r; i++) {\n\n System.out.println(G.adj(sourceid).toString());\n\n if (G.adj.get(sourceid).contains(sourceid + B.width)) {\n\n // System.out.println(\"row artı\");\n\n } else {\n\n result = false;\n\n }\n\n sourceid += B.width;\n\n }\n\n for (int i = 0; i != c; i++) {\n\n\n if (G.adj.get(sourceid).contains(sourceid + 1)) {\n\n // System.out.println(\"okk\");\n\n } else {\n\n //return false;\n\n }\n\n sourceid += 1;\n\n System.out.println(\"b\");\n\n }\n } else {\n\n sourceid = row * B.width + column;\n\n for (int i = 0; i != c; i++) {\n // System.out.println(\"a\");\n\n }\n for (int i = 0; i != r; i++) {\n // System.out.println(\"b\");\n\n }\n }\n\n\n }\n\n\n }\n\n\n return result;\n }", "public static void testMirrorTemple()\n {\n Picture temple = new Picture(\"temple.jpg\");\n temple.explore();\n temple.mirrorTemple();\n temple.explore();\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "public void testMoveCommand2() throws Exception {\n assertSVG(\"Paths/moveCommand2\");\n }", "@Test\n public void test78() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double((-1851.4229665529), (-1851.4229665529), (-1851.4229665529), (-1851.4229665529));\n rectangle2D_Double0.y = (-1851.4229665529);\n rectangle2D_Double0.setRect(0.0, (-216.554), 10.0, 0.0);\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n BasicStroke basicStroke0 = (BasicStroke)combinedDomainCategoryPlot0.getRangeGridlineStroke();\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "@Test\n public void testRelativeDirectionOfTileByAirFacingSouth() {\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 8)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 2)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 8)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 8)));\n\n /*\n Tile in front => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 5)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 1)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 5)));\n\n /*\n Tile to the left, but within the turning buffer => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 11)));\n\n /*\n Tile to the right, but within the turning buffer => FRONT\n */\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 11)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 9)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 10)));\n Assert.assertEquals(Direction.FRONT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 11)));\n\n /*\n Tile to to the right, horizontally aligned => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 9)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 10)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 11)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 9)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 10)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 11)));\n\n /*\n Tile in front, but within the turning buffer and to the right => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 8)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 8)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 6)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 7)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 8)));\n\n /*\n Tile is at the back, but to the right => RIGHT\n */\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(0, 17)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(4, 14)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(4, 17)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(5, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(6, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(7, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(8, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 12)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 14)));\n Assert.assertEquals(Direction.RIGHT, nav.finder().relativeDirectionOfTileByAir(getTile(9, 17)));\n\n /*\n To to the left, horizontally aligned => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 9)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 10)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 11)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 9)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 10)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 11)));\n\n /*\n Tile in front, but within the turning buffer and to the left => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 8)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 8)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 6)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 7)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 8)));\n\n /*\n Tile is at the back, but to the left => LEFT\n */\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 14)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(10, 17)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(11, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(12, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(13, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(14, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(15, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(16, 14)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(16, 17)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 12)));\n Assert.assertEquals(Direction.LEFT, nav.finder().relativeDirectionOfTileByAir(getTile(17, 17)));\n }", "private boolean findPixel(Location p) {\n\t\treturn !(bst.get(bst.getRoot(), p) == null);\n\t}", "public void testUriMatcher() {\n UriMatcher testMatcher = RecipeProvider.buildUriMatcher();\n\n assertEquals(\"Error: The INGREDIENT URI was matched incorrectly.\",\n testMatcher.match(TEST_INGREDIENT), RecipeProvider.INGREDIENT);\n assertEquals(\"Error on all ingredient match.\", testMatcher.match(TEST_INGREDIENT_ALL), RecipeProvider.INGREDIENT_ALL);\n assertEquals(\"Error: The WEATHER WITH LOCATION URI was matched incorrectly.\",\n testMatcher.match(TEST_RECIPE), RecipeProvider.RECIPE);\n }", "private void renderRaster(Feature feature, RasterSymbolizer symbolizer) {\n GridCoverage grid = (GridCoverage) feature.getAttribute(\"grid\");\n GridCoverageRenderer gcr = new GridCoverageRenderer(grid);\n gcr.paint(graphics);\n LOGGER.finest(\"Raster rendered\");\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 4294967244L, 4294967244L);\n range0.getBegin();\n range0.equals(range_CoordinateSystem0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem1);\n assertEquals(\"[ 4294967245 .. 4294967245 ]/RB\", string0);\n \n Range.CoordinateSystem.values();\n Range range1 = Range.parseRange(\"[ 4294967245 .. 4294967244 ]/RB\");\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n Range range2 = Range.parseRange(\"[ 4294967245 .. 4294967244 ]/RB\", range_CoordinateSystem2);\n boolean boolean0 = range0.equals(range1);\n range0.equals(range_CoordinateSystem0);\n Range.CoordinateSystem.values();\n boolean boolean1 = range1.equals(range2);\n assertFalse(boolean1 == boolean0);\n assertTrue(boolean1);\n }", "public boolean equals(Object obj) {\n\t\t// Check class of object\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (!(obj instanceof GJGeneralPath2D))\n\t\t\treturn false;\n\t\t\n\t\t// class cast\n\t\tGJGeneralPath2D that = (GJGeneralPath2D) obj;\n\t\t\n\t\t// Paths should have same number of segments\n\t\tif (this.segments.size() != that.segments.size())\n\t\t\treturn false;\n\t\t\n\t\tSegment seg1, seg2;\n\t\tGJPoint2D[] pts1, pts2;\n\t\t\n\t\tfor (int i = 0; i < this.segments.size(); i++) {\n\t\t\t// extract each segment\n\t\t\tseg1 = this.segments.get(i);\n\t\t\tseg2 = that.segments.get(i);\n\t\t\t\n\t\t\t// check segments have same type\n\t\t\tif (seg1.type() != seg2.type())\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t// extract control points\n\t\t\tpts1 = seg1.controlPoints();\n\t\t\tpts2 = seg2.controlPoints();\n\t\t\t\n\t\t\t// check size of control point arrays\n\t\t\tif (pts1.length != pts2.length)\n\t\t\t\tthrow new RuntimeException(\"Two path segments have type but different number of control points\");\n\t\t\t\n\t\t\t// check identity of control points\n\t\t\tfor (int j = 0; j < pts1.length; j++) {\n\t\t\t\tif (!pts1[j].equals(pts2[j]))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if no difference was found, then the paths are almost equal\n\t\treturn true;\t\t\n\t}", "org.openxmlformats.schemas.drawingml.x2006.main.CTPath2D addNewPath();", "public boolean isCompatibleRaster(Raster raster) {\n\n\tboolean flag = true;\n SampleModel sm = raster.getSampleModel();\n\n if (sm instanceof ComponentSampleModel) {\n if (sm.getNumBands() != getNumComponents()) {\n return false;\n }\n for (int i=0; i<nBits.length; i++) {\n if (sm.getSampleSize(i) < nBits[i])\n flag = false;\n }\n }\n else {\n return false;\n }\n return ( (raster.getTransferType() == transferType) && flag);\n }", "public static void testPixellateOneArg(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(40);\n\t caterpillar.explore();\n }", "@Test\n public void copyTest() {\n ImageLayout layout = new ImageLayout();\n int[] bitMask = new int[] { 0, 1 };\n SampleModel sampleModel = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE, 512, 512,\n bitMask);\n layout.setSampleModel(sampleModel);\n layout.setColorModel(null);\n\n // Creation of the RenderingHints\n RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout);\n\n // create image with 2 bands\n RenderedImage twoBands = ConstantDescriptor.create(512f, 512f, new Byte[] { 1, 0 }, null);\n // Force the SampleModel to be th one defiend by the layout\n RenderedImage twoBandsPacked = new CopyOpImage(twoBands, hints, layout);\n\n // now select second band\n RenderedOp oneBand = BandSelectDescriptor.create(twoBandsPacked, new int[] { 1 }, hints);\n\n // make sure we got the right band\n Assert.assertEquals(1, oneBand.getSampleModel().getNumBands());\n Assert.assertEquals(0, oneBand.getData().getSample(0, 0, 0), 1E-11);\n }", "@Test\n\tpublic void withLensDistortion() {\n\t\tQrCodeDistortedChecks helper = new QrCodeDistortedChecks();\n\n\t\thelper.render();\n\n\t\t// find location of postion patterns and create graph\n\t\tFastQueue<PositionPatternNode> pps = new FastQueue<>(PositionPatternNode.class,true);\n\n\t\tpps.grow().square = new Polygon2D_F64(4);\n\t\tpps.grow().square = new Polygon2D_F64(4);\n\t\tpps.grow().square = new Polygon2D_F64(4);\n\n\t\thelper.setLocation(pps.get(0).square,pps.get(1).square,pps.get(2).square);\n\t\tfor (int i = 0; i < pps.size; i++) {\n\t\t\tpps.get(i).grayThreshold = 125;\n\t\t}\n\t\t// these numbers were found by sketching the QR code\n\t\tconnect(pps.get(2),pps.get(1),3,1);\n\t\tconnect(pps.get(0),pps.get(1),0,2);\n\n\t\t// Should fail when run on distorted image\n\t\tQrCodeDecoderImage<GrayF32> decoder = new QrCodeDecoderImage<>(null,GrayF32.class);\n\t\tdecoder.process(pps,helper.image);\n\n\t\tassertEquals(0, decoder.successes.size());\n\n\t\t// now tell it how to undistort the image\n\t\tdecoder.setLensDistortion(helper.image.width,helper.image.height,helper.distortion);\n\t\tfor (int i = 0; i < pps.size; i++) {\n\t\t\thelper.distToUndist(pps.get(i).square);\n\t\t}\n\t\tdecoder.process(pps,helper.image);\n\n\t\tassertEquals(1,decoder.successes.size());\n\t\tQrCode found = decoder.getFound().get(0);\n\t\tassertTrue(found.message.equals(\"123\"));\n\t}", "boolean hasImagePath();", "public void testSpecialIcons() {\n Utility.FolderProperties fp = Utility.FolderProperties.getInstance(mContext);\n \n // Make sure they're available\n Drawable inbox = fp.getIconIds(Mailbox.TYPE_INBOX);\n Drawable mail = fp.getIconIds(Mailbox.TYPE_MAIL);\n Drawable parent = fp.getIconIds(Mailbox.TYPE_PARENT);\n Drawable drafts = fp.getIconIds(Mailbox.TYPE_DRAFTS);\n Drawable outbox = fp.getIconIds(Mailbox.TYPE_OUTBOX);\n Drawable sent = fp.getIconIds(Mailbox.TYPE_SENT);\n Drawable trash = fp.getIconIds(Mailbox.TYPE_TRASH);\n Drawable junk = fp.getIconIds(Mailbox.TYPE_JUNK);\n \n // Make sure they're unique\n Set<Drawable> set = new HashSet<Drawable>();\n set.add(inbox);\n set.add(mail);\n set.add(parent);\n set.add(drafts);\n set.add(outbox);\n set.add(sent);\n set.add(trash);\n set.add(junk);\n assertEquals(8, set.size());\n }", "public static void main(String[] args) throws Exception{\n DrawingPanel panel = new DrawingPanel(840, 480);\n Graphics g = panel.getGraphics();\n \n //Test Step 1 - construct mountain map data\n Scanner S = new Scanner(new File(\"Colorado_844x480.dat\"));\n int[][] grid = read(S, 480, 840);\n \n //Test Step 2 - min, max\n int min = findMinValue(grid);\n System.out.println(\"Min value in map: \"+ min);\n \n int max = findMaxValue(grid);\n System.out.println(\"Max value in map: \"+ max);\n \n \n //Test Step 3 - draw the map\n drawMap(g, grid);\n \n //Test Step 4 - draw a greedy path\n \n // 4.1 implement indexOfMinInCol\n int minRow = indexOfMinInCol(grid, 0); // find the smallest value in col 0\n System.out.println(\"Row with lowest val in col 0: \"+ minRow);\n \n // 4.2 use minRow as starting point to draw path\n g.setColor(Color.RED); //can set the color of the 'brush' before drawing, then method doesn't need to worry about it\n int totalChange = drawLowestElevPath(g, grid, minRow); //\n System.out.println(\"Lowest-Elevation-Change Path starting at row \"+minRow+\" gives total change of: \"+totalChange);\n \n //Test Step 5 - draw the best path\n g.setColor(Color.RED);\n int bestRow = indexOfLowestElevPath(g, grid);\n \n //drawMap(g, grid); //use this to get rid of all red lines\n //g.setColor(Color.GREEN); //set brush to green for drawing best path\n //totalChange = drawLowestElevPath(g, grid, bestRow);\n System.out.println(\"The Lowest-Elevation-Change Path starts at row: \"+bestRow+\" and gives a total change\\nof: \"+totalChange);\n }", "@Test\n\tpublic void testIsAxesMatchingSpatialCalibration() throws Exception {\n\t\tfinal String unit = \"mm\";\n\t\tfinal double scale = 0.75;\n\t\tfinal DefaultLinearAxis xAxis = new DefaultLinearAxis(Axes.X, unit, scale);\n\t\tfinal DefaultLinearAxis yAxis = new DefaultLinearAxis(Axes.Y, unit, scale);\n\t\tfinal Img<BitType> img = ArrayImgs.bits(1, 1);\n\t\tfinal ImgPlus<BitType> imgPlus = new ImgPlus<>(img, \"Test image\", xAxis,\n\t\t\tyAxis);\n\n\t\tfinal boolean result = IsosurfaceWrapper.isAxesMatchingSpatialCalibration(\n\t\t\timgPlus);\n\n\t\tassertTrue(\"Axes should have matching calibration\", result);\n\t}", "public static void testMirrorHorizontal()\n {\n Picture caterpillar = new Picture(\"caterpillar.jpg\");\n caterpillar.explore();\n caterpillar.mirrorHorizontal();\n caterpillar.explore();\n }", "@Test\n public void shouldFindProperLocationBasedOnDistance() {\n assertEquals(Location.B6,\n Location.findLocation(Color.RED, Location.B2, 4));\n\n assertEquals(Location.B2,\n Location.findLocation(Color.BLACK, Location.B6, 4));\n\n // moving off the board\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 4));\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 6));\n assertEquals(Location.R_BEAR_OFF,\n Location.findLocation(Color.RED, Location.R2, 6));\n\n // moving in from the bar\n assertEquals(Location.R3,\n Location.findLocation(Color.BLACK,\n Location.B_BAR, 3));\n assertEquals(Location.B6,\n Location.findLocation(Color.RED,\n Location.R_BAR, 6));\n // passing from red to black table and opposite\n assertEquals(Location.B10,\n Location.findLocation(Color.BLACK,\n Location.R10, 5));\n assertEquals(Location.R10,\n Location.findLocation(Color.RED,\n Location.B10, 5));\n }", "boolean isLocator();", "public void testAbsolutize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/base/path\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path/\", \"foo.bar\", \"/base/path/foo.bar\"},\n new String[]{\"/base/path\", \"/foo.bar\", \"/foo.bar\"},\n \n new String[]{\"/base/path\", \"\", \"/base/path\"},\n new String[]{\"/base/path\", null, \"/base/path\"},\n \n new String[]{\"\", \"foo.bar\", \"foo.bar\"},\n new String[]{null, \"foo.bar\", \"foo.bar\"},\n };\n \n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_rel_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.absolutize(test_path, test_rel_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" relativeResource \" + \"'\" + test_rel_resource;\n assertEquals(message, expected, result);\n }\n }", "protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}", "@Test\n public void shouldCorrectlyResolveItemsWithEqualNames() throws Exception {\n final MockFolder folder = rule.createFolder(\"F\");\n final FreeStyleProject prjInRoot = rule.createFreeStyleProject(\"FOO\");\n final FreeStyleProject prjInFolder = folder.createProject(FreeStyleProject.class, \"FOO\");\n\n // Additional spot-checks for the absolute addressing\n assertsPath(\"F/FOO\", null, prjInFolder);\n assertsPath(\"/F/FOO\", null, prjInFolder);\n assertsPath(\"/FOO\", null, prjInRoot);\n }", "private boolean overlappingGateways(BpmnShape s1, BpmnShape s2) {\n\t\tdouble firstHeight = s1.getBounds().getHeight() / 2;\n\t\tdouble firstWidth = s1.getBounds().getWidth() / 2;\n\t\tdouble firstX = s1.getBounds().getX() + firstWidth;\n\t\tdouble firstY = s1.getBounds().getY() + firstHeight;\n\t\tdouble firstApothem = (s1.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\n\t\tdouble secondWidth = s2.getBounds().getWidth() / 2;\n\t\tdouble secondHeight = s2.getBounds().getHeight() / 2;\n\t\tdouble secondX = s2.getBounds().getX();\n\t\tdouble secondY = s2.getBounds().getY() + secondHeight;\n\t\tdouble secondApothem = (s2.getBounds().getHeight() * Math.sqrt(2)) / 2;\n\t\t\n\t\tif (firstX > secondX && firstY > secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY > secondY){\n\t\t\tif ((firstX + firstWidth > secondX - secondWidth && firstY - firstHeight < secondY + secondHeight) &&\n\t\t\t\t(firstX + firstApothem > secondX - secondApothem || firstY - firstApothem < secondY + secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY < secondY){\n\t\t\tif ((firstX - firstWidth < secondX + secondWidth && firstY + firstHeight > secondY - secondHeight) &&\n\t\t\t\t(firstX - firstApothem < secondX + secondApothem || firstY + firstApothem > secondY - secondApothem))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY == secondY)\n\t\t\t\treturn true;\n\t\t\n\t\tif (firstX == secondX && firstY > secondY){\n\t\t\tif (firstY - firstHeight < secondY + secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX > secondX && firstY == secondY){\n\t\t\tif (firstX - firstWidth < secondX + secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX == secondX && firstY < secondY){\n\t\t\tif (firstY + firstHeight > secondY - secondHeight)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (firstX < secondX && firstY == secondY){\n\t\t\tif (firstX + firstWidth > secondX - secondWidth)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void testIsValidonContinentNotConnectedMap() {\n // Create a new continent ContinentC which is not connected\n mapModel.addContinent(\"ContinentC\", 3);\n mapModel.getGraphTerritories()\n .get(\"TerritoryA\").setContinentName(\"ContinentC\");\n mapModel.getGraphTerritories()\n .get(\"TerritoryE\").setContinentName(\"ContinentC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testDirectMatPainting8UC1() {\n Mat m = new Mat(width, height, CV_8UC1);\r\n assertEquals(1, m.channels());\r\n assertEquals(1, m.capacity());\r\n assertEquals(width, m.step());\r\n assertEquals(width, m.cols());\r\n assertEquals(height, m.rows());\r\n\r\n ByteBuffer bb = m.createBuffer();\r\n for (long i = 0; i < width * height; i++) {\r\n long x = i % width, y = i / width;\r\n // blue to gray:\r\n byte gray = (byte) (pixelFunc(x, y) & 0xff);\r\n bb.put(gray);\r\n }\r\n\r\n // Java's byte is always signed, but opencv seems to treat it as\r\n // unsigned, ie. -1 is maximum luminosity, ie. gray value 255. The total\r\n // (Java byte -> gray value) mapping is then:\r\n // 0..127, -128..-1 -> 0..255\r\n imwrite(new File(TEMP_DIR, \"testDirectMatPainting8UC1.png\").getAbsolutePath(), m);\r\n // @insert:image:testDirectMatPainting8UC1.png@\r\n }", "public static void testZeroRed()\n {\n\t Picture wall = new Picture(\"wall.jpg\");\n\t wall.zeroRed();\n\t wall.explore();\n }", "@Test\n\tpublic void testIsAxesMatchingSpatialCalibrationNoUnits() throws Exception {\n\t\tfinal double scale = 0.75;\n\t\tfinal DefaultLinearAxis xAxis = new DefaultLinearAxis(Axes.X, \"\", scale);\n\t\tfinal DefaultLinearAxis yAxis = new DefaultLinearAxis(Axes.Y, null, scale);\n\t\tfinal Img<BitType> img = ArrayImgs.bits(1, 1);\n\t\tfinal ImgPlus<BitType> imgPlus = new ImgPlus<>(img, \"Test image\", xAxis,\n\t\t\tyAxis);\n\n\t\tfinal boolean result = IsosurfaceWrapper.isAxesMatchingSpatialCalibration(\n\t\t\timgPlus);\n\n\t\tassertTrue(\"No units should mean matching calibration\", result);\n\t}", "private void setSuccess(List<Coordinate> path) {\n success = false;\n boolean hasStart = false;\n boolean hasEnd = false;\n boolean hasWayPoint = true;\n for (Coordinate end : destCells) {\n if (path.contains(end)) {\n hasEnd = true;\n break;\n }\n }\n for (Coordinate start : originCells) {\n if (path.contains(start)) {\n hasStart = true;\n break;\n }\n }\n for (Coordinate way : waypointCells) {\n if (!path.contains(way)) {\n hasWayPoint = false;\n }\n }\n success = hasStart && hasEnd && hasWayPoint;\n }", "@Test\n public void testGray16BitIntoRGB() {\n BufferedImage im16bit = new BufferedImage(100, 100, BufferedImage.TYPE_USHORT_GRAY);\n WritableRaster raster16bit = im16bit.getRaster();\n int[] fill = new int[50 * 100];\n Arrays.fill(fill, 1000);\n raster16bit.setSamples(0, 0, 100, 50, 0, fill);\n Arrays.fill(fill, 30000);\n raster16bit.setSamples(0, 50, 100, 50, 0, fill);\n\n // mosaic setting the nodata\n\n BufferedImage yellow = buildBGR(Color.YELLOW);\n\n // mosaic setting the nodata\n Range noData1000 = RangeFactory.create(1000, 1000);\n RenderedOp mosaic = MosaicDescriptor.create(new RenderedImage[] { im16bit, yellow },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0 }, new Range[] { noData1000, null }, null);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n assertRGB(mosaic, false);\n\n // check top left quadrant, should be yellow (nodata in the gray one)\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check top right quadrant, should be yellow (nodata in the gray one)\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom left quadrant, should be 30000 scaled down to byte\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 117, 117, 117 }, pixel);\n // check bottom right quadrant, should be 30000 scaled down to byte\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 117, 117, 117 }, pixel);\n }", "private boolean clearPath(Square square1, Square square2) {\n int x1 = square1.getCoords()[0];\n int x2 = square2.getCoords()[0];\n int y1 = square1.getCoords()[1];\n int y2 = square2.getCoords()[1];\n\n int targetX;\n int targetY;\n int startX;\n int startY;\n\n if (y1 > y2) {\n targetY = y1;\n startY = y2 + 1;\n } else {\n targetY = y2;\n startY = y1 + 1;\n }\n\n if (x1 > x2) {\n targetX = x1;\n startX = x2 + 1;\n } else {\n targetX = x2;\n startX = x1 + 1;\n }\n\n // Straight path along Y axis\n if (x1 == x2) {\n\n // Go along y\n while (startY < targetY) {\n if (!squares[x1][startY].isEmpty()) {\n return false;\n } else {\n startY++;\n }\n }\n // Straight path along X axis\n } else if (y1 == y2) {\n // Go along x\n while (startX < targetX) {\n if (!squares[startX][y1].isEmpty()) {\n return false;\n } else {\n startX++;\n }\n }\n }\n\n // Angled path\n if (Math.abs(x1 - x2) == Math.abs(y1 - y2)) {\n int smallerX;\n int largerX;\n if (x1 > x2) {\n largerX = x1;\n smallerX = x2;\n } else {\n smallerX = x1;\n largerX = x2;\n }\n // If the angle is down and to the left\n if ((x1 > x2 && y1 < y2) || (x1 < x2 && y1 > y2)) {\n targetX = smallerX;\n startX = largerX - 1;\n while (startX > targetX && startY < targetY) {\n if (!squares[startX][startY].isEmpty()) {\n return false;\n } else {\n startX--;\n startY++;\n }\n }\n // If the angle is down and to the right\n } else if ((x1 < x2 && y1 < y2) || (x1 > x2 && y1 > y2)) {\n targetX = largerX;\n startX = smallerX + 1;\n // Go to the right and down\n while (startX < targetX && startY < targetY) {\n if (!squares[startX][startY].isEmpty()) {\n return false;\n } else {\n startX++;\n startY++;\n }\n }\n }\n }\n return true;\n }", "public boolean validPath(int curRow, int curCol, int movRow, int movCol) {\n\n if(movCol > curCol && curRow == movRow || movCol < curCol && curRow == movRow){\n return true;\n }\n\n if(curRow + 1 == movRow && movCol == curCol || curRow - 1 == movRow && movCol == curCol){\n return true;\n }\n\n return false;\n }", "private Boolean pointNotCorner(Position3D cell,int d, int r, int c) {\n\n return d == cell.getDepthIndex() && (r == cell.getRowIndex() || c == cell.getColumnIndex());\n }", "@Test\n public void testInvalidAttemptLinks() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n\n //invoke attemptLinks\n try {\n testPillars = largeMaze.getPillars();\n testPillar = testPillars.get(Maze.position(3,3));\n testPillar.setPlanksLeft(0);\n attemptLinks.invoke(solver.getClass(), testPillar, largeMaze.getEnd(), testESet, testNQueue);\n } catch (Exception e) {\n fail(\"Unexpectedly could not invoke attemptLinks().\");\n }\n\n assertEquals(0, testESet.size());\n assertEquals(0, testNQueue.size());\n }", "void lineTestPattern2()\n\t{\n\t float theta,d_theta,d_petal,petal,radius,p;\n\t int cx,cy;\n\t int i;\n\t int n_steps =( Nsteps == 18 )?64:4*Nsteps;\n\t Point2D v0 = new Point2D(),v1 = new Point2D();\n\n\t d_theta = (float)(2.0*Math.PI / n_steps);\n\t d_petal = (float)(12.0*Math.PI / n_steps);\n\n\t cx = buff.getWidth()/2;\n\t cy = buff.getHeight()/2;\n\n\t radius = (float) (0.75 * ((cx < cy) ? cx : cy));\n\t p = (float) (radius*0.25);\n\n\t /* draw the outer petals first */\n\n\t v0.x = cx;\n\t v0.y = (int)Math.floor(0.5 + radius + p) + cy;\n\t v0.c.r = 1;\n\t v0.c.g = (float) (128+Math.sin(2*Math.PI)*127.0)/255.0f;\n\t v0.c.b = (float) (128+Math.cos(2*Math.PI)*127.0)/255.0f;\n\n\t for(petal=d_petal,theta=d_theta,i=0;i<=n_steps;++i,theta+=d_theta,petal+=d_petal)\n\t {\n\t v1.x = (int)Math.floor(0.5 + radius*Math.sin(theta) + p*Math.sin(petal)) + cx;\n\t v1.y = (int)Math.floor(0.5 + radius*Math.cos(theta) + p*Math.cos(petal)) + cy;\n\n\t v1.c.r = 1;\n\t v1.c.g = (float) ((128+Math.sin(theta*5)*127.0)/255.0f);\n\t v1.c.b = (float) ((128+Math.cos(theta*5)*127.0)/255.0f);\n\t SketchBase.drawLine(buff,v0,v1);\n\n\t v0.x = v1.x;\n\t v0.y = v1.y;\n\t v0.c = v1.c;\n\t }\n\n\t /* draw circle at center */\n\t radius *= 0.5;\n\t v0.x = cx;\n\t v0.y = (int)Math.floor(0.5 + radius) + cy;\n\n\t /* color = orange */\n\t v1.c.r = v0.c.r = 1;\n\t v1.c.g = v0.c.g = 97.0f/255.0f;\n\t v1.c.b = v0.c.b = 0; \n\n\t for(theta=d_theta,i=0;i<=n_steps;++i,theta+=d_theta)\n\t {\n\t v1.x = (int)Math.floor(0.5 + radius*Math.sin(theta)) + cx;\n\t v1.y = (int)Math.floor(0.5 + radius*Math.cos(theta)) + cy;\n\n\t SketchBase.drawLine(buff,v0,v1);\n\n\t v0.x = v1.x;\n\t v0.y = v1.y;\n\t }\n\t}", "public void draw(BWRaster raster) {\n for (int y = 0, height = raster.getHeight(); y < height; y++) {\n for (int x = 0, width = raster.getWidth(); x < width; x++) {\n if (containsPoint(x, y))\n raster.turnOn(x, y);\n }\n }\n }" ]
[ "0.56471324", "0.555498", "0.54241383", "0.5369739", "0.5354094", "0.5311355", "0.5302043", "0.51695925", "0.5134436", "0.51311237", "0.51260793", "0.51177794", "0.5109101", "0.5098306", "0.50854325", "0.50820696", "0.50605255", "0.5050033", "0.5044693", "0.5036499", "0.5033801", "0.5007695", "0.49629265", "0.49616078", "0.49596798", "0.4957666", "0.49535736", "0.49401626", "0.49196488", "0.49160808", "0.49058464", "0.4903045", "0.48999056", "0.48885122", "0.48869753", "0.48685482", "0.48618907", "0.48455384", "0.48279923", "0.48066494", "0.48038107", "0.47659126", "0.47460523", "0.47415197", "0.47410342", "0.4739862", "0.47393817", "0.47157827", "0.47110927", "0.46933028", "0.46884274", "0.46851066", "0.46821097", "0.4678378", "0.466951", "0.46684152", "0.4660469", "0.46578708", "0.46465796", "0.46446154", "0.4642695", "0.46332905", "0.4629385", "0.4616726", "0.46140063", "0.4613913", "0.46119067", "0.4604281", "0.46040535", "0.45975286", "0.45956835", "0.45843235", "0.45823348", "0.458026", "0.45716012", "0.45710266", "0.45689735", "0.45636168", "0.45631713", "0.45436653", "0.454252", "0.45401627", "0.45356482", "0.45317423", "0.45279214", "0.45278758", "0.45261046", "0.45246333", "0.45232207", "0.45219085", "0.45190924", "0.4519066", "0.45186266", "0.45131832", "0.45030117", "0.44975322", "0.4497005", "0.44930756", "0.4492314", "0.44915742" ]
0.692601
0
Test to check if we can successfully create a direct rendered image by using a coverage view as a source, and a symbolizer defining which three bands of the input coverage view can be used for RGB coloring, and with what order.
@Test public void testStyleUsingChannelsFromCoverageView() throws Exception { GetMapRequest request = new GetMapRequest(); CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84; ReferencedEnvelope bbox = new ReferencedEnvelope(new Envelope((-116.90673461649858), (-114.30988665660261), 32.070937282184026, 33.8903284734844), crs); request.setBbox(bbox); request.setSRS("urn:x-ogc:def:crs:EPSG:4326"); request.setFormat("image/png"); final WMSMapContent map = new WMSMapContent(request); map.setMapWidth(300); map.setMapHeight(300); map.setTransparent(false); map.getViewport().setBounds(bbox); StyleBuilder styleBuilder = new StyleBuilder(); Catalog catalog = getCatalog(); // Source image CoverageInfo ci = catalog.getCoverageByName(MULTIBAND.getPrefix(), MULTIBAND.getLocalPart()); GridCoverage2DReader reader = ((GridCoverage2DReader) (ci.getGridCoverageReader(null, null))); reader.getCoordinateReferenceSystem(); Layer sl = new org.geoserver.wms.CachedGridReaderLayer(reader, styleBuilder.createStyle(styleBuilder.createRasterSymbolizer())); map.addLayer(sl); RenderedImageMap srcImageMap = this.rasterMapProducer.produceMap(map); RenderedImage srcImage = srcImageMap.getImage(); // CoverageView band creation. We create a coverage view with 6 bands, using // the original bands from the multiband coverage // Note that first three bands are int reverse order of the bands of the source coverage final InputCoverageBand ib0 = new InputCoverageBand("multiband", "2"); final CoverageBand b0 = new CoverageBand(Collections.singletonList(ib0), "multiband@2", 0, CompositionType.BAND_SELECT); final InputCoverageBand ib1 = new InputCoverageBand("multiband", "1"); final CoverageBand b1 = new CoverageBand(Collections.singletonList(ib1), "multiband@1", 1, CompositionType.BAND_SELECT); final InputCoverageBand ib2 = new InputCoverageBand("multiband", "0"); final CoverageBand b2 = new CoverageBand(Collections.singletonList(ib2), "multiband@0", 2, CompositionType.BAND_SELECT); final InputCoverageBand ib3 = new InputCoverageBand("multiband", "0"); final CoverageBand b3 = new CoverageBand(Collections.singletonList(ib3), "multiband@0", 0, CompositionType.BAND_SELECT); final InputCoverageBand ib4 = new InputCoverageBand("multiband", "1"); final CoverageBand b4 = new CoverageBand(Collections.singletonList(ib4), "multiband@1", 1, CompositionType.BAND_SELECT); final InputCoverageBand ib5 = new InputCoverageBand("multiband", "2"); final CoverageBand b5 = new CoverageBand(Collections.singletonList(ib5), "multiband@2", 2, CompositionType.BAND_SELECT); final List<CoverageBand> coverageBands = new ArrayList<CoverageBand>(1); coverageBands.add(b0); coverageBands.add(b1); coverageBands.add(b2); coverageBands.add(b3); coverageBands.add(b4); coverageBands.add(b5); CoverageView multiBandCoverageView = new CoverageView("multiband_select", coverageBands); CoverageStoreInfo storeInfo = catalog.getCoverageStoreByName("multiband"); CatalogBuilder builder = new CatalogBuilder(catalog); // Reordered bands coverage CoverageInfo coverageInfo = multiBandCoverageView.createCoverageInfo("multiband_select", storeInfo, builder); coverageInfo.getParameters().put("USE_JAI_IMAGEREAD", "false"); catalog.add(coverageInfo); final LayerInfo layerInfoView = builder.buildLayer(coverageInfo); catalog.add(layerInfoView); final Envelope env = ci.boundingBox(); RenderedImageMapOutputFormatTest.LOGGER.info(("about to create map ctx for BasicPolygons with bounds " + env)); RasterSymbolizer symbolizer = styleBuilder.createRasterSymbolizer(); ChannelSelection cs = new ChannelSelectionImpl(); SelectedChannelType red = new SelectedChannelTypeImpl(); SelectedChannelType green = new SelectedChannelTypeImpl(); SelectedChannelType blue = new SelectedChannelTypeImpl(); // We want to create an image where the RGB channels are in reverse order // regarding the band order of the input coverage view // Note that channel names start with index "1" red.setChannelName("3"); green.setChannelName("2"); blue.setChannelName("1"); cs.setRGBChannels(new SelectedChannelType[]{ red, green, blue }); symbolizer.setChannelSelection(cs); reader = ((GridCoverage2DReader) (coverageInfo.getGridCoverageReader(null, null))); reader.getCoordinateReferenceSystem(); Layer dl = new org.geoserver.wms.CachedGridReaderLayer(reader, styleBuilder.createStyle(symbolizer)); map.removeLayer(sl); map.addLayer(dl); RenderedImageMap dstImageMap = this.rasterMapProducer.produceMap(map); RenderedImage destImage = dstImageMap.getImage(); int dWidth = destImage.getWidth(); int dHeight = destImage.getHeight(); int[] destImageRowBand0 = new int[dWidth * dHeight]; int[] destImageRowBand1 = new int[destImageRowBand0.length]; int[] destImageRowBand2 = new int[destImageRowBand0.length]; destImage.getData().getSamples(0, 0, dWidth, dHeight, 0, destImageRowBand0); destImage.getData().getSamples(0, 0, dWidth, dHeight, 1, destImageRowBand1); destImage.getData().getSamples(0, 0, dWidth, dHeight, 2, destImageRowBand2); int sWidth = srcImage.getWidth(); int sHeight = srcImage.getHeight(); int[] srcImageRowBand0 = new int[sWidth * sHeight]; int[] srcImageRowBand2 = new int[srcImageRowBand0.length]; srcImage.getData().getSamples(0, 0, sWidth, sHeight, 0, srcImageRowBand0); // Source and result image first bands should be the same. We have reversed the order // of the three first bands of the source coverage and then we re-reversed the three // first bands using channel selection on the raster symbolizer used for rendering. Assert.assertTrue(Arrays.equals(destImageRowBand0, srcImageRowBand0)); // Result band 0 should not be equal to source image band 2 Assert.assertFalse(Arrays.equals(destImageRowBand0, srcImageRowBand2)); srcImageMap.dispose(); dstImageMap.dispose(); map.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testTwoIndexedSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, with palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n null, new Range[] { noDataBlue, noDataBlue }, null);\n\n // it has been expanded\n assertByteIndexed(mosaic);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[1];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0 }, pixel);\n // check top right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom left quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n\n }", "@Test\n public void testDirectVsNonDirectRasterRender() throws Exception {\n Catalog catalog = getCatalog();\n CoverageInfo ci = catalog.getCoverageByName(MULTIBAND.getPrefix(), MULTIBAND.getLocalPart());\n final Envelope env = ci.boundingBox();\n RenderedImageMapOutputFormatTest.LOGGER.info((\"about to create map ctx for BasicPolygons with bounds \" + env));\n GetMapRequest request = new GetMapRequest();\n CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;\n ReferencedEnvelope bbox = new ReferencedEnvelope(new Envelope((-116.90673461649858), (-114.30988665660261), 32.070937282184026, 33.8903284734844), crs);\n request.setBbox(bbox);\n request.setSRS(\"urn:x-ogc:def:crs:EPSG:4326\");\n request.setFormat(\"image/png\");\n final WMSMapContent map = new WMSMapContent(request);\n map.setMapWidth(300);\n map.setMapHeight(300);\n map.setBgColor(Color.red);\n map.setTransparent(false);\n map.getViewport().setBounds(bbox);\n StyleBuilder builder = new StyleBuilder();\n GridCoverage2DReader reader = ((GridCoverage2DReader) (ci.getGridCoverageReader(null, null)));\n reader.getCoordinateReferenceSystem();\n Layer l = new org.geoserver.wms.CachedGridReaderLayer(reader, builder.createStyle(builder.createRasterSymbolizer()));\n map.addLayer(l);\n RenderedImageMap imageMap = this.rasterMapProducer.produceMap(map);\n ImageAssert.assertEquals(new File(\"src/test/resources/org/geoserver/wms/map/direct-raster-expected.tif\"), imageMap.getImage(), 0);\n imageMap.dispose();\n }", "@Test\n public void testInterpolationAtEdges() {\n // Following constant is pixel size (in degrees).\n // This constant must be identical to the one defined in 'createRandomCoverage()'\n final double PIXEL_SIZE = 0.25;\n createRandomCoverage();\n coverage = coverage.view(ViewType.GEOPHYSICS);\n coverage = Interpolator2D.create(coverage, Interpolation.getInstance(Interpolation.INTERP_BILINEAR));\n assertTrue(coverage instanceof Interpolator2D);\n assertTrue(coverage.view(ViewType.GEOPHYSICS) instanceof Interpolator2D);\n assertTrue(coverage.view(ViewType.PACKED) instanceof Interpolator2D);\n final int band = 0; // Band to test.\n double[] buffer = null;\n final Raster data = coverage.getRenderedImage().getData();\n final Envelope envelope = coverage.getEnvelope();\n final GridExtent range = coverage.getGridGeometry().getExtent();\n final double left = envelope.getMinimum(0);\n final double upper = envelope.getMaximum(1);\n final Point2D.Double point = new Point2D.Double(); // Will maps to pixel upper-left corner\n for (long j=range.getSize(1); --j>=1;) {\n for (long i=range.getSize(0); --i>=1;) {\n point.x = left + PIXEL_SIZE*i;\n point.y = upper - PIXEL_SIZE*j;\n buffer = coverage.evaluate(point, buffer);\n double t = buffer[band];\n\n // Computes the expected value:\n double r00 = data.getSampleDouble((int) i-0, (int) j-0, band);\n double r01 = data.getSampleDouble((int) i-0, (int) j-1, band);\n double r10 = data.getSampleDouble((int) i-1, (int) j-0, band);\n double r11 = data.getSampleDouble((int) i-1, (int) j-1, band);\n double r = (r00 + r01 + r10 + r11) / 4;\n assertEquals(r, t, SAMPLE_TOLERANCE);\n }\n }\n }", "protected final synchronized void show(final GridCoverage coverage) {\n if (!viewEnabled) {\n return;\n }\n final RenderedImage image = coverage.render(null);\n try {\n Class.forName(\"org.geotoolkit.gui.swing.image.OperationTreeBrowser\")\n .getMethod(\"show\", new Class<?>[] {RenderedImage.class})\n .invoke(null, new Object[]{image});\n } catch (RuntimeException e) {\n throw e;\n } catch (Exception e) {\n /*\n * The OperationTreeBrowser is not part of Geotk's core. It is optional and this\n * class should not fails if it is not presents. This is only a helper for debugging.\n */\n System.err.println(e);\n }\n }", "@Test\n public void rectContainsImageWriteTest() {\n final Rectangle rect = new Rectangle(-10, -10, 150, 80);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n public void equality() {\n ImageReference expected = createSampleImage();\n\n assertEquals(expected, createSampleImage());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(\"content://bar\")\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(1, TEST_HEIGHT)\n .build());\n assertNotEquals(expected, new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(false)\n .setOriginalSize(TEST_WIDTH, 1)\n .build());\n\n assertEquals(expected.hashCode(), new ImageReference.Builder()\n .setContentUri(TEST_CONTENT_URI)\n .setIsTintable(true)\n .setOriginalSize(TEST_WIDTH, TEST_HEIGHT)\n .build()\n .hashCode());\n }", "@Test\n public void testIndexedNoDataRBG() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED, icm);\n Graphics2D gr = bi.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // create a ROI, split vertically between black and white\n BufferedImage biROI = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_BINARY);\n gr = biROI.createGraphics();\n gr.setColor(Color.BLACK);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.WHITE);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // create a RGB Image, yellow\n BufferedImage yellow = buildBGR(Color.YELLOW);\n\n // mosaic them, with palette expansion\n RenderedOp mosaic = MosaicDescriptor.create(new RenderedImage[] { bi, yellow },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null,\n new ROI[] { new ROI(biROI), null }, null, null,\n new Range[] { RangeFactory.create((byte) 0, (byte) 0), null }, null);\n\n // it has been expanded\n assertRGB(mosaic, false);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be yellow, we have both nodata and outside of ROI\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check top right quadrant, should be yellow, we have data but outside of ROI\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom left quadrant, should be yellow, we have nodata even if inside the ROI\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom right quadrant, should be red, we have data and it's inside the ROI\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n\n }", "public boolean testPixel(EIfcpixeltexture type) throws SdaiException;", "@Override\n protected final GridCoverage prepareCoverageToResampling(final GridCoverage source, final CachedRasterSymbolizer symbolizer) {\n final ColorMap cMap = symbolizer.getSource().getColorMap();\n if (cMap != null && cMap.getFunction() != null) {\n return source; // Coloration is handled externally\n }\n\n final List<SampleDimension> sds = source.getSampleDimensions();\n if (sds == null || sds.size() != 3) {\n return source;\n }\n\n if (source != source.forConvertedValues(false)) {\n return source;\n }\n\n for (SampleDimension sd : sds) {\n if (sd.getTransferFunction().isPresent())\n return source;\n }\n\n // At this point, no geophysic information has been found. We will consider input coverage as a colorized image.\n return new ForcedAlpha(source);\n }", "@Test\n public void testTwoIndexedNoSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, the different nodata will force a palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n Range noDataRed = RangeFactory.create((byte) 1, (byte) 1);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0, 0, 0 }, new Range[] { noDataBlue, noDataRed }, null);\n\n // it has been expanded\n assertRGB(mosaic, false);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0, 0, 255 }, pixel);\n // check top right quadrant, should be red (red is data in the first image)\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n // check bottom left quadrant, should be black, it's no data in both\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 0, 0, 0 }, pixel);\n // check bottom right quadrant, should be red, it's red in the first image\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n }", "@Test\n public void testDataV1OverpaintedArc() throws IOException, InterruptedException {\n PICTImageReader reader = createReader();\n reader.setInput(new ByteArrayImageInputStream(DATA_V1_OVERPAINTED_ARC));\n reader.read(0);\n BufferedImage image = reader.read(0);\n\n if (!GraphicsEnvironment.isHeadless()) {\n PICTImageReader.showIt(image, \"dataV1CopyBits\");\n Thread.sleep(10000);\n }\n }", "public void testEquals() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n r1.setBlockHeight(2.0);\n r2.setBlockHeight(2.0);\n r1.setBlockWidth(2.0);\n r2.setBlockWidth(2.0);\n r1.setPaintScale(new GrayPaintScale(0.0, 1.0));\n r2.setPaintScale(new GrayPaintScale(0.0, 1.0));\n }", "@Test\r\n public void testConfigurableConstructor(){\r\n ColorDistanceFunction distanceFunction = mock(ColorDistanceFunction.class);\r\n when(distanceFunction.getDistance(not(eq(new Tone(Color.BLUE))), any())).thenReturn(99.9);\r\n when(distanceFunction.getDistance(eq(new Tone(Color.BLUE)), any())).thenReturn(0.0);\r\n\r\n List<Tone> palette = Arrays.asList(new Tone(Color.RED), new Tone(Color.BLUE));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer(distanceFunction);\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertContainsColor(Color.BLUE, analysis);\r\n }", "public void testGetImage() {\n CLImage instance = new CLImage();\n byte[] expResult = new byte[] {1, 2, 3};\n instance.image = new byte[] {1, 2, 3};\n byte[] result = instance.getImage();\n assertEquals(expResult.length, result.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], result[i]);\n }\n }", "@Test\n public void copyTest() {\n ImageLayout layout = new ImageLayout();\n int[] bitMask = new int[] { 0, 1 };\n SampleModel sampleModel = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE, 512, 512,\n bitMask);\n layout.setSampleModel(sampleModel);\n layout.setColorModel(null);\n\n // Creation of the RenderingHints\n RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout);\n\n // create image with 2 bands\n RenderedImage twoBands = ConstantDescriptor.create(512f, 512f, new Byte[] { 1, 0 }, null);\n // Force the SampleModel to be th one defiend by the layout\n RenderedImage twoBandsPacked = new CopyOpImage(twoBands, hints, layout);\n\n // now select second band\n RenderedOp oneBand = BandSelectDescriptor.create(twoBandsPacked, new int[] { 1 }, hints);\n\n // make sure we got the right band\n Assert.assertEquals(1, oneBand.getSampleModel().getNumBands());\n Assert.assertEquals(0, oneBand.getData().getSample(0, 0, 0), 1E-11);\n }", "public boolean testColourcomponents(EIfcpixeltexture type) throws SdaiException;", "@Test\n\t\tpublic void testPictureSample() {\n\t\t\tPixel[][] red = new Pixel[15][10];\n\t\t\tfor(int x =0; x < 15; x++) {\n\t\t\t\tfor(int y =0; y<10; y++) {\n\t\t\t\t\tif(x%2 == 0) {\n\t\t\t\t\t\tred[x][y] = new ColorPixel(1, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tred[x][y] = new GrayPixel(.5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tPicture redAndGray = new MutablePixelArrayPicture(red, \"redAndGray\");\n\t\t\tIterator<Pixel> sample = redAndGray.sample(2,3, 3, 4);\n\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(2, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(5, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(8, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(11, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(14, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(2, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(5, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(8, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(11, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(14, 7));\n\t\t\tassertFalse(sample.hasNext());\n\t\t}", "@Test\n\tpublic void testGetProcessorForColorProcessor() {\n\t\tfinal PlanarImg< ARGBType, IntArray > argbs = PlanarImgs.argbs( 1, 1, 1 );\n\t\targbs.randomAccess().get().set( 0xff010203 );\n\t\tfinal VirtualStack stack = PlanarImgToVirtualStack.wrap( argbs );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t\tstack.getProcessor( 1 );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t}", "@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(20)\n\tboolean hasDirectCoverage();", "@Test\n public void imageContainsRectWriteTest() {\n final Rectangle rect = new Rectangle(20, 10, 70, 30);\n minx = -5;\n miny = 7;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n setPixelIterator(renderedImage, rect);\n while (pixIterator.next()) pixIterator.setSample(-1);\n fillGoodTabRef(minx, miny, width, height, tilesWidth, tilesHeight, numBand, rect);\n setPixelIterator(renderedImage);\n int comp = 0;\n while (pixIterator.next()) {\n setTabTestValue(comp++, pixIterator.getSampleDouble());\n }\n assertTrue(compareTab());\n }", "@Test\n public void testGray16BitIntoRGB() {\n BufferedImage im16bit = new BufferedImage(100, 100, BufferedImage.TYPE_USHORT_GRAY);\n WritableRaster raster16bit = im16bit.getRaster();\n int[] fill = new int[50 * 100];\n Arrays.fill(fill, 1000);\n raster16bit.setSamples(0, 0, 100, 50, 0, fill);\n Arrays.fill(fill, 30000);\n raster16bit.setSamples(0, 50, 100, 50, 0, fill);\n\n // mosaic setting the nodata\n\n BufferedImage yellow = buildBGR(Color.YELLOW);\n\n // mosaic setting the nodata\n Range noData1000 = RangeFactory.create(1000, 1000);\n RenderedOp mosaic = MosaicDescriptor.create(new RenderedImage[] { im16bit, yellow },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0 }, new Range[] { noData1000, null }, null);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n assertRGB(mosaic, false);\n\n // check top left quadrant, should be yellow (nodata in the gray one)\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check top right quadrant, should be yellow (nodata in the gray one)\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom left quadrant, should be 30000 scaled down to byte\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 117, 117, 117 }, pixel);\n // check bottom right quadrant, should be 30000 scaled down to byte\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 117, 117, 117 }, pixel);\n }", "@Test\n public void testGetColorModel(){\n IndexColorModel indexColorModel = imageData.getColorModel();\n Assert.assertNotNull(indexColorModel );\n Assert.assertEquals(ColorTable.getColorModel(0), indexColorModel);\n }", "protected void assertCoverage(final String expectedCoverage) {\n\t\t\n\t\tfinal List<Coverage> expected = Arrays.asList(expectedCoverage.split(\"\\n\")).stream()\n\t\t\t\t.map(o -> new Coverage(o.split(\":\"))).collect(Collectors.toList());\n\t\t\n\t\t// Step A:\n\t\t// Validation of coverage results is split into two steps. Step A checks if all\n\t\t// uncovered (zero) lines are found, step B checks if non-zero lines exist.\t\t\n\t\tfinal Set<Coverage> expectedZero = expected.stream().filter(Coverage::isZero)\n\t\t\t\t.filter(Coverage::isCoverage).collect(Collectors.toSet());\n\t\tfinal Set<Coverage> actualZeroCoverage = recorder.getZeroCoverage().stream().collect(Collectors.toSet());\n\t\tassertEquals(expectedZero, actualZeroCoverage);\n\t\t\n\t\t// Step B1 (coverage):\n\t\tfinal List<Coverage> actualNonZeroCoverage = recorder.getNonZeroCoverage();\n\t\tfinal List<Coverage> expectedNonZeroCoverage = expected.stream().filter(Coverage::isCoverage).\n\t\t\t\tfilter(c -> !c.isCost()).collect(Collectors.toList());\n\t\texpectedNonZeroCoverage.removeAll(actualZeroCoverage);\n\t\tfor (int i = 0; i < actualNonZeroCoverage.size(); i++) {\n\t\t\tfinal Coverage a = actualNonZeroCoverage.get(i);\n\t\t\tfinal Coverage e = expectedNonZeroCoverage.get(i);\n\t\t\tassertEquals(e, a);\n\t\t}\n\t\tassertTrue(expectedNonZeroCoverage.size() == actualNonZeroCoverage.size());\n\t\t\n\t\t// Step B2 (coverage with cost):\n\t\tfinal List<Coverage> actualCostCoverage = recorder.getCostCoverage();\n\t\tfinal List<Coverage> expectedCostCoverage = expected.stream().filter(Coverage::isCoverage)\n\t\t\t\t.filter(Coverage::isCost).collect(Collectors.toList());\n\t\tfor (int i = 0; i < actualCostCoverage.size(); i++) {\n\t\t\tfinal Coverage a = actualCostCoverage.get(i);\n\t\t\tfinal Coverage e = expectedCostCoverage.get(i);\n\t\t\tassertEquals(e, a);\n\t\t}\n\t\tassertTrue(expectedCostCoverage.size() == actualCostCoverage.size());\n\t\t\n\t\t// Step C (actions):\n\t\tfinal List<Coverage> actualActions = recorder.getActionCoverage();\n\t\tfinal List<Coverage> expectedActions = expected.stream().filter(Coverage::isAction).collect(Collectors.toList());\n\t\tfor (int i = 0; i < actualActions.size(); i++) {\n\t\t\tfinal Coverage a = actualActions.get(i);\n\t\t\tfinal Coverage e = expectedActions.get(i);\n\t\t\tassertEquals(e, a);\n\t\t}\n\t\tassertTrue(expectedActions.size() == actualActions.size());\n\t}", "public static void testPixellateOneArg(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(40);\n\t caterpillar.explore();\n }", "@Test\n public void test72() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"+ pLI||2%b/S\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n CategoryAnchor categoryAnchor0 = combinedDomainCategoryPlot0.getDomainGridlinePosition();\n LegendItemCollection legendItemCollection0 = combinedDomainCategoryPlot0.getLegendItems();\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) \"+ pLI||2%b/S\");\n combinedDomainCategoryPlot0.addDomainMarker(categoryMarker0);\n ValueAxis[] valueAxisArray0 = new ValueAxis[1];\n NumberAxis numberAxis0 = new NumberAxis();\n subCategoryAxis0.setTickMarksVisible(true);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedDomainCategoryPlot0);\n RenderingHints renderingHints0 = jFreeChart0.getRenderingHints();\n ColorConvertOp colorConvertOp0 = new ColorConvertOp(renderingHints0);\n // Undeclared exception!\n try { \n colorConvertOp0.filter((BufferedImage) null, (BufferedImage) null);\n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.image.ColorConvertOp\", e);\n }\n }", "@Test\n public void testLineGrey() {\n System.out.println(\"lineGrey\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.lineGrey();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "@Test\n public void test10() throws Throwable {\n CategoryPlot categoryPlot0 = new CategoryPlot();\n AxisLocation axisLocation0 = categoryPlot0.getDomainAxisLocation(48);\n categoryPlot0.setDomainAxisLocation(axisLocation0, false);\n MultiplePiePlot multiplePiePlot0 = new MultiplePiePlot();\n JFreeChart jFreeChart0 = multiplePiePlot0.getPieChart();\n // Undeclared exception!\n try { \n jFreeChart0.createBufferedImage(0, (-4802));\n } catch(IllegalArgumentException e) {\n //\n // Width (0) and height (-4802) cannot be <= 0\n //\n assertThrownBy(\"java.awt.image.DirectColorModel\", e);\n }\n }", "@Test\n public void test17() throws Throwable {\n DefaultStatisticalCategoryDataset defaultStatisticalCategoryDataset0 = new DefaultStatisticalCategoryDataset();\n CategoryAxis3D categoryAxis3D0 = new CategoryAxis3D(\"The renderer has changed and I don't know what to do!\");\n IntervalBarRenderer intervalBarRenderer0 = new IntervalBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultStatisticalCategoryDataset0, (CategoryAxis) categoryAxis3D0, (ValueAxis) null, (CategoryItemRenderer) intervalBarRenderer0);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) categoryPlot0);\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n // Undeclared exception!\n try { \n jFreeChart0.createBufferedImage(0, (-2355), chartRenderingInfo0);\n } catch(IllegalArgumentException e) {\n //\n // Width (0) and height (-2355) cannot be <= 0\n //\n assertThrownBy(\"java.awt.image.DirectColorModel\", e);\n }\n }", "public void testSetImage() {\n byte[] image = new byte[] {1, 2, 3};\n byte[] expResult = new byte[] {1, 2, 3};\n CLImage instance = new CLImage();\n instance.setImage(image);\n assertEquals(expResult.length, instance.image.length);\n for (int i = 0; i < expResult.length; ++i)\n {\n assertEquals(expResult[i], instance.image[i]);\n }\n }", "@Test\n public void testLineCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setLineCoverage(\"91,90,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }", "@MediumTest\n public void test_1314_3() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_false.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "SuccessCoverage createSuccessCoverage();", "@MediumTest\n public void test_1314_4() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_true.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "@Test\n public void test13() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double();\n int int0 = rectangle2D_Double0.outcode((-2387.0), (-2387.0));\n CategoryPlot categoryPlot0 = new CategoryPlot();\n CategoryItemRenderer categoryItemRenderer0 = categoryPlot0.getRenderer();\n }", "@Test\n public void testSharpenABlurredImage() {\n\n IImage newImage = new Blur().applyFilter(this.checkerboard);\n\n List<List<Pixel>> result = new ArrayList<>();\n List<Pixel> row1 = new ArrayList<>();\n row1.add(new Pixel(80, 80, 80, new Posn(0, 0)));\n row1.add(new Pixel(64, 64, 64, new Posn(1, 0)));\n List<Pixel> row2 = new ArrayList<>();\n row2.add(new Pixel(64, 64, 64, new Posn(0, 1)));\n row2.add(new Pixel(80, 80, 80, new Posn(1, 1)));\n result.add(row1);\n result.add(row2);\n IImage resultImage = new Image(result, 255);\n\n assertEquals(resultImage, newImage);\n\n IImage newImage2 = new Sharpen().applyFilter(newImage);\n\n List<List<Pixel>> result2 = new ArrayList<>();\n List<Pixel> row01 = new ArrayList<>();\n row01.add(new Pixel(132, 132, 132, new Posn(0, 0)));\n row01.add(new Pixel(120, 120, 120, new Posn(1, 0)));\n List<Pixel> row02 = new ArrayList<>();\n row02.add(new Pixel(120, 120, 120, new Posn(0, 1)));\n row02.add(new Pixel(132, 132, 132, new Posn(1, 1)));\n result2.add(row01);\n result2.add(row02);\n IImage resultImage2 = new Image(result2, 255);\n\n assertEquals(resultImage2, newImage2);\n\n\n\n\n }", "@Test\n public void testRectangleExport(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecCommandStack.push(VecCommandFactory.GetShapeCommand(VecCommandType.RECTANGLE, fakeCoord));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"RECTANGLE 0.1 0.2 \\n\", print);\n }", "private void renderRaster(Feature feature, RasterSymbolizer symbolizer) {\n GridCoverage grid = (GridCoverage) feature.getAttribute(\"grid\");\n GridCoverageRenderer gcr = new GridCoverageRenderer(grid);\n gcr.paint(graphics);\n LOGGER.finest(\"Raster rendered\");\n }", "@Test\n public void unappropriateRenderedImageTest() {\n final int dataType = getDataBufferType();\n final BandedSampleModel sampleMR = new BandedSampleModel(dataType, 100, 50, 3);\n final RenderedImage rendReadImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMR, null);\n\n BandedSampleModel sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n WritableRenderedImage rendWriteImage = new TiledImage(0, 0, 100, 500, 15, 25, sampleMW, null);\n\n //test : different image dimension.\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //test : different tiles dimension.\n sampleMW = new BandedSampleModel(dataType, 10, 5, 3);\n rendWriteImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //test : different datas type.\n final int dataTypeTest = (dataType == DataBuffer.TYPE_INT) ? DataBuffer.TYPE_BYTE : DataBuffer.TYPE_INT;\n sampleMW = new BandedSampleModel(dataTypeTest, 100, 50, 3);\n rendWriteImage = new TiledImage(0, 0, 1000, 500, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //out of rectangle\n final Rectangle subArea = new Rectangle(10, 10, 200, 100);\n sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n rendWriteImage = new TiledImage(0, 0, 200, 100, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //bad tiles size\n sampleMW = new BandedSampleModel(dataType, 10, 50, 3);\n rendWriteImage = new TiledImage(10, 10, 200, 100, 0, 0, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n\n //bad tilesgridOffset\n sampleMW = new BandedSampleModel(dataType, 100, 50, 3);\n rendWriteImage = new TiledImage(10, 10, 200, 100, 1, 2, sampleMW, null);\n try {\n getWritableRIIterator(rendReadImage, rendWriteImage, subArea);\n Assert.fail(\"test should had failed\");\n } catch(IllegalArgumentException e) {\n //ok\n }\n }", "public static void assertRasterEquals(final GridCoverage expected, final GridCoverage actual) {\n assertNotNull(\"Expected coverage\", expected);\n assertNotNull(\"Actual coverage\", actual);\n Assert.assertRasterEquals(expected.render(null),\n actual.render(null));\n }", "public static void testPixellateThreeArgs(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(18, 60, 40);\n\t caterpillar.explore();\n }", "@Test\n public void testSharp() {\n System.out.println(\"sharp\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.sharp();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void basicRenderTwoColorTest() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(Point3D.zero, new Vector(0, -1, 0), new Vector(0, 0, 1)));\n scene.setDistance(100);\n scene.setBackground(new Color(75, 127, 90));\n scene.setAmbientLight(new AmbientLight(new java.awt.Color(255, 191, 191), 1));\n\n scene.addGeometries(new Sphere(50, new Point3D(0, 0, 100)));\n\n scene.addGeometries(\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, 100, 100), new Point3D(100, 100, 100)),\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, -100, 100), new Point3D(100, -100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, 100, 100), new Point3D(-100, 100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, -100, 100), new Point3D(-100, -100, 100)));\n\n ImageWriter imageWriter = new ImageWriter(\"new render test\", 500, 500, 500, 500);\n Render render = new Render(scene , imageWriter);\n\n render.renderImage();\n render.printGrid(50, java.awt.Color.YELLOW);\n render.writeToImage();\n }", "@MediumTest\n public void test_1314_2() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/statement_without_prev.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "private void handleCoverageDescription(CoverageInfo ci) {\n GridCoverage2D gc2d=null;\n try{\n gc2d=readSampleGridCoverage(ci);\n if(gc2d==null){\n throw new WCS20Exception(\"Unable to read sample coverage for \"+ci.getName());\n }\n // get the crs and look for an EPSG code\n final CoordinateReferenceSystem crs = gc2d.getCoordinateReferenceSystem2D();\n List<String> axesNames = envelopeDimensionsMapper.getAxesNames(gc2d.getEnvelope2D(),true);\n \n // lookup EPSG code\n Integer EPSGCode=null;\n try {\n EPSGCode = CRS.lookupEpsgCode(crs, false);\n } catch (FactoryException e) {\n throw new IllegalStateException(\"Unable to lookup epsg code for this CRS:\"+crs,e);\n }\n if(EPSGCode==null){\n throw new IllegalStateException(\"Unable to lookup epsg code for this CRS:\"+crs);\n } \n final String srsName = GMLCoverageResponseDelegate.SRS_STARTER+EPSGCode; \n // handle axes swap for geographic crs\n final boolean axisSwap = CRS.getAxisOrder(crs).equals(AxisOrder.EAST_NORTH); \n \n \n //encoding ID of the coverage\n final AttributesImpl coverageAttributes = new AttributesImpl();\n String encodedId = NCNameResourceCodec.encode(ci);\n coverageAttributes.addAttribute(\"\", \"gml:id\", \"gml:id\", \"\", encodedId);\n\n // starting encoding\n start(\"wcs:CoverageDescription\", coverageAttributes);\n\n \n // handle domain\n final StringBuilder builder= new StringBuilder();\n for(String axisName:axesNames){\n builder.append(axisName).append(\" \");\n } \n String axesLabel=builder.substring(0, builder.length()-1);\n handleBoundedBy(gc2d, axisSwap,srsName,axesLabel);\n \n //coverage id\n element(\"wcs:CoverageId\", encodedId);\n\n // handle coverage function\n handleCoverageFunction(gc2d,axisSwap);\n\n // metadata \n handleMetadata(gc2d);\n \n // handle domain\n builder.setLength(0);\n axesNames = envelopeDimensionsMapper.getAxesNames(gc2d.getEnvelope2D(),false); \n for(String axisName:axesNames){\n builder.append(axisName).append(\" \");\n } \n axesLabel=builder.substring(0, builder.length()-1); \n handleDomainSet(gc2d,encodedId,srsName,axisSwap);\n\n \n // handle rangetype\n handleRangeType(gc2d);\n \n //service parameters\n handleServiceParameters(ci);\n\n end(\"wcs:CoverageDescription\");\n }catch (Exception e) {\n throw new WcsException(e);\n } finally{\n if(gc2d!=null ){\n CoverageCleanerCallback.addCoverages(gc2d);\n }\n }\n }", "@Test\n public void test29() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n combinedRangeCategoryPlot0.setRangeGridlinesVisible(true);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedRangeCategoryPlot0);\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, 0, 0, 0, 0, 24, 0, true, true, true, true, false, false);\n chartPanel0.transferFocusBackward();\n Point point0 = chartPanel0.getLocation();\n Line2D.Double line2D_Double0 = new Line2D.Double((Point2D) point0, (Point2D) point0);\n line2D_Double0.y1 = (double) 0;\n DefaultCategoryItemRenderer defaultCategoryItemRenderer0 = new DefaultCategoryItemRenderer();\n boolean boolean0 = jFreeChart0.equals(defaultCategoryItemRenderer0);\n Rectangle2D.Double rectangle2D_Double0 = (Rectangle2D.Double)line2D_Double0.getBounds2D();\n combinedRangeCategoryPlot0.setDrawSharedDomainAxis(false);\n combinedRangeCategoryPlot0.setWeight(0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n // Undeclared exception!\n try { \n jFreeChart0.createBufferedImage(0, 0, (double) 0, (-629.173823008773), chartRenderingInfo0);\n } catch(IllegalArgumentException e) {\n //\n // Width (0) and height (0) cannot be <= 0\n //\n assertThrownBy(\"java.awt.image.DirectColorModel\", e);\n }\n }", "@Override\n public String exportImage() throws IllegalArgumentException {\n BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n int r = this.pixels[x][y][0];\n int g = this.pixels[x][y][1];\n int b = this.pixels[x][y][2];\n int color = (r << 16) | (g << 8) | b;\n img.setRGB(x, y, color);\n }\n }\n return exportHelp(img);\n }", "@Test\n public void testGetColor() {\n assertEquals(r1.getColor(), new Color(255, 0, 0));\n assertEquals(r2.getColor(), new Color(255, 255, 255));\n assertEquals(r3.getColor(), new Color(255, 255, 0));\n assertEquals(r4.getColor(), new Color(200, 150, 133));\n }", "@Test\n\tpublic void testImageFromPaintNet() throws IOException, URISyntaxException {\n\t\tfinal String filePath = \"img_orientation/view_20170929_124415.jpg\";\n\t\tURL url = this.getClass().getClassLoader().getResource(filePath);\n\t\tFile imgFile = new File(url.toURI());\n\t\tlogger.debug(\"File '{}' exists = {}\", filePath, imgFile.isFile());\n\t\tBufferedImage bi = TrpImageIO.read(imgFile);\n\t\t\n\t\tif(bi instanceof RotatedBufferedImage) {\n\t\t\t//if we are here this is broken\n\t\t\tAssert.fail(\"Image was erroneously rotated!\");\n\t\t}\n\t}", "public RenderedImage create(ParameterBlock args,\n RenderingHints renderHints) {\n \n // Get the source image and the data type parameter.\n RenderedImage src = args.getRenderedSource(0);\n Integer datatype = (Integer)args.getObjectParameter(0);\n int type = datatype.intValue();\n\n // Get ImageLayout from renderHints if any.\n ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);\n\n // If there is no change return the source image directly.\n if(layout == null && type == src.getSampleModel().getDataType()) {\n return src;\n }\n\n // Create or clone the ImageLayout.\n if(layout == null) {\n layout = new ImageLayout(src);\n } else {\n layout = (ImageLayout)layout.clone();\n }\n\n\tboolean isDataTypeChange = false;\n\n // Get prospective destination SampleModel.\n SampleModel sampleModel = layout.getSampleModel(src);\n\n // Create a new SampleModel if the type is not as desired.\n if (sampleModel.getDataType() != type) {\n int tileWidth = layout.getTileWidth(src);\n int tileHeight = layout.getTileHeight(src);\n int numBands = src.getSampleModel().getNumBands();\n\n SampleModel csm =\n RasterFactory.createComponentSampleModel(sampleModel,\n type,\n tileWidth,\n tileHeight,\n numBands);\n\n layout.setSampleModel(csm);\n\t isDataTypeChange = true;\n }\n\n\n // Check ColorModel.\n ColorModel colorModel = layout.getColorModel(null);\n if(colorModel != null &&\n !JDKWorkarounds.areCompatibleDataModels(layout.getSampleModel(src),\n colorModel)) {\n // Clear the mask bit if incompatible.\n layout.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n\n // Check whether anything but the ColorModel is changing.\n if (layout.getSampleModel(src) == src.getSampleModel() &&\n layout.getMinX(src) == src.getMinX() &&\n layout.getMinY(src) == src.getMinY() &&\n layout.getWidth(src) == src.getWidth() &&\n layout.getHeight(src) == src.getHeight() &&\n layout.getTileWidth(src) == src.getTileWidth() &&\n layout.getTileHeight(src) == src.getTileHeight() &&\n layout.getTileGridXOffset(src) == src.getTileGridXOffset() &&\n layout.getTileGridYOffset(src) == src.getTileGridYOffset()) {\n\n if(layout.getColorModel(src) == src.getColorModel()) {\n // Nothing changed: return the source directly.\n return src;\n } else {\n // Remove TileCache hint from RenderingHints if present.\n RenderingHints hints = renderHints;\n if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {\n hints = new RenderingHints((Map)renderHints);\n hints.remove(JAI.KEY_TILE_CACHE);\n }\n\n // Only the ColorModel is changing.\n return new NullOpImage(src, layout, hints,\n OpImage.OP_IO_BOUND);\n }\n }\n\n\tif (isDataTypeChange == true) {\n\n\t // Add JAI.KEY_REPLACE_INDEX_COLOR_MODEL hint to renderHints\n\t if (renderHints == null) {\n\t\trenderHints = \n\t\t new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,\n\t\t\t\t Boolean.TRUE);\n\t\t\n\t } else if (!renderHints.containsKey(\n\t\t\t\t\tJAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {\n\t\t// If the user specified a value for this hint, we don't\n\t\t// want to change that\n\t\trenderHints.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, \n\t\t\t\tBoolean.TRUE);\n\t }\n\t}\n\n return new CopyOpImage(src, renderHints, layout);\n }", "@org.junit.Test\n public void coverage()\n {\n new Encodings();\n }", "public Result testGetIcon() {\n try {\n assertNull(beanInfo.getIcon(BeanInfo.ICON_MONO_16x16));\n Bean1BeanInfo.verifyException();\n return passed();\n } catch (Exception e) {\n e.printStackTrace();\n return failed(e.getMessage());\n }\n }", "@Test\n public void testShow() throws Exception {\n System.out.println(\"show\");\n int numLEDs = 150;\n Color color = new Color(63, 123, 255);\n DotStar instance = new MockDotStar(numLEDs);\n for (int i = 0; i < numLEDs; i++) {\n instance.setPixelColor(i, color);\n }\n\n instance.show();\n\n for (int i = 0; i < numLEDs; i++) {\n assertEquals((byte) 0xFF, instance.data[4 * i]);\n assertEquals((byte) color.getBlue(), instance.data[(4 * i) + 1]);\n assertEquals((byte) color.getGreen(), instance.data[(4 * i) + 2]);\n assertEquals((byte) color.getRed(), instance.data[(4 * i) + 3]);\n }\n }", "@Test\n public void baseTest() {\n RenderedImage twoBands=ConstantDescriptor.create(512f, 512f, new Double[]{1d,0d}, null);\n \n // now select second band\n ParameterBlockJAI pb =\n new ParameterBlockJAI(\"BandSelect\");\n pb.addSource(twoBands);\n pb.setParameter(\"bandIndices\", new int[]{1});\n RenderedOp oneBand = JAI.create(\"BandSelect\", pb);\n \n \n // make sure we got the right band\n Assert.assertEquals(1,oneBand.getSampleModel().getNumBands());\n Assert.assertEquals(0,oneBand.getData().getSample(0, 0, 0),1E-11);\n \n }", "@Test\n public void test26() throws Throwable {\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis(0.0, 0.0);\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) cyclicNumberAxis0);\n RectangleEdge rectangleEdge0 = combinedRangeCategoryPlot0.getDomainAxisEdge(1248);\n List list0 = combinedRangeCategoryPlot0.getSubplots();\n AxisLocation axisLocation0 = AxisLocation.BOTTOM_OR_LEFT;\n combinedRangeCategoryPlot0.setDomainAxisLocation(0, axisLocation0, false);\n combinedRangeCategoryPlot0.setRangeCrosshairValue(0.18, false);\n AxisLocation axisLocation1 = combinedRangeCategoryPlot0.getRangeAxisLocation();\n boolean boolean0 = combinedRangeCategoryPlot0.isRangeCrosshairLockedOnData();\n TextBlock textBlock0 = new TextBlock();\n TextBox textBox0 = new TextBox(textBlock0);\n MultiplePiePlot multiplePiePlot0 = new MultiplePiePlot();\n JFreeChart jFreeChart0 = multiplePiePlot0.getPieChart();\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n // Undeclared exception!\n try { \n jFreeChart0.createBufferedImage(0, 3030, chartRenderingInfo0);\n } catch(IllegalArgumentException e) {\n //\n // Width (0) and height (3030) cannot be <= 0\n //\n assertThrownBy(\"java.awt.image.DirectColorModel\", e);\n }\n }", "private static ImageLayout layoutHelper(ImageLayout layout, RenderedImage source,\n LookupTableJAI colorMap) {\n // Create or clone the layout.\n ImageLayout il = layout == null ? new ImageLayout() : (ImageLayout) layout.clone();\n\n // Force the destination and source origins and dimensions to coincide.\n il.setMinX(source.getMinX());\n il.setMinY(source.getMinY());\n il.setWidth(source.getWidth());\n il.setHeight(source.getHeight());\n\n // Get the SampleModel.\n SampleModel sm = il.getSampleModel(source);\n\n // Ensure an appropriate SampleModel.\n if (colorMap.getNumBands() == 1 && colorMap.getNumEntries() == 2\n && !ImageUtil.isBinary(il.getSampleModel(source))) {\n sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE, il.getTileWidth(source),\n il.getTileHeight(source), 1);\n il.setSampleModel(sm);\n }\n\n // Make sure that this OpImage is single-banded.\n if (sm.getNumBands() != 1) {\n sm = RasterFactory.createComponentSampleModel(sm, sm.getTransferType(), sm.getWidth(),\n sm.getHeight(), 1);\n il.setSampleModel(sm);\n\n // Clear the ColorModel mask if needed.\n ColorModel cm = il.getColorModel(null);\n if (cm != null && !JDKWorkarounds.areCompatibleDataModels(sm, cm)) {\n // Clear the mask bit if incompatible.\n il.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n }\n\n // Determine whether a larger bit depth is needed.\n int numColorMapBands = colorMap.getNumBands();\n int maxIndex = 0;\n for (int i = 0; i < numColorMapBands; i++) {\n maxIndex = Math.max(colorMap.getOffset(i) + colorMap.getNumEntries() - 1, maxIndex);\n }\n\n // Create a deeper SampleModel if needed.\n if ((maxIndex > 255 && sm.getDataType() == DataBuffer.TYPE_BYTE)\n || (maxIndex > 65535 && sm.getDataType() != DataBuffer.TYPE_INT)) {\n int dataType = maxIndex > 65535 ? DataBuffer.TYPE_INT : DataBuffer.TYPE_USHORT;\n sm = RasterFactory.createComponentSampleModel(sm, dataType, sm.getWidth(),\n sm.getHeight(), 1);\n il.setSampleModel(sm);\n\n // Clear the ColorModel mask if needed.\n ColorModel cm = il.getColorModel(null);\n if (cm != null && !JDKWorkarounds.areCompatibleDataModels(sm, cm)) {\n // Clear the mask bit if incompatible.\n il.unsetValid(ImageLayout.COLOR_MODEL_MASK);\n }\n }\n\n // Set an IndexColorModel on the image if:\n // a. none is provided in the layout;\n // b. source and colormap have byte data type;\n // c. the colormap has 3 bands;\n // d. destination has byte or ushort data type.\n if ((layout == null || !il.isValid(ImageLayout.COLOR_MODEL_MASK))\n && source.getSampleModel().getDataType() == DataBuffer.TYPE_BYTE\n && (sm.getDataType() == DataBuffer.TYPE_BYTE || sm.getDataType() == DataBuffer.TYPE_USHORT)\n && colorMap.getDataType() == DataBuffer.TYPE_BYTE && colorMap.getNumBands() == 3) {\n ColorModel cm = source.getColorModel();\n if (cm == null || (cm != null && cm.getColorSpace().isCS_sRGB())) {\n int size = colorMap.getNumEntries();\n byte[][] cmap = new byte[3][maxIndex + 1];\n for (int i = 0; i < 3; i++) {\n byte[] band = cmap[i];\n byte[] data = colorMap.getByteData(i);\n int offset = colorMap.getOffset(i);\n int end = offset + size;\n for (int j = offset; j < end; j++) {\n band[j] = data[j - offset];\n }\n }\n\n int numBits = sm.getDataType() == DataBuffer.TYPE_BYTE ? 8 : 16;\n il.setColorModel(new IndexColorModel(numBits, maxIndex + 1, cmap[0], cmap[1],\n cmap[2]));\n }\n }\n\n return il;\n }", "@Test\n public void test56() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n Color color0 = (Color)combinedRangeCategoryPlot0.getRangeGridlinePaint();\n }", "public boolean generateImageFromText();", "boolean testDrawShip(Tester t) {\n return t.checkExpect(ship3.draw(), new CircleImage(10, OutlineMode.SOLID, Color.CYAN))\n && t.checkExpect(ship1.draw(), new CircleImage(10, OutlineMode.SOLID, Color.CYAN));\n }", "public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }", "@Test\n\tpublic void testBytesToHexStringForSrcMode() throws Exception {\n//TODO: Test goes here... \n\t}", "@Test\n public void testGray8BitIntoRGB() {\n BufferedImage im8bit = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_GRAY);\n WritableRaster raster8bit = im8bit.getRaster();\n int[] fill = new int[50 * 100];\n Arrays.fill(fill, 10);\n raster8bit.setSamples(0, 0, 50, 100, 0, fill);\n Arrays.fill(fill, 50);\n raster8bit.setSamples(50, 0, 50, 100, 0, fill);\n\n BufferedImage yellow = buildBGR(Color.YELLOW);\n\n // mosaic setting the nodata\n Range noData10 = RangeFactory.create((byte) 10, (byte) 10);\n RenderedOp mosaic = MosaicDescriptor.create(new RenderedImage[] { im8bit, yellow },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0 }, new Range[] { noData10, null }, null);\n\n assertRGB(mosaic, false);\n\n // check top left quadrant, should be yellow\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check top right quadrant, should be 50 expanded to RGB\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 50, 50, 50 }, pixel);\n // check bottom left quadrant, should be yellow\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 255, 255, 0 }, pixel);\n // check bottom right quadrant, should be 50 expanded to RGB\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 50, 50, 50 }, pixel);\n }", "@Test\n\tpublic void withLensDistortion() {\n\t\tQrCodeDistortedChecks helper = new QrCodeDistortedChecks();\n\n\t\thelper.render();\n\n\t\t// find location of postion patterns and create graph\n\t\tFastQueue<PositionPatternNode> pps = new FastQueue<>(PositionPatternNode.class,true);\n\n\t\tpps.grow().square = new Polygon2D_F64(4);\n\t\tpps.grow().square = new Polygon2D_F64(4);\n\t\tpps.grow().square = new Polygon2D_F64(4);\n\n\t\thelper.setLocation(pps.get(0).square,pps.get(1).square,pps.get(2).square);\n\t\tfor (int i = 0; i < pps.size; i++) {\n\t\t\tpps.get(i).grayThreshold = 125;\n\t\t}\n\t\t// these numbers were found by sketching the QR code\n\t\tconnect(pps.get(2),pps.get(1),3,1);\n\t\tconnect(pps.get(0),pps.get(1),0,2);\n\n\t\t// Should fail when run on distorted image\n\t\tQrCodeDecoderImage<GrayF32> decoder = new QrCodeDecoderImage<>(null,GrayF32.class);\n\t\tdecoder.process(pps,helper.image);\n\n\t\tassertEquals(0, decoder.successes.size());\n\n\t\t// now tell it how to undistort the image\n\t\tdecoder.setLensDistortion(helper.image.width,helper.image.height,helper.distortion);\n\t\tfor (int i = 0; i < pps.size; i++) {\n\t\t\thelper.distToUndist(pps.get(i).square);\n\t\t}\n\t\tdecoder.process(pps,helper.image);\n\n\t\tassertEquals(1,decoder.successes.size());\n\t\tQrCode found = decoder.getFound().get(0);\n\t\tassertTrue(found.message.equals(\"123\"));\n\t}", "@Test\r\n public void testSingleColor(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n }", "@Test\n public void test15() throws Throwable {\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset0 = new DefaultMultiValueCategoryDataset();\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"#C%b:FJR+QY\");\n DateAxis dateAxis0 = new DateAxis(\"#C%b:FJR+QY\");\n GroupedStackedBarRenderer groupedStackedBarRenderer0 = new GroupedStackedBarRenderer();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) defaultMultiValueCategoryDataset0, (CategoryAxis) extendedCategoryAxis0, (ValueAxis) dateAxis0, (CategoryItemRenderer) groupedStackedBarRenderer0);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) categoryPlot0);\n DefaultMultiValueCategoryDataset defaultMultiValueCategoryDataset1 = (DefaultMultiValueCategoryDataset)defaultMultiValueCategoryDataset0.clone();\n // Undeclared exception!\n try { \n jFreeChart0.createBufferedImage(1628, 1628, 1502.679, (double) 1628, (ChartRenderingInfo) null);\n } catch(NoClassDefFoundError e) {\n //\n // Could not initialize class sun.dc.pr.Rasterizer\n //\n assertThrownBy(\"sun.dc.DuctusRenderingEngine\", e);\n }\n }", "@Test\n public void rectEqualImageWriteWithinReadImageTest() {\n final Rectangle rect = new Rectangle(10, 10, 5, 2);\n minx = 0;\n miny = 0;\n width = 100;\n height = 50;\n tilesWidth = 10;\n tilesHeight = 5;\n numBand = 3;\n setRenderedImgTest(minx, miny, width, height, tilesWidth, tilesHeight, numBand, null);\n final SampleModel sampleMW = new PixelInterleavedSampleModel(getDataBufferType(), tilesWidth, tilesHeight, numBand, tilesWidth*numBand, new int[]{0, 1, 2});\n final WritableRenderedImage rendWriteImage = new TiledImage(rect.x, rect.y, rect.width, rect.height, renderedImage.getTileGridXOffset(), renderedImage.getTileGridYOffset(), sampleMW, null);\n setPixelIterator(renderedImage, rendWriteImage, rect);\n while (pixIterator.next()) pixIterator.setSample(1);\n setPixelIterator(rendWriteImage);\n while (pixIterator.next()) assertTrue(pixIterator.getSampleDouble() == 1);\n }", "@Test\n public void testWriteObject() throws Exception {\n System.out.println(\"ColorIOProviderNGTest.testWriteObject\");\n\n // Test not verbose and graph.IsDefaultValue is true skips all processing\n resetMocking();\n when(mockGraphReadMethods.isDefaultValue(anyInt(), anyInt())).thenReturn(true);\n instance.writeObject(attr, elementId, mockJsonGenerator, mockGraphReadMethods, null, false);\n Mockito.verify(mockGraphReadMethods, times(0)).getStringValue(anyInt(), anyInt());\n\n // Now turn on verbose, and configure getStringValue to return null\n resetMocking();\n when(mockGraphReadMethods.isDefaultValue(anyInt(), anyInt())).thenReturn(true);\n when(mockGraphReadMethods.getStringValue(anyInt(), anyInt())).thenReturn(null);\n instance.writeObject(attr, elementId, mockJsonGenerator, mockGraphReadMethods, null, true);\n Mockito.verify(mockGraphReadMethods, times(1)).getStringValue(attributeId, elementId);\n Mockito.verify(mockJsonGenerator, times(1)).writeNullField(attr.getName());\n Mockito.verify(mockJsonGenerator, times(0)).writeStringField(anyString(), anyString());\n\n // Now turn verbose back off, but set graph.isDefaultValue to return false. Set color to a known color (Grey)\n resetMocking();\n when(mockGraphReadMethods.isDefaultValue(anyInt(), anyInt())).thenReturn(false);\n when(mockGraphReadMethods.getStringValue(anyInt(), anyInt())).thenReturn(attribValue);\n instance.writeObject(attr, elementId, mockJsonGenerator, mockGraphReadMethods, null, false);\n Mockito.verify(mockGraphReadMethods, times(1)).getStringValue(attributeId, elementId);\n Mockito.verify(mockJsonGenerator, times(0)).writeNullField(attr.getName());\n Mockito.verify(mockJsonGenerator, times(1)).writeObjectFieldStart(attr.getName());\n Mockito.verify(mockJsonGenerator, times(1)).writeStringField(\"name\", \"Grey\");\n Mockito.verify(mockJsonGenerator, times(1)).writeEndObject();\n \n // Repeat the above but use an RGB color\n resetMocking();\n when(mockGraphReadMethods.isDefaultValue(anyInt(), anyInt())).thenReturn(false);\n when(mockGraphReadMethods.getStringValue(anyInt(), anyInt())).thenReturn(attribValueRGB);\n instance.writeObject(attr, elementId, mockJsonGenerator, mockGraphReadMethods, null, false);\n Mockito.verify(mockGraphReadMethods, times(1)).getStringValue(attributeId, elementId);\n Mockito.verify(mockJsonGenerator, times(0)).writeNullField(attr.getName());\n Mockito.verify(mockJsonGenerator, times(1)).writeObjectFieldStart(attr.getName());\n Mockito.verify(mockJsonGenerator, times(1)).writeNumberField(\"red\", 1.0f);\n Mockito.verify(mockJsonGenerator, times(1)).writeNumberField(\"green\", 1.0f);\n Mockito.verify(mockJsonGenerator, times(1)).writeNumberField(\"blue\", 1.0f);\n Mockito.verify(mockJsonGenerator, times(1)).writeNumberField(\"alpha\", 1.0f);\n Mockito.verify(mockJsonGenerator, times(1)).writeEndObject();\n }", "public static void testEdgeDetection()\n {\n Picture swan = new Picture(\"swan.jpg\");\n swan.edgeDetection();\n swan.explore();\n }", "@LargeTest\n public void testIntrinsicsColorMatrixGrey() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX_GREY);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX_GREY.name());\n }", "@Test\n public void testSetGraphic() {\n writeBanner(getMethodName());\n }", "@Test\n public void test58() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = (Rectangle2D.Double)Plot.DEFAULT_LEGEND_ITEM_BOX;\n double double0 = rectangle2D_Double0.getWidth();\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n combinedDomainCategoryPlot0.rendererChanged((RendererChangeEvent) null);\n combinedDomainCategoryPlot0.setWeight((-1699));\n double double1 = combinedDomainCategoryPlot0.getRangeCrosshairValue();\n int int0 = combinedDomainCategoryPlot0.getDomainAxisCount();\n Collection collection0 = combinedDomainCategoryPlot0.getRangeMarkers((Layer) null);\n Color color0 = (Color)combinedDomainCategoryPlot0.getRangeCrosshairPaint();\n combinedDomainCategoryPlot0.mapDatasetToDomainAxis(1, (-1699));\n AxisLocation axisLocation0 = combinedDomainCategoryPlot0.getDomainAxisLocation();\n Range range0 = combinedDomainCategoryPlot0.getDataRange((ValueAxis) null);\n combinedDomainCategoryPlot0.setRangeAxisLocation(axisLocation0, true);\n combinedDomainCategoryPlot0.rendererChanged((RendererChangeEvent) null);\n MockFile mockFile0 = new MockFile(\"$dhA|P=px%DHgW<3M\", \"$dhA|P=px%DHgW<3M\");\n MockFileInputStream mockFileInputStream0 = null;\n try {\n mockFileInputStream0 = new MockFileInputStream((File) mockFile0);\n } catch(FileNotFoundException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"org.evosuite.runtime.mock.java.io.MockFileInputStream\", e);\n }\n }", "@Test\n public void testCardSelectionIsValid_TRUE() throws Exception {\n System.out.println(\"cardSelectionIsValid not valid\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n utils.cardSelectionIsValid(cardSelection, drawCard, wildColour);\n }", "@Test\r\n public void testDirectMatPainting8SC1() {\n Mat m = new Mat(width, height, CV_8SC1);\r\n assertEquals(1, m.channels());\r\n assertEquals(1, m.capacity());\r\n assertEquals(width, m.step());\r\n assertEquals(width, m.cols());\r\n assertEquals(height, m.rows());\r\n\r\n ByteBuffer bb = m.createBuffer();\r\n for (long i = 0; i < width * height; i++) {\r\n long x = i % width, y = i / width;\r\n // blue to gray:\r\n byte gray = (byte) (pixelFunc(x, y) & 0xff);\r\n bb.put(gray);\r\n }\r\n\r\n // negative gray values get ignored/mapped to black/0. The total\r\n // (Java byte -> gray value) mapping is then:\r\n // -128..127 -> 128x 0, 0..127\r\n imwrite(new File(TEMP_DIR, \"testDirectMatPainting8SC1.png\").getAbsolutePath(), m);\r\n // @insert:image:testDirectMatPainting8SC1.png@\r\n }", "@Test\n\tvoid testToPixel() {\n\t\t\n\t\t// read the image map of ariel \n\t\tBufferedImage map = null;\n\t\ttry {\n\t\t\tmap = ImageIO.read(new File(\"Ariel1.png\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tMap m= new Map(map,Width,Height,start,end);\n\n\n\t\tPoint3D ans1 =m.toPixel(start);\n\t\tassertTrue(ans1.equals(pixelStart));\n\n\t\tPoint3D ans2 =m.toPixel(end);\n\t\tassertTrue(ans2.equals(pixelEnd));\n\n\n\t\tPoint3D ans3 = m.toPixel(p);\n\t\tassertTrue(ans3.equals(p1));\n\n\t}", "@Test //Associated with Confirm image icon exists (Scenario 2)\n public void confirmImageIconExistsTest() throws Exception {\n onView(withId(R.id.contact_new)).perform(click());\n\n //types in the name \"Shane\" into the name field for the Contact\n onView(withId(R.id.info_name)).perform(typeText(\"Shane\"), closeSoftKeyboard());\n\n //performs a click operation on the \"Submit Changes\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //performs a scroll action within the activity to take you to the necessary spot where\n //the newly created contact will be located\n onView(withId(R.id.contacts_list)).perform(RecyclerViewActions.scrollToPosition(0));\n\n //performs a click operation on the newly created Contact that is within the field\n //of view for the RecyclerView\n onView(withText(\"Shane\")).perform(click());\n\n //performs a click operation on the \"Edit Contact Info\" button\n onView(withId(R.id.info_edit_button)).perform(click());\n\n //confirms that the button on the Edit Contact screen associated with the id info_delete_button\n //has a string associated with it that reads \"Delete Contact\". This string and id is unique in the\n //app and only exists in this singular activity.\n onView(withId(R.id.info_delete_button)).check(matches(withText(R.string.info_delete)));\n\n onView(withId(R.id.info_pic)).check(matches(withContentDescription(R.string.image_contact)));\n\n //clicks the Delete Contact button\n onView(withId(R.id.info_delete_button)).perform(click());\n }", "@Test\n public void testGetColorID() throws FitsException, IOException{\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n Assert.assertEquals(0, imageData.getColorTableId());\n }", "@Test\n public void test55() throws Throwable {\n CategoryAxis categoryAxis0 = new CategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot(categoryAxis0);\n DefaultCategoryItemRenderer defaultCategoryItemRenderer0 = new DefaultCategoryItemRenderer();\n boolean boolean0 = categoryAxis0.equals(defaultCategoryItemRenderer0);\n AxisLocation axisLocation0 = AxisLocation.BOTTOM_OR_LEFT;\n combinedDomainCategoryPlot0.setDomainAxisLocation(axisLocation0, false);\n combinedDomainCategoryPlot0.setDomainAxisLocation(0, axisLocation0, false);\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n defaultPolarItemRenderer0.setAutoPopulateSeriesPaint(true);\n categoryAxis0.setCategoryLabelPositionOffset(1378);\n BasicStroke basicStroke0 = (BasicStroke)defaultPolarItemRenderer0.getItemStroke(0, 0);\n MockPrintStream mockPrintStream0 = null;\n try {\n mockPrintStream0 = new MockPrintStream(\"\", \"\");\n } catch(FileNotFoundException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"org.evosuite.runtime.mock.java.io.MockFileOutputStream\", e);\n }\n }", "@Test\n public void testGetIcon() throws Exception {\n assert ResourceManager.getIcon(\"/images/card_00.png\") instanceof ImageIcon;\n }", "@Test\r\n public void testDrawingDoubler() {\r\n System.out.println(\"testDrawingDoubler\");\r\n ad = new AreaDoubler();\r\n d.accept(ad);\r\n \r\n Drawing dd = (Drawing)ad.getFigureDoubled();\r\n Circle dd_c = (Circle) dd.getComponents().get(0);\r\n Rectangle dd_r = (Rectangle) dd.getComponents().get(1);\r\n \r\n \r\n Circle c_doubled = (Circle)d.getComponents().get(0);\r\n double c_radius_doubled = c_doubled.getRadius()* Math.sqrt(2.0);\r\n \r\n assertEquals(c_radius_doubled, dd_c.getRadius(), 0.02);\r\n \r\n Rectangle r_doubled = (Rectangle)d.getComponents().get(1);\r\n double r_height_doubled = r_doubled.getHeight()* Math.sqrt(2.0);\r\n double r_width_doubled= r_doubled.getWidth()*Math.sqrt(2.0);\r\n \r\n assertEquals(r_height_doubled, dd_r.getHeight(), 0.02);\r\n assertEquals(r_width_doubled, dd_r.getWidth(), 0.02);\r\n \r\n }", "@org.junit.Test\r\n public void testPaint() {\r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n \r\n node.invertColor();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.invertColor();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n }", "@LargeTest\n public void testIntrinsicsColorMatrix() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX.name());\n }", "private static RenderedImage ownerImage(RegionReport rr) {\n BufferedImage bufferedImage = new BufferedImage(MAP_SIZE, MAP_SIZE,\n BufferedImage.TYPE_INT_RGB) ;\n // Create a graphics contents on the buffered image\n Graphics2D g2d = bufferedImage.createGraphics() ;\n g2d.setColor(Color.white);\n //TODO need to set default overflow to something other than black,\n // or set this default background to something else. colors colors colors.\n g2d.fillRect(0, 0, MAP_SIZE, MAP_SIZE);\n \n String family = \"Sans-Serif\";\n int style = Font.PLAIN;\n int size = 12;\n Font font = new Font(family, style, size);\n g2d.setFont(font);\n\n ArrayList owners = rr.getOwnerMap() ;\n System.out.println(owners.size() + \" owners.\") ;\n int yy = 20 ;\n int boxX = 14 ;\n int nameX = boxX + 26 ; ;\n\n for (Iterator all = owners.iterator(); all.hasNext();) {\n Owner owner = (Owner) all.next() ;\n int ownerNum = owner.getNumber() ;\n Color cc = OwnerColors.getOwnerColor(ownerNum) ;\n g2d.setColor(cc) ;\n g2d.fillRect(boxX, yy, 16, 16) ;\n String ownerName = owner.getName() ;\n int spot = ownerName.indexOf(\"-\") ;\n if (spot > 0) {\n ownerName = ownerName.substring(0,8) ;\n }\n g2d.drawString(ownerName, nameX, yy+13) ;\n yy += 24 ;\n \n if (yy+48 > MAP_SIZE) {\n yy = 20 ;\n boxX = boxX + MAP_SIZE/2 ;\n nameX = boxX + 26 ;\n \n }\n }\n \n/*\n // trial of svg\n // <rect x=\"0\" y=\"8\" width=\"512\" height=\"8\"\n // style=\"fill:rgb(255,255,255)\"/>\n char q = '\"' ;\n System.out.println(\n \"<rect x=\" + q + xx + q + \" y=\" + q + yy + q +\n \" width=\" + q + finishRow + q + \" height=\" + q + \"1\" + q +\n \" style=\" + q + \"fill:rgb(\" + \n cc.getRed() + \",\" + cc.getGreen() + \",\" + cc.getBlue() \n + \")\" + q + \"/>\") ;\n */\n \n // Graphics context no longer needed so dispose it\n g2d.dispose() ;\n\n return bufferedImage ;\n }", "@LargeTest\n public void testColorMatrix() {\n TestAction ta = new TestAction(TestName.COLOR_MATRIX);\n runTest(ta, TestName.COLOR_MATRIX.name());\n }", "private void debug()\n {\n if (!checkTestNeeded())\n {\n String resolution = width + \"x\" + height + \"-\";\n\n boolean success = preferences.getBoolean(PREF_PREFIX + resolution + \"success\",false);\n if (!success)\n {\n throw new RuntimeException(\"Phone not supported with this resolution (\" + width + \"x\" + height + \")\");\n }\n\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(preferences.getInt(PREF_PREFIX + resolution + \"sliceHeight\", 0));\n nv21Convertor.setStride(preferences.getInt(PREF_PREFIX + resolution + \"stride\", 0));\n nv21Convertor.setYPadding(preferences.getInt(PREF_PREFIX + resolution + \"padding\", 0));\n nv21Convertor.setPlanar(preferences.getBoolean(PREF_PREFIX + resolution + \"planar\", false));\n nv21Convertor.setColorPanesReversed(preferences.getBoolean(PREF_PREFIX + resolution + \"reversed\", false));\n encoderName = preferences.getString(PREF_PREFIX + resolution + \"encoderName\", \"\");\n encoderColorFormat = preferences.getInt(PREF_PREFIX + resolution + \"colorFormat\", 0);\n base64PPS = preferences.getString(PREF_PREFIX + resolution + \"pps\", \"\");\n base64SPS = preferences.getString(PREF_PREFIX + resolution + \"sps\", \"\");\n\n return;\n }\n\n Log.d(TAG, \">>>> Testing the phone for resolution \" + width + \"x\" + height);\n\n // Builds a list of available encoders and decoders we may be able to use\n // because they support some nice color formats\n Codec[] encoders = CodecManager.findEncodersForMimeType(MIME_TYPE);\n Codec[] decoders = CodecManager.findDecodersForMimeType(MIME_TYPE);\n\n int count = 0;\n int n = 1;\n for (Codec encoder1 : encoders)\n {\n count += encoder1.formats.length;\n }\n\n // Tries available encoders\n for (Codec encoder1 : encoders)\n {\n for (int j = 0; j < encoder1.formats.length; j++)\n {\n reset();\n\n encoderName = encoder1.name;\n encoderColorFormat = encoder1.formats[j];\n\n Log.v(TAG, \">> Test \" + (n++) + \"/\" + count + \": \" + encoderName + \" with color format \" + encoderColorFormat + \" at \" + width + \"x\" + height);\n\n // Converts from NV21 to YUV420 with the specified parameters\n nv21Convertor.setSize(width, height);\n nv21Convertor.setSliceHeigth(height);\n nv21Convertor.setStride(width);\n nv21Convertor.setYPadding(0);\n nv21Convertor.setEncoderColorFormat(encoderColorFormat);\n\n // /!\\ NV21Convertor can directly modify the input\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n\n try\n {\n // Starts the encoder\n configureEncoder();\n searchSPSandPPS();\n\n Log.v(TAG, \"SPS and PPS in b64: SPS=\" + base64SPS + \", PPS=\" + base64PPS);\n\n // Feeds the encoder with an image repeatedly to produce some NAL units\n encode();\n\n // We now try to decode the NALs with decoders available on the phone\n boolean decoded = false;\n for (int k = 0; k < decoders.length && !decoded; k++)\n {\n for (int l = 0; l < decoders[k].formats.length && !decoded; l++)\n {\n decoderName = decoders[k].name;\n decoderColorFormat = decoders[k].formats[l];\n try\n {\n configureDecoder();\n } catch (Exception e)\n {\n Log.d(TAG, decoderName + \" can't be used with \" + decoderColorFormat + \" at \" + width + \"x\" + height, e);\n\n releaseDecoder();\n break;\n }\n\n try\n {\n decode(true);\n Log.d(TAG, decoderName + \" successfully decoded the NALs (color format \" + decoderColorFormat + \")\");\n\n decoded = true;\n }\n catch (Exception e)\n {\n Log.e(TAG, decoderName + \" failed to decode the NALs\", e);\n }\n finally\n {\n releaseDecoder();\n }\n }\n }\n\n if (!decoded)\n {\n throw new RuntimeException(\"Failed to decode NALs from the encoder.\");\n }\n\n // Compares the image before and after\n if (!compareLumaPanes())\n {\n // TODO: try again with a different stride\n // TODO: try again with the \"stride\" param\n throw new RuntimeException(\"It is likely that stride != width\");\n }\n\n int padding;\n if ((padding = checkPaddingNeeded()) > 0)\n {\n if (padding < 4096)\n {\n Log.d(TAG, \"Some padding is needed: \" + padding);\n\n nv21Convertor.setYPadding(padding);\n createTestImage();\n data = nv21Convertor.convert(initialImage);\n encodeDecode();\n }\n else\n {\n // TODO: try again with a different sliceHeight\n // TODO: try again with the \"slice-height\" param\n throw new RuntimeException(\"It is likely that sliceHeight != height\");\n }\n }\n\n createTestImage();\n if (!compareChromaPanes(false))\n {\n if (compareChromaPanes(true))\n {\n nv21Convertor.setColorPanesReversed(true);\n Log.d(TAG, \"U and V pane are reversed\");\n }\n else\n {\n throw new RuntimeException(\"Incorrect U or V pane...\");\n }\n }\n\n saveTestResult(true);\n Log.v(TAG, \"The encoder \" + encoderName + \" is usable with resolution \" + width + \"x\" + height);\n return;\n }\n catch (Exception e)\n {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n String stack = sw.toString();\n String str = \"Encoder \" + encoderName + \" cannot be used with color format \" + encoderColorFormat;\n Log.e(TAG, str, e);\n errorLog += str + \"\\n\" + stack;\n }\n finally\n {\n releaseEncoder();\n }\n }\n }\n\n saveTestResult(false);\n Log.e(TAG,\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n throw new RuntimeException(\"No usable encoder were found on the phone for resolution \" + width + \"x\" + height);\n }", "@MediumTest\n public void test_1314_5() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_next.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "@Test\n\tpublic void test4_verifyImage_VRI() throws GeneralLeanFtException {\n\t\t\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Test 4 - Verify Insight & VRI Started\");\n\t\t\t\n\t\t\t//App should exist \n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\n\t\t\tWindow mainWindow = Desktop.describe(Window.class, new WindowDescription.Builder()\n\t\t\t.title(\"SwingSet2\").index(0).build());\n\n\t\t\t// Create a description for the top-level menu item: File\n\t\t\tMenu fileMenu = mainWindow.describe(Menu.class, new MenuDescription.Builder().label(\"File\").build());\n\n\t\t\t//Select About Menu option\n\t\t\tfileMenu.selectSubMenu(\"About\");\n\t\t\t\n\t\t\tDialog about = mainWindow.describe(Dialog.class, new DialogDescription.Builder()\n\t\t\t.title(\"About Swing!\").build());\n\t\t\t\n\t\t\t//Access the Swing Image in the Resources folder\n\t\t\t//ClassLoader classLoader = getClass().getClassLoader();\n\t\t\t//File imgFile = new File(classLoader.getResource(\"SwingImage.PNG\").getFile());\n\t\t\tFile imgFile = new File(\"resources\\\\SwingImage.PNG\");\n\t RenderedImage image = ImageIO.read(imgFile);\n\t \n\t //Create Insight Object with 100% similarity\n\t InsightObject swingImage = about.describe(InsightObject.class, new InsightDescription(image,90));\n\t \n\t //Highlight the Object if present\n\t assertTrue(swingImage.exists(5));\n\t swingImage.highlight();\n\t \n\t //Close the Dialog\n\t about.close();\n\t \n\t ToolBar toolbar = mainWindow.describe(ToolBar.class, new ToolBarDescription.Builder()\n\t\t\t.nativeClass(\"SwingSet2$ToggleButtonToolBar\").build());\n\t \n\t toolbar.getButton(\"JDesktop\").press();\n\t \n\t\t\t\n\t //Maximizable checkbox in the Internal Frame\n\t CheckBox maximizable = mainWindow.describe(InternalFrame.class, new InternalFrameDescription.Builder()\n\t\t\t.title(\"Internal Frame Generator\").index(0).build()).describe(CheckBox.class, new CheckBoxDescription.Builder()\n\t\t\t.attachedText(\"Maximizable\").build());\n\t \n\t //Create Visual Relation Object and Set the Relation with the Test Object\n\t VisualRelation vr = new VisualRelation();\n\t vr.setTestObject(maximizable);\n\t vr.setVerticalRelation(VerticalVisualRelation.BELOW_AND_INLINE);\n\t \n\t //Create Description for Checkbox which is above the Maximizable checkbox\n\t CheckBox above = mainWindow.describe(InternalFrame.class, new InternalFrameDescription.Builder()\n\t\t\t.label(\"Internal Frame Generator\").build()).describe(CheckBox.class, new CheckBoxDescription.Builder()\n\t\t\t.nativeClass(\"javax.swing.JCheckBox\").vri(vr).build());\n\t \n\t //Check for Existence\n\t assertTrue(\"Checkbox above Maximizable should exist\",above.exists(5));\t \n\t above.highlight();\n\t \n\t //Get name of the Checkbox\n\t System.out.println(\"Name of the Checkbox above Maximizable CheckBox = \" + above.getAttachedText());\n\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage());\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 4 - Verify Insight & VRI finished\");\n\t\t}\n\t\t\n\t}", "@Test\n public void testFillOnExport(){\n VecCommandStack.push(VecCommandFactory.GetColorCommand(FILL, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"FILL #0000ff\\n\", print);\n }", "@Test\n public void testSetColorModel() throws FitsException, IOException{\n IndexColorModel colorModel = ColorTable.getColorModel(2);\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n imageData.setColorModel(colorModel);\n Assert.assertEquals(-1, imageData.getColorTableId());\n\n }", "private boolean generateDeviceImages() throws Exception {\n mDevice.executeShellCommand(STOP_CMD);\n\n // Start instrumentation test.\n final CollectingOutputReceiver receiver = new CollectingOutputReceiver();\n mDevice.executeShellCommand(START_CMD, receiver, TEST_RESULT_TIMEOUT,\n TimeUnit.MILLISECONDS, 0);\n\n return receiver.getOutput().contains(\"OK \");\n }", "@Test(expected = IllegalArgumentException.class)\n public void testAppearEqualsDisappear() {\n testAnimation.addShape(c, 100, 100);\n }", "@Test\n public void testReadObject() throws Exception {\n System.out.println(\"ColorIOProviderNGTest.testReadObject\");\n\n // Call method under test with JsonNode.isNull=false and JsonNode.isObject=true, use both types of color definition\n resetMocking();\n when(mockJsonNode.isNull()).thenReturn(false);\n when(mockJsonNode.isObject()).thenReturn(true);\n when(mockJsonNode.has(anyString())).thenReturn(true);\n when(mockJsonNode.get(anyString())).thenReturn(new TextNode(\"red\"));\n when(mockCache.deduplicate(any())).thenReturn(redAttribValue);\n instance.readObject(attributeId, elementId, mockJsonNode, mockGraphWriteMethods, null, null, null, mockCache);\n Mockito.verify(mockGraphWriteMethods, times(1)).setObjectValue(attributeId, elementId, redAttribValue);\n\n resetMocking(); \n when(mockJsonNode.isNull()).thenReturn(false);\n when(mockJsonNode.isObject()).thenReturn(true); \n when(mockJsonNode.has(anyString())).thenReturn(false);\n when(mockJsonNode.get(\"red\")).thenReturn(new FloatNode(0.0f));\n when(mockJsonNode.get(\"green\")).thenReturn(new FloatNode(0.5f));\n when(mockJsonNode.get(\"blue\")).thenReturn(new FloatNode(0.5f));\n when(mockJsonNode.get(\"alpha\")).thenReturn(new FloatNode(1.0f));\n when(mockCache.deduplicate(any())).thenReturn(tealAttribValue);\n instance.readObject(attributeId, elementId, mockJsonNode, mockGraphWriteMethods, null, null, null, mockCache);\n Mockito.verify(mockGraphWriteMethods, times(1)).setObjectValue(attributeId, elementId, tealAttribValue);\n Mockito.verify(mockGraphWriteMethods, times(0)).setStringValue(anyInt(), anyInt(), anyString());\n\n // Call method under test with JsonNode.isNull=false and JsonNode.isObject=false\n resetMocking();\n when(mockJsonNode.isNull()).thenReturn(false);\n when(mockJsonNode.isObject()).thenReturn(false);\n when(mockJsonNode.textValue()).thenReturn(attribValue);\n when(mockCache.deduplicate(any())).thenReturn(attribValue);\n instance.readObject(attributeId, elementId, mockJsonNode, mockGraphWriteMethods, null, null, null, mockCache);\n Mockito.verify(mockGraphWriteMethods, times(0)).setObjectValue(anyInt(), anyInt(), any(ConstellationColor.class));\n Mockito.verify(mockGraphWriteMethods, times(1)).setStringValue(attributeId, elementId, attribValue);\n \n // Call method under test with JsonNode.isNull=true and JsonNode.isObject=false\n resetMocking();\n when(mockJsonNode.isNull()).thenReturn(true);\n when(mockJsonNode.isObject()).thenReturn(false);\n instance.readObject(attributeId, elementId, mockJsonNode, mockGraphWriteMethods, null, null, null, mockCache);\n Mockito.verify(mockGraphWriteMethods, times(0)).setObjectValue(anyInt(), anyInt(), any(ConstellationColor.class));\n Mockito.verify(mockGraphWriteMethods, times(1)).setStringValue(attributeId, elementId, null);\n \n // Call method under test with JsonNode.isNull=true and JsonNode.isObject=true\n resetMocking();\n when(mockJsonNode.isNull()).thenReturn(true);\n when(mockJsonNode.isObject()).thenReturn(true);\n instance.readObject(attributeId, elementId, mockJsonNode, mockGraphWriteMethods, null, null, null, mockCache);\n Mockito.verify(mockGraphWriteMethods, times(0)).setObjectValue(anyInt(), anyInt(), any(ConstellationColor.class));\n Mockito.verify(mockGraphWriteMethods, times(1)).setStringValue(attributeId, elementId, null);\n }", "@Test\n @DisplayName(\"Action Marker Production Violet Test\")\n public void ActionMarkerProductionVioletTest() throws IOException, InterruptedException {\n ActionMarkerProductionViolet actionMarker = new ActionMarkerProductionViolet();\n Server server= new Server();\n ClientHandler clientHandler= new ClientHandler(server);\n ClientController clientController= new ClientController(server,clientHandler) ;\n VirtualView virtualView = new VirtualView(clientController);\n\n GameSolitaire game = new GameSolitaire(\"Ali\",true,clientController);\n\n assertEquals(\"ActionMarkerProductionViolet\", actionMarker.getType());\n\n assertEquals(4, game.productionDeckSize(6));\n assertEquals(4, game.productionDeckSize(7));\n assertEquals(4, game.productionDeckSize(8));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(2, game.productionDeckSize(6));\n assertEquals(4, game.productionDeckSize(7));\n assertEquals(4, game.productionDeckSize(8));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(6));\n assertEquals(4, game.productionDeckSize(7));\n assertEquals(4, game.productionDeckSize(8));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(6));\n assertEquals(2, game.productionDeckSize(7));\n assertEquals(4, game.productionDeckSize(8));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(6));\n assertEquals(0, game.productionDeckSize(7));\n assertEquals(4, game.productionDeckSize(8));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(6));\n assertEquals(0, game.productionDeckSize(7));\n assertEquals(2, game.productionDeckSize(8));\n\n game.activateActionMarker(actionMarker);\n\n assertEquals(0, game.productionDeckSize(6));\n assertEquals(0, game.productionDeckSize(7));\n assertEquals(0, game.productionDeckSize(8));\n\n FileClass.FileDestroyer();\n\n }", "@Test\n public void testColorStaticMethods() {\n assertEquals(1, Color.RED.r(), 0.0);\n assertEquals(0, Color.RED.g(), 0.0);\n assertEquals(0, Color.RED.b(), 0.0);\n //Test Green r, g et b\n assertEquals(0, Color.GREEN.r(), 0.0);\n assertEquals(1, Color.GREEN.g(), 0.0);\n assertEquals(0, Color.GREEN.b(), 0.0);\n //Test BLUE r, g et b\n assertEquals(0, Color.BLUE.r(), 0.0);\n assertEquals(0, Color.BLUE.g(), 0.0);\n assertEquals(1, Color.BLUE.b(), 0.0);\n //Test BLACK r, g et b\n assertEquals(0, Color.BLACK.r(), 0.0);\n assertEquals(0, Color.BLACK.g(), 0.0);\n assertEquals(0, Color.BLACK.b(), 0.0);\n //Test WHITE r, g et b\n assertEquals(1, Color.WHITE.r(), 0.0);\n assertEquals(1, Color.WHITE.g(), 0.0);\n assertEquals(1, Color.WHITE.b(), 0.0);\n }", "@Test(expected = UnsupportedOperationException.class)\n public void SVGViewTest3() {\n IView a = new SVGView(new AnimatorModelImpl(0, 0, 100, 100), \"toh-3.txt\", 10);\n a.makeVisible();\n }", "public int computeGoodCoverage(CameraPlacementResult result, CameraPlacementResult testResult, CameraPlacementProblem problem)\n {\n \tint i, j, goodCoverage = 0;\n\n \tint[][] totalCoverage = result.cover;\n \tint[][] testCoverage = testResult.cover;\n\n \tfor (i = 0; i < problem.getMaxY(); i++)\n \t{\n \t\tfor (j = 0; j < problem.getMaxX(); j++)\n \t\t{\n\n \t\t\t//If totalCoverage[j][i] uncovered but testCoverage covered, + 1\n \t\t\tif ( totalCoverage[j][i] == 0 && testCoverage[j][i] == 1)\n \t\t\t\tgoodCoverage++;\n \t\t}\n \t}\n\n \treturn goodCoverage;\n\n }", "@MediumTest\n public void test_1314_1() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/no_start.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "@Test\n public void test65() throws Throwable {\n CategoryPlot categoryPlot0 = new CategoryPlot();\n CyclicNumberAxis cyclicNumberAxis0 = new CyclicNumberAxis((-738.666557918385), 0.0);\n BasicStroke basicStroke0 = (BasicStroke)cyclicNumberAxis0.getAdvanceLineStroke();\n categoryPlot0.setDomainGridlineStroke(basicStroke0);\n FileDescriptor fileDescriptor0 = new FileDescriptor();\n MockFileInputStream mockFileInputStream0 = new MockFileInputStream(fileDescriptor0);\n ObjectInputStream objectInputStream0 = null;\n try {\n objectInputStream0 = new ObjectInputStream((InputStream) mockFileInputStream0);\n } catch(IOException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"org.evosuite.runtime.mock.java.io.NativeMockedIO\", e);\n }\n }", "public void testEquals() {\r\n\t\t// direct circle\r\n\t\tCircleArc2D arc0 = new CircleArc2D();\r\n\t\tCircle2D circle = new Circle2D(0, 0, 1, true);\r\n\t\tCircleArc2D arc1 = new CircleArc2D(circle, 0, PI/2);\r\n\t\tCircleArc2D arc2 = new CircleArc2D(circle, 0, PI/2, true);\r\n\t\tCircleArc2D arc3 = new CircleArc2D(0, 0, 1, 0, PI/2);\r\n\t\tCircleArc2D arc4 = new CircleArc2D(0, 0, 1, 0, PI/2, true);\r\n\t\tassertTrue(arc1.equals(arc0));\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\r\n\t\t// direct circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, PI, true);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, PI, true);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t\t\r\n\t\t// indirect circle, with different angles\r\n\t\tcircle = new Circle2D(0, 0, 1, true);\r\n\t\tarc1 = new CircleArc2D(circle, PI/2, -PI/2);\r\n\t\tarc2 = new CircleArc2D(circle, PI/2, 2*PI, false);\r\n\t\tarc3 = new CircleArc2D(0, 0, 1, PI/2, -PI/2);\r\n\t\tarc4 = new CircleArc2D(0, 0, 1, PI/2, 2*PI, false);\r\n\t\tassertTrue(arc1.equals(arc2));\r\n\t\tassertTrue(arc1.equals(arc3));\r\n\t\tassertTrue(arc1.equals(arc4));\r\n\t}", "public Boolean CanRender(String symbolCode, \n ArrayList<Point2D.Double> coords,\n int symStd)\n {\n String message = null;\n String basicSymbolID = symbolCode;\n basicSymbolID = SymbolUtilities.getBasicSymbolIDStrict(basicSymbolID);\n //ErrorLogger.LogMessage(\"TEST\");\n try\n {\n // message = \"Cannot draw: \" + symbolCode + \" (\" + basicSymbolID + \")\";\n if(SymbolUtilities.isTacticalGraphic(basicSymbolID))\n {\n if(_SymbolDefTable == null)\n _SymbolDefTable = SymbolDefTable.getInstance();\n\n SymbolDef sd = _SymbolDefTable.getSymbolDef(basicSymbolID,symStd);\n if(sd != null)\n {\n int pointCount = 0;\n if(coords != null)\n {\n pointCount = coords.size();\n }\n\n int dc = sd.getDrawCategory();\n if (dc == SymbolDef.DRAW_CATEGORY_POINT)//make sure we can find the character in the font.\n {\n int index = -1;\n index = SinglePointLookup.getInstance().getCharCodeFromSymbol(symbolCode,symStd);\n if(index > 0)\n return true;\n else\n message = \"Bad font lookup for: \" + symbolCode + \" (\" + basicSymbolID + \")\";\n }\n else if(dc > 0 && dc < 99)\n {\n if(sd.getMinPoints() == sd.getMaxPoints())\n { //complex graphic like ambush\n\n if(pointCount == sd.getMinPoints())\n return true;\n else\n message = \"Specific point count not met for: \" + symbolCode + \" (\" + basicSymbolID + \") - Had: \" + String.valueOf(pointCount) + \" Needed: \" + String.valueOf(sd.getMinPoints());\n }\n else if(pointCount >= sd.getMinPoints())\n {\n return true;\n }\n else if(sd.getDrawCategory() == SymbolDef.DRAW_CATEGORY_POLYGON\n && pointCount == 2 && sd.getMinPoints() == 3 && sd.getMaxPoints() > 100)\n {//areas with 2 points are allowable.\n return true;\n }\n else if(pointCount < sd.getMinPoints())\n {\n message = symbolCode + \" had less than the required number of points. Had: \" + String.valueOf(coords.size()) + \" Needed: \" + String.valueOf(sd.getMinPoints());\n }\n }\n else\n {\n message = \"Cannot draw: \" + symbolCode + \" (\" + basicSymbolID + \")\";\n }\n\n }\n else\n {\n message = \"Cannot draw symbolID: \" + symbolCode + \" (\" + basicSymbolID + \")\";\n }\n }\n else\n {\n //UnitDef ud = UnitDefTable.getInstance().getUnitDef(basicSymbolID,symStd);\n UnitFontLookupInfo ufli = UnitFontLookup.getInstance().getLookupInfo(basicSymbolID,symStd);\n if(ufli != null)\n {\n return true;\n }\n else\n {\n message = \"JavaRenderer.CanRender() - Cannot draw symbolID: \" + symbolCode + \" (\" + basicSymbolID + \")\";\n }\n }\n\n if(message != null && !message.equals(\"\"))\n {\n ErrorLogger.LogMessage(this.getClass().getName(), \"CanRender()\", message,Level.FINE);\n //System.err.println(message);\n //System.out.println(\"\");\n //System.out.println(\"INFO: CanRender - \" + message);\n //Exception foo = new Exception(\"Stack?\");\n //foo.printStackTrace();\n }\n }\n catch(Exception exc)\n {\n System.err.println(String.valueOf(message));\n System.err.println(exc.getMessage());\n }\n return false;\n }", "@Test\n public void testImage() {\n int expected = 4;\n assertEquals(expected, image.getHeight());\n assertEquals(expected, image.getWidth());\n }" ]
[ "0.5562243", "0.5547472", "0.551372", "0.54642", "0.5460175", "0.5442115", "0.5434388", "0.5411617", "0.5402052", "0.5377077", "0.5373975", "0.53683376", "0.52822053", "0.52795583", "0.52642673", "0.5242987", "0.521453", "0.52132744", "0.5174643", "0.5167812", "0.5143336", "0.5138791", "0.51349247", "0.5103388", "0.5072041", "0.5070347", "0.5063966", "0.50594157", "0.5046025", "0.5044635", "0.50372154", "0.5032153", "0.50318253", "0.502311", "0.49972963", "0.4992791", "0.49840063", "0.4980722", "0.497097", "0.49694595", "0.49684083", "0.49659306", "0.49647522", "0.49600074", "0.49457896", "0.4944397", "0.49332774", "0.49222055", "0.4912199", "0.49072814", "0.49058637", "0.49045813", "0.4900133", "0.48980263", "0.48840827", "0.4870485", "0.4870367", "0.48644054", "0.48608392", "0.48541033", "0.48523444", "0.48507816", "0.48445034", "0.48363775", "0.48358265", "0.4832107", "0.4831942", "0.48258552", "0.4822792", "0.48217317", "0.48165885", "0.48083827", "0.480712", "0.4804835", "0.48044002", "0.4803361", "0.47976503", "0.47968045", "0.47930807", "0.47788927", "0.47739962", "0.47735164", "0.4766938", "0.4756349", "0.47544664", "0.47538117", "0.47522628", "0.4749202", "0.4746846", "0.47375712", "0.47341073", "0.4722221", "0.47202402", "0.47194374", "0.47142595", "0.47137994", "0.4711909", "0.47063032", "0.47033885", "0.46921077" ]
0.6738903
0
Test to make sure the rendering does not skip on unmatched original envelope and tries anyways to render an output
@Test public void testMosaicExpansion() throws Exception { File red1 = URLs.urlToFile(this.getClass().getResource("red_footprint_test/red1.tif")); File source = red1.getParentFile(); File testDataDir = getResourceLoader().getBaseDirectory(); File directory1 = new File(testDataDir, "redHarvest1"); File directory2 = new File(testDataDir, "redHarvest2"); if (directory1.exists()) { FileUtils.deleteDirectory(directory1); } FileUtils.copyDirectory(source, directory1); // move all files except red3 to the second dir directory2.mkdirs(); for (File file : FileUtils.listFiles(directory1, new RegexFileFilter("red[^3].*"), null)) { Assert.assertTrue(file.renameTo(new File(directory2, file.getName()))); } // create the first reader URL harvestSingleURL = URLs.fileToUrl(directory1); ImageMosaicReader reader = new ImageMosaicReader(directory1, null); // now create a second reader that won't be informed of the harvesting changes // (simulating changes over a cluster, where the bbox information won't be updated from one // node to the other) ImageMosaicReader reader2 = new ImageMosaicReader(directory1, null); try { // harvest the other files with the first reader for (File file : directory2.listFiles()) { Assert.assertTrue(file.renameTo(new File(directory1, file.getName()))); } reader.harvest(null, directory1, null); // now use the render to paint a map not hitting the original envelope of reader2 ReferencedEnvelope renderEnvelope = new ReferencedEnvelope(991000, 992000, 216000, 217000, reader2.getCoordinateReferenceSystem()); Rectangle rasterArea = new Rectangle(0, 0, 10, 10); GetMapRequest request = new GetMapRequest(); request.setBbox(renderEnvelope); request.setSRS("EPSG:6539"); request.setFormat("image/png"); final WMSMapContent map = new WMSMapContent(request); map.setMapWidth(10); map.setMapHeight(10); map.setBgColor(Color.BLACK); map.setTransparent(false); map.getViewport().setBounds(renderEnvelope); StyleBuilder builder = new StyleBuilder(); Style style = builder.createStyle(builder.createRasterSymbolizer()); Layer l = new org.geoserver.wms.CachedGridReaderLayer(reader2, style); map.addLayer(l); RenderedImageMap imageMap = this.rasterMapProducer.produceMap(map); File reference = new File("src/test/resources/org/geoserver/wms/map/red10.png"); ImageAssert.assertEquals(reference, imageMap.getImage(), 0); // now again, but with a rendering transformation, different code path style.featureTypeStyles().get(0).setTransformation(new IdentityCoverageFunction()); RenderedImageMap imageMap2 = this.rasterMapProducer.produceMap(map); ImageAssert.assertEquals(reference, imageMap2.getImage(), 0); imageMap.dispose(); } finally { reader.dispose(); reader2.dispose(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(expected = java.io.IOException.class)\n\tpublic void testRenderMergedOutputModel_4()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"/\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tMap model = new LinkedHashMap();\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\n\t\tfixture.renderMergedOutputModel(model, request, response);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testRenderMergedOutputModel_2()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", false, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tMap model = new LinkedHashMap();\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\n\t\tfixture.renderMergedOutputModel(model, request, response);\n\n\t\t// add additional test code here\n\t}", "private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}", "@Test\n\tpublic void testRenderMergedOutputModel_1()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"/\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tMap model = new LinkedHashMap();\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\n\t\tfixture.renderMergedOutputModel(model, request, response);\n\n\t\t// add additional test code here\n\t}", "@Test\n\tpublic void testRenderMergedOutputModel_3()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tMap model = new LinkedHashMap();\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\n\t\tfixture.renderMergedOutputModel(model, request, response);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void testRender(){\n Mockito.doNothing().when(renderer).renderWorld(level);\n Mockito.doNothing().when(renderer).renderScore();\n Mockito.doNothing().when(renderer).renderLives();\n renderer.render();\n verify(renderer).renderWorld(level);\n verify(renderer).renderScore();\n verify(renderer).renderLives();\n verify(batch).begin();\n verify(batch).end();\n }", "private boolean skipping(PhaseId phaseId, FacesContext context) {\n \n if (context.getResponseComplete()) {\n return (true);\n } else if (context.getRenderResponse() &&\n !phaseId.equals(PhaseId.RENDER_RESPONSE)) {\n return (true);\n } else {\n return (false);\n }\n \n }", "@Override\n public boolean isToBeRendered()\n {\n return true;\n }", "@Test(expected = java.io.UnsupportedEncodingException.class)\n\tpublic void testRenderMergedOutputModel_5()\n\t\tthrows Exception {\n\t\tRedirectView fixture = new RedirectView(\"\", true, true);\n\t\tfixture.setUrl(\"\");\n\t\tfixture.setEncodingScheme(\"\");\n\t\tMap model = new LinkedHashMap();\n\t\tHttpServletRequest request = new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true);\n\t\tHttpServletResponse response = new JSecurityHttpServletResponse(new HttpServletResponseWrapper((HttpServletResponse) null), (ServletContext) null, new JSecurityHttpServletRequest(new HttpServletRequestWrapper((HttpServletRequest) null), (ServletContext) null, true));\n\n\t\tfixture.renderMergedOutputModel(model, request, response);\n\n\t\t// add additional test code here\n\t}", "@Test\n public void shouldSucceedWithNoOutputRedirections() {\n Template template = createTemplate(\"file\", \"file\");\n new OutputRedirectionTemplateValidator(\"stdout\").validate(template, new NullHeterogeneousRegistry());\n }", "private boolean no_output() {\n\t\treturn _outcaptures.size() > 0 || _outhides.size() > 0;\n\t}", "@Test\n public void testRenderscriptDidNotRun() throws Exception {\n Map<String, ProjectBuildOutput> multi =\n project.executeAndReturnOutputMultiModel(\"compileDebugRenderscript\");\n assertThat(\n project.getBuildResult()\n .getTask(\":compileDebugRenderscript\")\n .getExecutionState()\n .toString())\n .isEqualTo(\"SKIPPED\");\n }", "public boolean renderAsNormalBlock()\r\n/* 166: */ {\r\n/* 167:184 */ return false;\r\n/* 168: */ }", "@Override\r\n public boolean isRendered() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n if (!context.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE)) {\r\n Integer index = getView().getActiveRowIndex();\r\n return super.isRendered() && index != null && index > -1;\r\n }\r\n return super.isRendered();\r\n }", "private void doAfterRenderResponse(final PhaseEvent arg0) {\n\t}", "public boolean renderAsNormalBlock()\n {\n return false;\n }", "public boolean renderAsNormalBlock()\r\n {\r\n return false;\r\n }", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock() {\n\t\treturn false;\n\t}", "public boolean renderAsNormalBlock(){\r\n return false;\r\n }", "public static boolean shouldRender(InfoUUID uuid) {\n\t\treturn uuid.identity != -2;\n\t}", "@Test\n public void shouldSuccedWithOneOuptutRedirection() {\n Template template = createTemplate(\"stdout\", \"file\");\n new OutputRedirectionTemplateValidator(\"stdout\").validate(template, new NullHeterogeneousRegistry());\n }", "public abstract boolean isRenderRedirect();", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n FileInput fileInput0 = new FileInput(errorPage0, \"http://xmlpull.org/v1/doc/properties.html#serializer-indentation\", \"trying to write past already finished output\");\n // Undeclared exception!\n try { \n fileInput0.wBlock(\"trying to write past already finished output\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void render() {\n\t\t// do nothing... as we should\n\t}", "@Test(expected = SamlProcessingException.class)\n\tpublic void testNoOriginalAuthnRequestProcessing() throws Exception {\n\t\tthis.spProcessor.setSaml20Storage(Mockito.mock(ISaml20Storage.class));\n\t\tthis.testAuthnResponseProcessingScenario1(this.responseAssertSigned);\n\t}", "public abstract void render(VirtualDocument document, Output out)\n\t\t\tthrows RenderingException;", "@Test\n\tpublic void testRender() {\n\t\tDialog messageBox = new MessageBoxSub();\n\t\tCuboid cuboid = new Cuboid(messageBox, 2,3,7);\n\t\tcuboid.render();\n\t}", "@Override\n\tpublic final boolean renderAsNormalBlock()\n\t{\n\t\treturn false;\n\t}", "@Override\n public boolean hasOverlappingRendering() {\n return false;\n }", "@Override\n public boolean hasOverlappingRendering() {\n return false;\n }", "@Test(expected = HardwareLerEnvelopesException.class)\n\tpublic void falhasDeHardwareLerEnvelopes() {\n\t\thardwareMock.lerEnvelope(0);\n\t}", "@Override\n public boolean hasOverlappingRendering() {\n return false;\n }", "public boolean renderAsNormalBlock()\n\t {\n\t return false;\n\t }", "@Test\n public void testTemplate1() throws Exception {\n TemplateWebApplication webApp = new TemplateWebApplication(\"src/main/template1\");\n webApp.initialize();\n webApp.start();\n\n TemplateHttpServletRequest request = new TemplateHttpServletRequest();\n request.setWebApplication(webApp);\n request.setContextPath(\"\");\n request.setServletPath(\"/faces\");\n request.setPathInfo(\"/notfound.html\");\n\n TemplateHttpServletResponse response = new TemplateHttpServletResponse();\n TemplateServletOutputStream outputStream = new TemplateServletOutputStream();\n response.setOutputStream(outputStream);\n outputStream.setResponse(response);\n\n webApp.service(request, response);\n\n assertEquals(404, response.getStatus());\n }", "@Test(expected = TooManyOutputRedirectionsException.class)\n public void shouldFailWithTwoOutputRedirections() {\n Template template = createTemplate(\"stdout\", \"stdout\");\n new OutputRedirectionTemplateValidator(\"stdout\").validate(template, new NullHeterogeneousRegistry());\n }", "public abstract boolean teReproduces();", "@Test\n public void shouldLoadEmptyModel() throws Exception {\n final Map<String, Object> modelData = createEmptyModel();\n\n // WHEN asking the view to render the model contents\n underTest.renderMergedOutputModel(modelData, mock(HttpServletRequest.class), response);\n\n // THEN the response sets the correct MIME type\n verify(response).setContentType(\"text/csv\");\n verify(response).setHeader(\"Content-Disposition\", \"attachment; filename=activityReport.csv\");\n\n // AND returns an empty closed stream\n verify(sourceWriter).close();\n }", "public void XtestOneLevelClippingInView() throws Throwable {\n mEvents.clear();\n getReactContext().getJSModule(SubviewsClippingTestModule.class).renderClippingSample1();\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(new String[] {\"Attach_outer\", \"Attach_inner2\"}, mEvents.toArray());\n }", "@Override\n public void setToBeRendered(boolean arg0)\n {\n \n }", "public abstract boolean isRendered();", "@Test\n public void getCapturedResponses_discardsDuplicates() throws Exception {\n\n // Fire two instances of the same response document\n SsmlDocument response1 = ssmlDocument().withFilename(\"ssmlTextResponse_helloWorld.xml\").build();\n SsmlDocument response2 = ssmlDocument().withFilename(\"ssmlTextResponse_helloWorld.xml\").build();\n listener.outputSsml(null, response1);\n listener.outputSsml(null, response2);\n List<SsmlDocument> responses = listener.getCapturedResponses();\n assertThat(responses, hasSize(1));\n }", "public static boolean isRendered(Element sourceElement) {\r\n return !Constants.FALSE.equalsIgnoreCase(sourceElement.getAttribute(\"rendered\")); //$NON-NLS-1$\r\n }", "@Test\n public void testTemplate2() throws Exception {\n TemplateWebApplication webApp = new TemplateWebApplication(\"src/main/template2\");\n webApp.initialize();\n webApp.start();\n\n TemplateHttpServletRequest request = new TemplateHttpServletRequest();\n request.setWebApplication(webApp);\n request.setContextPath(\"\");\n request.setServletPath(\"/index.html\");\n request.setPathInfo(null);\n\n TemplateHttpServletResponse response = new TemplateHttpServletResponse();\n TemplateServletOutputStream outputStream = new TemplateServletOutputStream();\n response.setOutputStream(outputStream);\n outputStream.setResponse(response);\n\n webApp.service(request, response);\n\n assertEquals(200, response.getStatus());\n String responseString = new String(response.getResponseBody());\n assertTrue(responseString.contains(\"Hello Mojarra\"));\n }", "public abstract boolean isRenderRedirectAfterDispatch();", "@Override\n\tpublic boolean isResponseExpected() {\n\t\treturn false;\n\t}", "@Test\n public void encode_whenMessageCantBeParsed_dontWriteToBuffer() throws Exception {\n when(parser.encode(any(StartCommunicationMessage.class))).thenReturn(null);\n\n ByteBuf out = Unpooled.buffer();\n messageFrameEncoder.encode(ctx, new StartCommunicationMessage(), out);\n\n assertFalse(new String(out.array()).contains(\"\\r\\n\"));\n }", "public void XtestTwoLevelClippingInView() throws Throwable {\n mEvents.clear();\n getReactContext().getJSModule(SubviewsClippingTestModule.class).renderClippingSample2();\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(\n new String[] {\"Attach_outer\", \"Attach_complexInner\", \"Attach_inner1\"}, mEvents.toArray());\n }", "private void suspendOnNullResponse(CartReceiptResponse receiptResponse, HttpServletResponse response,\n HttpServletRequest request, Locale localeObj) throws IOException {\n\n \t/* If response contains null info then render error message on screen */\n if (null == receiptResponse || null != receiptResponse.getErrorCode() ||\n null != receiptResponse.getErrorMessage()) {\n String errorMessage = \"\";\n if (null != receiptResponse) {\n errorMessage = receiptResponse.getErrorMessage();\n LOGGER.debug(\"errorMessage : \" + receiptResponse.getErrorMessage());\n }\n response.reset();\n response.setContentType(\"text/plain\");\n request.setAttribute(\"customErrorMessage\", getMessage(localeObj, \"pdf.receipt.servletErrorMessage\"));\n String message = getMessage(localeObj, \"pdf.receipt.servletErrorMessage\", errorMessage);\n response.sendError(HttpServletResponse.SC_NOT_FOUND,\n message);\n }\n }", "boolean getOutputPartialsBeforeLanguageDecision();", "@Test\n public void shouldThrow422ExceptionWhenPreviewNotEligibleForPublishing() {\n UUID randomUuid = UUID.randomUUID();\n when(eomFile.getUuid()).thenReturn(randomUuid.toString());\n when(eomFileProcessor.process(\n eq(eomFile), eq(TransformationMode.PREVIEW), eq(TRANSACTION_ID), any()))\n .thenThrow(new UnsupportedEomTypeException(randomUuid, INVALID_TYPE));\n try {\n postContentToTransformResource.map(eomFile, IS_PREVIEW_TRUE, null);\n fail(\"No exception was thrown, but expected one.\");\n } catch (WebApplicationClientException wace) {\n assertThat(\n ((ErrorEntity) wace.getResponse().getEntity()).getMessage(),\n equalTo(String.format(\"[%s] not an EOM::CompoundStory.\", INVALID_TYPE)));\n assertThat(wace.getResponse().getStatus(), equalTo(HttpStatus.SC_UNPROCESSABLE_ENTITY));\n }\n }", "boolean hasOutputPartialsBeforeLanguageDecision();", "@Override\r\n\tpublic boolean getOutput() {\n\t\treturn false;\r\n\t}", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\n public void simpleRender(RenderManager rm) {\n }", "@Override\r\n\tpublic boolean renderAsNormalBlock ( )\r\n\t{\n\t\treturn ( Configuration.Cosmetic.renderFallback ) ;\r\n\t}", "public final void clearRendered()\n\t{\n\t\tIterator<FeedbackMessage> msgs = iterator();\n\t\twhile (msgs.hasNext())\n\t\t{\n\t\t\tfinal FeedbackMessage msg = msgs.next();\n\t\t\tif (msg.isRendered())\n\t\t\t{\n\t\t\t\tmsgs.remove();\n\t\t\t}\n\t\t}\n\t}", "@Test \n\tvoid test3() {\n\t\tassertTrue(!r1.getOutput().isEmpty());\n\t}", "@Test\n void testFlattenWidgetNoRef() throws IOException\n {\n File file = new File(OUT_DIR, \"AlignmentTests-flattened-noRef.pdf\");\n\n try (PDDocument testPdf = Loader.loadPDF(new File(IN_DIR, \"AlignmentTests.pdf\")))\n {\n PDAcroForm acroFormToTest = testPdf.getDocumentCatalog().getAcroForm();\n for (PDField field : acroFormToTest.getFieldTree())\n {\n field.getWidgets().forEach(widget -> widget.getCOSObject().removeItem(COSName.P));\n }\n acroFormToTest.flatten();\n\n // 36 non widget annotations shall not be flattened\n assertEquals(36, testPdf.getPage(0).getAnnotations().size());\n\n assertTrue(acroFormToTest.getFields().isEmpty());\n testPdf.save(file);\n }\n // compare rendering\n if (!TestPDFToImage.doTestFile(file, IN_DIR.getAbsolutePath(), OUT_DIR.getAbsolutePath()))\n {\n // don't fail, rendering is different on different systems, result must be viewed manually\n System.out.println(\"Rendering of \" + file + \" failed or is not identical to expected rendering in \" + IN_DIR + \" directory\");\n }\n }", "public void validatePipe(SunGraphics2D paramSunGraphics2D) {\n/* 155 */ if (paramSunGraphics2D.antialiasHint != 2 && paramSunGraphics2D.paintState <= 1 && (paramSunGraphics2D.compositeState <= 0 || paramSunGraphics2D.compositeState == 2)) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 160 */ if (paramSunGraphics2D.clipState == 2) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 165 */ super.validatePipe(paramSunGraphics2D);\n/* */ } else {\n/* 167 */ switch (paramSunGraphics2D.textAntialiasHint) {\n/* */ \n/* */ \n/* */ case 0:\n/* */ case 1:\n/* 172 */ paramSunGraphics2D.textpipe = solidTextRenderer;\n/* */ break;\n/* */ \n/* */ case 2:\n/* 176 */ paramSunGraphics2D.textpipe = aaTextRenderer;\n/* */ break;\n/* */ \n/* */ default:\n/* 180 */ switch ((paramSunGraphics2D.getFontInfo()).aaHint) {\n/* */ \n/* */ case 4:\n/* */ case 6:\n/* 184 */ paramSunGraphics2D.textpipe = lcdTextRenderer;\n/* */ break;\n/* */ \n/* */ case 2:\n/* 188 */ paramSunGraphics2D.textpipe = aaTextRenderer;\n/* */ break;\n/* */ } \n/* */ \n/* 192 */ paramSunGraphics2D.textpipe = solidTextRenderer;\n/* */ break;\n/* */ } \n/* */ } \n/* 196 */ paramSunGraphics2D.imagepipe = imagepipe;\n/* 197 */ if (paramSunGraphics2D.transformState >= 3) {\n/* 198 */ paramSunGraphics2D.drawpipe = gdiTxPipe;\n/* 199 */ paramSunGraphics2D.fillpipe = gdiTxPipe;\n/* 200 */ } else if (paramSunGraphics2D.strokeState != 0) {\n/* 201 */ paramSunGraphics2D.drawpipe = gdiTxPipe;\n/* 202 */ paramSunGraphics2D.fillpipe = gdiPipe;\n/* */ } else {\n/* 204 */ paramSunGraphics2D.drawpipe = gdiPipe;\n/* 205 */ paramSunGraphics2D.fillpipe = gdiPipe;\n/* */ } \n/* 207 */ paramSunGraphics2D.shapepipe = gdiPipe;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 213 */ if (paramSunGraphics2D.loops == null)\n/* */ {\n/* 215 */ paramSunGraphics2D.loops = getRenderLoops(paramSunGraphics2D);\n/* */ }\n/* */ } else {\n/* 218 */ super.validatePipe(paramSunGraphics2D);\n/* */ } \n/* */ }", "@Override\n public void render() {\n if (renderInterrupted) {\n log.debug(\"render()\");\n renderInterrupted = false;\n }\n\n }", "private boolean browserCantRenderFontsConsistently() {\n\r\n return getPage().getWebBrowser().getBrowserApplication()\r\n .contains(\"PhantomJS\")\r\n || (getPage().getWebBrowser().isIE() && getPage()\r\n .getWebBrowser().getBrowserMajorVersion() <= 9);\r\n }", "@Override\n protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {\n ByteArrayOutputStream baos = createTemporaryOutputStream();\n\n // Apply preferences and build metadata.\n Document document = new Document();\n PdfWriter writer = PdfWriter.getInstance(document, baos);\n prepareWriter(model, writer, request);\n buildPdfMetadata(model, document, request);\n\n // Build PDF document.\n writer.setInitialLeading(16);\n document.open();\n buildPdfDocument(model, document, writer, request, response);\n document.close();\n\n // Flush to HTTP response.\n writeToResponse(response, baos);\n\n }", "public boolean isReadyToRender() {\n return mHasSwapChain;\n }", "protected void assertNoTESpec() {\n\t\tassertFalse(\"A TE spec was generated, but it shouldn't\", \n\t\t\trecorder.recorded(EC.TLC_TE_SPEC_GENERATION_COMPLETE));\n\t}", "@Test\n\tpublic void testRenderData() throws Exception\n\t{\n\t\tfinal HttpServletRequest request = mock(HttpServletRequest.class);\n\t\tfinal HttpServletResponse response = mock(HttpServletResponse.class);\n\n\t\t// servlet mock responses\n\t\tfinal Map<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"__action\", \"download_json\");\n\t\tmap.put(\"__target\", \"jqGridView\");\n\t\tmap.put(\"Operation\", \"RENDER_DATA\");\n\t\tmap.put(\"rows\", \"10\");\n\t\tmap.put(\"page\", \"1\");\n\t\tfor (final Entry<String, String> entry : map.entrySet())\n\t\t{\n\t\t\twhen(request.getParameter(entry.getKey())).thenReturn(entry.getValue());\n\t\t}\n\t\twhen(request.getParameterMap()).thenReturn(map);\n\t\twhen(request.getMethod()).thenReturn(\"GET\");\n\n\t\tfinal ServletContext context = mock(ServletContext.class);\n\t\tfinal HttpSession session = mock(HttpSession.class);\n\t\twhen(request.getSession()).thenReturn(session);\n\t\twhen(session.getServletContext()).thenReturn(context);\n\n\t\tfinal ServletOutputStream mockOutstream = mock(ServletOutputStream.class);\n\t\twhen(response.getOutputStream()).thenReturn(mockOutstream);\n\n\t\tfinal Tuple molRequest = new MolgenisRequest(request, response);\n\t\tplugin.handleRequest(db, molRequest, mockOutstream);\n\n\t\t// final HttpServletResponse realRequest = ((MolgenisRequest)\n\t\t// molRequest).getResponse();\n\t\t// System.out.println(realRequest.toString());\n\t\tverify(mockOutstream)\n\t\t\t\t.print(\"{\\\"page\\\":1,\\\"total\\\":3067,\\\"records\\\":30670,\\\"rows\\\":[{\\\"Country.Code\\\":\\\"ABW\\\",\\\"Country.Name\\\":\\\"Aruba\\\",\\\"Country.Continent\\\":\\\"North America\\\",\\\"Country.Region\\\":\\\"Caribbean\\\",\\\"Country.SurfaceArea\\\":\\\"193.0\\\",\\\"Country.IndepYear\\\":\\\"null\\\",\\\"Country.Population\\\":\\\"103000\\\",\\\"Country.LifeExpectancy\\\":\\\"78.4000015258789\\\",\\\"Country.GNP\\\":\\\"828.0\\\",\\\"Country.GNPOld\\\":\\\"793.0\\\",\\\"Country.LocalName\\\":\\\"Aruba\\\",\\\"Country.GovernmentForm\\\":\\\"Nonmetropolitan Territory of The Netherlands\\\",\\\"Country.HeadOfState\\\":\\\"Beatrix\\\",\\\"Country.Capital\\\":\\\"129\\\",\\\"Country.Code2\\\":\\\"AW\\\",\\\"City.ID\\\":\\\"129\\\",\\\"City.Name\\\":\\\"Oranjestad\\\",\\\"City.CountryCode\\\":\\\"ABW\\\",\\\"City.District\\\":\\\"Ð\\\",\\\"City.Population\\\":\\\"29034\\\",\\\"CountryLanguage.CountryCode\\\":\\\"ABW\\\",\\\"CountryLanguage.Language\\\":\\\"Dutch\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"T\\\",\\\"CountryLanguage.Percentage\\\":\\\"5.300000190734863\\\"},{\\\"Country.Code\\\":\\\"ABW\\\",\\\"Country.Name\\\":\\\"Aruba\\\",\\\"Country.Continent\\\":\\\"North America\\\",\\\"Country.Region\\\":\\\"Caribbean\\\",\\\"Country.SurfaceArea\\\":\\\"193.0\\\",\\\"Country.IndepYear\\\":\\\"null\\\",\\\"Country.Population\\\":\\\"103000\\\",\\\"Country.LifeExpectancy\\\":\\\"78.4000015258789\\\",\\\"Country.GNP\\\":\\\"828.0\\\",\\\"Country.GNPOld\\\":\\\"793.0\\\",\\\"Country.LocalName\\\":\\\"Aruba\\\",\\\"Country.GovernmentForm\\\":\\\"Nonmetropolitan Territory of The Netherlands\\\",\\\"Country.HeadOfState\\\":\\\"Beatrix\\\",\\\"Country.Capital\\\":\\\"129\\\",\\\"Country.Code2\\\":\\\"AW\\\",\\\"City.ID\\\":\\\"129\\\",\\\"City.Name\\\":\\\"Oranjestad\\\",\\\"City.CountryCode\\\":\\\"ABW\\\",\\\"City.District\\\":\\\"Ð\\\",\\\"City.Population\\\":\\\"29034\\\",\\\"CountryLanguage.CountryCode\\\":\\\"ABW\\\",\\\"CountryLanguage.Language\\\":\\\"English\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"9.5\\\"},{\\\"Country.Code\\\":\\\"ABW\\\",\\\"Country.Name\\\":\\\"Aruba\\\",\\\"Country.Continent\\\":\\\"North America\\\",\\\"Country.Region\\\":\\\"Caribbean\\\",\\\"Country.SurfaceArea\\\":\\\"193.0\\\",\\\"Country.IndepYear\\\":\\\"null\\\",\\\"Country.Population\\\":\\\"103000\\\",\\\"Country.LifeExpectancy\\\":\\\"78.4000015258789\\\",\\\"Country.GNP\\\":\\\"828.0\\\",\\\"Country.GNPOld\\\":\\\"793.0\\\",\\\"Country.LocalName\\\":\\\"Aruba\\\",\\\"Country.GovernmentForm\\\":\\\"Nonmetropolitan Territory of The Netherlands\\\",\\\"Country.HeadOfState\\\":\\\"Beatrix\\\",\\\"Country.Capital\\\":\\\"129\\\",\\\"Country.Code2\\\":\\\"AW\\\",\\\"City.ID\\\":\\\"129\\\",\\\"City.Name\\\":\\\"Oranjestad\\\",\\\"City.CountryCode\\\":\\\"ABW\\\",\\\"City.District\\\":\\\"Ð\\\",\\\"City.Population\\\":\\\"29034\\\",\\\"CountryLanguage.CountryCode\\\":\\\"ABW\\\",\\\"CountryLanguage.Language\\\":\\\"Papiamento\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"76.69999694824219\\\"},{\\\"Country.Code\\\":\\\"ABW\\\",\\\"Country.Name\\\":\\\"Aruba\\\",\\\"Country.Continent\\\":\\\"North America\\\",\\\"Country.Region\\\":\\\"Caribbean\\\",\\\"Country.SurfaceArea\\\":\\\"193.0\\\",\\\"Country.IndepYear\\\":\\\"null\\\",\\\"Country.Population\\\":\\\"103000\\\",\\\"Country.LifeExpectancy\\\":\\\"78.4000015258789\\\",\\\"Country.GNP\\\":\\\"828.0\\\",\\\"Country.GNPOld\\\":\\\"793.0\\\",\\\"Country.LocalName\\\":\\\"Aruba\\\",\\\"Country.GovernmentForm\\\":\\\"Nonmetropolitan Territory of The Netherlands\\\",\\\"Country.HeadOfState\\\":\\\"Beatrix\\\",\\\"Country.Capital\\\":\\\"129\\\",\\\"Country.Code2\\\":\\\"AW\\\",\\\"City.ID\\\":\\\"129\\\",\\\"City.Name\\\":\\\"Oranjestad\\\",\\\"City.CountryCode\\\":\\\"ABW\\\",\\\"City.District\\\":\\\"Ð\\\",\\\"City.Population\\\":\\\"29034\\\",\\\"CountryLanguage.CountryCode\\\":\\\"ABW\\\",\\\"CountryLanguage.Language\\\":\\\"Spanish\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"7.400000095367432\\\"},{\\\"Country.Code\\\":\\\"AFG\\\",\\\"Country.Name\\\":\\\"Afghanistan\\\",\\\"Country.Continent\\\":\\\"Asia\\\",\\\"Country.Region\\\":\\\"Southern and Central Asia\\\",\\\"Country.SurfaceArea\\\":\\\"652090.0\\\",\\\"Country.IndepYear\\\":\\\"1919\\\",\\\"Country.Population\\\":\\\"22720000\\\",\\\"Country.LifeExpectancy\\\":\\\"45.900001525878906\\\",\\\"Country.GNP\\\":\\\"5976.0\\\",\\\"Country.GNPOld\\\":\\\"null\\\",\\\"Country.LocalName\\\":\\\"Afganistan/Afqanestan\\\",\\\"Country.GovernmentForm\\\":\\\"Islamic Emirate\\\",\\\"Country.HeadOfState\\\":\\\"Mohammad Omar\\\",\\\"Country.Capital\\\":\\\"1\\\",\\\"Country.Code2\\\":\\\"AF\\\",\\\"City.ID\\\":\\\"1\\\",\\\"City.Name\\\":\\\"Kabul\\\",\\\"City.CountryCode\\\":\\\"AFG\\\",\\\"City.District\\\":\\\"Kabol\\\",\\\"City.Population\\\":\\\"1780000\\\",\\\"CountryLanguage.CountryCode\\\":\\\"AFG\\\",\\\"CountryLanguage.Language\\\":\\\"Balochi\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"0.8999999761581421\\\"},{\\\"Country.Code\\\":\\\"AFG\\\",\\\"Country.Name\\\":\\\"Afghanistan\\\",\\\"Country.Continent\\\":\\\"Asia\\\",\\\"Country.Region\\\":\\\"Southern and Central Asia\\\",\\\"Country.SurfaceArea\\\":\\\"652090.0\\\",\\\"Country.IndepYear\\\":\\\"1919\\\",\\\"Country.Population\\\":\\\"22720000\\\",\\\"Country.LifeExpectancy\\\":\\\"45.900001525878906\\\",\\\"Country.GNP\\\":\\\"5976.0\\\",\\\"Country.GNPOld\\\":\\\"null\\\",\\\"Country.LocalName\\\":\\\"Afganistan/Afqanestan\\\",\\\"Country.GovernmentForm\\\":\\\"Islamic Emirate\\\",\\\"Country.HeadOfState\\\":\\\"Mohammad Omar\\\",\\\"Country.Capital\\\":\\\"1\\\",\\\"Country.Code2\\\":\\\"AF\\\",\\\"City.ID\\\":\\\"2\\\",\\\"City.Name\\\":\\\"Qandahar\\\",\\\"City.CountryCode\\\":\\\"AFG\\\",\\\"City.District\\\":\\\"Qandahar\\\",\\\"City.Population\\\":\\\"237500\\\",\\\"CountryLanguage.CountryCode\\\":\\\"AFG\\\",\\\"CountryLanguage.Language\\\":\\\"Balochi\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"0.8999999761581421\\\"},{\\\"Country.Code\\\":\\\"AFG\\\",\\\"Country.Name\\\":\\\"Afghanistan\\\",\\\"Country.Continent\\\":\\\"Asia\\\",\\\"Country.Region\\\":\\\"Southern and Central Asia\\\",\\\"Country.SurfaceArea\\\":\\\"652090.0\\\",\\\"Country.IndepYear\\\":\\\"1919\\\",\\\"Country.Population\\\":\\\"22720000\\\",\\\"Country.LifeExpectancy\\\":\\\"45.900001525878906\\\",\\\"Country.GNP\\\":\\\"5976.0\\\",\\\"Country.GNPOld\\\":\\\"null\\\",\\\"Country.LocalName\\\":\\\"Afganistan/Afqanestan\\\",\\\"Country.GovernmentForm\\\":\\\"Islamic Emirate\\\",\\\"Country.HeadOfState\\\":\\\"Mohammad Omar\\\",\\\"Country.Capital\\\":\\\"1\\\",\\\"Country.Code2\\\":\\\"AF\\\",\\\"City.ID\\\":\\\"3\\\",\\\"City.Name\\\":\\\"Herat\\\",\\\"City.CountryCode\\\":\\\"AFG\\\",\\\"City.District\\\":\\\"Herat\\\",\\\"City.Population\\\":\\\"186800\\\",\\\"CountryLanguage.CountryCode\\\":\\\"AFG\\\",\\\"CountryLanguage.Language\\\":\\\"Balochi\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"0.8999999761581421\\\"},{\\\"Country.Code\\\":\\\"AFG\\\",\\\"Country.Name\\\":\\\"Afghanistan\\\",\\\"Country.Continent\\\":\\\"Asia\\\",\\\"Country.Region\\\":\\\"Southern and Central Asia\\\",\\\"Country.SurfaceArea\\\":\\\"652090.0\\\",\\\"Country.IndepYear\\\":\\\"1919\\\",\\\"Country.Population\\\":\\\"22720000\\\",\\\"Country.LifeExpectancy\\\":\\\"45.900001525878906\\\",\\\"Country.GNP\\\":\\\"5976.0\\\",\\\"Country.GNPOld\\\":\\\"null\\\",\\\"Country.LocalName\\\":\\\"Afganistan/Afqanestan\\\",\\\"Country.GovernmentForm\\\":\\\"Islamic Emirate\\\",\\\"Country.HeadOfState\\\":\\\"Mohammad Omar\\\",\\\"Country.Capital\\\":\\\"1\\\",\\\"Country.Code2\\\":\\\"AF\\\",\\\"City.ID\\\":\\\"4\\\",\\\"City.Name\\\":\\\"Mazar-e-Sharif\\\",\\\"City.CountryCode\\\":\\\"AFG\\\",\\\"City.District\\\":\\\"Balkh\\\",\\\"City.Population\\\":\\\"127800\\\",\\\"CountryLanguage.CountryCode\\\":\\\"AFG\\\",\\\"CountryLanguage.Language\\\":\\\"Balochi\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"F\\\",\\\"CountryLanguage.Percentage\\\":\\\"0.8999999761581421\\\"},{\\\"Country.Code\\\":\\\"AFG\\\",\\\"Country.Name\\\":\\\"Afghanistan\\\",\\\"Country.Continent\\\":\\\"Asia\\\",\\\"Country.Region\\\":\\\"Southern and Central Asia\\\",\\\"Country.SurfaceArea\\\":\\\"652090.0\\\",\\\"Country.IndepYear\\\":\\\"1919\\\",\\\"Country.Population\\\":\\\"22720000\\\",\\\"Country.LifeExpectancy\\\":\\\"45.900001525878906\\\",\\\"Country.GNP\\\":\\\"5976.0\\\",\\\"Country.GNPOld\\\":\\\"null\\\",\\\"Country.LocalName\\\":\\\"Afganistan/Afqanestan\\\",\\\"Country.GovernmentForm\\\":\\\"Islamic Emirate\\\",\\\"Country.HeadOfState\\\":\\\"Mohammad Omar\\\",\\\"Country.Capital\\\":\\\"1\\\",\\\"Country.Code2\\\":\\\"AF\\\",\\\"City.ID\\\":\\\"1\\\",\\\"City.Name\\\":\\\"Kabul\\\",\\\"City.CountryCode\\\":\\\"AFG\\\",\\\"City.District\\\":\\\"Kabol\\\",\\\"City.Population\\\":\\\"1780000\\\",\\\"CountryLanguage.CountryCode\\\":\\\"AFG\\\",\\\"CountryLanguage.Language\\\":\\\"Dari\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"T\\\",\\\"CountryLanguage.Percentage\\\":\\\"32.099998474121094\\\"},{\\\"Country.Code\\\":\\\"AFG\\\",\\\"Country.Name\\\":\\\"Afghanistan\\\",\\\"Country.Continent\\\":\\\"Asia\\\",\\\"Country.Region\\\":\\\"Southern and Central Asia\\\",\\\"Country.SurfaceArea\\\":\\\"652090.0\\\",\\\"Country.IndepYear\\\":\\\"1919\\\",\\\"Country.Population\\\":\\\"22720000\\\",\\\"Country.LifeExpectancy\\\":\\\"45.900001525878906\\\",\\\"Country.GNP\\\":\\\"5976.0\\\",\\\"Country.GNPOld\\\":\\\"null\\\",\\\"Country.LocalName\\\":\\\"Afganistan/Afqanestan\\\",\\\"Country.GovernmentForm\\\":\\\"Islamic Emirate\\\",\\\"Country.HeadOfState\\\":\\\"Mohammad Omar\\\",\\\"Country.Capital\\\":\\\"1\\\",\\\"Country.Code2\\\":\\\"AF\\\",\\\"City.ID\\\":\\\"2\\\",\\\"City.Name\\\":\\\"Qandahar\\\",\\\"City.CountryCode\\\":\\\"AFG\\\",\\\"City.District\\\":\\\"Qandahar\\\",\\\"City.Population\\\":\\\"237500\\\",\\\"CountryLanguage.CountryCode\\\":\\\"AFG\\\",\\\"CountryLanguage.Language\\\":\\\"Dari\\\",\\\"CountryLanguage.IsOfficial\\\":\\\"T\\\",\\\"CountryLanguage.Percentage\\\":\\\"32.099998474121094\\\"}]}\");\n\t}", "@Override\r\n public void render(HttpServletRequest request, HttpServletResponse response, Object result) throws Throwable\r\n {\n \r\n }", "@Config(qualifiers = \"mcc999\")\n @Test\n public void layoutWithoutAnimation_shouldNotCrash() {\n setupActivity_onRearDevice();\n\n EnrollmentCallback enrollmentCallback = verifyAndCaptureEnrollmentCallback();\n enrollmentCallback.onEnrollmentProgress(123);\n enrollmentCallback.onEnrollmentError(FingerprintManager.FINGERPRINT_ERROR_CANCELED, \"test\");\n\n ShadowActivity shadowActivity = Shadows.shadowOf(mActivity);\n IntentForResult startedActivity =\n shadowActivity.getNextStartedActivityForResult();\n assertWithMessage(\"Next activity\").that(startedActivity).isNotNull();\n assertThat(startedActivity.intent.getComponent())\n .isEqualTo(new ComponentName(application, FingerprintEnrollEnrolling.class));\n }", "private void finalRenderToTexture() {\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glCullFace(GL11.GL_BACK);\n\t\tGL11.glColorMask(true, true, true, true);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP);\n\t\tGL11.glDepthMask(false);\n\t\tGL11.glEnable(GL11.GL_STENCIL_TEST);\n\n\t\t// ambient pass\n\t\tGL11.glStencilFunc(GL11.GL_NOTEQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 1);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\t// diffuse pass\n\t\tGL11.glStencilFunc(GL11.GL_EQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 0);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\tGL11.glDisable(GL11.GL_BLEND);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glDepthMask(true);\n\t\tGL11.glDisable(GL11.GL_STENCIL_TEST);\n\n\t\t// SCREEN POST PROCESSING\n\t\tscreenBuffer.copyPixels();\n\t}", "@Override\n\tpublic final boolean canRenderInPass( int pass )\n\t{\n\t\tRenderers.currentRenderPass = pass;\n\n\t\t// We render during both passes\n\t\treturn true;\n\t}", "public void testReportProducesCorrectOutput() throws Exception {\n try {\n final IOHelper iohelper = new IOHelper();\n final File outputFile = File.createTempFile(\"1070-codepoint-defaults-output\", \".json\");\n final OWLOntology o = generateOntologyWithLotsOfViolations();\n ReportOperation.report(o, iohelper, outputFile.toString(), Collections.emptyMap());\n } catch (YAMLException e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "@Override\r\n\tpublic void simpleRender(RenderManager rm) {\n\t}", "@Override\n public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)\n throws IOException {\n if (skipResponse == null || !skipResponse) {\n new RequestJaxRsContext(providers, requestContext).contextOrNew().getResponseHolder()\n .populateResponse(responseContext);\n }\n }", "@Override\n public void render() {\n\n renderer.prepWindowRender(globalGameData.getGameWindow());\n renderer.setRenderSpace(0,0,500,500);\n\n\n renderEnvironment(getMainCamera(),testPlayer.getPlayerEntity().getEntityView().getViewableRegions(), instancedGridMesh);\n renderer.enableTransparency();\n walkieTalkie.render(renderer,renderer.getRenderWidth());\n renderer.disableTransparency();\n\n\n\n renderer.setRenderSpace(500,0,500,500);\n if (currentPlayers.containsKey(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\"))) {\n renderEnvironment(getMainCamera(),currentPlayers.get(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\")).getEntityView().getViewableRegions(), instancedGridMesh);\n }\n\n renderer.setRenderSpace(1000,0,500,500);\n renderer.enableTransparency();\n renderer.render2DTextItems(debugItems, \"Default2D\");\n renderer.disableTransparency();\n\n /*\n if (currentPlayers.containsKey(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\"))) {\n renderer.setRenderSpace(500, 0, 500, 500);\n for (Region region : currentPlayers.get(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\")).getEntityView().getViewableRegions()) {\n for (Block block : region.getBlocksArray()) {\n if (block instanceof CustomRenderBlock) {\n ((CustomRenderBlock) block).renderCustomBlock(renderer, camera);\n }\n }\n for (Entity entity : region.getEntities()) {\n entity.render(renderer, camera);\n }\n }\n }\n */\n\n\n //renderer.setRenderSpace(500,0,280,500);\n //SpriteItem spriteItem = new SpriteItem(AssetLoader.getTextureAsset(\"Noise\"),280,500,true);\n //spriteItem.setPosition(0,0,0);\n //renderer.render2DSpriteItem(spriteItem,\"Default2D\");\n //spriteItem.cleanup();\n\n\n\n /*\n renderer.getShader(\"DebugShader2D\").bind();\n glActiveTexture(GL_TEXTURE1);\n glBindTexture(GL_TEXTURE_2D, shaderTestBitmap.getId());\n glActiveTexture(GL_TEXTURE2);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect1.getId());\n glActiveTexture(GL_TEXTURE3);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect2.getId());\n glActiveTexture(GL_TEXTURE4);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect3.getId());\n renderer.getShader(\"DebugShader2D\").setUniform(\"bitmap\", 1);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect1\", 2);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect2\", 3);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect3\", 4);\n i++;\n i %= 600;\n float framePercent = i / 600.0f;\n renderer.getShader(\"DebugShader2D\").setUniform(\"frame\", framePercent);\n System.out.println(i);\n shaderTest.setPosition((float)gameInput.getMouseX(),(float)gameInput.getMouseY(),0);\n renderer.render2DSprite(shaderTest, \"DebugShader2D\");\n */\n\n\n\n\n\n }", "public void checkOutputXML (IInternalContest contest) {\n \n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, new Properties(), log);\n \n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n \n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n }", "public void testClippingAfterLayoutInner() {\n SubviewsClippingTestModule subviewsClippingTestModule =\n getReactContext().getJSModule(SubviewsClippingTestModule.class);\n\n mEvents.clear();\n subviewsClippingTestModule.renderUpdatingSample1(false, false);\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(new String[] {\"Attach_outer\", \"Attach_inner2\"}, mEvents.toArray());\n\n mEvents.clear();\n subviewsClippingTestModule.renderUpdatingSample1(true, false);\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(new String[] {\"Attach_inner1\"}, mEvents.toArray());\n\n mEvents.clear();\n subviewsClippingTestModule.renderUpdatingSample1(true, true);\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(new String[] {\"Detach_inner2\"}, mEvents.toArray());\n }", "private void assertNotConsumed() {\n if (this.consumed) {\n throw new IllegalStateException(\"Response content has been already consumed\");\n }\n }", "@Test\n public void testCreateLabelInvoiceBarcode_isConsigneePresent_Success()\n {\n \t\n \ttry {\n \t\tlogger.info(\"Testing consignee presence-- Success. \");\n \t\tString fileName = \"./com/cts/ptms/carrier/yrc/resources/InputData_Standard_ConsigneePresent_Success.xml\";\n\t \tURL url = getClass().getClassLoader().getResource(fileName);\n\t\t\tshipmentRequest.setFileName(url.getFile());\n \t\tshipmentRequest.setCarrier(\"YRC\");\n\t \tshipmentRequest.setGenLabel(true);\n\t \tshipmentResponse = yrcSoapClient.createShipmentRequest(shipmentRequest);\n\t \t\n\t \tSystem.out.println(\"Status:\"+shipmentResponse );\n\t \tassertEquals(\"SUCCESS\", shipmentResponse.getStatus());\n\t \tList<ShipmentDocument> shipmentDocs = shipmentResponse.getShipmentDocuments();\n\t \tfor( ShipmentDocument shipmentDoc : shipmentDocs) {\n\t\t\t\tassertFalse(null == shipmentDoc.getDocumentContent());\n\t\t\t\tif (shipmentDoc.getDocumentTitle().equals(SHIPPINGLABEL)) {\n\t\t\t\t\t\n\t\t\t\t\tbyte[] decoded = Base64.getDecoder().decode(shipmentDoc.getDocumentContent());\n\t\t\t\t\tsaveBase64DataToLocalFile(decoded, shipmentResponse.getTrackingNumber()+\"_ConsigneeValidation_\"+shipmentDoc.getDocumentTitle());\n\t\t\t\t\tPdfReader reader = new PdfReader(decoded);\n\t\t\t\t\tSystem.out.println(\"This PDF has \"+reader.getNumberOfPages()+\" pages.\");\n\t\t\t String page = PdfTextExtractor.getTextFromPage(reader, 1);\n\t\t\t \n\t\t\t //assertTrue(page.contains(\"40\"));\n\t\t\t assertTrue(page.contains(\"AMAZON.COM\"));\n\t\t\t assertTrue(page.contains(\"1901 SE 10TH ST\"));\n\t\t\t assertTrue(page.contains(\"72716\"));\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t\t} else if (shipmentDoc.getDocumentTitle().equals(INVOICE)) {\n\t\t\t\t\tbyte[] decoded = Base64.getDecoder().decode(shipmentDoc.getDocumentContent());\n\t\t\t\t\tsaveBase64DataToLocalFile(decoded, shipmentResponse.getTrackingNumber()+\"_ConsigneeValidation_\"+shipmentDoc.getDocumentTitle());\n\t\t\t\t\tPdfReader reader = new PdfReader(decoded);\n\t\t\t\t\tSystem.out.println(\"This PDF has \"+reader.getNumberOfPages()+\" pages.\");\n\t\t\t String page = PdfTextExtractor.getTextFromPage(reader, 1);\n\t\t\t \n\t\t\t assertTrue(page.contains(\"AMAZON.COM\"));\n\t\t\t assertTrue(page.contains(\"1901 SE 10TH ST\"));\n\t\t\t assertTrue(page.contains(\"72716\"));\n\t\t\t \n\t\t\t\t} else {\n\t\t\t\t\tbyte[] decoded = Base64.getDecoder().decode(shipmentDoc.getDocumentContent());\n\t\t\t\t\tsaveBase64DataToLocalFile(decoded, shipmentResponse.getTrackingNumber()+\"_ConsigneeValidation_\"+shipmentDoc.getDocumentTitle());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n \t} \n\t\tcatch(Exception e)\n\t\t{\n\t\t\tassertEquals(\"Failure\", \"Failure\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Exception occured\"+e.getMessage());\n\t\t}\n \t\n }", "@Test(timeout = 4000)\n public void test224() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.hr();\n List<CharSequence> list0 = component0._getRenderHints();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertNotNull(list0);\n assertEquals(\"Any_1\", component0.getComponentId());\n assertEquals(1, list0.size());\n }", "@Override\n public void prepareRendering() {\n GL11.glClearStencil(0);\n GL11.glClear(GL11.GL_STENCIL_BUFFER_BIT);\n \n GlStateManager.enableDepthTest();\n GL11.glEnable(GL_STENCIL_TEST);\n \n IEFrameBuffer ieFrameBuffer = (IEFrameBuffer) client.getFramebuffer();\n if (!ieFrameBuffer.getIsStencilBufferEnabled()) {\n ieFrameBuffer.setIsStencilBufferEnabledAndReload(true);\n if (Minecraft.func_238218_y_()) {\n client.worldRenderer.loadRenderers();\n }\n }\n \n }", "@Override\n\tpublic void forceRender() {\n\n\t}", "@Test(expected = SamlProcessingException.class)\n\tpublic void testAuthnResponseAttacked2() throws Exception {\n\t\tthis.testAuthnResponseProcessingScenario1(this.responseAttacked2);\n\t}", "public void testPrintStackTracePrintWriter_False() {\n ByteArrayOutputStream ba = new ByteArrayOutputStream(); \n PrintWriter ps = new PrintWriter(ba, false);\n try {\n throw new Exception(\"level1\", new Exception(\"level2\", new Exception(\"level3\", new NullPointerException())));\n } catch (Exception e) {\n e.printStackTrace(ps);\n }\n assertEquals(\"the output should be empty until flush\",\n \"\", ba.toString());\n }", "@Test\r\n\tpublic void testShowStandings2() {\n\t\tassertTrue(\"Error displaying standings\", false);\r\n\t}", "public void drawNonEssentialComponents(){\n\t\t\n\t}", "@Test\n public void testStopSendingEditsWhenOutOfSync() throws Exception {\n Mockito.doThrow(new IOException(\"injected error\"))\n .when(mockProxy).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(1L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n\n try {\n ch.sendEdits(1L, 1L, 1, FAKE_DATA).get();\n fail(\"Injected JOOSE did not cause sendEdits() to throw\");\n } catch (ExecutionException ee) {\n GenericTestUtils.assertExceptionContains(\"injected\", ee);\n }\n Mockito.verify(mockProxy).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(1L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n\n assertTrue(ch.isOutOfSync());\n \n try {\n ch.sendEdits(1L, 2L, 1, FAKE_DATA).get();\n fail(\"sendEdits() should throw until next roll\");\n } catch (ExecutionException ee) {\n GenericTestUtils.assertExceptionContains(\"disabled until next roll\",\n ee.getCause());\n }\n \n // It should have failed without even sending the edits, since it was not sync.\n Mockito.verify(mockProxy, Mockito.never()).journal(\n Mockito.<RequestInfo>any(),\n Mockito.eq(1L), Mockito.eq(2L),\n Mockito.eq(1), Mockito.same(FAKE_DATA));\n // It should have sent a heartbeat instead.\n Mockito.verify(mockProxy).heartbeat(\n Mockito.<RequestInfo>any());\n \n // After a roll, sending new edits should not fail.\n ch.startLogSegment(3L, NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION).get();\n assertFalse(ch.isOutOfSync());\n\n ch.sendEdits(3L, 3L, 1, FAKE_DATA).get();\n }", "@Test\n public void testSubsystemCalledOnceForStateMatchNonMatch() throws Exception {\n\n Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> sponsorsAdmin3Attributes = new HashMap<>();\n List<FilterNode> filterNodes = new ArrayList<>();\n FilterNode sponsorsMatchNode = getSponsorsFilterNode(\"BDog\");\n FilterNode admin3MatchNode = getAdminsFilterNode(\"admin3\");\n filterNodes.add(admin3MatchNode);\n filterNodes.add(sponsorsMatchNode);\n sponsorsAdmin3Attributes.put(GREATESTHITS_MODELNODEID, new Pair<>(new ArrayList<>(), filterNodes));\n\n Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> sponsorsAttributes = new HashMap<>();\n sponsorsAttributes.put(GREATESTHITS_MODELNODEID, new Pair<>(new ArrayList<>(), Collections.singletonList(sponsorsMatchNode)));\n\n verifyGet(m_server, \"/getwithstatecontainertest/get-with-filter-admin-matchnode-sponsor-nonmatchnode.xml\",\n \"/getwithstatecontainertest/get-with-filter-admin-matchnode-sponsor-nonmatchnode-response.xml\", MESSAGE_ID);\n verify(m_adminSubSystem, times(1)).retrieveStateAttributes(Mockito.eq(sponsorsAdmin3Attributes), Mockito.any(NetconfQueryParams.class));\n verify(m_jukeboxSubsystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_librarySystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_choiceCaseSubSystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n\n /**\n * State Match Node : <admins>\n * <admin>\n * <label>admin8</label> -> Non match node\n * </admin>\n * </admins>\n * <sponsors>\n * <sponsor>\n * <name>BDog</name> -> Non match node\n * </sponsor>\n * </sponsors>\n */\n\n Map<ModelNodeId, Pair<List<QName>, List<FilterNode>>> sponsorsAdmin8Attributes = new HashMap<>();\n filterNodes = new ArrayList<>();\n FilterNode admin8MatchNode = getAdminsFilterNode(\"admin8\");\n filterNodes.add(admin8MatchNode);\n filterNodes.add(sponsorsMatchNode);\n sponsorsAdmin8Attributes.put(GREATESTHITS_MODELNODEID, new Pair<>(new ArrayList<>(), filterNodes));\n\n verifyGet(m_server, \"/getwithstatecontainertest/get-with-filter-admin-nonmatchnode-sponsor-nonmatchnode.xml\",\n \"/getwithstatecontainertest/get-with-filter-admin-nonmatchnode-sponsor-nonmatchnode-response.xml\", MESSAGE_ID);\n verify(m_adminSubSystem, times(1)).retrieveStateAttributes(Mockito.eq(sponsorsAdmin8Attributes), Mockito.any(NetconfQueryParams.class));\n verify(m_jukeboxSubsystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_librarySystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n verify(m_choiceCaseSubSystem, never()).retrieveStateAttributes(any(Map.class), any(NetconfQueryParams.class), any(StateAttributeGetContext.class));\n }", "public void testConversionsWithoutHandler()\n throws Exception\n {\n VelocityEngine ve = createEngine(false);\n\n testConversions(ve, \"test_conv.vtl\", \"test_conv_without_handler\");\n }", "@Override\n public boolean shouldContinueSwitchedRootFound() {\n return false;\n }", "public void test1152() throws Exception {\n try {\n invoke(createDispatchForNonAnonymousWithWSDLWithoutAddressing(),\n MESSAGES.getNonAnonymousReplyToNoneFaultToMessage(),\n S11_NS,\n getNonAnonymousEndpointAddress(),\n clientAddress,\n ECHO_IN_ACTION,\n \"fault-test1152\");\n fail(\"WebServiceException must be thrown\");\n } catch (WebServiceException e) {\n assertEquals(\"No response returned.\", e.getMessage());\n }\n }", "private void defaultInvoiceShouldNotBeFound(String filter) throws Exception {\n restInvoiceMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restInvoiceMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "public void testTransformWithNullDocument() throws Exception {\n try {\n instance.transform(element, null, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test\n @MediumTest\n @Feature({\"RenderTest\"})\n public void singleFrameDisplayTest() throws Exception {\n displayTest(false);\n mRenderTestRule.render(mPlayerManager.getView(), \"single_frame\");\n }", "static void renderPage(BasePage page,PrintWriter pw){\n try{\n page.$render(pw);\n }catch(Throwable ex){\n String pn = page.getPageName();\n $renderError(ex,pn,null,true, -1);\n }finally {\n page.request = null;\n } //try\n}", "@Test\n public void fallbackHandlerTest() {\n String result = fallbackBean.demonstrateFallbackHandler(true);\n Assert.assertTrue(\"Did not get the expected result\", result.equals(FallbackBean.expectedResponse));\n }" ]
[ "0.572113", "0.56976545", "0.56803936", "0.56707436", "0.55988324", "0.5449863", "0.5433896", "0.53644454", "0.5352272", "0.53061235", "0.52097064", "0.5192597", "0.5132681", "0.5126943", "0.5119177", "0.5094052", "0.5069992", "0.5063462", "0.5063462", "0.5063462", "0.5063462", "0.50549424", "0.5053697", "0.50478315", "0.5020666", "0.50061613", "0.49994424", "0.49681926", "0.49611276", "0.49578896", "0.49566904", "0.49505627", "0.49505627", "0.4944242", "0.4933651", "0.49322248", "0.4926788", "0.4926038", "0.49006107", "0.4887922", "0.4881132", "0.48645458", "0.4842905", "0.48347747", "0.48328537", "0.48233953", "0.48217696", "0.48143905", "0.4805307", "0.47813573", "0.47812906", "0.47695184", "0.47464922", "0.4722964", "0.47100022", "0.470989", "0.470989", "0.470989", "0.470989", "0.470989", "0.470989", "0.4708169", "0.46924114", "0.46915627", "0.4680878", "0.46655285", "0.4661086", "0.46554172", "0.46406728", "0.46405134", "0.46354094", "0.4632714", "0.46308035", "0.46275702", "0.4612648", "0.4595661", "0.4592384", "0.45725468", "0.45594743", "0.45439127", "0.45391178", "0.45383468", "0.45373997", "0.45364174", "0.45318902", "0.45282108", "0.45248008", "0.45175034", "0.4512753", "0.45114022", "0.45079052", "0.4507859", "0.45067704", "0.45061257", "0.4503782", "0.44969827", "0.44950077", "0.44937706", "0.44920364", "0.449131", "0.44879147" ]
0.0
-1
Set is a list of unique items... no duplication. I can have a product with an id but I can't have the same product with another id, I can change the quantity of the product, or some of its attributes
public long getCustomerId() { return customerId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int hashCode() {\n return Objects.hash(product, quantity);\n }", "private Set<Product> getProductSet(Product product) {\n\t\treturn get(product.getType(), product.getState(), product.getItemId());\n\t}", "public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }", "public List<ProductToBuyViewModel> filterProductsToBuyList(List<ProductToBuyViewModel> productList){\n\n List<ProductToBuyViewModel> filteredList = new ArrayList<>();\n for (int i = 0; i < productList.size(); i++) {\n ProductToBuyViewModel product = productList.get(i);\n\n ProductToBuyViewModel newProduct = new ProductToBuyViewModel();\n newProduct.setProductId(product.getProductId());\n newProduct.setQuantity(product.getQuantity());\n\n filteredList.add(newProduct);\n }\n\n //List with uniques inventoryId\n Set<Integer> productId = new HashSet<>();\n\n for(int i = 0; i < filteredList.size(); i++){\n\n ProductToBuyViewModel product = filteredList.get(i);\n Integer inId = product.getProductId();\n\n if(productId.add(inId) == false){\n\n int quantity = product.getQuantity();\n\n for(int x = 0; x < filteredList.size(); x++){\n\n ProductToBuyViewModel product2 = filteredList.get(x);\n\n if(product2.getProductId() == inId){\n\n product2.setQuantity(product2.getQuantity() + quantity);\n filteredList.remove(i);\n\n //To break the loop\n x = filteredList.size();\n }\n }\n i = -1;\n productId.clear();\n }\n }\n return filteredList;\n }", "public Set<JavaproductModel> getproductList(Set<JavaproductModel> SetOfproductList){\n\n /* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the list of product resources that are needed.*/\n String strHibernateQuery = \"FROM JavaproductModel\";\n Query hibernateQuery = hibernateSession.createQuery(strHibernateQuery);\n SetOfproductList = new HashSet(hibernateQuery.list());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return SetOfproductList;\n }", "public Set<ProductBarcode> getProducts();", "Set createSet();", "public Set<Product> getUniqueProductsInList() {\n return new HashSet<>(getProducts());\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Product)) {\r\n return false;\r\n }\r\n Product other = (Product) object;\r\n if (this.id != other.id) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void addStock(Product p, int n) {\nif (p.id < 0) return;\nif (n < 1) return;\n\nfor (int i = 0; i < productCatalog.size(); i++) {\nProductStockPair pair = productCatalog.get(i);\nif (pair.product.id == p.id) {\nproductCatalog.set(i, new ProductStockPair(p, pair.stock + n));\nreturn;\n}\n}\nproductCatalog.add(new ProductStockPair(p, n));\n}", "public Set removeDuplicateUsingSet() throws ComputationException {\n Set<Integer> uniqueSet = new HashSet<>();\n log.debug(\"Removing duplicate using Set......\");\n int[] intArray = getRandomArray();\n log.debug(\"Actual size of int array:\" + intArray.length);\n for (int i = 0; i < intArray.length; i++) {\n uniqueSet.add(intArray[i]);\n }\n log.debug(\"refined size of int array using Set: \" + uniqueSet.size());\n log.debug(Arrays.toString(uniqueSet.toArray()));\n return uniqueSet;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Product)) {\r\n return false;\r\n }\r\n Product other = (Product) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Test\n public void whenAddSeveralIdenticalElementsThenSetHasOnlyOneSuchElement() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(3);\n set.add(2);\n set.add(1);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}", "public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }", "MultiSet<X> add(X x);", "@Override\n public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n Product other = (Product) obj;\n if (id != other.getId()) {\n \treturn false; \t\n }\n return true;\n }", "@Test\n public void testGetProductsByPurcher() throws Exception {\n System.out.println(\"getProductsByPurcher\");\n Customer c = new Customer();\n c.setId(1l);\n prs = dao.getProductsByPurcher(c);\n assertTrue(prs.contains(p3));\n assertTrue(prs.size() == 1);\n c.setId(2l);\n prs = dao.getProductsByPurcher(c);\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n \n c.setId(3l);\n prs = dao.getProductsByPurcher(c);\n assertTrue(prs.isEmpty());\n }", "public static void main(String[] args) {\n Set<Integer> set = new HashSet<>();\n\n\n // elementy w secie nie są poukładane\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(4);\n set.add(5);\n set.add(5);\n set.add(5);\n set.add(null);\n set.add(null);\n System.out.println(set);// elementów: 6\n\n\n\n Set<String> setString = new HashSet<>();\n\n List<Integer> ar = new ArrayList<>();\n }", "protected static <T> Set<T> itemSet(T[] items) {\n return new HashSet<>(Arrays.asList(items));\n }", "public Set removeDuplicateUsingLinkedHashSet() throws ComputationException {\n Set<Integer> uniqueSet = new LinkedHashSet<>();\n log.debug(\"Removing duplicate using Linked Hash Set......\");\n int[] intArray = getRandomArray();\n log.debug(\"Actual size of int array:\" + intArray.length);\n for (int i = 0; i < intArray.length; i++) {\n uniqueSet.add(intArray[i]);\n }\n log.debug(\"refined size of int array using Set: \" + uniqueSet.size());\n log.debug(Arrays.toString(uniqueSet.toArray()));\n return uniqueSet;\n }", "public static void main(String[] args) {\n HashSet<Person> set = new HashSet<>();\n Person p1 = new Person(\"小妹妹\", 18);\n Person p2 = new Person(\"小妹妹\", 18);\n Person p3 = new Person(\"小妹妹\", 19);\n System.out.println(p1.hashCode());\n System.out.println(p2.hashCode());\n System.out.println(p1 == p2);\n System.out.println(p1.equals(p2));\n set.add(p1);\n set.add(p2);\n set.add(p3);\n System.out.println(set);\n }", "@Test\n\tpublic void testRepeatedInsert() {\n\t\tSetADT<String> items = new JavaSet<>();\n\t\titems.insert(\"A\");\n\t\titems.insert(\"B\");\n\t\titems.insert(\"C\");\n\t\titems.insert(\"C\");\n\t\t\n\t\t// No matter what, \"C\" can't be added twice.\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\t//double checking - same as for loop\n\t\titems.insert(\"C\");\n\t\tassertEquals(3, items.size());\n\t\t\n\t\tassertEquals(3, items.size());\n\t\tassertEquals(true, items.contains(\"A\"));\n\t\tassertEquals(true, items.contains(\"B\"));\n\t\tassertEquals(true, items.contains(\"C\"));\n\t\t\n\t}", "public RandomizedSet() {\n set = new HashSet<Integer>();\n }", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "@Test\n\tpublic void addSameValueTwice() {\n\t\tXSet xset = new XSet(3);\n\t\txset.add(1);\n\t\txset.add(1);\n\t\tassertTrue(xset.getSize() == 1);\n\t}", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n HashSet<Person> set = new HashSet<>(10);\n for (int i = 0; i < 10; i++) {\n set.add(new Person(\"person\" + i, i));\n }\n for (int i = 0; i < 10; i++) {\n set.add(new Person(\"person\", 15));\n }\n Person p1 = new Person(\"person\", 15);\n Person p2 = new Person(\"person\", 15);\n System.out.println(p1 + \" hascode: \" + p1.hashCode());\n System.out.println(p2 + \" hascode: \" + p2.hashCode());\n System.out.println(\"person1 equals person2 \" + p1.equals(p2));\n for (Person person : set) {\n System.out.println(person);\n }\n }", "private Set<Product> payloadToProductSet(LinkedHashMap body) { //throws Exception {\n //System.out.println(\"body: \" + body.toString());\n ArrayList arrayListProducts = (ArrayList) body.get(\"product\");\n //System.out.println(\"arrayList: \" + arrayListProducts);\n Set<Product> productSet = new HashSet<>();\n// try {\n arrayListProducts.forEach(\n productIndex -> {\n ((HashMap) productIndex).values().forEach(\n productValue -> {\n Product product = new Product();\n TreeMap<Tab, TreeMap<Category, TreeMap<Item, TreeSet<Tag>>>> tabMap = new TreeMap();\n //System.out.println(\"productValue: \" + productValue);\n ((HashMap) productValue).forEach(\n (substanceKey, substanceValue) -> {\n //System.out.println(\"substanceKey: \" + substanceKey);\n //System.out.println(\"substanceValue: \" + substanceValue);\n ((HashMap) substanceValue).values().forEach(\n tabArrayWrapped -> {\n //System.out.println(\"tabArrayWrapped: \" + tabArrayWrapped);\n ((ArrayList) tabArrayWrapped).forEach(\n tabArrayUnwrapped -> {\n //System.out.println(\"tabArrayUnwrapped: \" + tabArrayUnwrapped);\n ((HashMap) tabArrayUnwrapped).forEach(\n (tabKey, tabValue) -> {\n TreeMap<Category, TreeMap<Item, TreeSet<Tag>>> categoryMap = new TreeMap<>();\n //System.out.println(\"tabValue: \" + tabValue);\n ((HashMap) tabValue).values().forEach(\n categoryWrapped -> {\n //System.out.println(\"categoryWrapped: \" + categoryWrapped);\n ((ArrayList) categoryWrapped).forEach(\n categoryUnwrapped -> {\n //System.out.println(\"categoryUnwrapped: \" + categoryUnwrapped);\n ((HashMap) categoryUnwrapped).forEach(\n (categoryKey, categoryValue) -> {\n TreeMap<Item, TreeSet<Tag>> itemMap = new TreeMap();\n //System.out.println(\"categoryValue: \" + categoryValue);\n ((HashMap) categoryValue).values().forEach(\n itemWrapped -> {\n //System.out.println(\"itemWrapped: \" + itemWrapped);\n ((ArrayList) itemWrapped).forEach(\n itemUnwrapped -> {\n\n Item item = new Item();\n //System.out.println(\"itemUnwrapped: \" + itemUnwrapped);\n ((HashMap) itemUnwrapped).forEach(\n (itemKey, itemValue) -> {\n //System.out.println(\"itemKey: \" + itemKey + \" itemValue: \" + itemValue);\n if (itemKey.equals(\"Title\")) {\n item.setName(itemValue.toString());\n }\n if (itemKey.equals(\"Description\")) {\n item.setDescription(itemValue.toString());\n }\n if (itemKey.equals(\"Tag\")) {\n TreeSet<Tag> tagSet = new TreeSet();\n ((ArrayList) itemValue).forEach(tagName -> tagSet.add(new Tag(tagName.toString())));\n itemMap.put(item, tagSet);\n categoryMap.put(new Category(categoryKey.toString()), itemMap);\n tabMap.put(new Tab(tabKey.toString()), categoryMap);\n product.getProduct().put(new Substance(substanceKey.toString()), tabMap);\n productSet.add(product);\n }\n });\n });\n });\n });\n });\n });\n });\n });\n });\n });\n });\n });\n// }\n// catch (Exception ex){\n// System.out.println(\"Ex: \" + ex.getMessage());\n// }\n\n return productSet;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\n return false;\n }\n Producto other = (Producto) object;\n if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public interface Set<Type> {\r\n\r\n\t/**\r\n\t * Ensures that this set contains the specified item.\r\n\t * \r\n\t * @param item\r\n\t * - the item whose presence is ensured in this set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if the input item was actually inserted); otherwise, returns\r\n\t * false\r\n\t */\r\n\tpublic boolean add(Type item);\r\n\r\n\t/**\r\n\t * Ensures that this set contains all items in the specified collection.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items whose presence is ensured in this\r\n\t * set\r\n\t * @return true if this set changed as a result of this method call (that\r\n\t * is, if any item in the input collection was actually inserted);\r\n\t * otherwise, returns false\r\n\t */\r\n\tpublic boolean addAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Removes all items from this set. The set will be empty after this method\r\n\t * call.\r\n\t */\r\n\tpublic void clear();\r\n\r\n\t/**\r\n\t * Determines if there is an item in this set that is equal to the specified\r\n\t * item.\r\n\t * \r\n\t * @param item\r\n\t * - the item sought in this set\r\n\t * @return true if there is an item in this set that is equal to the input\r\n\t * item; otherwise, returns false\r\n\t */\r\n\tpublic boolean contains(Type item);\r\n\r\n\t/**\r\n\t * Determines if for each item in the specified collection, there is an item\r\n\t * in this set that is equal to it.\r\n\t * \r\n\t * @param items\r\n\t * - the collection of items sought in this set\r\n\t * @return true if for each item in the specified collection, there is an\r\n\t * item in this set that is equal to it; otherwise, returns false\r\n\t */\r\n\tpublic boolean containsAll(Collection<? extends Type> items);\r\n\r\n\t/**\r\n\t * Returns true if this set contains no items.\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n\t/**\r\n\t * Returns the number of items in this set.\r\n\t */\r\n\tpublic int size();\r\n}", "Boolean same(MultiSet<X> s);", "void add(Set<Card> cards);", "@Override\r\n\tpublic Set<Product> getSet(String category) throws ItemNotFoundException{\r\n\t\taddItems();\r\n\t\tSet<Product> targetSet=new HashSet<>();\r\n\r\n\t\tif((category.toLowerCase()).equals(\"food items\")){ //creating a set of food items\r\n\t\t\tfor(Product p:productSet) {\r\n\t\t\t\tif(p instanceof FoodItems) {\r\n\t\t\t\t\ttargetSet.add(p);\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse if((category.toLowerCase()).equals(\"apparels\")) {//creating a set of apparels\r\n\t\t\tfor(Product p:productSet) {\r\n\t\t\t\tif(p instanceof Apparels) {\r\n\t\t\t\t\ttargetSet.add(p);\r\n\t\t\t\t\t//System.out.print(p);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if((category.toLowerCase()).equals(\"electronics\")) {//creating a set of electronics\r\n\t\t\tfor(Product p:productSet) {\r\n\t\t\t\tif(p instanceof Electronics) {\r\n\t\t\t\t\ttargetSet.add(p);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tif (targetSet!=null) //thowing exception\r\n\t\t\treturn targetSet;\r\n\t\telse \r\n\t\t\tthrow new ItemNotFoundException(\"item not found\");\r\n\t\t\r\n\t}", "public PromoSetPack(){\r\n\t\tthis.Type = type.PROMO;\r\n\t\tthis.promo = new ArrayList<\t>();\r\n\t}", "public RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "public Set<IS> getFreItemSet();", "public RandomizedSet() {\n\n\n sub =new ArrayList<Integer>();\n hm=new HashMap<Integer,Integer>();\n rand =new Random();\n\n }", "public Item() {this.users = new HashSet<>();}", "public RandomizedSet() {\r\n set = new HashSet<>();\r\n }", "public RandomizedSet() {\n list = new HashSet<>();\n\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + itemCode;\n\t\tresult = prime * result + ((itemName == null) ? 0 : itemName.hashCode());\n\t\tresult = prime * result + ((material == null) ? 0 : material.hashCode());\n\t\tresult = prime * result + quantity;\n\t\tresult = prime * result + ((size == null) ? 0 : size.hashCode());\n\t\tresult = prime * result + unitPrice;\n\t\treturn result;\n\t}", "@Test\r\n\tpublic void testMultset() {\n\t\tMultiset<Integer> multiSet = HashMultiset.create();\r\n\t\tmultiSet.add(10);\r\n\t\tmultiSet.add(30);\r\n\t\tmultiSet.add(30);\r\n\t\tmultiSet.add(40);\r\n\r\n\t\tassertEquals(2, multiSet.count(30));\r\n\t\tassertEquals(4, multiSet.size());\r\n\t}", "public IdentificationSet() {\n map = new HashMap<>();\n init();\n }", "private static <T> Set<T> Create_UnModifiableSet_By_InputElements(@NonNull Set<T> set, @NonNull T... ts) {\n for (T t : ts) {\n set.add(t);\n }\n\n return Collections.unmodifiableSet(set);\n }", "public static HashSet<Integer> storeId()\n\t{\n\t\titemCode.add(1);\n\t\titemCode.add(2);\n\t\titemCode.add(3);\n\t\titemCode.add(4);\n\t\titemCode.add(5);\n\t\titemCode.add(6);\n\t\titemCode.add(7);\n\t\titemCode.add(8);\n\t\titemCode.add(9);\n\t\titemCode.add(10);\n\t\titemCode.add(11);\n\t\treturn itemCode;\n\t}", "@Override\n public int hashCode() {\n return Objects.hashCode(getId());\n }", "private Set<Product> getProductSet(ProductType type, ProductState state, int itemId) {\n\t\tif (typeMap.get(type).get(state).containsKey(itemId)) {\n\t\t\treturn typeMap.get(type).get(state).get(itemId);\n\t\t} else {\n\t\t\tif (state == ProductState.PENDING) {\n\t\t\t\tswitch (type) {\n\t\t\t\tcase BUY:\n\t\t\t\t\treturn new TreeSet<>(buyComparator);\n\t\t\t\tcase SELL:\n\t\t\t\t\treturn new TreeSet<>(sellComparator);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn new TreeSet<>();\n\t\t\t}\n\t\t}\n\t}", "public RandomizedSet() {\n set = new HashMap<>();\n list = new ArrayList<>();\n }", "@Override\n\tpublic Collection<Object> getItemIds() {\n\t\tHashSet<Object> filteredItemIds = new HashSet<Object>(super.getItemIds()),\n\t\t\t\titemIds = new HashSet<Object>(filteredItemIds);\n\t\tFilter filter = getAppliedFiltersAsConjunction();\n\t\tItem item = null;\n\t\tfor (Object itemId : itemIds) {\n\t\t\tif (itemId instanceof UUID) {\n\t\t\t\titem = getItem(itemId);\n\t\t\t\tif (item != null) {\n\t\t\t\t\tif (!filter.passesFilter(itemId, item)) {\n\t\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfilteredItemIds.remove(itemId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn filteredItemIds;\n\t}", "public RandomizedSet() {\n realSet = new HashSet<>();\n allSet = new Integer[10];\n random = new Random();\n }", "public static void main(String[] args) {\n HashSet<String> food = new HashSet<>();\n food.add(\"Sushi\");\n food.add(\"Sashimi\");\n food.add(\"Pizza\");\n food.add(\"Japadog\");\n food.add(\"Sushi\");\n System.out.println(food.size());\n\n HashSet<String> food2 = new HashSet<>();\n food2.add(\"Pizza\");\n food2.add(\"Pasta\");\n food2.add(\"Sushi\");\n food2.add(\"Taco\");\n food2.add(\"Burrito\");\n food2.add(\"Nachos\");\n food2.add(\"Feijoada\");\n food2.add(\"Coxinha\");\n// food.addAll(food2);\n// food.retainAll(food2); // common\n\n System.out.println(food);\n System.out.println(food.contains(\"Sushi\"));\n }", "@Override\n public int hashCode() {\n return Objects.hash(name, unit, price, minimum, numUnits);\n }", "public RandomizedSet() {\n m = new HashMap<>();\n l = new ArrayList<>();\n }", "public RandomizedSet() {\n list = new ArrayList<>();\n map = new HashMap<>();\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof Product) {\n\t\tProduct newProduct = (Product)obj;\n\t\t return this.getSKU() == newProduct.getSKU() ;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public int addItem(Itemset i);", "public static void main( String[] args )\n {\n OrderedSet set = new OrderedSet( true );\n set.add( new Integer( 6 ) );\n set.add( new Integer( 1 ) );\n set.add( new Integer( 4 ) );\n set.add( new Integer( 1 ) );\n System.out.println( set );\n System.out.println();\n\n System.out.println( \"Enumerate the OrderedSet\" );\n Enumeration e = set.elements();\n while ( e.hasMoreElements() )\n System.out.println( e.nextElement() );\n System.out.println();\n\n System.out.println( \"Iterate through the OrderedSet\" );\n for ( OrderedSetIterator i = set.begin(); !i.atEnd(); i.advance() )\n System.out.println( i.get() );\n System.out.println();\n\n System.out.println( \"Show that duplicates can be added.\" );\n set.add( new Integer( 8 ) );\n System.out.println( \"set = \" + set );\n\n set.add( new Integer( 4 ) );\n System.out.println( \"set = \" + set );\n }", "@Test\n public void testGetPropertyValueSet(){\n List<User> list = toList(//\n new User(2L),\n new User(5L),\n new User(5L));\n\n Set<Integer> set = CollectionsUtil.getPropertyValueSet(list, \"id\", Integer.class);\n assertThat(set, contains(2, 5));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ProductoClase)) {\n return false;\n }\n ProductoClase other = (ProductoClase) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Test\n\tpublic void testAddHash() {\n\t\t// add a new method for ordering\n\t\tMySet <String> s = loadSet();\n\t\ts.add(\"Alice\");\n\t\ts.add(\"Sue\");\n\t\ts.add(\"Bob\");\n\t\ts.add(\"Cindy\");\n\t\ts.add(\"Joe\");\n\t\t\n\t\tassertEquals(5, ((MyHashSet<String>)s).map.size());\n\t\t\n\t\t\t\n\t}", "@Test\n public void testAddCity_City03() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.243345, -8.674084), \"city0\", 28);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(cityTest);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "public RandomizedSet() {\n nums = new ArrayList<Integer>();\n location = new HashMap<Integer, Integer>();\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Produit)) {\r\n return false;\r\n }\r\n Produit other = (Produit) object;\r\n if (this.id != other.id) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Producto)) {\n return false;\n }\n return id != null && id.equals(((Producto) o).id);\n }", "public RandomizedSet() {\n map = new HashMap<Integer, Integer>();\n set = new ArrayList<Integer>();\n int validLength = 0;\n }", "public RandomizedSet() {\n data=new ArrayList<>();\n valueIndex=new HashMap<>();\n random=new Random();\n }", "@Test \r\n\t\tpublic void testinsertAll() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(list1);\r\n\t\t\t// create set = to unique values in list \r\n\t\t\ttestingSet2 = new IntegerSet(unique); \r\n\t\t\t// 2 set should be equal \r\n\t\t\t// assertEquals for these parameters is a deprecated method \r\n\t\t\tassertArrayEquals(testingSet.toArray(), testingSet2.toArray()); \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t}", "@Test\n\tpublic void getCostForDuplicateItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"banana\", 4);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(6, fc) == 0);\n\n\t}", "public interface Set {\n\n /**\n * Create an empty set.\n *\n * @return the empty set\n */\n static Set createEmpty() {\n return new EmptySet();\n }\n\n /**\n * Checks if the ASet is empty.\n *\n * @return true if the set is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Given an {@code Integer} {@code element} add the element to the set. If {@code element} is\n * already a member of the set, we perform no operation and return back the set intact.\n *\n * @param element the new element to add to the set\n *\n * @return a newly created set that contains {@code element} and the original elements of the set.\n */\n Set add(Integer element);\n\n /**\n * Given an {@code Integer} {@code element} returns {@code true} if the element is already in the\n * set and {@code false} otherwise.\n *\n * @param element the element to check\n *\n * @return true if {@code element} is in the set, false otherwise\n */\n Boolean contains(Integer element);\n\n /**\n * Return the size of the set.\n *\n * @return return the size of the set\n */\n Integer size();\n\n /**\n * Given an element {@code element} remove it from the this list if it exists.\n *\n * @param element the element to remove\n *\n * @return set without {@code element}\n */\n Set remove(Integer element);\n\n\n /**\n * Given a set {@code other} return a new set which is the set union between {@code this} set and\n * {@code other} set.\n *\n * @param other set to perform union\n *\n * @return set union of this and other\n */\n Set union(Set other);\n\n\n /**\n * Returns the set intersection between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform intersection with\n *\n * @return set intersection between {@code this} and {@code otherSet}\n */\n Set intersect(Set otherSet);\n\n\n /**\n * Returns the set difference between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform set difference with\n *\n * @return set difference between {@code this} and {@code otherSet}\n */\n Set difference(Set otherSet);\n\n\n /**\n * Returns true if {@code this} set is a subset of {@code otherSet}.\n *\n * @param otherSet the set to check against\n *\n * @return true if this is a subset of otherSet, false otherwise\n */\n Boolean subset(Set otherSet);\n\n\n}", "public static final HashSet set (Object ... items) {\r\n HashSet result = new HashSet();\r\n for (int i=0; i<items.length; i++) {\r\n result.add(items[i]);\r\n }\r\n return result;\r\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + id; \n return result;\n }", "@Test\n public void testCartItemSetters() {\n int quantity = 4;\n Product p = new Product(\"test-product\", 5, new Category(\"Category1\"));\n CartItem cartItem = new CartItem(p, quantity);\n cartItem.setProduct(new Product(\"test-product-2\", 1, new Category(\"Category2\")));\n cartItem.setQuantity(quantity + 1);\n assertNotEquals(cartItem.getProduct(), p);\n assertNotEquals(cartItem.getQuantity(), quantity);\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Product product = (Product) o;\n return Objects.equals(id, product.id) &&\n Objects.equals(name, product.name) &&\n Objects.equals(price, product.price) &&\n Objects.equals(description, product.description) &&\n Objects.equals(gallery, product.gallery) &&\n Objects.equals(orders, product.orders) &&\n Objects.equals(animalCategories, product.animalCategories);\n }", "public int hashCode()\n {\n// return this.getAdjustmentNumber();\n return this.getProductKey();\n }", "private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }", "private void createNewItemsetsFromPreviousOnes() {\n // by construction, all existing itemsets have the same size\n int currentSizeOfItemsets = itemsets.get(0).length;\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Creating itemsets of size {0} based on {1} itemsets of size {2}\", new Object[]{currentSizeOfItemsets + 1, itemsets.size(), currentSizeOfItemsets});\n\n HashMap<String, String[]> tempCandidates = new HashMap<>(); //temporary candidates\n\n // compare each pair of itemsets of size n-1\n for (int i = 0; i < itemsets.size(); i++) {\n for (int j = i + 1; j < itemsets.size(); j++) {\n String[] X = itemsets.get(i);\n String[] Y = itemsets.get(j);\n\n assert (X.length == Y.length);\n\n //make a string of the first n-2 tokens of the strings\n String[] newCand = new String[currentSizeOfItemsets + 1];\n for (int s = 0; s < newCand.length - 1; s++) {\n newCand[s] = X[s];\n }\n\n int ndifferent = 0;\n // then we find the missing value\n for (int s1 = 0; s1 < Y.length; s1++) {\n boolean found = false;\n // is Y[s1] in X?\n for (int s2 = 0; s2 < X.length; s2++) {\n if (X[s2].equals(Y[s1])) {\n found = true;\n break;\n }\n }\n if (!found) { // Y[s1] is not in X\n ndifferent++;\n // we put the missing value at the end of newCand\n newCand[newCand.length - 1] = Y[s1];\n }\n\n }\n\n // we have to find at least 1 different, otherwise it means that we have two times the same set in the existing candidates\n assert (ndifferent > 0);\n\n /*if (ndifferent==1) {\n \tArrays.sort(newCand);*/\n tempCandidates.put(Arrays.toString(newCand), newCand);\n //}\n }\n }\n\n //set the new itemsets\n itemsets = new ArrayList<>(tempCandidates.values());\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Created {0} unique itemsets of size {1}\", new Object[]{itemsets.size(), currentSizeOfItemsets + 1});\n\n }", "public void test_retainAll() {\r\n try {\r\n List<WrongHashCode> retain = new ArrayList<WrongHashCode>();\r\n retain.add(new WrongHashCode(\"1\"));\r\n \r\n Set<WrongHashCode> set = IdentityHashSet.create();\r\n set.add(new WrongHashCode(\"2\"));\r\n \r\n assertTrue(set.retainAll(retain));\r\n assertEquals(0, set.size());\r\n \r\n fail(\"retainAll works now, rewrite test\");\r\n } catch (UnsupportedOperationException e) {\r\n //passed\r\n }\r\n }", "@Override\n public int hashCode() {\n return 1;\n }", "@Test\n public void whenAddThreeDifferentElementsThenSetHasThreeTheSameElements() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + id;\n return result;\n }", "public RandomizedSet() {\n map = new HashMap<>();\n }", "public static void main(String[] args) {\n\t\tHashSet<String> obj = new HashSet<String>();\n\t\t\n\t\tobj.add(\"Apple\");\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\t//adding duplicate elements\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\tobj.add(null);\n\t\tobj.add(null);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\t\t\n\t}", "@Override\r\n public int hashCode() {\r\n final int prime = 31;\r\n int result = 1;\r\n result = prime * result + id;\r\n return result;\r\n }", "@Test\n public void AfterAddingDuplicatetheSizeShouldBeOne() throws MySetException {\n set.add(1);\n assertThat(set.size(), is(1));\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\r\n return false;\r\n }\r\n Producto other = (Producto) object;\r\n if ((this.idProducto == null && other.idProducto != null) || (this.idProducto != null && !this.idProducto.equals(other.idProducto))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object other) {\r\n return (other instanceof Product) && (id != null)\r\n ? id.equals(((Product) other).id)\r\n : (other == this);\r\n }", "public void testTypedCollection()\r\n\t{\r\n broker.beginTransaction();\r\n for (int i = 1; i < 4; i++)\r\n {\r\n ProductGroupWithTypedCollection example = new ProductGroupWithTypedCollection();\r\n example.setId(i);\r\n ProductGroupWithTypedCollection group =\r\n (ProductGroupWithTypedCollection) broker.getObjectByQuery(\r\n new QueryByIdentity(example));\r\n assertEquals(\"should be equal\", i, group.getId());\r\n //System.out.println(group + \"\\n\\n\");\r\n\r\n broker.delete(group);\r\n broker.store(group);\r\n }\r\n broker.commitTransaction();\r\n\t}", "@Override\n public int hashCode() {\n return this.id.hashCode();\n }", "public RandomizedSet() {\n this.valueToIndex = new HashMap<>();\n this.values = new ArrayList<>();\n this.random = new Random();\n }", "public void processLargeInList(Set values);", "@Override\n public int hashCode() {\n return Long.hashCode(this.getId());\n }", "private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }", "Set<String> getInventory();", "public static void main(String[] args) {\n/*\n * Implementações\n * Set notas = new HashSet(); --> antes do Java 5\n * HashSet<Double> notas = new HashSet<>();\n * Set<Double> notas = new HashSet<>(); //--> Generics (jdk5) - Diamond Operator(jdk7)\n * \n */\n\t\t//--> Set não aceita elementos duplicados \n//\t\tSet<Double> notas = Set.of(7d, 8.5, 9.3, 5d, 7d, 0d, 3.6); \t\t\n//\t\tnotas.add(1d);\n//\t\tnotas.add(1d);\n//\t\tSystem.out.println(notas);\n\t\t\n\t\t\tSystem.out.println(\"Crie um conjunto e adicione as notas:\");\n\t\t\t//Elementos serão impressos em ordem aleatória\n\t\t\t//Elementos duplicados não serão impressos\n\t\t\tSet<Double> notas = new HashSet<>(Arrays.asList(7d, 8.5, 9.3, 5d, 7d, 0d, 3.6));\n\t\t\tSystem.out.println(notas.toString());\n\t\t\t\n\t\t\t//indexOf --> Set não trabalha com indice, não é possível fazer a pesquisa\n//\t\t\tSystem.out.println(\"Exiba a posição da nota 5.0: \" + notas.indexOf(5.0));\n\n\t\t\t\t// não se trabalha com indice(posição) no Set\n//\t\t\t\tSystem.out.println(\"Adicione na lista a nota 8.0 na posição 4: \");\n\n\t\t\t\t// set --> não há como fazer atualizacao usando Set\n//\t\t\t\tSystem.out.println(\"Substitua a nota 5.0 pela nota 6.0:\");\n//\t\t\t\tnotas.set(notas.indexOf(5.0), 6.0);\n//\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t// contains --> retorna boolean (true or false) se determinado elemento existe\n\t\t\t\t// na lista\n\t\t\t\tSystem.out.println(\"Confira se a nota 5.0 está na lista: \" + notas.contains(5.0));\n\n\t\t\t\t// get --> não consegue executar o método em Set apenas em List\n//\t\t\t\tSystem.out.println(\"Exiba a terceira nota: \" + notas.get(2));\n//\t\t\t\tSystem.out.println(notas.toString());\n\t\t\t\t\n\t\t\t\t// Collections.min/max --> não existem métodos nativos em Set para\n\t\t\t\t// comparacao de valores minimos e maximos\n\t\t\t\t// porém sendo Set uma Collection\n\t\t\t\t// pode-se utilizar metodos de Collections na implementacao\n\t\t\t\tSystem.out.println(\"Exiba a menor nota: \" + Collections.min(notas));\n\t\t\t\t// Collections.max\n\t\t\t\tSystem.out.println(\"Exiba a maior nota: \" + Collections.max(notas));\n\t\t\t\t\n\t\t\t\t// Soma de valores\n\t\t\t\tIterator<Double> iterator = notas.iterator();\n\t\t\t\tDouble soma = 0d;\n\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\tDouble next = iterator.next();\n\t\t\t\t\tsoma += next;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Exiba a soma dos valores: \" + soma);\n\n\t\t\t\t// Media dos valores\n\t\t\t\tSystem.out.println(\"Exiba a média dos valores: \" + (soma / notas.size()));\n\n\t\t\t\t// remove --> pode ser usado para remocao pelo elemento ou indice\n\t\t\t\tSystem.out.println(\"Remova a nota 0.0\");\n\t\t\t\tnotas.remove(0.0); // remocao do elemento 0.0 ou 0d\n\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t// remove na posição --> não pode ser usado pois Set não é indexado\n//\t\t\t\tSystem.out.println(\"Remova a nota na posição 0\");\n//\t\t\t\tnotas.remove(0);\n//\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t// Remocao de uma colecao de elementos\n\t\t\t\tIterator<Double> iterator1 = notas.iterator();\n\t\t\t\twhile (iterator1.hasNext()) {\n\t\t\t\t\tDouble next = iterator1.next();\n\t\t\t\t\tif (next < 7)\n\t\t\t\t\t\titerator1.remove();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(notas);\n\n\t\t\t\t//Implementando o conjunto com LinkedHasSet\n\t\t\t\t//Exibir os elementos na ordem em que foram inseridos\n\t\t\t\tSystem.out.println(\"Exiba todas as notas na ordem em que foram inseridos:\");\n\t\t\t\tSet<Double> notas2 = new LinkedHashSet<>();\n\t\t\t\tnotas2.add(7.0);\n\t\t\t\tnotas2.add(8.5);\n\t\t\t\tnotas2.add(9.3);\n\t\t\t\tnotas2.add(5.0);\n\t\t\t\tnotas2.add(7.0);\n\t\t\t\tnotas2.add(0.0);\n\t\t\t\tnotas2.add(3.6);\n\t\t\t\t\n\t\t\t\tSystem.out.println(notas2);\n\n\t\t\t\t//Implementando o conjunto com TreeSet\n\t\t\t\t//Exibir os elementos na ordem crescente\n\t\t\t\tSystem.out.println(\"Exiba todas as notas na ordem crescente:\");\n\t\t\t\tSet<Double> notas3 = new TreeSet<>(notas2);\n\t\t\t\tSystem.out.println(notas3);\n\t\t\t\t\n\t\t\t\t// clear --> apagar um conjunto\t\t\n\t\t\t\tSystem.out.println(\"Apague todo o conjunto\"); \n\t\t\t\tnotas.clear();\n\t\t\t\tSystem.out.println(notas);\n\t\t\t\t\n\t\t\t\t// isEmpty --> retorna boolean (true or false) para validacao se a lista\n\t\t\t\t// encontra-se vazia ou nao\n\t\t\t\tSystem.out.println(\"Confira se o conjunto está vazio notas1: \" + notas.isEmpty());\n\t\t\t\tSystem.out.println(\"Confira se o conjunto está vazio notas2: \" + notas2.isEmpty());\n\t\t\t\tSystem.out.println(\"Confira se o conjunto está vazio: notas3\" + notas3.isEmpty());\n\t\t\t}", "@Override\n public int hashCode() {\n return Objects.hash(id);\n }", "public static void main(String[] args) {\n\t\tA1 a1=new A1(\"ram\",1,\"ram\");\n\t\tA1 a2=new A1(\"ram\",1,\"ram\");\n\t\tHashSet<A1> set=new HashSet<A1>();\n\t System.out.println(a1.getName());\n\t System.out.println(a2.getName());\n\t set.add(a1);\n\t set.add(a2);\n\t System.out.println(set.size());\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn getId();\n\t}", "@Override\n public boolean equals(Object object)\n {\n if (!(object instanceof ScStoreOrderItem))\n {\n return false;\n }\n ScStoreOrderItem other = (ScStoreOrderItem) object;\n if ((this.idItem == null && other.idItem != null) || (this.idItem != null && !this.idItem.equals(other.idItem)))\n {\n return false;\n }\n return true;\n }", "public static void powerSet(ArrayList<Integer> set) {\n HashSet<ArrayList<Integer>> output = new HashSet<ArrayList<Integer>>();\n output.add(new ArrayList<Integer>());\n for(Integer a : set) {\n HashSet<ArrayList<Integer>> new_subsets = new HashSet<ArrayList<Integer>>();\n ArrayList<Integer> el_set = new ArrayList<Integer>(a);\n new_subsets.add(el_set);\n for(ArrayList<Integer> subset: output) {\n ArrayList<Integer> new_subset = new ArrayList<Integer>(subset);\n new_subset.add(a);\n new_subsets.add(new_subset);\n }\n if(new_subsets.size() > 0) {\n output.addAll(new_subsets);\n }\n }\n for(ArrayList<Integer> subset: output) {\n System.out.print(\"{\");\n for(Integer el: subset) {\n System.out.print(el + \",\");\n }\n System.out.println(\"}\");\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Produto)) {\n return false;\n }\n Produto other = (Produto) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }" ]
[ "0.6531059", "0.62906134", "0.61590517", "0.6105416", "0.6045634", "0.60320777", "0.5944286", "0.5903926", "0.59013516", "0.5886527", "0.5881008", "0.5841194", "0.57838494", "0.57817155", "0.5759256", "0.57381845", "0.5732497", "0.57072246", "0.56951624", "0.56630945", "0.5659271", "0.5658203", "0.5638591", "0.55925953", "0.55887055", "0.5584922", "0.5581763", "0.5568813", "0.5565592", "0.5564937", "0.556405", "0.5561861", "0.55596423", "0.55586183", "0.55542344", "0.5552696", "0.55391276", "0.55384237", "0.55379385", "0.55344766", "0.5526083", "0.55210525", "0.5512829", "0.5511896", "0.5504434", "0.5500484", "0.54979074", "0.548299", "0.54793566", "0.5477674", "0.54718786", "0.5465413", "0.54619986", "0.54618", "0.5454533", "0.5451545", "0.54514223", "0.5426405", "0.5424894", "0.5422812", "0.5412941", "0.5411569", "0.5402911", "0.54015076", "0.5397991", "0.5392858", "0.5390892", "0.53691083", "0.53605926", "0.5356977", "0.5353332", "0.5350921", "0.53462416", "0.53461415", "0.5340673", "0.5335932", "0.53315824", "0.5326146", "0.53231287", "0.53207487", "0.5318138", "0.5315958", "0.53128344", "0.5308325", "0.5300965", "0.52999216", "0.5288194", "0.52874494", "0.5286688", "0.528575", "0.52849346", "0.5283992", "0.5280562", "0.5278094", "0.5278059", "0.5246116", "0.5243264", "0.52383846", "0.5237366", "0.52365834", "0.52354854" ]
0.0
-1
/ renamed from: tm reason: default package / compiled from: GoRoutePageListener
public interface tm<T, V> { void a(V v); void a(boolean z); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RouterListener {\n /**\n * Notification method to be invoked from CLI if a router changes\n * his states (becomes available/unavailable).\n *\n * @param routerName router name\n * @param available true/false\n */\n public void onRouterEvent(String routerName, boolean available);\n}", "@Override\n\tpublic void staticByViewListener() {\n\t\t\n\t}", "public void routingStarted(RoutingHeader routingHeader) {\n \n }", "public void routingStarted(RoutingHeader routingHeader) {\n \n }", "public interface FindDirectionListener {\n\n /**\n * Method initiates finding directions beetwen two points on the route (clean auxiliary variables)\n */\n void onStartFindDirection();\n\n /**\n * Method downloads url of polylines beetwen two points on the route\n */\n void onSucceedFindDirection(List<RouteBeetweenTwoPointsDTO> route);\n\n /**\n * Method is nesecery for selecting if the current position of user is on the route\n */\n void onStoreFindDirection();\n}", "public interface IListenerPresenter {\n void loadListen(Context context, boolean isFirst, String type, String page);\n\n void loadListen(Context context, boolean isFirst, String page);\n}", "public interface RouteProtocol {\n\n default void onBeforeLaunch(@NonNull Context context) {}\n default int getLaunchDelay() { return 0; }\n default boolean willActivityFinish() { return false; }\n @NonNull\n Intent getIntent(@NonNull Context context);\n}", "public interface OnLoadNextPageListener {\n\n void loadNextPage(int age);\n}", "public void addRoute(String attribute, TElement listener, String targetName);", "@Override\n public void getRoutes(LoadRouteCallback callback) {\n\n\n }", "public interface Router {\n final class BundleKeys {\n private BundleKeys() {\n }\n\n public static final String EMPLOYEE = \"employee\";\n }\n\n /**\n * This method enables navigation to {@link mk.pjonceski.empleyeemanager.ui.features.employee_details_feature.EmployeeDetailsActivity}\n *\n * @param data the extra data to be transferred.\n */\n void navigateToEmployeeDetailsActivity(@Nullable Bundle data);\n}", "public interface PageConnector {\n void onLastPage();\n void onNormalPage();\n}", "@Override\r\n\tpublic URLModule gotoPage(int page) {\n\t\treturn null;\r\n\t}", "public interface PageDispatcher {\n\t/**\n\t * Process a webpage\n\t * @param url The URL to process\n\t * @param link The link that was followed to get there\n\t */\n\tpublic void dispatch(URL url, Weblink link, long delay);\n\t\n\t/**\n\t * Register a redirect\n\t * @param oldURL The URL that was redirected\n\t * @param newURL The URL it was redirected to\n\t * @param delay The number of milliseconds to wait before loading the page\n\t */\n\tpublic void registerRedirect(String oldURL, String newURL);\n\t\n\t/**\n\t * Remove all traces of having crawled a URL\n\t * @param url the URL to remove\n\t */\n\tpublic void undispatchURL(String url);\n\t\n\t/**\n\t * Notify the dispatcher that a page has been parsed\n\t * @param page The final version of the page\n\t * @param link The link that was followed to reach the page\n\t */\n\tpublic void notifyPage(Webpage page, Weblink link);\n\t\n\t/**\n\t * Send a command to the Builders\n\t * @param cmd The Command to send\n\t */\n\tpublic void sendCommand(Command cmd);\n}", "@Override\n public void onRouteInfo(BNRGRouteInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onRouteInfo...... \");\n }", "@Override\n public void onAllRoutesCompleted() {\n\n }", "@Override\r\n\tpublic void mypage() {\n\t\t\r\n\t}", "@Override\n protected void onNextPageRequested(int page) {\n\n }", "@Override\n public void addDefaultRoutes() {\n super.addDefaultRoutes();\n addRoute( \"/user\", UserResponder.class );\n addRoute( \"/user/:id\", UserResponder.class );\n addRoute( \"/user/help\", GeneralResponder.class );\n addRoute( \"/general/:param1/:param2\", GeneralResponder.class );\n addRoute( \"/photos/:customer_id/:photo_id\", null );\n addRoute( \"/test\", String.class );\n addRoute( \"/interface\", Responder.class ); // this will cause an error\n addRoute( \"/toBeDeleted\", String.class );\n removeRoute( \"/toBeDeleted\" );\n addRoute( \"/stream\", StreamUrl.class );\n addRoute( \"/browse/(.)+\", StaticPageTestResponder.class, new File( \"src/test/resources\" ).getAbsoluteFile() );\n }", "public NavNodeInitialiserServletContextListener() {\n super();\n }", "@Override\n public void onStartNavi(int arg0) {\n\n }", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void onStartNavi(int arg0) {\n\r\n\t}", "@Override\n public void onRouteSelected(MediaRouter router, MediaRouter.RouteInfo info) {\n }", "private void gotoPage(String _page, HttpServletRequest _req, HttpServletResponse _res)\n throws IOException, ServletException {\n\n RequestDispatcher dispatcher = _req.getRequestDispatcher(_page);\n if (dispatcher != null)\n dispatcher.forward(_req, _res);\n\n }", "@Override\r\n\tpublic void onReCalculateRouteForTrafficJam() {\n\r\n\t}", "@Override\n\tpublic void service(Request request, Response response) {\n\t\tresponse.print(\"其他测试页面\");\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void visit(Page page) {\r\n\t\t// Some business logic I won't expose here\r\n\t\t// My boss won't be happy ;-)\r\n\t}", "public interface SpiderListener {\n\n public void onSuccess(Request request);\n\n public void onError(Request request, Throwable e);\n \n public void onAddRequestException(int pushResult, Request request);\n\n\tpublic void onExitWhenComplete();\n\n\tpublic void onWaitWhenComplete();\n}", "public void onRouterEvent(String routerName, boolean available);", "@Override\n\tpublic void onReCalculateRouteForTrafficJam() {\n\n\t}", "@Override\n\tpublic void onStartNavi(int arg0) {\n\n\t}", "Move listen(IListener ll);", "@Override\r\n\tpublic void navigate() {\n\t\t\r\n\t}", "private GuidoLocationListener() {}", "public interface EditPagesListener {\n /**\n * Called when a page was moved to a new position\n *\n * @param fromPageNum The page number from which the page moves\n * @param toPageNum The page number to which the page moves\n */\n void onPageMoved(int fromPageNum, int toPageNum);\n\n /**\n * Called when new pages were added to the document.\n *\n * @param pageList The list of pages added to the document\n */\n void onPagesAdded(List<Integer> pageList);\n }", "public interface WalkthroughViewListener {\n}", "public interface EndPointListener {\n /**\n * @param storeId\n * @param spaceId\n * @param contentId\n * @param backupContentId\n * @param localFilePath\n */\n void contentBackedUp(String storeId,\n String spaceId,\n String contentId,\n String backupContentId,\n String localFilePath);\n\n /**\n * @param storeId\n * @param spaceId\n * @param contentId\n * @param localFilePath\n */\n void contentAdded(String storeId,\n String spaceId,\n String contentId,\n String localFilePath);\n\n /**\n * @param storeId\n * @param spaceId\n * @param contentId\n * @param localFilePath\n */\n void contentUpdated(String storeId,\n String spaceId,\n String contentId,\n String localFilePath);\n\n /**\n * @param storeId\n * @param spaceId\n * @param contentId\n */\n void contentDeleted(String storeId,\n String spaceId,\n String contentId);\n\n /**\n * @param storeId\n * @param spaceId\n * @param contentId\n * @param absPath\n */\n void contentUpdateIgnored(String storeId,\n String spaceId,\n String contentId,\n String absPath);\n}", "interface URLEntryFieldListener {\n\n /**\n * A method to be called when the user has pressed the enter key indicating they wish to navigate to the URL they've\n * entered. Called only after URL verification is complete, so the url object is factually known to be a\n * genuine (by schema at least) URL that we can try to navigate to.\n */\n void urlFieldEnterKeyPressed();\n\n\n}", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "public interface IEvenListener {\n}", "@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}", "public interface OnRequestDetailsListen {\n}", "public interface RecipientListRouter extends Router {\n}", "@Override\n\tpublic void process(Page page) {\n\t\t\n\t}", "public interface IEndpointsListener {\n void onJokeTold(String joke);\n}", "public void addNPTListener(NPTListener l){}", "public interface Router {\n\t/**\n\t * @return\n\t * \t\trouting target information or null, if the URI didn't match\n\t */\n\tpublic RoutingTarget routeUri(HttpServletRequest request);\n\t\n\t/**\n\t * routers should be able to access the configuration and path resolver\n\t */\n\tpublic void setConfig(WeberknechtConf conf, AreaPathResolver areaPathResolver);\n}", "public void loadStartPage()\n\t{\n\t}", "@Override\r\n\tpublic void onArrivedWayPoint(int arg0) {\n\r\n\t}", "Point onPage();", "public interface ServiceRedirection {\n\n /**\n * The interface method implemented in the java files activity or Fragments for Success Response\n *\n * @param taskID the id based on which the relevant action is performed\n * @return none\n */\n\n void onSuccessRedirection(Response object, int taskID);\n\n /***\n * The interface method implemented in the java files activity or Fragments for Server Error Response\n * @param errorModel\n * @param taskID\n */\n void onServerErrorRedirection(ErrorModel errorModel, int taskID);\n\n /**\n * The interface method implemented in the java files activity or Fragments for Failure Response\n *\n * @param errorModel the error message to be displayed\n * @return none\n */\n void onFailureRedirection(ErrorModel errorModel);\n}", "interface ActionDelegate {\n\n void onRouteUrlsChanged();\n\n void onResetRouteUrls();\n\n void onSaveRouteUrls();\n }", "public interface PageChangedCallback {\n\n /**\n * 获取上一页的时候调用\n *\n * @return 获取结果\n */\n TurnStatus toPrevPage();\n\n /**\n * 获取下一页的时候调用\n *\n * @return 获取结果\n */\n TurnStatus toNextPage();\n}", "public int addRoute(RouteEntry rtEntry);", "@Override\n\tpublic void onCalculateRouteSuccess() {\n\t\tnaviActivity();\n\t}", "public interface Router {\n\n interface Message {\n /**\n * The reply-to header\n *\n * @return the reply-to header\n */\n default String replyTo() {\n return (String) metadata().get(\"reply-to\");\n }\n\n /**\n * The host header\n *\n * @return the host header\n */\n default String host() {\n return (String) metadata().get(\"x-host\");\n }\n\n /**\n * Get the name of the reply queue to send the message to\n *\n * @return the reply queue\n */\n default String replyQueue() {\n return (String) metadata().get(\"x-reply-queue\");\n }\n\n\n /**\n * The uri header\n *\n * @return the uri header\n */\n default String uri() {\n\n return (String) metadata().get(\"x-uri\");\n }\n\n /**\n * The scheme header\n *\n * @return the scheme header\n */\n default String scheme() {\n return (String) metadata().get(\"x-scheme\");\n }\n\n /**\n * The method header\n *\n * @return the method header\n */\n default String method() {\n String m = (String) metadata().get(\"x-method\");\n if (null == m) {\n m = \"get\";\n }\n return m.toLowerCase();\n }\n\n /**\n * Get the port... may be String, Number, or null\n *\n * @return get the port\n */\n default Object port() {\n return metadata().get(\"server-port\");\n }\n\n /**\n * get the protocol for the request\n *\n * @return\n */\n default String protocol() {\n return (String) metadata().get(\"x-server-protocol\");\n }\n\n /**\n * Get the uri args for the request\n *\n * @return the uri args for the request\n */\n default String args() {\n return (String) metadata().get(\"x-uri-args\");\n }\n\n /**\n * The content-type header\n *\n * @return the content-type header\n */\n default String contentType() {\n return (String) metadata().get(\"content-type\");\n }\n\n /**\n * The remote address of the client\n *\n * @return remote address\n */\n default String remoteAddr() {\n return (String) metadata().get(\"x-remote-addr\");\n }\n\n /**\n * The\n *\n * @return\n */\n Map<String, Object> metadata();\n\n Object body();\n\n byte[] rawBody();\n\n MessageBroker.ReceivedMessage underlyingMessage();\n }\n\n /**\n * Convert the message from the more generic one from the MessageBroker into\n * something that can be routed\n *\n * @param message\n * @return\n */\n default Message brokerMessageToRouterMessage(MessageBroker.ReceivedMessage message) {\n return new Message() {\n\n @Override\n public Map<String, Object> metadata() {\n return message.metadata();\n }\n\n @Override\n public Object body() {\n return message.body();\n }\n\n @Override\n public byte[] rawBody() {\n return message.rawBody();\n }\n\n @Override\n public MessageBroker.ReceivedMessage underlyingMessage() {\n return message;\n }\n };\n }\n\n /**\n * Route the message. This may cause the message to be queued to the next handler (Runner)\n * or route it to the handler Func.\n *\n * @param message the Message to route\n * @return the result of the Message application or void if this Router forwards the message\n */\n Object routeMessage(Message message) throws IOException;\n\n\n /**\n * Release any resources that the Router has... for example, any database pool connections\n */\n void endLife();\n\n /**\n * Get the host that this Router is listening for\n *\n * @return the name of the host. May be null\n */\n String host();\n\n /**\n * Get the base path for this Router\n *\n * @return the base path for the router\n */\n String basePath();\n\n /**\n * Return the name of the queue that is associated with the host/path combination\n *\n * @return the name of the queue associated with the host/path combination\n */\n String nameOfListenQueue();\n\n /**\n * Get the swagger for this Router\n *\n * @return the Swagger information for the router\n */\n Map<String, Object> swagger();\n\n}", "@Override\n public void onRoutePlanFailed() {\n\n }", "public interface OnArrivalListener {\n void onDestinationArrived();\n}", "@Override\n public void onArrivedWayPoint(int arg0) {\n\n }", "@Override public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n\n }", "@Override\n\tpublic void onPageSelected(int arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onPageSelected(int arg0) {\n\t\t\n\t}", "public static interface OnVisitListener {\n void onVisit(final Context context,\n final int id,\n final String label,\n final int hour,\n final int minutes,\n final int atTimeInMillis,\n final int repeatOnDaysCode,\n final boolean enabled,\n final String handler,\n final String extra);\n }", "public void onDescriptorChanged(MediaRouteProvider provider,\n RouteProviderDescriptor descriptor) {\n }", "@Override\n public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n }", "void pharmacyListener(){\n \n }", "public abstract void addCustomPages();", "@Override\n\tpublic void preServe() {\n\n\t}", "public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException\n {\n try\n {\n String pathInfo = request.getPathInfo();\n String servletPath = request.getServletPath();\n String contextPath = request.getContextPath();\n \n if (nullPathInfoWorkaround && pathInfo == null)\n {\n pathInfo = request.getServletPath();\n servletPath = PathConstants.PATH_ROOT;\n log.debug(\"Default servlet suspected. pathInfo=\" + pathInfo + \"; contextPath=\" + contextPath + \"; servletPath=\" + servletPath); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n }\n \n if (pathInfo == null ||\n pathInfo.length() == 0 ||\n pathInfo.equals(PathConstants.PATH_ROOT))\n {\n response.sendRedirect(contextPath + servletPath + PathConstants.FILE_INDEX);\n }\n else if (pathInfo.startsWith(PathConstants.FILE_INDEX))\n {\n String page = debugPageGenerator.generateIndexPage(contextPath + servletPath);\n \n response.setContentType(MimeConstants.MIME_HTML);\n PrintWriter out = response.getWriter();\n out.print(page);\n response.flushBuffer();\n }\n else if (pathInfo.startsWith(PathConstants.PATH_TEST))\n {\n String scriptName = pathInfo;\n scriptName = LocalUtil.replace(scriptName, PathConstants.PATH_TEST, \"\"); //$NON-NLS-1$\n scriptName = LocalUtil.replace(scriptName, PathConstants.PATH_ROOT, \"\"); //$NON-NLS-1$\n \n String page = debugPageGenerator.generateTestPage(contextPath + servletPath, scriptName);\n \n response.setContentType(MimeConstants.MIME_HTML);\n PrintWriter out = response.getWriter();\n out.print(page);\n response.flushBuffer();\n }\n else if (pathInfo.startsWith(PathConstants.PATH_INTERFACE))\n {\n String scriptName = pathInfo;\n scriptName = LocalUtil.replace(scriptName, PathConstants.PATH_INTERFACE, \"\"); //$NON-NLS-1$\n scriptName = LocalUtil.replace(scriptName, PathConstants.EXTENSION_JS, \"\"); //$NON-NLS-1$\n String path = contextPath + servletPath;\n \n String script = remoter.generateInterfaceScript(scriptName, path);\n \n // Officially we should use MimeConstants.MIME_JS, but if we cheat and\n // use MimeConstants.MIME_PLAIN then it will be easier to read in a\n // browser window, and will still work just fine.\n response.setContentType(MimeConstants.MIME_PLAIN);\n PrintWriter out = response.getWriter();\n out.print(script);\n response.flushBuffer();\n }\n else if (pathInfo.startsWith(PathConstants.PATH_PLAINJS))\n {\n Calls calls = plainJsMarshaller.marshallInbound(request, response);\n Replies replies = remoter.execute(calls);\n plainJsMarshaller.marshallOutbound(replies, request, response);\n }\n else if (pathInfo.startsWith(PathConstants.PATH_HTMLJS))\n {\n Calls calls = htmlJsMarshaller.marshallInbound(request, response);\n Replies replies = remoter.execute(calls);\n htmlJsMarshaller.marshallOutbound(replies, request, response);\n }\n else if (pathInfo.equalsIgnoreCase(PathConstants.FILE_ENGINE))\n {\n doFile(request, response, PathConstants.FILE_ENGINE, MimeConstants.MIME_JS, true);\n }\n else if (pathInfo.equalsIgnoreCase(PathConstants.FILE_UTIL))\n {\n doFile(request, response, PathConstants.FILE_UTIL, MimeConstants.MIME_JS, false);\n }\n else if (pathInfo.startsWith(PathConstants.PATH_STATUS))\n {\n Container container = WebContextFactory.get().getContainer();\n ScriptSessionManager manager = (ScriptSessionManager) container.getBean(ScriptSessionManager.class.getName());\n if (manager instanceof DefaultScriptSessionManager)\n {\n DefaultScriptSessionManager dssm = (DefaultScriptSessionManager) manager;\n dssm.debug();\n }\n }\n else\n {\n log.warn(\"Page not found (\" + pathInfo + \"). In debug/test mode try viewing /[WEB-APP]/dwr/\"); //$NON-NLS-1$ //$NON-NLS-2$\n response.sendError(HttpServletResponse.SC_NOT_FOUND);\n }\n }\n catch (Exception ex)\n {\n log.warn(\"Error: \" + ex); //$NON-NLS-1$\n if (ex instanceof SecurityException && log.isDebugEnabled())\n {\n log.debug(\"- User Agent: \" + request.getHeader(HttpConstants.HEADER_USER_AGENT)); //$NON-NLS-1$\n log.debug(\"- Remote IP: \" + request.getRemoteAddr()); //$NON-NLS-1$\n log.debug(\"- Request URL:\" + request.getRequestURL()); //$NON-NLS-1$\n log.debug(\"- Query: \" + request.getQueryString()); //$NON-NLS-1$\n log.debug(\"- Method: \" + request.getMethod()); //$NON-NLS-1$\n \n ex.printStackTrace();\n }\n \n response.setContentType(MimeConstants.MIME_HTML);\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n PrintWriter out = response.getWriter();\n out.println(\"<html><head><title>Error</title</head><body>\"); //$NON-NLS-1$\n out.println(\"<p><b>Error</b>: \" + ex.getMessage() + \"</p>\"); //$NON-NLS-1$ //$NON-NLS-2$\n out.println(\"<p>For further information about DWR see:</p><ul>\"); //$NON-NLS-1$\n out.println(\"<li><a href='http://getahead.ltd.uk/dwr/documentation'>DWR Documentation</a></li>\"); //$NON-NLS-1$\n out.println(\"<li><a href='http://getahead.ltd.uk/dwr/support'>DWR Mailing List</a></li>\"); //$NON-NLS-1$\n out.println(\"</ul>\"); //$NON-NLS-1$\n out.println(\"<script type='text/javascript'>\"); //$NON-NLS-1$\n out.println(\"alert('\" + ex.getMessage() + \"');\"); //$NON-NLS-1$ //$NON-NLS-2$\n out.println(\"</script>\"); //$NON-NLS-1$\n out.println(\"</body></html>\"); //$NON-NLS-1$\n out.flush();\n }\n }", "public interface IMainRouter {\n\n\t/**\n\t * Method to run wallet tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToWalletTab(FragmentActivity activity);\n\n\t/**\n\t * Method to run transactions history tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToHistoryTab(FragmentActivity activity);\n\n\t/**\n\t * Method to run user contacts tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToContactsTab(FragmentActivity activity);\n\n\t/**\n\t * Method to open settings tab.\n\t *\n\t * @param activity activity that hold fragment\n\t */\n\tvoid goToSettingsTab(FragmentActivity activity);\n\n\t/**\n\t * Method to open import or create wallet screen.\n\t *\n\t * @param context context\n\t */\n\tvoid openImportOrCreate(Context context);\n}", "public interface Listener {}", "@Override\n\tpublic void onArrivedWayPoint(int arg0) {\n\n\t}", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();", "@Override\n\tpublic void getListener(){\n\t}", "@Override\n\tpublic void onGetIndoorRouteResult(IndoorRouteResult arg0) {\n\n\t}", "PageAgent getPage();", "@Override\nprotected void doPage(Frame frame,Circuit circuit, IPlug plug, PageContext ctx) {\n\t\n}", "private void goOnPage(final HttpServletRequest request, final HttpServletResponse response, String goToPage,\n\t\t\tfinal String methodName) throws ServletException, IOException {\n\t\tRequestDispatcher dispatcher = null;\n\t\ttry {\n\t\t\tif (goToPage == null) {\n\t\t\t\tgoToPage = ServiceJspPagePath.PATH_HR_PAGE;\n\t\t\t\tdispatcher = request.getRequestDispatcher(goToPage);\n\t\t\t\tdispatcher.forward(request, response);\n\t\t\t} else {\n\t\t\t\tresponse.sendRedirect(goToPage);\n\t\t\t}\n\t\t} catch (ServletException | IOException e) {\n\t\t\tlogger.error(\"ServiceHrImpl: \" + methodName + \": \", e);\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onPageSelected(int arg0) {\n\t\t\t\t\n\t\t\t}", "public interface LiveHostEvents extends LiveEvents{\n /** Live infomation\n * @param strUrl Rtmp/Hls url\n * @param strSessionId SessionId\n */\n public void OnRtcLiveInfomation(String strUrl, String strSessionId);\n\n /** Guest want to line with you\n * @param strPeerId Peer's ID\n * @param strUserName Peer's user name\n * @param strBrief A brief\n */\n public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);\n\n /** Guest cancel line apply\n * @param strPeerId Peer's ID\n * @param strUserName Peer's user name\n */\n public void OnRtcLiveCancelLine(String strPeerId, String strUserName);\n}", "public interface IRouter {\n\n void start(RouterContext routerContext);\n\n}", "@Override\n public void addHandlerListener(IHandlerListener handlerListener) {\n\n }", "private static interface Service {}", "protected void installListeners() {\n\n\t}", "@Override\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"Request routed to servlet\");\n//\t\tresp.().println(\"<!DOCTYPE html><html><head></head><body><h1>Hello!</h1></body></html>\");\n\t\tsuper.service(req, resp);\n\t}", "void onPageMoved(int fromPageNum, int toPageNum);", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "@Override\n public String getServletInfo() {\n return \"Louie Info Home\";\n }", "public native com.johnholdsworth.swiftbindings.SwiftHelloTypes.ListenerMap __testMap( long __swiftObject, com.johnholdsworth.swiftbindings.SwiftHelloTypes.ListenerMap arg );", "void mo9949a(StatusListener eVar);", "public interface HttpListener {\r\n /**\r\n * 请求成功\r\n * @param response 响应数据\r\n */\r\n void onSucceed(Response response);\r\n\r\n /**\r\n * 请求失败\r\n * @param e\r\n */\r\n void onFailed(Exception e);\r\n}", "@Override\r\n\tpublic void onPageSelected(int arg0) {\n\r\n\t}", "@Override\r\n public Class<? extends SdlRouterService> defineLocalSdlRouterClass() {\n return com.lz.proxytestdemo.sdlapp.SdlRouterService.class;\r\n }", "@Override\n\tpublic void addHandlerListener(IHandlerListener handlerListener) {\n\n\t}", "@Override\n\tpublic void onPageSelected(int arg0) {\n\n\t}", "@Override\n\tpublic void onPageSelected(int arg0) {\n\n\t}" ]
[ "0.57247174", "0.54991394", "0.5497859", "0.5497859", "0.5440424", "0.5362493", "0.53451025", "0.5277411", "0.5256582", "0.5255934", "0.5228819", "0.51849365", "0.51835316", "0.51561385", "0.51403165", "0.5119282", "0.50910187", "0.5073891", "0.5066348", "0.5064031", "0.506184", "0.50541204", "0.5040964", "0.5040334", "0.5031454", "0.500886", "0.49910927", "0.49837303", "0.49724084", "0.496962", "0.49516907", "0.49493694", "0.49430972", "0.49409303", "0.49297234", "0.49162218", "0.49117547", "0.4907072", "0.48784465", "0.48676026", "0.4858111", "0.48552614", "0.4851192", "0.484906", "0.48484302", "0.48449308", "0.48362064", "0.4835003", "0.4830357", "0.48246378", "0.48194826", "0.48098758", "0.4808753", "0.48084494", "0.4802273", "0.47997564", "0.47949782", "0.4788957", "0.4788243", "0.4779365", "0.47777003", "0.47743726", "0.47735152", "0.47735152", "0.47658843", "0.47656795", "0.47643456", "0.47643182", "0.47620258", "0.4758041", "0.47562662", "0.47519857", "0.47503516", "0.47473246", "0.47432294", "0.47432294", "0.47432294", "0.47416046", "0.47357976", "0.4730083", "0.472766", "0.47121847", "0.4711592", "0.4711592", "0.4705074", "0.47021395", "0.47017834", "0.46991637", "0.46959886", "0.46953464", "0.46906686", "0.46798542", "0.46749142", "0.46742097", "0.46739247", "0.46735188", "0.4664582", "0.46599984", "0.46580875", "0.4655624", "0.4655624" ]
0.0
-1
/ public javaart.create_class_instance_by_5_methods.Book(); Code: 0: aload_0 1: invokespecial 1 // Method java/lang/Object."":()V 4: return
public Book(String name, int pages, int date, String type) { this.name = name; this.pages = pages; this.date = date; this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] arguments){\n Book AtlasShrugged = new Book(\"Atlas Shrugged\");\n// Book HungerGames = new Book(\"Hunger Games\");\n// CatinHat.WhatBook();\n AtlasShrugged.WhatBook();\n AtlasShrugged.CheckAvailable();\n// CatinHat.CheckAvailable();\n// HungerGames.CheckAvailable();\n //cant return total number of book instances, i would have to call out an instance to return a value.\n //System.out.println(book.length);\n\n //CatinHat.CheckIn();\n\n //AtlasShrugged.CheckIn();\n //CatinHat.CheckOut();\n AtlasShrugged.CheckOut();\n AtlasShrugged.CheckAvailable();\n AtlasShrugged.CheckIn();\n AtlasShrugged.CheckAvailable();\n //AtlasShrugged.CheckOut();\n \n// Book TheDaVinciCode = new Book(\"The Da Vinci Code\");\n// Book LePetitPrince = new Book(\"Le Petit Prince\");\n// Book ATaleofTwoCities = new Book(\"A Tale of Two Cities\");\n// Book TheLordofTheRings = new Book(\"The Lord of The Rings\");\n// TheDaVinciCode.WhatBook();\n// LePetitPrince.WhatBook();\n \n}", "Book createBook();", "void create(Book book);", "NewClass1 createNewClass1();", "public static void main(String[] args){\r\n\t\tnew Book();\r\n\t}", "public static void main(String[] args) {\n\t//Class name variable - new ClassName(); \n\t\n Car car1=new Car(); // we create a new object by using NEW\n \n //1 Object\n System.out.println(\"---------The first object----------\");\n car1.make=\"Honda\"; //you assign features according to their data type specified in template\n car1.model=\"Civic\"; //we can identify because this object has its unique features\n car1.color=\"Silver\";\n car1.door=4;\n car1.wheels=4; \n \n System.out.println(\"Car \"+car1.make+\" has \"+car1.wheels+\" wheels\");\n // define behavior \n car1.drive(); // if we debug when we run drive will search for same method -> it will jump to line 39\n\t\tcar1.reverse();\n\t\tcar1.honk(); \n \n //2 Object\n Car car2 = new Car();\n System.out.println(\"---------The second object---------\");\n car2.make=\"Tesla\";\n car2.model=\"X\";\n car2.color=\"Blue\";\n car2.door=4;\n car2.wheels=4;\n System.out.println(\"My car is \"+car2.color+ \" \"+car2.make);\n // define behavior\n car2.drive();\n car2.reverse();\n car2.honk();\n}", "private java.lang.reflect.Method m16124a(java.lang.Class r3, java.lang.String r4, java.lang.Class[] r5) {\n /*\n r2 = this;\n r0 = 0\n if (r3 == 0) goto L_0x0028\n boolean r1 = r2.m16125a((java.lang.Object) r4)\n if (r1 == 0) goto L_0x000a\n goto L_0x0028\n L_0x000a:\n r3.getMethods() // Catch:{ Exception -> 0x0015 }\n r3.getDeclaredMethods() // Catch:{ Exception -> 0x0015 }\n java.lang.reflect.Method r3 = r3.getDeclaredMethod(r4, r5) // Catch:{ Exception -> 0x0015 }\n return r3\n L_0x0015:\n java.lang.reflect.Method r3 = r3.getMethod(r4, r5) // Catch:{ Exception -> 0x001a }\n return r3\n L_0x001a:\n java.lang.Class r1 = r3.getSuperclass()\n if (r1 == 0) goto L_0x0028\n java.lang.Class r3 = r3.getSuperclass()\n java.lang.reflect.Method r0 = r2.m16124a((java.lang.Class) r3, (java.lang.String) r4, (java.lang.Class[]) r5)\n L_0x0028:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.shortcutbadger.impl.OPPOHomeBader.m16124a(java.lang.Class, java.lang.String, java.lang.Class[]):java.lang.reflect.Method\");\n }", "public static void main(String[] args)\n\t{\n\t\tJavaClass jc=new JavaClass();\n\t\tjc.name=null;\n\t\tjc.id=0;\n\t\t//constructor\n\t\tJavaClass jc2=new JavaClass();\n\t\t//method\n\t\tJavaClass jc3=new JavaClass();\n\t\tjc3.intiailize();\n\t\t\n\t\t//anonymous object\n\t\tnew JavaClass().intiailize();\n\t\n\t\t//copy constructor\n\t\t\n\t\tJavaClass copyConstructor=new JavaClass(jc2);\n\t\tSystem.out.println(copyConstructor.name);\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\tBook b2=Book.getinstanceof();\r\n\t\t\t\r\n\t\t\tBook b3=Book.getinstanceof();\r\n\t\t\tSystem.out.println(b2==b3);\r\n\t\t\r\n\t}", "public Book() {}", "BOpMethod createBOpMethod();", "H create(Method method);", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "public static void main(String[] args) {\n Student student = Student.createInstanceByIdAndFirstName(10 , \"Jhn\");\n Student student1 = Student.createInstanceByIdAndLastName(11, \"Smith\");\n }", "Method createMethod();", "Method createMethod();", "public static void main(String[] args)\r\n\t{\r\n\t\tBook b1 = new Book(\"Simple Book\"); // instantiation of Book class. b1.\r\n\t\tScience s1 = new Science(\"Hello Physics!\", \"ScienceWorld\"); // instantiation of Science class. s1.\r\n\t\tHistory h1 = new History(\"What Is history?\", \"E.H.Carr\"); // instantiation of History class. h1\r\n\t\tHistory h2 = new History(\"The South Korea\", \"Judis\");// instantiation of History class. h2\r\n\t\t\r\n\t\tb1.showthebook(); // call to the showthebook method in the book class. b1\r\n \t\ts1.showthebook(); // call to the showthebook method in the Science class. s1\r\n\t\th1.showthebook(); // call to the showthebook method in the History class. h1\r\n\t\th2.showthebook(); // call to the showthebook method in the History class. h2\r\n\t}", "public static void main(String[] args) {\n\t\tBook book1 =new Book(1,100,\"java\");\n\t\tSystem.out.println(book1);\n\t\tbook1.setBook_price(300);\n\t\tSystem.out.println(book1);\n\t}", "public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalArgumentException, InvocationTargetException, CloneNotSupportedException {\n\t\tStudent st = new Student();\n\t\tst.setName(\"Madan\");\n\t\t\n\t\t//2 Using new instance method of class\n\t\tStudent st1 = (Student) Class.forName(\"com.home.Student\").newInstance();\n\t\tst1.setName(\"Mohan\");\n\t\t\n\t\t\n\t\t//3 using new instance of constructor\n\t\tConstructor<Student> cs = Student.class.getConstructor();\t\t\n\t\tStudent st2 = cs.newInstance();\n\t\tst2.setName(\"Nautiyal\");\n\t\t\n\t\t//4 using clone method\n\t\tStudent st3 = (Student) st.clone();\n\t\t\n\t\t\n\t\tSystem.out.println(\"Object 1 \" + st.getName());\n\t\tSystem.out.println(\"Object 2 \"+ st1.getName());\n\t\tSystem.out.println(\"Object 3 \"+st2.getName());\n\t\tSystem.out.println(\"Object 4 \"+st3.getName());\n\n\t\t\n\t}", "public static void main(String args[]) { \r\n\tCW27FebClass dog =new CW27FebClass(); //Constructor declaration\r\n\tdog.bark(); // Object creation & Calling the Class method execution \r\n\tdog.walk();\r\n\tSystem.out.println(\"Print the Class Method Declaration tail variable :\" +dog.tail);\r\n\tSystem.out.println(\"Print the Class Method Declaration legs variable :\" +dog.legs);\r\n\t\r\n}", "public abstract Object mo26777y();", "public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\t \r\n\tClass<?> t = Class.forName(\"Java_Oops.ForNameObjectCreation\");\r\n\tObjectCreation_1 obj = ((ObjectCreation_1) t.newInstance());\r\n\t \t\t\t\t obj.display();\t\r\n\t\t\t\t\t }", "Instance createInstance();", "public static void main(String[] args)\r\n {\n Type objectName = new Type();\r\n // call a method ON an object\r\n objectName.methodName();\r\n // call a static method OF a class\r\n ClassName.methodName();\r\n }", "public Book() {\n\t\t// Default constructor\n\t}", "Reproducible newInstance();", "public static void objectDemo() {\n\t}", "public static void main(String[] args) {// we can create psvm method but cannot create objects in abstract class\n\t\tSchool.bonus();// as bonus method is static we can print it without create class name so we can use\n\t\t\t\t\t\t// with classname.mthdname hence it is accepted in abstract class\n\t\tSystem.out.println(\"i am from main method\");// we can write anything in main mthd it prints automatically without\n\t\t\t\t\t\t\t\t\t\t\t\t\t// creating obj\n\t}", "public static void main(String[] args) {\nsample1 obj=new sample1();\r\n\t}", "public static void main(String[]args) { \n Box box1 = new Box();\n box1.setHeight(4);\n box1.setLength(4);\n box1.setWidth(6);\n System.out.println(box1);\n/** part 12 call method */ \n Box box2 = new Box( 3, 4, 5);\n System.out.println(box2);\n/** part 16 call method */ \n Box box3 = new Box(5);\n System.out.println(box3);\n \n }", "public static void main(String[] args) throws IOException, ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\n Class objectClass = LazyMethodSingleton.class;\n\n Constructor constructor = objectClass.getDeclaredConstructor();\n constructor.setAccessible(true);\n\n LazyMethodSingleton instance = LazyMethodSingleton.getInstance();\n LazyMethodSingleton newInstance = (LazyMethodSingleton) constructor.newInstance();\n\n// HungrySingleton instance = HungrySingleton.getInstance();\n// HungrySingleton newInstance = (HungrySingleton) constructor.newInstance();\n\n// LazyStaticInnerClassSingleton instance = LazyStaticInnerClassSingleton.getInstance();\n// LazyStaticInnerClassSingleton newInstance = (LazyStaticInnerClassSingleton) constructor.newInstance();\n\n System.out.println(instance);\n System.out.println(newInstance);\n System.out.println(instance == newInstance);\n\n\n\n\n }", "Class createClass();", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "public Book() {\n }", "public static void main(String []args){\n\t\tOuter o1 = new Outer();\n\t\to1.Method1Out();\n\n\t\t//Creating object of inner class: \n\t\t//Object creation method 1: (For using this method first we have to create the object of outer class)\n\t\tOuter.Inner i1 = o1.new Inner();\n\t\ti1.MethodIn();\n\n\t\t//Object creation method 2:\n\t\tOuter.Inner i2 = new Outer().new Inner();\n\t\ti2.MethodIn();\n\t}", "public abstract Object mo1185b();", "public static void main(String[] args) {\n FunctionInJava obj=new FunctionInJava();\n //one object will be created , obj is references variable, referring to this object\n//after creating the object,the copy of the all non static methods will be give the to this object\n obj.test();\n int l=obj.pqr();\n System.out.println(l);\n String s1=obj.qa();\n System.out.println(s1);\n int div=obj.division(30,10);\n System.out.println(div);\n// main method void, never return the value\n }", "public static void main(String[] args) {\n for(int i=0; i<10; i++){\n Constructor c=new Constructor (i);\n c.Constructor(\"Who\");\n \n } \n }", "public static void main(String[] args)\n\t{\n\t\tBook book1 = new Book(\"Title\", \"Author\", 19.95);\n\t\tSystem.out.println(book1); // Automatically calls toString\n\n\t\t// Create a book2\n\t\tBook book2 = new Book();\n\t\t\n\t\t// Create a book3\n\t\tBook book3 = new Book();\n\t\t\t\t\n\t\t// Create a book4\n\t\tBook book4 = new Book();\n\t\t\n\t\t// Create an array of 4 Books\n\t\tBook[] books = new Book[4];\n\t\tSystem.out.println(Arrays.toString(books));\n\t\t\n\t\t// Assign book1 to the first position of the array\n\t\tbooks[0] = book1;\n\t\t\n\t\t// Assign book2 to the second position of the array\n\t\tbooks[1] = book2;\n\t\t\n\t\tSystem.out.println(Arrays.toString(books));\n\t\t\n\t}", "JDefinedClass objectFactory();", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"/||OC]6QKvi*G\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"?t|o'XqH!B#u5<FG2z\";\n stringArray0[1] = \"?t|o'XqH!B#u5<FG2z\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 17, \"?t|o'XqH!B#u5<FG2z\", \"?t|o'XqH!B#u5<FG2z\", \"/||OC]6QKvi*G\", stringArray0, false, false);\n methodWriter0.visitVarInsn(17, 2);\n MethodWriter methodWriter1 = classWriter0.firstMethod;\n methodWriter1.visitIntInsn(17, 172);\n MethodWriter methodWriter2 = classWriter0.firstMethod;\n methodWriter2.visitInsn(1);\n assertSame(methodWriter2, methodWriter1);\n }", "public static void main(String[] args) {\n\t\t\n\t MethodExample object=new MethodExample();\n\t object.greet(\"Sarmed\");\n\t object.greet(\"Farid\");\n\t object.greet(\"John\");\n\t object.greet(\"Gulen\");\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tclass BobcatKitten extends Bobcat {\n\t\t\t@Override\n\t\t\tpublic void findDen() {\n\t\t\t} // override\n\n\t\t\tpublic void findDen(boolean b) {\n\t\t\t} // overload\n\n\t\t\tpublic int findden() throws Exception {\n\t\t\t\treturn 0;\n\t\t\t} // new method.\n\t\t}\n\n\t\t// Abstract class\n\t\t// may contain any number of methods including zero. \n\t\t// The methods can be abstract or concrete. \n\t\t// Abstract methods may not appear in a class that is not abstract.\n\t\t// The first concrete subclass of an abstract class is required to implement all\n\t\t// abstract methods\n\n\t\t// static and final. \n\t\t// Final prevents a variable from changing or a method from being overridden.\n\t\t// Static makes a variable shared at the class level and uses the class name to\n\t\t// refer to a method.\n\n\t\t// instanceOf\n\t\t// In \"a instanceof B\", the expression returns true if the reference to which \"a\" points\n\t\t// is an instance of class B, a subclass of B (directly or indirectly), or a class that \n\t\t// implements the B interface (directly or indirectly).\n\t\tclass HeavyAnimal {\n\t\t}\n\t\tclass Hippo extends HeavyAnimal {\n\t\t}\n\t\tclass Elephant extends HeavyAnimal {\n\t\t}\n\t\tHeavyAnimal hippo = new Hippo();\n\t\tboolean b1 = hippo instanceof Hippo; // true\n\t\tboolean b2 = hippo instanceof HeavyAnimal; // true\n\t\tboolean b3 = hippo instanceof Elephant; // false\n\t\tboolean b4 = hippo instanceof Object; // true\n\t\t\n\t\tHippo nullHippo = null; // null is not an object\n\t\tboolean b5 = nullHippo instanceof Object; // false\n\t\t\n\t\tHippo anotherHippo = new Hippo();\n\t\t// boolean b6 = anotherHippo instanceof Elephant; // DOES NOT COMPILE.\n\t\t\n\t\t// The compilation check only applies when instanceof is called on a class.\n\t\t// When checking whether an object is an instanceof an interface, Java waits\n\t\t// until runtime to do the check.\n\t\t\n\t\t// Virtual Method Invocation. \n\t\t// It does not work for instance variables.\n\t\t// Is this polymorphism? Yes. Polymorphism includes overloading and overriding\n\t\tclass Cow implements Animal {\n\t\t\tString name = \"Cow\";\n\t\t\tpublic void feed() { addHay(); }\n\t\t\tprivate void addHay() { System.out.println(\"hay\");}\n\t\t}\n\t\tclass Bird implements Animal {\n\t\t\tString name = \"Bird\";\n\t\t\t@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn \"Bird [name=\" + name + \"]\";\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void feed() { addSeed(); }\n\t\t\t@Override\n\t\t\tpublic void printName() {};\n\t\t\tprivate void addSeed() {System.out.println(\"seed\");}\n\t\t}\n\t\t// See feedAnimal method above.\n\t\tAnimal cow = new Cow();\n\t\tnew Advance_class_design().feedAnimal(cow); // will print hay and ???\n\t\t\n\t\t// Annotating Overridden methods\n\t\t// An annotation is extra information about the program, and it\n\t\t// is a type of metadata. It can be used by the compiler or even at runtime.\n\t\t// The @Override annotation is used to express that you, the programmer, intend for this\n\t\t// method to override one in a superclass or implement one from an interface.\n\t\t// @Override is allowed only when referencing a method\n\t\t// 3 cases: Implementing a method from an interface\n\t\t// Overriding a superclass method of a class shown in the example\n\t\t// Overriding a method declared in Object, such as hashCode, equals, or toString\n\t\t\n\t\t// Object: toString, equals and hashCode\n\t\t// toString() with Apache Commons: print outs all the attributes of the class\n\t\t\t/*\n\t\t\tpublic String toString() {\n\t\t\t\treturn ToStringBuilder.reflectionToString(this);\n\t\t\t\t}\n\t\t\t */\n\t\t\n\t\t// equals(). There are several rules to override equals. If x.equals(null) return false\n\t\t/*\n\t\t\t@Override \n\t\t\tpublic boolean equals(Object obj) {\n\t\t\t\tif ( !(obj instanceof Lion)) return false;\n\t\t\t\tLion otherLion = (Lion) obj;\n\t\t\t\treturn this.idNumber == otherLion.idNumber;\n\t\t\t}\n\t\t */\n\t\t\n\t\t// hashCode(). Whenever you override equals(), do the same with hashCode(). \n\t\t// \t\tpublic int hashCode() { return idNumber; }\n\t\t// So, variables used in equals() should be used in hashCode()\n\t\t// If a.equals(b) is true, a.hashCode() == b.hashCode() is always true.\n\t\t// If a.equals(b) is false, a.hashCode() == b.hashCode() can sometimes be true.\t\t\n\t\t\n\t}", "public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\ttry {\n\tClass cls=Class.forName(\"udemy.ObjCreation\");\n\tObjCreation o=(ObjCreation)cls.newInstance();\n\tSystem.out.println(o.a);\n\t}\n\tcatch(InstantiationException e) {\n\t\te.printStackTrace();\n\t}\n\tcatch(IllegalAccessException e) {\n\t\te.printStackTrace();\n\t}\n\tcatch(ClassNotFoundException e) {\n\t\tSystem.out.println(\"not found class\");\n\t\te.printStackTrace();\n\t}\n}", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n ClassWriter classWriter1 = new ClassWriter(2);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"/||OC]6QKvi*G\");\n classWriter0.visitInnerClass(\"I)3(E\\\"fl>%a;-7\", \"8oDTx&g*ZVx?eE@.\", \"/||OC]6QKvi*G\", 1);\n ByteVector byteVector0 = new ByteVector(1);\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1499, \"long\", \"Code\", \"8oDTx&g*ZVx?eE@.\", stringArray0, false, false);\n methodWriter0.put(byteVector0);\n }", "public org.objenesis.instantiator.ObjectInstantiator newInstantiatorOf(final java.lang.Class r4) {\n /*\n r3 = this;\n boolean r0 = com.esotericsoftware.kryo.util.Util.IS_ANDROID\n r1 = 1\n if (r0 != 0) goto L_0x002a\n java.lang.Class r0 = r4.getEnclosingClass()\n if (r0 == 0) goto L_0x001d\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x001d\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 != 0) goto L_0x001d\n r0 = 1\n goto L_0x001e\n L_0x001d:\n r0 = 0\n L_0x001e:\n if (r0 != 0) goto L_0x002a\n com.esotericsoftware.reflectasm.ConstructorAccess r0 = com.esotericsoftware.reflectasm.ConstructorAccess.get(r4) // Catch:{ Exception -> 0x002a }\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 r2 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 // Catch:{ Exception -> 0x002a }\n r2.<init>(r0, r4) // Catch:{ Exception -> 0x002a }\n return r2\n L_0x002a:\n r0 = 0\n r2 = r0\n java.lang.Class[] r2 = (java.lang.Class[]) r2 // Catch:{ Exception -> 0x0033 }\n java.lang.reflect.Constructor r0 = r4.getConstructor(r2) // Catch:{ Exception -> 0x0033 }\n goto L_0x003c\n L_0x0033:\n java.lang.Class[] r0 = (java.lang.Class[]) r0 // Catch:{ Exception -> 0x0042 }\n java.lang.reflect.Constructor r0 = r4.getDeclaredConstructor(r0) // Catch:{ Exception -> 0x0042 }\n r0.setAccessible(r1) // Catch:{ Exception -> 0x0042 }\n L_0x003c:\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 r1 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 // Catch:{ Exception -> 0x0042 }\n r1.<init>(r0, r4) // Catch:{ Exception -> 0x0042 }\n return r1\n L_0x0042:\n org.objenesis.strategy.InstantiatorStrategy r0 = r3.fallbackStrategy\n if (r0 != 0) goto L_0x00c1\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x0073\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 == 0) goto L_0x0058\n goto L_0x0073\n L_0x0058:\n com.esotericsoftware.kryo.KryoException r0 = new com.esotericsoftware.kryo.KryoException\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (non-static member class): \"\n r1.append(r2)\n java.lang.String r4 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r4)\n java.lang.String r4 = r1.toString()\n r0.<init>(r4)\n throw r0\n L_0x0073:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (missing no-arg constructor): \"\n r1.append(r2)\n java.lang.String r2 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r2)\n java.lang.String r1 = r1.toString()\n r0.<init>(r1)\n java.lang.String r4 = r4.getSimpleName()\n java.lang.String r1 = \"\"\n boolean r4 = r4.equals(r1)\n if (r4 == 0) goto L_0x00b7\n java.lang.String r4 = \"\\n\\tThis is an anonymous class, which is not serializable by default in Kryo. Possible solutions: \"\n r0.append(r4)\n java.lang.String r4 = \"1. Remove uses of anonymous classes, including double brace initialization, from the containing \"\n r0.append(r4)\n java.lang.String r4 = \"class. This is the safest solution, as anonymous classes don't have predictable names for serialization.\"\n r0.append(r4)\n java.lang.String r4 = \"\\n\\t2. Register a FieldSerializer for the containing class and call \"\n r0.append(r4)\n java.lang.String r4 = \"FieldSerializer#setIgnoreSyntheticFields(false) on it. This is not safe but may be sufficient temporarily. \"\n r0.append(r4)\n java.lang.String r4 = \"Use at your own risk.\"\n r0.append(r4)\n L_0x00b7:\n com.esotericsoftware.kryo.KryoException r4 = new com.esotericsoftware.kryo.KryoException\n java.lang.String r0 = r0.toString()\n r4.<init>(r0)\n throw r4\n L_0x00c1:\n org.objenesis.instantiator.ObjectInstantiator r4 = r0.newInstantiatorOf(r4)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.kryo.Kryo.DefaultInstantiatorStrategy.newInstantiatorOf(java.lang.Class):org.objenesis.instantiator.ObjectInstantiator\");\n }", "public static void main(String[] args) {\n\t\tBook b1=new Book();\n\t\t//Who is setting all these values?programmer\n\t\tb1.setAuther(\"Robert\");\n\t\tb1.setBookid(123);\n\t\tb1.setPrice(9202);\n\t\tb1.setPublication(\"TMH\");\n\t\t//who is managing the life cycle of the book object which b1?programming\n\t\t//who is managing the dependency of book ? programmer\n\t\t\n\t\tString result=b1.print();\n\t\tSystem.out.println(result);\n\t}", "Object getClass_();", "Object getClass_();", "private void __sep__Constructors__() {}", "abc createabc();", "public void method_193() {}", "public static class_1198 method_6445() {\r\n class_1198 var10000 = new class_1198;\r\n var10000.method_6436();\r\n class_1198 var0 = var10000;\r\n var0.method_6438(class_985.field_4989.field_5050);\r\n List var1 = var0.method_6440();\r\n class_1205 var10001 = new class_1205;\r\n var10001.method_6469(1, class_1192.field_6032);\r\n var1.add(var10001);\r\n var1 = var0.method_6440();\r\n var10001 = new class_1205;\r\n var10001.method_6469(2, class_1192.field_6028);\r\n var1.add(var10001);\r\n var1 = var0.method_6440();\r\n var10001 = new class_1205;\r\n var10001.method_6469(1, class_1192.field_6027);\r\n var1.add(var10001);\r\n var0.method_6441();\r\n Map var2 = var0.method_6439();\r\n String[] var3 = field_6229;\r\n var2.put(\"village\", new HashMap());\r\n return var0;\r\n }", "public void firstClass(){\n }", "private static void Demo4() {\n\t\tClass<?> class1 = null;\r\n\t\tPerson person1 = null;\r\n\t\tPerson person2 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\tConstructor<?>[] con = class1.getConstructors();\r\n\t\t\ttry {\r\n\t\t\t\tperson1 = (Person) con[0].newInstance(20, \"Hongten\");\r\n\t\t\t\tSystem.out.println(person1.getAge() + \";\" + person1.getName());\r\n\t\t\t\tperson2 = (Person) con[1].newInstance();\r\n\t\t\t\tperson2.setAge(100);\r\n\t\t\t\tperson2.setName(\"haha\");\r\n\t\t\t\tSystem.out.println(person2.getAge() + \";\" + person2.getName());\r\n\r\n\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (InvocationTargetException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "MethodStart createMethodStart();", "public static void main(String[] args){\n SecondClassExample secondClassExample = new SecondClassExample(67);\nsecondClassExample.testMethod(); //metodo iskvietimas\n\n}", "public void build() throws HelperCodeException {\n MethodNode constructorNode = null;\n if(!TypeUtil.isAccess(methodNode.access, Opcodes.ACC_STATIC) && !methodNode.name.contains(\"<init>\")) {\n //1. make instance for the instance of the class\n //ClassNode classNode = TypeTableBuilder.getMethodClassNode(methodNode);\n if(!ClassNodeUtil.isClassNodeBuilderable(classNode))\n throw new HelperCodeException(\"not able to build classNode\");\n constructorNode = ClassNodeUtil.getSimpleConstructor(classNode);\n if(constructorNode != null) {\n String classname = classNode.name.substring(classNode.name.lastIndexOf(\".\") + 1);\n classname = classname.substring(classname.lastIndexOf(\"/\") + 1);\n String stmt = makeNewVoidConstructorStmt(classname, \"c\");//fixme\n if(!TypeUtil.isAccess(constructorNode.access, Opcodes.ACC_PUBLIC))\n throw new HelperCodeException(\"classnode is non-public\");\n addImport(classNode.name);\n stmts.add(stmt);\n } else\n throw new HelperCodeException(\"unable to found a classnode constructor\");\n } else {\n //what if the method is static\n\n //what if it\n }\n\n for (Type pt : Type.getMethodType(methodNode.desc).getArgumentTypes()) {\n //fixme, only support primitive and string object now.\n int sort = pt.getSort();\n if (sort > Type.DOUBLE) {\n if (sort == Type.OBJECT) {\n //if it is in standard library\n HelperMethod item = null;\n if(TypeUtil.isStandardLibrary(pt.getClassName())) {\n item = StandardLibraryClasses.getHelper(pt);\n //fixme for instance helper\n } else {\n item = InstanceHelperClasses.getInstanceHelper(pt);\n }\n\n if (item != null) {\n Type methodType = Type.getMethodType(item.desc);\n methodArguments.add(methodType);\n methods.add(item);\n continue;\n }\n }\n //fixme\n InstanceHelperBuilder.addunsuported(pt);\n throw new HelperCodeException(\"doesn't support this type now\");\n } else\n methodArguments.add(pt);\n }\n\n int number_of_string_arg = 0;\n for(Type t: methodArguments) {\n if(t.getSort() == Type.METHOD) {\n for(Type mt: t.getArgumentTypes()) {\n if(mt.getSort() == Type.OBJECT)\n number_of_string_arg += 1;\n }\n }\n if(t.getSort() == Type.OBJECT)\n number_of_string_arg += 1;\n }\n if(number_of_string_arg > 1) {\n //is_args_valid_for_building = false;\n throw new HelperCodeException(\"fail to build argument\");\n }\n\n if(number_of_string_arg == 1) {\n this.isFileString = true;\n }\n\n System.out.println(\"The size of the stmts in build, before methodArgument: \" + stmts.size());\n makeMethodBody(methodArguments);\n }", "@Test\n public void test01()\n {\n MetaClass.forClass(Class, reflectorFactory)\n }", "public static void main(String[] args) {\n\t\tHomeLoans obj = new HomeLoans();\n\t\tHomeLoans obj1 = new HomeLoans();\n\t\tobj.totalSal();\n\t\tSystem.out.println(obj.sal);\n\t\t\n\t\tobj1.totalSal();\n\t\tSystem.out.println(obj1.sal);\n\t\tobj1.sal();\n\t\tobj1.absMethod();\n\t\tobj1.concMethod();\n\t\t\n\t}", "public static void main(String[] args) {\n Book book0 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book0copy2 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book1 = new Book(\"Ender's Game\", \"Orson S. Card\", 324);\n Book book3; //just creates unassigned reference\n Book[] lotr = new Book[3];\n lotr[0] = new Book(\"The Fellowship of the Ring\", \"J.R.R. Tolkien\", 432);\n lotr[1] = new Book(\"The Two Towers\", \"J.R.R. Tolkien\", 322);\n lotr[2] = new Book(\"The Return of the King\", \"J.R.R. Tolkien\", 490);\n\n book0.ripOutPage();\n System.out.print(book0); //calls toString() object method\n\n book1.setAuthor(\"Orson Scott Card\");\n\n for(Book b : lotr) {\n System.out.print(b);\n }\n\n if (book0.isLong()) {\n System.out.println(book0.getTitle() + \" is a long book.\");\n } else {\n System.out.println(book0.getTitle() + \" is a short book.\");\n }\n \n System.out.printf(\"The title of %s by %s is %d characters long.%n\", \n book0.getTitle(), book0.getAuthor(), book0.getTitleLength());\n\n System.out.println(book0.equals(book0copy2));\n System.out.println(book0.equals(book1));\n }", "public static void main(String[] args) {\n\t\tExample_4 obj = new Example_4();\r\n\t\tobj.method();\r\n\t}", "public static void main(String[] args) {\n\t\tCard c1=Card.newInstance();\n\t\tSystem.out.println(\"c1=\"+c1);\n\t\t\n\t\tCard c2=Card.newInstance();\n\t\tSystem.out.println(\"c2=\"+c2);\n\t\t\n\t\tCard c3=Card.newInstance();\n\t\tSystem.out.println(\"c3=\"+c3);\n \n \n\t}", "public Person(){\n count++;\n System.out.println(\"Creating an object\");\n }", "public class_4 method_9() {\n return this.method_17();\n }", "public static void main(String[] args) {\n\t\tCar a =new Car();// new Car() is the object for new class..a, b,c are references\n\t\ta.mod =10;\n\t\ta.wheel =20;\n\t\tSystem.out.println(a.mod\n\t\t\t\t);\n\t\tCar b =new Car();\n\t\t\n\t\t\n\n\t}", "public OOP_207(){\n\n }", "public static void\ninitClass()\n//\n////////////////////////////////////////////////////////////////////////\n{\n}", "DescribedClass createDescribedClass();", "public static void main(String[] args) {\nconstructorDemo obj=new constructorDemo();\nconstructorDemo obj1=new constructorDemo(\"My Parameter\");\nconstructorDemo obj2=new constructorDemo(123);\nconstructorDemo obj3=new constructorDemo(123,6);\nSystem.out.println(\"code after creating object\");\nobj.hello();\nobj.hello(\"hi\");\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tBook b1 = new Book(111, \"Hello Java\");\r\n\t\tBook b2 = new Book(111, \"Hello Java\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(b1 ==b2);\r\n\t\tSystem.out.println(b1.equals(b2));\r\n\t\tSystem.out.println(b1.hashCode());\r\n\t\tSystem.out.println(b2.hashCode());\r\n\t\t\t\r\n\t}", "public static void main(String[] args) {\n method(new Cat1());\r\n method(new Dog1());\r\n\r\n //Animal a = new Cat();\t\t\t开发的是很少在创建对象的时候用父类引用指向子类对象,直接创建子类对象更方便,可以使用子类中的特有属性和行为\r\n }", "public static void main(String[] args) {\n\t\tObject o1=new Object();\r\n\t\tObject o2=new RbiBank();\r\n\t\tObject o3=new HdfcBank();\r\n\t\tObject o4=new IciciBank();\r\n\t\tObject o5=\"RBG Technologies\";\r\n\t\tObject o6=10;\r\n\t\tObject o7=true;\r\n\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor ar = new Author();\r\n\t\tBookdetails bk = new Bookdetails();\r\n\t\tbk.setName(\"Revolution 2020\");\r\n\t\tbk.setPrice(1000);\r\n\t\tbk.setQtyinstack(250);\r\n\t\tar.setName(\"Chetan Bhagat\");\r\n\t\tar.setEmail(\"[email protected]\");\r\n\t\tar.setGender('m');\r\n\t\tSystem.out.println(bk.getName()+\" \"+bk.getPrice()+\" \"+bk.getQtyinstack());\r\n\t\tSystem.out.println(ar.getName()+\" \"+ar.getEmail()+\" \"+ar.getGender()); \r\n}", "public void instatnceMethod() {\n System.out.println(\"instatnMethod\");\n System.out.println(\"count = \" + count);\n displayMessage(\"hello from instance methods\");\n }", "public static <T> T createObject(Class<T> clas, Object[] arguments) throws InstantiationException {\n ProxyFactory f = new ProxyFactory(); //This starts a proxy factory which will create the proxy.\n f.setSuperclass(clas); //This sets the super class.\n\n Field[] fields = clas.getDeclaredFields(); //Get all the fields from the class it's being made to replicate\n boolean hasFieldInv = ContractHelper.fieldHasInvariant(fields);\n //The is to ensure that a class which has a field invariant \n //then all of the methods will be checked.\n\n f.setFilter((Method m) -> {\n //This checks if any annotations are present for a method supplied.\n return m.getAnnotationsByType(Pre.class).length != 0\n || m.getAnnotationsByType(Post.class).length != 0\n || m.getAnnotationsByType(Invariant.class).length != 0\n || m.getAnnotationsByType(ForAll.class).length != 0\n || m.getAnnotationsByType(Exists.class).length != 0\n || m.getAnnotationsByType(PostThrow.class).length != 0\n || hasFieldInv;\n });\n\n Class c = f.createClass(); //This then creates a new class from the proxy factory.\n\n MethodHandler mi = (Object self, Method m, Method proceed, Object[] args) -> { //This is the method handler for the proxy created.\n Parameter[] params = m.getParameters(); //This gets the parameters of the method.\n //These are maps of all the parameters and fields to be checked.\n HashMap<String, Object> initialParameters = ContractHelper.mapHelper(args, params); //This uses a helper to assign the parameter names and values.\n HashMap<String, Object> afterParameters = initialParameters; //This sets the after parameters to the intial to begin with.\n HashMap<String, Object> initialFields = ContractHelper.fieldHelper(self, fields); //This uses a helper to assign the field name and values\n HashMap<String, Object> afterFields = initialFields; //This sets the after fields to the intial to begin.\n //These are arrays of all the annotations.\n Pre[] preArr = m.getAnnotationsByType(Pre.class); //This gets all the annotations that could be on the methods.\n Post[] postArr = m.getAnnotationsByType(Post.class);\n Invariant[] invArr = m.getAnnotationsByType(Invariant.class);\n ForAll[] forAllArr = m.getAnnotationsByType(ForAll.class);\n Exists[] existsArr = m.getAnnotationsByType(Exists.class);\n\n invArr = getFieldInvs(invArr, fields);\n\n for (Pre pre : preArr) { //This loops through all annotations for pre.\n preCheck(pre.value(), initialParameters, initialFields); //This then checks the pre conditions.\n }\n\n for (Invariant inv : invArr) {\n invCheck(inv.value(), initialParameters, initialFields); //This then checks the invariant condition.\n }\n\n Object result = null; //This intialised the result to null.\n\n try {\n result = proceed.invoke(self, args); // execute the original method.\n\n afterParameters = ContractHelper.mapHelper(args, params); //This gets the parameters after the method is called.\n afterFields = ContractHelper.fieldHelper(self, fields); //This gets the fields after\n\n initialParameters = ContractHelper.alterOldMap(initialParameters);\n initialFields = ContractHelper.alterOldMap(initialFields);\n\n for (Post post : postArr) {\n postCheck(post.value(), initialParameters, afterParameters, initialFields, afterFields, result); //This then runs any post checks.\n }\n \n for (ForAll forAll : forAllArr) {\n forAllCheck(forAll.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n\n for (Exists exist : existsArr) {\n existsCheck(exist.value(), initialParameters, afterParameters, initialFields, afterFields, result);\n }\n \n for (Invariant inv : invArr) {\n invCheck(inv.value(), afterParameters, afterFields);\n }\n } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException thrownByMethod) {\n Throwable cause = thrownByMethod.getCause();\n\n if (!(cause instanceof AssertionError || cause instanceof ContractException)) {\n if (cause != null) { //If cause is null then it is not an exception from the method.\n PostThrow[] thrown = m.getAnnotationsByType(PostThrow.class);\n\n for (PostThrow post : thrown) {\n if (cause.getClass().equals(post.exception())) { //Check if it has exception to check.\n postThrowCheck(post.condition(), initialParameters, afterParameters, initialFields, afterFields, result, cause); //This then runs any post checks.\n }\n }\n cause.setStackTrace(ContractHelper.alterTrace(cause.getStackTrace())); //This sets the trace of the throwable \n throw cause;\n }\n }\n throw thrownByMethod;\n }\n return result; // this returns the result of the method invocation.\n };\n\n Object obj = ContractHelper.getConstructor(c, arguments); //This uses a helper to get a constructor.\n\n //If it is still null then it can't instantiated by reflection.\n if (obj == null) {\n InstantiationException e = new InstantiationException(\"Class could not be instantiated: \" + clas);\n e.setStackTrace(ContractHelper.alterStackInstantiation(e.getStackTrace()));\n throw e;\n }\n\n ((Proxy) obj).setHandler(mi); //This then sets it's handler using the proxy.\n\n return clas.cast(obj); //This returns the object which should now have the proxy with it.\n }", "public static byte[] classWithEmptyMethods(String className, String... namesAndDescriptors)\n throws Exception {\n\n ClassWriter cw = new ClassWriter(0);\n MethodVisitor mv;\n\n cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, \"test/\" + className, null, \"java/lang/Object\", null);\n\n {\n mv = cw.visitMethod(ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n mv.visitCode();\n mv.visitVarInsn(ALOAD, 0);\n mv.visitMethodInsn(INVOKESPECIAL, \"java/lang/Object\", \"<init>\", \"()V\", false);\n mv.visitInsn(RETURN);\n mv.visitMaxs(1, 1);\n mv.visitEnd();\n }\n for (String namesAndDescriptor : namesAndDescriptors) {\n int colon = namesAndDescriptor.indexOf(':');\n String methodName = namesAndDescriptor.substring(0, colon);\n String descriptor =\n namesAndDescriptor.substring(colon + 1, namesAndDescriptor.length());\n {\n mv = cw.visitMethod(ACC_PUBLIC, methodName, descriptor, null, null);\n mv.visitCode();\n // This bytecode is only valid for some signatures (void methods). This class is used\n // for testing the parser, we don't ever load these classes to a running VM anyway.\n mv.visitInsn(RETURN);\n mv.visitMaxs(0, 1);\n mv.visitEnd();\n }\n }\n cw.visitEnd();\n\n return cw.toByteArray();\n }", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "OBJECT createOBJECT();", "SomeClass someClass();", "private static Book createFirstBookTest() {\n var book = new Book();\n book.setOriginalPriceNumber(1760);\n book.setDescription(\"52ヘルツのクジラとは―他の鯨が聞き取れない高い周波数で鳴く\");\n book.setCategory(\"トップページ > 本・コミック > 文芸 > 文芸(日本) > 現代小説 \");\n return book;\n }", "public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\r\n Class<?> c = Class.forName(\"Reflect.Student\");\r\n// System.out.println(c);\r\n //返回一个 Constructor对象,该对象反映 Constructor对象表示的类的指定的公共构造器\r\n Constructor<?>[] constructors = c.getConstructors();\r\n //返回一个 Constructor对象,该对象反映 Constructor对象表示的类的所有构造器\r\n Constructor<?>[] declaredConstructors = c.getDeclaredConstructors();\r\n for (Constructor con : declaredConstructors)\r\n System.out.println(con);\r\n\r\n System.out.println(\"-----------------\");\r\n\r\n Constructor<?> dc = c.getDeclaredConstructor(String.class, int.class, String.class);\r\n //dc.setAccessible(true); //暴力反射\r\n System.out.println(dc.newInstance(\"tcp\", 22, \"shangluo\"));\r\n\r\n Constructor<?> constructor = c.getConstructor();\r\n\r\n Object obj = constructor.newInstance();\r\n System.out.println(obj);\r\n\r\n Method function = c.getDeclaredMethod(\"method2\", String.class);\r\n function.setAccessible(true);\r\n function.invoke(obj,\"tangcaiping\");\r\n }", "public Methods() {\n // what is this doing? -PMC\n }", "public void objectTest() {\n }", "private void installBasicClasses() {\n \tAbstractSymbol filename \n \t = AbstractTable.stringtable.addString(\"<basic class>\");\n \t\n \t// The following demonstrates how to create dummy parse trees to\n \t// refer to basic Cool classes. There's no need for method\n \t// bodies -- these are already built into the runtime system.\n \n \t// IMPORTANT: The results of the following expressions are\n \t// stored in local variables. You will want to do something\n \t// with those variables at the end of this method to make this\n \t// code meaningful.\n \n \t// The Object class has no parent class. Its methods are\n \t// cool_abort() : Object aborts the program\n \t// type_name() : Str returns a string representation \n \t// of class name\n \t// copy() : SELF_TYPE returns a copy of the object\n \n \tclass_c Object_class = \n \t new class_c(0, \n \t\t TreeConstants.Object_, \n \t\t TreeConstants.No_class,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0, \n \t\t\t\t\t TreeConstants.cool_abort, \n \t\t\t\t\t new Formals(0), \n \t\t\t\t\t TreeConstants.Object_, \n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.type_name,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.copy,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \t\n \t// The IO class inherits from Object. Its methods are\n \t// out_string(Str) : SELF_TYPE writes a string to the output\n \t// out_int(Int) : SELF_TYPE \" an int \" \" \"\n \t// in_string() : Str reads a string from the input\n \t// in_int() : Int \" an int \" \" \"\n \n \tclass_c IO_class = \n \t new class_c(0,\n \t\t TreeConstants.IO,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_string,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.out_int,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.SELF_TYPE,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_string,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.in_int,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The Int class has no methods and only a single attribute, the\n \t// \"val\" for the integer.\n \n \tclass_c Int_class = \n \t new class_c(0,\n \t\t TreeConstants.Int,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// Bool also has only the \"val\" slot.\n \tclass_c Bool_class = \n \t new class_c(0,\n \t\t TreeConstants.Bool,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t// The class Str has a number of slots and operations:\n \t// val the length of the string\n \t// str_field the string itself\n \t// length() : Int returns length of the string\n \t// concat(arg: Str) : Str performs string concatenation\n \t// substr(arg: Int, arg2: Int): Str substring selection\n \n \tclass_c Str_class =\n \t new class_c(0,\n \t\t TreeConstants.Str,\n \t\t TreeConstants.Object_,\n \t\t new Features(0)\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.val,\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new attr(0,\n \t\t\t\t\t TreeConstants.str_field,\n \t\t\t\t\t TreeConstants.prim_slot,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.length,\n \t\t\t\t\t new Formals(0),\n \t\t\t\t\t TreeConstants.Int,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.concat,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg, \n \t\t\t\t\t\t\t\t TreeConstants.Str)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0)))\n \t\t\t .appendElement(new method(0,\n \t\t\t\t\t TreeConstants.substr,\n \t\t\t\t\t new Formals(0)\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg,\n \t\t\t\t\t\t\t\t TreeConstants.Int))\n \t\t\t\t\t\t .appendElement(new formalc(0,\n \t\t\t\t\t\t\t\t TreeConstants.arg2,\n \t\t\t\t\t\t\t\t TreeConstants.Int)),\n \t\t\t\t\t TreeConstants.Str,\n \t\t\t\t\t new no_expr(0))),\n \t\t filename);\n \n \t/* Do somethind with Object_class, IO_class, Int_class,\n Bool_class, and Str_class here */\n nameToClass.put(TreeConstants.Object_.getString(), Object_class);\n nameToClass.put(TreeConstants.IO.getString(), IO_class);\n nameToClass.put(TreeConstants.Int.getString(), Int_class);\n nameToClass.put(TreeConstants.Bool.getString(), Bool_class);\n nameToClass.put(TreeConstants.Str.getString(), Str_class);\n adjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.IO.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Int.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Bool.getString(), new ArrayList<String>() );\n adjacencyList.put(TreeConstants.Str.getString(), new ArrayList<String>() );\n // Do the same for other basic classes\n basicClassList = new Classes(0);\n basicClassList.appendElement(Object_class);\n basicClassList.appendElement(IO_class);\n basicClassList.appendElement(Int_class);\n basicClassList.appendElement(Bool_class);\n basicClassList.appendElement(Str_class);\n \n }", "public static void main(String[] args) {\n\t\tCab cRef;\n\t\t\n\t\tcRef = new MicroCab(); // We are constructing Object of MicroCab\n\t\tcRef.bookCab(\"Pristine Magnum\", \"Country Homes\");\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcRef = new MiniCab();\n\t\tcRef.bookCab(\"Pristine Magnum\", \"Country Homes\");\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcRef = new SedanCab();\n\t\tcRef.bookCab(\"Pristine Magnum\", \"Country Homes\");\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcRef = new Bike();\n\t\tcRef.bookCab(\"Pristine Magnum\", \"Country Homes\");\n\t\t\n\t\t// Reference Variable of Cab can point to any Child Object :) | More than 1 form -> Polymorphism\n\t\t// same bookCab method is used to book different type of cabs\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t// Lets review below statements :)\n\t\t// Below statements shall create a Cab Object and bookCab will will book some generic Cab\n\t\t// Here, no specific type of Cab is known when we execute below code\n\t\t// cRef = new Cab();\n\t\t// cRef.bookCab(\"Pristine Magnum\", \"Country Homes\");\n\t\t// So, we need to restrict user to write such statements :)\n\n\t}", "public static void main()\n {\n\n Magazine magazine1 = new Magazine (\"David Publishing\", \"Mega Magazine\", 30, \"Maria Craig\", \"22/06/2014\");\n\n System.out.println();\n magazine1.getEditor();\n magazine1.getDate();\n magazine1.getPublisher();\n magazine1.getPublicationTitle();\n magazine1.getPrice();\n // Display a blank line\n System.out.println();\n\n \n // Create an instance of Book\n \n Book Book1 = new Book (\"Beckem and windsor\", \"Remember\", 100, 2451, \"Sue bright\");\n\n Book1.getPageNumber();\n Book1.getAuthor();\n Book1.getPublisher();\n Book1.getPublicationTitle();\n Book1.getPrice(); \n }", "protected PyObject createObject(final PyObject pyClass, final Object[] args, final String[] keywords) {\n\t\treturn pyClass.__call__(convertArgs2Python(args), keywords);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tConstructor obj = new Constructor(1);\n\t\t\n\t\n\t\t\n\t\t\n\n\t}", "public abstract Object mo1771a();", "public static void main(String[] args) {\n\t\tStudent2 s2 = new Student2(123, \"Hans\", \"UP\", 'I');\r\n\t\tSystem.out.println(s2.id + \" \" + s2.name + \" \" + s2.address);\r\n\t\t// creating multiple object of same type.\r\n\t\tStudent2 s3 = new Student2(123, \"mohan\", \"Naini\", 'N'), s4 = new Student2(123, \"rani\", \"nainital\", 'u');\r\n\t}", "public static void main(String[] args) {\nSystem.out.println(\"Hello World.....!!!!\");\r\nHello_World e3=new Hello_World(1,2,3);\r\nHello_World e6=new Hello_World(1,2,3);\r\nHello_World e7=new Hello_World(1,2,3);\r\nHello_World e4=new Hello_World();\r\nHello_World e5=new Hello_World();\r\nHello_World e1=new Hello_World(\"ABC\",\"1\"); \r\nHello_World e2=new Hello_World(\"ABC\",\"1\"); \r\nSystem.out.println(\"Number of Hello_World objects created =\"+ objectcount);\r\n}", "public static void main(String args[]) {\n Person empOne = new Person();\n // Invoking methods for each object created\n empOne.name= \"peter\";\n empOne.age=26;\n empOne.designation=\"Senior Software Engineer\";\n \n Person empTwo = new Person();\n empTwo.name= \"Smith\"; \n empTwo.age=21;\n empTwo.designation=\"Software Engineer\";\n \n PrintFindPeople pfp = new PrintFindPeople();\n pfp.addMethod(empOne);\n pfp.addMethod(empTwo);\n \n \n pfp.peopleList();\n pfp.nameFinder(\"Smith\");\n \n }", "public Book create(String title,double price, Author author)\r\n {\r\n return new Book(title,price,author);\r\n }", "public static void main(String[] args) throws IOException {\n\t\t// creating local class objects \n\t\t\n\t}", "private static void Demo3() {\n\t\tClass<?> class1 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\ttry {\r\n\t\t\t\tPerson person = (Person) class1.newInstance();\r\n\t\t\t\tperson.setAge(20);\r\n\t\t\t\tperson.setName(\"mark\");\r\n\t\t\t\tSystem.out.println(person.getName() + \" : \" + person.getAge());\r\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\n\t\tSample1 AM = new Sample1();\n\t\t\n\t\tAM.PROTECTEDMETHOD();\n\t\t\n\t\tAM.PUBLICMETHOD();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tC2 c2Obj=new C2();\n\t\t//c2Obj.c2(); exception\n\t\t\n\t\t\n\t\tTest t=new Test();\n\t\tt.f1();\n\t\t//t.f2(); // error. Because f2 is default method\n\t\t//t.f3(); // error. f3 is protected method\n\t\t//t.f4(); // error f4 is private method\n\t\t\n\t\tC1 c1=new C1();\n\t\tc1.f1();// public\n\t\t//c1.f2();\n\t\tc1.f3(); // protected. \n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n//\t\t\tA a=new A();\r\n//\t\t\ta.disp1();\r\n//\t\t\ta.disp2();\r\n\t\t\t\r\n\t\t\tA a=new A();\r\n\t\t\tSystem.out.println(\"a=\"+a);\r\n\t\t\tClass clsName=Class.forName(\"com.sist.temp.A\");\r\n\t\t\tObject obj=clsName.newInstance();\r\n\t\t\tSystem.out.println(\"obj=\"+obj);\r\n\t\t\r\n\t\t\tMethod[] methods=clsName.getDeclaredMethods();\r\n\t\t\tfor(Method m:methods) {\r\n\t\t\t\t m.invoke(obj, null);\r\n\t\t\t}\r\n\t\t} catch(Exception ex) {}\r\n\t}", "public static void main(String[] args) {\n\t\tnewClass obj=new newClass();\n\t\tobj.positiveNegative();\n\t\tobj.EqualUnequal();\n\t}", "public static void main(String args[]){\n SingleTonClass myobject= SingleTonClass.objectCreationMethod();\r\n SingleTonClass myobject1= SingleTonClass.objectCreationMethod();\r\n myobject.display();\r\n myobject.b = 600;\r\n myobject1.display();\r\n myobject1.b = 800;\r\n SingleTonClass myobject2 = new SingleTonClass();\r\n myobject2.display();\r\n }" ]
[ "0.6247805", "0.620454", "0.58636916", "0.584826", "0.578653", "0.57515764", "0.5712413", "0.56226736", "0.56154644", "0.5605853", "0.56054133", "0.55918604", "0.5571666", "0.5558799", "0.555388", "0.555388", "0.55409706", "0.55239636", "0.5510034", "0.54874283", "0.54851186", "0.5480701", "0.545742", "0.5438292", "0.54256725", "0.5417025", "0.541009", "0.5395375", "0.53914773", "0.53840643", "0.5357348", "0.53555363", "0.5347424", "0.5336504", "0.532263", "0.5310957", "0.530817", "0.53072435", "0.5306201", "0.5300888", "0.5299603", "0.5299325", "0.52971876", "0.5259963", "0.52574015", "0.5249212", "0.52379566", "0.52290636", "0.52290636", "0.5228266", "0.5223598", "0.52069825", "0.5198131", "0.5193675", "0.51917934", "0.5187668", "0.5184911", "0.5179628", "0.51759154", "0.51759005", "0.5175756", "0.5172695", "0.5169967", "0.51671875", "0.51667476", "0.5152964", "0.5151082", "0.5144044", "0.5128201", "0.5126231", "0.5121417", "0.5120904", "0.5117757", "0.51165235", "0.51163566", "0.51159686", "0.5114447", "0.51128024", "0.51097083", "0.5104516", "0.51032394", "0.5102741", "0.5091365", "0.50878984", "0.5082837", "0.5082668", "0.50812197", "0.5080534", "0.5072581", "0.50710267", "0.5070832", "0.5070489", "0.5068064", "0.50677097", "0.50570667", "0.50558186", "0.50532323", "0.5046789", "0.50454813", "0.5044698", "0.50411326" ]
0.0
-1
/ public javaart.create_class_instance_by_5_methods.Book(java.lang.String, int, int, java.lang.String); Code: 0: aload_0 1: invokespecial 1 // Method java/lang/Object."":()V 4: aload_0 5: aload_1 6: putfield 2 // Field name:Ljava/lang/String; 9: aload_0 10: iload_2 11: putfield 3 // Field pages:I 14: aload_0 15: iload_3 16: putfield 4 // Field date:I 19: aload_0 20: aload 4 22: putfield 5 // Field type:Ljava/lang/String; 25: return
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "Book createBook();", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "void create(Book book);", "public Book(String name, int pages, int date, String type) {\n this.name = name;\n this.pages = pages;\n this.date = date;\n this.type = type;\n }", "public BookRecord(String NameOfTheBook, String NameofWriter, int isbnNumber, double booksCost) \r\n\r\n{ \r\n\r\nthis.NameOfTheBook = NameOfTheBook; \r\n\r\nthis.NameofWriter = NameofWriter; \r\n\r\nthis.isbnNumber = isbnNumber; \r\n\r\nthis.booksCost = booksCost; \r\n\r\n}", "public static void main(String[] arguments){\n Book AtlasShrugged = new Book(\"Atlas Shrugged\");\n// Book HungerGames = new Book(\"Hunger Games\");\n// CatinHat.WhatBook();\n AtlasShrugged.WhatBook();\n AtlasShrugged.CheckAvailable();\n// CatinHat.CheckAvailable();\n// HungerGames.CheckAvailable();\n //cant return total number of book instances, i would have to call out an instance to return a value.\n //System.out.println(book.length);\n\n //CatinHat.CheckIn();\n\n //AtlasShrugged.CheckIn();\n //CatinHat.CheckOut();\n AtlasShrugged.CheckOut();\n AtlasShrugged.CheckAvailable();\n AtlasShrugged.CheckIn();\n AtlasShrugged.CheckAvailable();\n //AtlasShrugged.CheckOut();\n \n// Book TheDaVinciCode = new Book(\"The Da Vinci Code\");\n// Book LePetitPrince = new Book(\"Le Petit Prince\");\n// Book ATaleofTwoCities = new Book(\"A Tale of Two Cities\");\n// Book TheLordofTheRings = new Book(\"The Lord of The Rings\");\n// TheDaVinciCode.WhatBook();\n// LePetitPrince.WhatBook();\n \n}", "public Book() {}", "public Book(String name)\t//declare public Book method with String name\r\n\t{\r\n\t\tthis.Name = name;\t//Name initialize and equal name by using this\r\n\t\tidcount++;\t//idcount increase 1 each process \r\n\t\tid=idcount;\t//id equal idcount\r\n\t}", "private java.lang.reflect.Method m16124a(java.lang.Class r3, java.lang.String r4, java.lang.Class[] r5) {\n /*\n r2 = this;\n r0 = 0\n if (r3 == 0) goto L_0x0028\n boolean r1 = r2.m16125a((java.lang.Object) r4)\n if (r1 == 0) goto L_0x000a\n goto L_0x0028\n L_0x000a:\n r3.getMethods() // Catch:{ Exception -> 0x0015 }\n r3.getDeclaredMethods() // Catch:{ Exception -> 0x0015 }\n java.lang.reflect.Method r3 = r3.getDeclaredMethod(r4, r5) // Catch:{ Exception -> 0x0015 }\n return r3\n L_0x0015:\n java.lang.reflect.Method r3 = r3.getMethod(r4, r5) // Catch:{ Exception -> 0x001a }\n return r3\n L_0x001a:\n java.lang.Class r1 = r3.getSuperclass()\n if (r1 == 0) goto L_0x0028\n java.lang.Class r3 = r3.getSuperclass()\n java.lang.reflect.Method r0 = r2.m16124a((java.lang.Class) r3, (java.lang.String) r4, (java.lang.Class[]) r5)\n L_0x0028:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.shortcutbadger.impl.OPPOHomeBader.m16124a(java.lang.Class, java.lang.String, java.lang.Class[]):java.lang.reflect.Method\");\n }", "public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n\r\n Class<?> c = Class.forName(\"Reflect.Student\");\r\n// System.out.println(c);\r\n //返回一个 Constructor对象,该对象反映 Constructor对象表示的类的指定的公共构造器\r\n Constructor<?>[] constructors = c.getConstructors();\r\n //返回一个 Constructor对象,该对象反映 Constructor对象表示的类的所有构造器\r\n Constructor<?>[] declaredConstructors = c.getDeclaredConstructors();\r\n for (Constructor con : declaredConstructors)\r\n System.out.println(con);\r\n\r\n System.out.println(\"-----------------\");\r\n\r\n Constructor<?> dc = c.getDeclaredConstructor(String.class, int.class, String.class);\r\n //dc.setAccessible(true); //暴力反射\r\n System.out.println(dc.newInstance(\"tcp\", 22, \"shangluo\"));\r\n\r\n Constructor<?> constructor = c.getConstructor();\r\n\r\n Object obj = constructor.newInstance();\r\n System.out.println(obj);\r\n\r\n Method function = c.getDeclaredMethod(\"method2\", String.class);\r\n function.setAccessible(true);\r\n function.invoke(obj,\"tangcaiping\");\r\n }", "public static void main(String[] args){\r\n\t\tnew Book();\r\n\t}", "public void method_6337(ahb var1, long var2, boolean var4, String var5) {\r\n super();\r\n String[] var6 = class_752.method_4253();\r\n this.field_5909 = new aji[256];\r\n this.field_5910 = new byte[256];\r\n this.field_5912 = new ArrayList();\r\n this.field_5907 = var1;\r\n this.field_5908 = new Random(var2);\r\n this.field_5911 = class_1198.method_6444(var5);\r\n boolean var10000 = var4;\r\n String[] var10;\r\n Map var19;\r\n if(var6 != null) {\r\n label91: {\r\n if(var4) {\r\n Map var7 = this.field_5911.method_6439();\r\n var10 = field_5917;\r\n var10000 = var7.containsKey(\"village\");\r\n List var15;\r\n if(var6 != null) {\r\n if(var10000) {\r\n Map var8 = (Map)var7.get(\"village\");\r\n var10000 = var8.containsKey(\"size\");\r\n if(var6 != null) {\r\n if(!var10000) {\r\n var8.put(\"size\", \"1\");\r\n }\r\n\r\n var15 = this.field_5912;\r\n class_1053 var10001 = new class_1053;\r\n var10001.method_5976(var8);\r\n var15.add(var10001);\r\n }\r\n }\r\n\r\n var10 = field_5917;\r\n var10000 = var7.containsKey(\"biome_1\");\r\n }\r\n\r\n if(var6 != null) {\r\n if(var10000) {\r\n var15 = this.field_5912;\r\n class_1055 var16 = new class_1055;\r\n var10 = field_5917;\r\n var16.method_5978((Map)var7.get(\"biome_1\"));\r\n var15.add(var16);\r\n }\r\n\r\n var10 = field_5917;\r\n var10000 = var7.containsKey(\"mineshaft\");\r\n }\r\n\r\n if(var6 != null) {\r\n if(var10000) {\r\n var15 = this.field_5912;\r\n class_1057 var17 = new class_1057;\r\n var10 = field_5917;\r\n var17.method_5982((Map)var7.get(\"mineshaft\"));\r\n var15.add(var17);\r\n }\r\n\r\n var10 = field_5917;\r\n var10000 = var7.containsKey(\"stronghold\");\r\n }\r\n\r\n if(var6 == null) {\r\n break label91;\r\n }\r\n\r\n if(var10000) {\r\n var15 = this.field_5912;\r\n class_1054 var18 = new class_1054;\r\n var10 = field_5917;\r\n var18.method_5977((Map)var7.get(\"stronghold\"));\r\n var15.add(var18);\r\n }\r\n }\r\n\r\n var19 = this.field_5911.method_6439();\r\n var10 = field_5917;\r\n this.field_5913 = var19.containsKey(\"decoration\");\r\n var10000 = this.field_5911.method_6439().containsKey(\"lake\");\r\n }\r\n }\r\n\r\n class_1198 var11;\r\n label97: {\r\n class_1187 var20;\r\n if(var6 != null) {\r\n if(var10000) {\r\n var20 = new class_1187;\r\n var20.method_6406(class_1192.field_6034);\r\n this.field_5915 = var20;\r\n }\r\n\r\n var11 = this.field_5911;\r\n if(var6 == null) {\r\n break label97;\r\n }\r\n\r\n Map var12 = this.field_5911.method_6439();\r\n var10 = field_5917;\r\n var10000 = var12.containsKey(\"lava_lake\");\r\n }\r\n\r\n if(var10000) {\r\n var20 = new class_1187;\r\n var20.method_6406(class_1192.field_6036);\r\n this.field_5916 = var20;\r\n }\r\n\r\n var19 = this.field_5911.method_6439();\r\n String[] var10002 = field_5917;\r\n this.field_5914 = var19.containsKey(\"dungeon\");\r\n var11 = this.field_5911;\r\n }\r\n\r\n Iterator var13 = var11.method_6440().iterator();\r\n\r\n label71:\r\n while(var13.hasNext()) {\r\n class_1205 var14 = (class_1205)var13.next();\r\n int var9 = var14.method_6474();\r\n\r\n while(var9 < var14.method_6474() + var14.method_6471()) {\r\n this.field_5909[var9] = var14.method_6472();\r\n this.field_5910[var9] = (byte)var14.method_6473();\r\n ++var9;\r\n if(var6 == null) {\r\n continue label71;\r\n }\r\n\r\n if(var6 == null) {\r\n break;\r\n }\r\n }\r\n\r\n if(var6 == null) {\r\n break;\r\n }\r\n }\r\n\r\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180372));\n classWriter0.addType(\"H\");\n classWriter0.visitOuterClass(\"H\", \"H\", \"9iniWt>\");\n classWriter0.newField(\"H\", \"H\", \"UNp|{*'V\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"UNp|{*'V\";\n stringArray0[1] = \"9iniWt>\";\n stringArray0[2] = \"H\";\n stringArray0[3] = \"UNp|{*'V\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180372), \"H\", \"<T'RwU+).UKJX>\", \"H\", stringArray0, true, false);\n methodWriter0.visitFieldInsn(7, \"9iniWt>\", \"9iniWt>\", \"<T'RwU+).UKJX>\");\n Label label0 = new Label();\n label0.toString();\n ByteVector byteVector0 = classWriter0.pool;\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(1, \"3<|siktz\", \"Label offset position has not been resolved yet\", \"H\");\n methodWriter0.visitLocalVariable(\"3<|siktz\", \"GeT\", \"ddVw2Z7M){e/Y(#j\", label0, label0, 65);\n methodWriter0.getSize();\n methodWriter0.visitLocalVariable(\"asS}<n;\", \"Deprecated\", \"RuntimeVisibleParameterAnnotations\", label0, label0, 2);\n }", "public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalArgumentException, InvocationTargetException, CloneNotSupportedException {\n\t\tStudent st = new Student();\n\t\tst.setName(\"Madan\");\n\t\t\n\t\t//2 Using new instance method of class\n\t\tStudent st1 = (Student) Class.forName(\"com.home.Student\").newInstance();\n\t\tst1.setName(\"Mohan\");\n\t\t\n\t\t\n\t\t//3 using new instance of constructor\n\t\tConstructor<Student> cs = Student.class.getConstructor();\t\t\n\t\tStudent st2 = cs.newInstance();\n\t\tst2.setName(\"Nautiyal\");\n\t\t\n\t\t//4 using clone method\n\t\tStudent st3 = (Student) st.clone();\n\t\t\n\t\t\n\t\tSystem.out.println(\"Object 1 \" + st.getName());\n\t\tSystem.out.println(\"Object 2 \"+ st1.getName());\n\t\tSystem.out.println(\"Object 3 \"+st2.getName());\n\t\tSystem.out.println(\"Object 4 \"+st3.getName());\n\n\t\t\n\t}", "public Book() {\n }", "public static void main(String[] args) {\n\t\tString name =\"Siyar\";\n\t\t\n\t\tint a=-21;\n\t\tif (a%2!=0) {\n\t\t\tSystem.out.println(\"odd\");\n\t\t} else {\n\t\t\tSystem.out.println(\"even\");\n\t\t}\n\t\t\n\t\tchar ch[]={'s','t','r','i','n','g','s'};\n\t\tString s2=new String(ch);\n\t\tSystem.out.println(ch);\n\t\t\nBookStudy num=new BookStudy();\nSystem.out.println(num.VAR(40));//=20\nname =\"mehmet\";\nnum.b1 =\"kk\";\n\t}", "public Book() {\n\t\t// Default constructor\n\t}", "public static void main(String[] args) {\n Student student = Student.createInstanceByIdAndFirstName(10 , \"Jhn\");\n Student student1 = Student.createInstanceByIdAndLastName(11, \"Smith\");\n }", "public static void main(String[] args) {\n\t\tBook book1 =new Book(1,100,\"java\");\n\t\tSystem.out.println(book1);\n\t\tbook1.setBook_price(300);\n\t\tSystem.out.println(book1);\n\t}", "public Book(String bookAuthor, String bookTitle, int bookPages, String getDetails)\n {\n author = bookAuthor;\n title = bookTitle;\n pages = bookPages;\n details = author,title,pages;\n Number = \"\";\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"O8\";\n classWriter0.visit(50, 50, \"K#fa'T}Gl(X;x\", \"O8\", \"O8\", stringArray0);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The array of suffixes must not be null\", \"O8\", \"wheel.asm.MethodWriter\", (Object) null);\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "public static byte[] classWithFieldsAndMethods(\n @NonNull String className, @NonNull List<String> fields, @NonNull List<String> methods)\n throws Exception {\n\n ClassWriter cw = new ClassWriter(0);\n MethodVisitor mv;\n FieldVisitor fv;\n\n cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, className, null, \"java/lang/Object\", null);\n\n {\n mv = cw.visitMethod(ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n mv.visitCode();\n mv.visitVarInsn(ALOAD, 0);\n mv.visitMethodInsn(INVOKESPECIAL, \"java/lang/Object\", \"<init>\", \"()V\", false);\n mv.visitInsn(RETURN);\n mv.visitMaxs(1, 1);\n mv.visitEnd();\n }\n for (String fieldName : fields) {\n fv = cw.visitField(ACC_PRIVATE, fieldName, \"Ljava/lang/String;\", null, null);\n fv.visitEnd();\n }\n for (String namesAndDescriptor : methods) {\n int colon = namesAndDescriptor.indexOf(':');\n String methodName = namesAndDescriptor.substring(0, colon);\n String descriptor =\n namesAndDescriptor.substring(colon + 1, namesAndDescriptor.length());\n {\n mv = cw.visitMethod(ACC_PUBLIC, methodName, descriptor, null, null);\n mv.visitCode();\n // This bytecode is only valid for some signatures (void methods). This class is used\n // for testing the parser, we don't ever load these classes to a running VM anyway.\n mv.visitInsn(RETURN);\n mv.visitMaxs(0, 1);\n mv.visitEnd();\n }\n }\n cw.visitEnd();\n\n return cw.toByteArray();\n }", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2320);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"xp:%03,6Y\";\n stringArray0[1] = \"StackMap\";\n stringArray0[2] = \"Signature\";\n stringArray0[3] = \"StackMap\";\n stringArray0[4] = \"StackMap\";\n stringArray0[5] = \"StackMap\";\n stringArray0[6] = \"StackMap\";\n stringArray0[7] = \"Signature\";\n stringArray0[8] = \"Signature\";\n MethodVisitor methodVisitor0 = classWriter0.visitMethod(54, \"Signature\", \"StackMap\", \"Signature\", stringArray0);\n String[] stringArray1 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2127, \"c6c)y~[K\", \"c6c)y~[K\", \"c6c)y~[K\", stringArray1, true, true);\n methodWriter0.visitAnnotation(\"c6c)y~[K\", true);\n Object[] objectArray0 = new Object[5];\n objectArray0[0] = (Object) methodWriter0;\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 2127, \"Signature\", \"Signature\", \"y=xVO_zNCTW s\", stringArray0, false, false);\n methodVisitor0.visitMethodInsn(54, \"StackMap\", \"{M\", \"{M\");\n int int0 = methodWriter1.getSize();\n assertEquals(42, int0);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180372));\n classWriter0.addType(\"H\");\n classWriter0.visitOuterClass(\"H\", \"H\", \"9iniWt>\");\n classWriter0.newField(\"H\", \"H\", \"UNp|{*'V\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"UNp|{*'V\";\n stringArray0[1] = \"9iniWt>\";\n classWriter0.newLong(1);\n stringArray0[2] = \"H\";\n stringArray0[3] = \"UNp|{*'V\";\n boolean boolean0 = true;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180372), \"H\", \"<T'RwU+).UKJX>\", \"H\", stringArray0, true, false);\n classWriter0.newNameTypeItem(\"9iniWt>\", \"UNp|{*'V\");\n Item item0 = new Item();\n methodWriter0.visitInsn(186);\n Label label0 = new Label();\n Attribute attribute0 = new Attribute(\"9iniWt>\");\n methodWriter0.visitIincInsn((-1), 177);\n ClassReader classReader0 = null;\n try {\n classReader0 = new ClassReader(\"HL)rLXrkh@[\");\n fail(\"Expecting exception: IOException\");\n \n } catch(Throwable e) {\n //\n // Class not found\n //\n verifyException(\"org.objectweb.asm.jip.ClassReader\", e);\n }\n }", "private static void Demo4() {\n\t\tClass<?> class1 = null;\r\n\t\tPerson person1 = null;\r\n\t\tPerson person2 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\tConstructor<?>[] con = class1.getConstructors();\r\n\t\t\ttry {\r\n\t\t\t\tperson1 = (Person) con[0].newInstance(20, \"Hongten\");\r\n\t\t\t\tSystem.out.println(person1.getAge() + \";\" + person1.getName());\r\n\t\t\t\tperson2 = (Person) con[1].newInstance();\r\n\t\t\t\tperson2.setAge(100);\r\n\t\t\t\tperson2.setName(\"haha\");\r\n\t\t\t\tSystem.out.println(person2.getAge() + \";\" + person2.getName());\r\n\r\n\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (InvocationTargetException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args)\n\t{\n\t\tBook book1 = new Book(\"Title\", \"Author\", 19.95);\n\t\tSystem.out.println(book1); // Automatically calls toString\n\n\t\t// Create a book2\n\t\tBook book2 = new Book();\n\t\t\n\t\t// Create a book3\n\t\tBook book3 = new Book();\n\t\t\t\t\n\t\t// Create a book4\n\t\tBook book4 = new Book();\n\t\t\n\t\t// Create an array of 4 Books\n\t\tBook[] books = new Book[4];\n\t\tSystem.out.println(Arrays.toString(books));\n\t\t\n\t\t// Assign book1 to the first position of the array\n\t\tbooks[0] = book1;\n\t\t\n\t\t// Assign book2 to the second position of the array\n\t\tbooks[1] = book2;\n\t\t\n\t\tSystem.out.println(Arrays.toString(books));\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tAuthor au1=new Author(\"Ma Ma\",\"[email protected]\",'F');\r\n\t\tAuthor au2=new Author(\"Mg Mg\",\"[email protected]\",'M');\r\n\t\tAuthor au3=new Author(\"Su Su\",\"[email protected]\",'F');\r\n\t\tBook b1=new Book(\"Software Engineering\",au1,7000);\r\n\t\tBook b2=new Book(\"Java\",au1,8000,2);\r\n\t\tSystem.out.println(\"BookInfo writing by Ma Ma:\");\r\n\t\tSystem.out.println(\"BookName:\"+b1.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b1.price);\r\n\t\tSystem.out.println(\"BookName:\"+b2.name+\"\\nAuthor:\"+au1.name+\"\\nPrice:\"+b2.price+\"\\nQty:\"+b2.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b3=new Book(\"Digital\",au2,4000);\r\n\t\tBook b4=new Book(\"Management\",au2,6000,3);\r\n\t\tSystem.out.println(\"BookInfo writing by Mg Mg:\");\r\n\t\tSystem.out.println(\"BookName:\"+b3.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b3.price);\r\n\t\tSystem.out.println(\"BookName:\"+b4.name+\"\\nAuthor:\"+au2.name+\"\\nPrice:\"+b4.price+\"\\nQty:\"+b4.qty);\r\n\t\tSystem.out.println();\r\n\t\tBook b5=new Book(\"Accounting\",au3,5000);\r\n\t\tBook b6=new Book(\"Javascript\",au3,9000,4);\r\n\t\tSystem.out.println(\"BookInfo writing by Su Su:\");\r\n\t\tSystem.out.println(\"BookName:\"+b5.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b5.price);\r\n\t\tSystem.out.println(\"BookName:\"+b6.name+\"\\nAuthor:\"+au3.name+\"\\nPrice:\"+b6.price+\"\\nQty:\"+b6.qty);\r\n\t}", "public static void main(String[] args) {\n for(int i=0; i<10; i++){\n Constructor c=new Constructor (i);\n c.Constructor(\"Who\");\n \n } \n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2320);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"xp:%03,6Y\";\n stringArray0[1] = \"StackMap\";\n stringArray0[2] = \"Signature\";\n stringArray0[3] = \"StackMap\";\n stringArray0[4] = \"StackMap\";\n stringArray0[5] = \"StackMap\";\n stringArray0[6] = \"StackMap\";\n stringArray0[7] = \"Signature\";\n stringArray0[8] = \"Signature\";\n MethodVisitor methodVisitor0 = classWriter0.visitMethod(54, \"Signature\", \"StackMap\", \"Signature\", stringArray0);\n String[] stringArray1 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2127, \"c6c)y~[K\", \"c6c)y~[K\", \"c6c)y~[K\", stringArray1, true, true);\n methodWriter0.visitAnnotation(\"c6c)y~[K\", true);\n Object[] objectArray0 = new Object[5];\n objectArray0[0] = (Object) methodWriter0;\n methodWriter0.visitTypeInsn((-1934044868), \"Label offset position has not been resolved yet\");\n methodVisitor0.visitTypeInsn(127, \"StackMap\");\n assertFalse(methodVisitor0.equals((Object)methodWriter0));\n }", "public static void main(String[] args)\n\t{\n\t\tJavaClass jc=new JavaClass();\n\t\tjc.name=null;\n\t\tjc.id=0;\n\t\t//constructor\n\t\tJavaClass jc2=new JavaClass();\n\t\t//method\n\t\tJavaClass jc3=new JavaClass();\n\t\tjc3.intiailize();\n\t\t\n\t\t//anonymous object\n\t\tnew JavaClass().intiailize();\n\t\n\t\t//copy constructor\n\t\t\n\t\tJavaClass copyConstructor=new JavaClass(jc2);\n\t\tSystem.out.println(copyConstructor.name);\n\t\t\n\n\t}", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(3738);\n classWriter0.newInteger(2);\n classWriter0.visitInnerClass(\"S][)j}wM^Cr3`xZYV\", \"S][)j}wM^Cr3`xZYV\", \"S][)j}wM^Cr3`xZYV\", 3738);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"0?#vEGxfre%M>5\";\n stringArray0[1] = \"S][)j}wM^Cr3`xZYV\";\n stringArray0[2] = \"long\";\n ByteVector byteVector0 = new ByteVector(2);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-2217), \"S][)j}wM^Cr3`xZYV\", \"0?#vEGxfre%M>5\", \"long\", stringArray0, false, false);\n methodWriter0.put(byteVector0);\n }", "private void __sep__Constructors__() {}", "public /* synthetic */ f(java.lang.String r16, java.lang.String r17, java.lang.String r18, com.ss.android.ugc.aweme.base.model.UrlModel r19, int r20, int r21, java.util.List r22, java.lang.String r23, java.lang.String r24, java.util.List r25, java.util.List r26, int r27, int r28, kotlin.jvm.internal.DefaultConstructorMarker r29) {\n /*\n r15 = this;\n r0 = r28\n r1 = r0 & 1\n if (r1 == 0) goto L_0x000a\n java.lang.String r1 = \"\"\n r3 = r1\n goto L_0x000c\n L_0x000a:\n r3 = r16\n L_0x000c:\n r1 = r0 & 2\n if (r1 == 0) goto L_0x0014\n java.lang.String r1 = \"\"\n r4 = r1\n goto L_0x0016\n L_0x0014:\n r4 = r17\n L_0x0016:\n r1 = r0 & 4\n if (r1 == 0) goto L_0x001e\n java.lang.String r1 = \"\"\n r5 = r1\n goto L_0x0020\n L_0x001e:\n r5 = r18\n L_0x0020:\n r1 = r0 & 64\n if (r1 == 0) goto L_0x002a\n java.util.List r1 = kotlin.collections.CollectionsKt.emptyList()\n r9 = r1\n goto L_0x002c\n L_0x002a:\n r9 = r22\n L_0x002c:\n r1 = r0 & 128(0x80, float:1.794E-43)\n if (r1 == 0) goto L_0x0034\n java.lang.String r1 = \"\"\n r10 = r1\n goto L_0x0036\n L_0x0034:\n r10 = r23\n L_0x0036:\n r1 = r0 & 256(0x100, float:3.59E-43)\n if (r1 == 0) goto L_0x003e\n java.lang.String r1 = \"\"\n r11 = r1\n goto L_0x0040\n L_0x003e:\n r11 = r24\n L_0x0040:\n r1 = r0 & 512(0x200, float:7.175E-43)\n if (r1 == 0) goto L_0x004a\n java.util.List r1 = kotlin.collections.CollectionsKt.emptyList()\n r12 = r1\n goto L_0x004c\n L_0x004a:\n r12 = r25\n L_0x004c:\n r1 = r0 & 1024(0x400, float:1.435E-42)\n if (r1 == 0) goto L_0x0056\n java.util.List r1 = kotlin.collections.CollectionsKt.emptyList()\n r13 = r1\n goto L_0x0058\n L_0x0056:\n r13 = r26\n L_0x0058:\n r0 = r0 & 2048(0x800, float:2.87E-42)\n if (r0 == 0) goto L_0x005f\n r0 = -1\n r14 = -1\n goto L_0x0061\n L_0x005f:\n r14 = r27\n L_0x0061:\n r2 = r15\n r6 = r19\n r7 = r20\n r8 = r21\n r2.<init>(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.commerce.preview.footprint.f.<init>(java.lang.String, java.lang.String, java.lang.String, com.ss.android.ugc.aweme.base.model.UrlModel, int, int, java.util.List, java.lang.String, java.lang.String, java.util.List, java.util.List, int, int, kotlin.jvm.internal.DefaultConstructorMarker):void\");\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n ClassWriter classWriter1 = new ClassWriter(2);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"/||OC]6QKvi*G\");\n classWriter0.visitInnerClass(\"I)3(E\\\"fl>%a;-7\", \"8oDTx&g*ZVx?eE@.\", \"/||OC]6QKvi*G\", 1);\n ByteVector byteVector0 = new ByteVector(1);\n String[] stringArray0 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1499, \"long\", \"Code\", \"8oDTx&g*ZVx?eE@.\", stringArray0, false, false);\n methodWriter0.put(byteVector0);\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180372));\n classWriter0.addType(\"H\");\n classWriter0.visitOuterClass(\"H\", \"H\", \"9iniWt>\");\n classWriter0.newField(\"H\", \"H\", \"UNp|{*'V\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"<T'RwU+).UKJX>\";\n stringArray0[1] = \"9iniWt>\";\n stringArray0[2] = \"H\";\n stringArray0[3] = \"UNp|{*'V\";\n boolean boolean0 = true;\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180372), \"H\", \"<T'RwU+).UKJX>\", \"H\", stringArray0, true, false);\n classWriter0.newNameTypeItem(\"9iniWt>\", \"UNp|{*'V\");\n Item item0 = new Item();\n methodWriter0.visitInsn(186);\n Label label0 = new Label();\n Attribute attribute0 = new Attribute(\"9iniWt>\");\n classWriter0.addType(\"<T'RwU+).UKJX>\");\n methodWriter0.visitLocalVariable(\"UNp|{*'V\", \"UNp|{*'V\", \"dVw27M){e/Y(#j\", label0, label0, 1);\n ClassReader classReader0 = null;\n try {\n classReader0 = new ClassReader(\"HL)rLXrkh@[\");\n fail(\"Expecting exception: IOException\");\n \n } catch(Throwable e) {\n //\n // Class not found\n //\n verifyException(\"org.objectweb.asm.jip.ClassReader\", e);\n }\n }", "public static void main(String[] args) {\n Book book0 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book0copy2 = new Book(\"Ulysses\", \"James Joyce\", 732);\n Book book1 = new Book(\"Ender's Game\", \"Orson S. Card\", 324);\n Book book3; //just creates unassigned reference\n Book[] lotr = new Book[3];\n lotr[0] = new Book(\"The Fellowship of the Ring\", \"J.R.R. Tolkien\", 432);\n lotr[1] = new Book(\"The Two Towers\", \"J.R.R. Tolkien\", 322);\n lotr[2] = new Book(\"The Return of the King\", \"J.R.R. Tolkien\", 490);\n\n book0.ripOutPage();\n System.out.print(book0); //calls toString() object method\n\n book1.setAuthor(\"Orson Scott Card\");\n\n for(Book b : lotr) {\n System.out.print(b);\n }\n\n if (book0.isLong()) {\n System.out.println(book0.getTitle() + \" is a long book.\");\n } else {\n System.out.println(book0.getTitle() + \" is a short book.\");\n }\n \n System.out.printf(\"The title of %s by %s is %d characters long.%n\", \n book0.getTitle(), book0.getAuthor(), book0.getTitleLength());\n\n System.out.println(book0.equals(book0copy2));\n System.out.println(book0.equals(book1));\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"tE\", \"Class not found\", \"&h'pH__a\", stringArray0, false, false);\n MethodWriter methodWriter1 = new MethodWriter(classWriter0, 298, \"&h'pH__a\", \"'0\", \"5\", stringArray0, false, false);\n methodWriter1.visitMultiANewArrayInsn(\"'0\", 298);\n methodWriter1.getSize();\n methodWriter0.visitIincInsn(2, 1392510721);\n methodWriter0.visitIincInsn(464, (-1217));\n Object[] objectArray0 = new Object[3];\n objectArray0[0] = (Object) \"Label offset position has not been resolved yet\";\n objectArray0[1] = (Object) methodWriter0;\n objectArray0[2] = (Object) classWriter0;\n methodWriter1.visitFrame(2685, 464, stringArray0, 740, objectArray0);\n assertEquals(3, objectArray0.length);\n }", "public static void main(String[] args) {\n\t//Class name variable - new ClassName(); \n\t\n Car car1=new Car(); // we create a new object by using NEW\n \n //1 Object\n System.out.println(\"---------The first object----------\");\n car1.make=\"Honda\"; //you assign features according to their data type specified in template\n car1.model=\"Civic\"; //we can identify because this object has its unique features\n car1.color=\"Silver\";\n car1.door=4;\n car1.wheels=4; \n \n System.out.println(\"Car \"+car1.make+\" has \"+car1.wheels+\" wheels\");\n // define behavior \n car1.drive(); // if we debug when we run drive will search for same method -> it will jump to line 39\n\t\tcar1.reverse();\n\t\tcar1.honk(); \n \n //2 Object\n Car car2 = new Car();\n System.out.println(\"---------The second object---------\");\n car2.make=\"Tesla\";\n car2.model=\"X\";\n car2.color=\"Blue\";\n car2.door=4;\n car2.wheels=4;\n System.out.println(\"My car is \"+car2.color+ \" \"+car2.make);\n // define behavior\n car2.drive();\n car2.reverse();\n car2.honk();\n}", "public static void main(String[] args) {\nsample1 obj=new sample1();\r\n\t}", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n ClassWriter classWriter0 = new ClassWriter((-4015));\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", \"dVw2Z7M){e/Y(#j\", (String[]) null, false, false);\n methodWriter0.visitInsn((-4015));\n FieldWriter fieldWriter0 = classWriter0.firstField;\n classWriter0.firstField = null;\n Object[] objectArray0 = new Object[7];\n objectArray0[0] = (Object) \"+t1`X]_2(_63\";\n Attribute attribute0 = new Attribute(\"zLWhmp0G*{\");\n ClassReader classReader0 = null;\n try {\n classReader0 = new ClassReader(\"dVw2Z7M){e/Y(#j\");\n fail(\"Expecting exception: IOException\");\n \n } catch(Throwable e) {\n //\n // Class not found\n //\n verifyException(\"org.objectweb.asm.jip.ClassReader\", e);\n }\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"/||OC]6QKvi*G\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"?t|o'XqH!B#u5<FG2z\";\n stringArray0[1] = \"?t|o'XqH!B#u5<FG2z\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 17, \"?t|o'XqH!B#u5<FG2z\", \"?t|o'XqH!B#u5<FG2z\", \"/||OC]6QKvi*G\", stringArray0, false, false);\n methodWriter0.visitVarInsn(17, 2);\n MethodWriter methodWriter1 = classWriter0.firstMethod;\n methodWriter1.visitIntInsn(17, 172);\n MethodWriter methodWriter2 = classWriter0.firstMethod;\n methodWriter2.visitInsn(1);\n assertSame(methodWriter2, methodWriter1);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n Label label0 = new Label();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"oc[MfnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter((-2450));\n classWriter0.newInteger((-2450));\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n classWriter0.newConst(\"Code\");\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"Fj)3/|(;sZXz$\";\n stringArray0[1] = \"Code\";\n stringArray0[2] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[3] = \"~)yCTRxQ#s$y[Ly%\";\n stringArray0[4] = \"Fj)3/|(;sZXz$\";\n stringArray0[5] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[6] = \"Code\";\n stringArray0[7] = \"oc[MfnZM[~MHOK iO\";\n stringArray0[8] = \"Code\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 3, \"\\\".3t\\\"0\", \"~)yCTRxQ#s$y[Ly%\", \"\\\".3t\\\"0\", stringArray0, true, false);\n Label label1 = new Label();\n byte[] byteArray0 = new byte[0];\n label1.resolve(methodWriter0, 168, byteArray0);\n classWriter0.newNameTypeItem(\"Code\", \"Fj)3/|(;sZXz$\");\n Label label2 = new Label();\n methodWriter0.visitFieldInsn(3, \"oc[MfnZM[~MHOK iO\", \"oc[MfnZM[~MHOK iO\", \"*/TEiGBLds&\");\n methodWriter0.visitLdcInsn(\"java/lang/dyn/Dynamic\");\n }", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-32768));\n String[] stringArray0 = new String[2];\n stringArray0[0] = \" u]{2y%.,\";\n stringArray0[1] = \"R$_Ff!sF,uE4P'wGFDy\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1023), \"R$_Ff!sF,uE4P'wGFDy\", \"R$_Ff!sF,uE4P'wGFDy\", \"oc[MfnZM[~MHOK iO\", stringArray0, false, false);\n Object[] objectArray0 = new Object[8];\n objectArray0[0] = (Object) methodWriter0;\n objectArray0[1] = (Object) \" u]{2y%.,\";\n objectArray0[2] = (Object) \" u]{2y%.,\";\n objectArray0[3] = (Object) \" u]{2y%.,\";\n Object object0 = new Object();\n objectArray0[4] = object0;\n objectArray0[5] = (Object) \" u]{2y%.,\";\n objectArray0[6] = (Object) \" u]{2y%.,\";\n objectArray0[7] = (Object) \"R$_Ff!sF,uE4P'wGFDy\";\n methodWriter0.visitFrame(1, (-1274), objectArray0, (-1274), stringArray0);\n assertEquals(8, objectArray0.length);\n }", "public static void main(String[] args)\r\n\t{\r\n\t\tBook b1 = new Book(\"Simple Book\"); // instantiation of Book class. b1.\r\n\t\tScience s1 = new Science(\"Hello Physics!\", \"ScienceWorld\"); // instantiation of Science class. s1.\r\n\t\tHistory h1 = new History(\"What Is history?\", \"E.H.Carr\"); // instantiation of History class. h1\r\n\t\tHistory h2 = new History(\"The South Korea\", \"Judis\");// instantiation of History class. h2\r\n\t\t\r\n\t\tb1.showthebook(); // call to the showthebook method in the book class. b1\r\n \t\ts1.showthebook(); // call to the showthebook method in the Science class. s1\r\n\t\th1.showthebook(); // call to the showthebook method in the History class. h1\r\n\t\th2.showthebook(); // call to the showthebook method in the History class. h2\r\n\t}", "public static void main(String[] args) {\n\t\tAuthor ar = new Author();\r\n\t\tBookdetails bk = new Bookdetails();\r\n\t\tbk.setName(\"Revolution 2020\");\r\n\t\tbk.setPrice(1000);\r\n\t\tbk.setQtyinstack(250);\r\n\t\tar.setName(\"Chetan Bhagat\");\r\n\t\tar.setEmail(\"[email protected]\");\r\n\t\tar.setGender('m');\r\n\t\tSystem.out.println(bk.getName()+\" \"+bk.getPrice()+\" \"+bk.getQtyinstack());\r\n\t\tSystem.out.println(ar.getName()+\" \"+ar.getEmail()+\" \"+ar.getGender()); \r\n}", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(1977);\n FieldWriter fieldWriter0 = (FieldWriter)classWriter0.visitField(2, \"AS \", \"AS \", \"AS \", \"AS \");\n fieldWriter0.visitAnnotation(\"AS \", false);\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "public Book(String firstName, String lastName, String isbn, String title, String date, int numPages)\n {\n this.firstName = firstName;\n this.lastName = lastName;\n this.isbn = isbn;\n this.title = title;\n this.date = date;\n this.numPages = numPages;\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, true);\n ClassWriter classWriter0 = new ClassWriter((-1878));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"\\\"\";\n classWriter0.newLong(0L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n classWriter0.newClass(\"\\\"\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1878), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, true);\n methodWriter0.visitAnnotation(\"\", true);\n methodWriter0.visitFieldInsn(1, \"\\\"\", \"char\", \"3<|siktz\");\n Label label0 = new Label();\n String string0 = label0.toString();\n assertEquals(\"L23\", string0);\n \n ByteVector byteVector0 = classWriter0.pool;\n methodWriter0.signature = \"\";\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(102, \"char\", \"Code\", \"\");\n methodWriter0.visitLocalVariable(\"\\\"\", \"Code\", \"7,9%\\\"lXhsy+;K+!\", label0, label0, 16777239);\n int int0 = methodWriter0.getSize();\n assertEquals(116, int0);\n }", "List method_111(class_922 var1, int var2, int var3, int var4);", "public static LinkedList<String> trackMethod(Class<?> myClass,Integer year,Integer month,Integer day){\n LinkedList<String> result = null;//array with result\n\n /*\n * Map stores methods and their annotations\n * Data are store sorted by MethodNoteBook,\n * because this annotation is describe\n * the queue of executions of methods and\n * descriptions\n */\n Map<MethodNoteBook, Method> map = new TreeMap<MethodNoteBook, Method>(\n new Comparator<MethodNoteBook>() {\n\n @Override\n public int compare(MethodNoteBook o1, MethodNoteBook o2) {\n return o1.name() - (o2.name());\n }\n\n });\n\n try {\n Class classNoteBook = NoteBook.class;\n\n /* Create instance of class */\n NoteBook newInstance = (NoteBook) classNoteBook.getConstructor().newInstance();\n\n /* Put all methods of class to map*/\n for (Method methodNoteBook : myClass.getDeclaredMethods()){\n MethodNoteBook methodClass = methodNoteBook.getAnnotation(MethodNoteBook.class);\n map.put(methodClass,methodNoteBook);\n }\n\n result = new LinkedList<String>();\n\n /* Invoke methods */\n for (Map.Entry<MethodNoteBook, Method> el : map.entrySet()) {\n if (el.getKey().description().compareTo(\"set\") == 0) {\n switch (el.getKey().name()) {\n case 1: //name() of annotation return 1 , so, the first, execute this method\n result.add(\"1 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"lastName\"));\n continue;\n case 2://name() of annotation return 2 , so ,the second, execute this method\n result.add(\"2 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"firstName\"));\n continue;\n case 3:\n result.add(\"3 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"middleName\"));\n continue;\n case 4:\n result.add(\"4 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new String(\"telephone\"));\n continue;\n case 5:\n result.add(\"5 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance, new Integer(year), new Integer(month), new Integer(day));\n continue;\n }\n } else if (el.getKey().name() == 6 && el.getKey().description().compareTo(\"Count days to birthday\") == 0) {\n result.add(\"6 \" + el.getValue().getName() + \" : \" + el.getKey().description());\n el.getValue().invoke(newInstance);\n }\n }\n } catch (NoSuchMethodException e1) {\n e1.printStackTrace();\n } catch (InstantiationException e1) {\n e1.printStackTrace();\n } catch (IllegalAccessException e1) {\n e1.printStackTrace();\n } catch (InvocationTargetException e1) {\n e1.printStackTrace();\n }\n return result;\n }", "@Test(timeout = 4000)\n public void test084() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"\\\"\";\n classWriter0.newLong(32L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n classWriter0.newClass(\"\\\"\");\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, true);\n methodWriter0.visitAnnotation(\"\", true);\n methodWriter0.visitFieldInsn(1, \"\\\"\", \"char\", \"3<|siktz\");\n Label label0 = new Label();\n label0.toString();\n ByteVector byteVector0 = new ByteVector(1);\n byteVector0.putUTF8(\"Label offset position has not been resolved yet\");\n ByteVector byteVector1 = classWriter0.pool;\n byteVector1.putInt(1);\n methodWriter0.put(byteVector1);\n methodWriter0.signature = \"\";\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(102, \"char\", \"Code\", \"\");\n methodWriter0.visitTypeInsn(4, \"zaxCQe&RK=9\");\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-1983180370));\n classWriter0.addType(\"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n String[] stringArray0 = new String[4];\n stringArray0[0] = \"\\\"\";\n stringArray0[1] = \"char\";\n classWriter0.newLong(32L);\n stringArray0[2] = \"\";\n stringArray0[3] = \"\\\"\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, (-1983180370), \"\", \"<T'RwU+).UKJX>\", \"\", stringArray0, true, false);\n methodWriter0.visitAnnotation(\"\", false);\n methodWriter0.visitVarInsn(2, 1);\n methodWriter0.visitFieldInsn(1, \"char\", \"char\", \"<init>\");\n Label label0 = new Label();\n String string0 = label0.toString();\n assertEquals(\"L23\", string0);\n \n ByteVector byteVector0 = new ByteVector(1);\n byteVector0.putShort(1);\n byteVector0.putUTF8(\"Label offset position has not been resolved yet\");\n ByteVector byteVector1 = classWriter0.pool;\n methodWriter0.put(byteVector1);\n methodWriter0.getSize();\n methodWriter0.visitFieldInsn(153, \"char\", \"c8E+g/+VYG;^slpR|N\", \"UuKpnSVn~O3\");\n methodWriter0.visitInsn(2);\n methodWriter0.visitFrame(78, 1, stringArray0, 78, stringArray0);\n int int0 = methodWriter0.getSize();\n assertEquals(90, int0);\n }", "public static class_1198 method_6445() {\r\n class_1198 var10000 = new class_1198;\r\n var10000.method_6436();\r\n class_1198 var0 = var10000;\r\n var0.method_6438(class_985.field_4989.field_5050);\r\n List var1 = var0.method_6440();\r\n class_1205 var10001 = new class_1205;\r\n var10001.method_6469(1, class_1192.field_6032);\r\n var1.add(var10001);\r\n var1 = var0.method_6440();\r\n var10001 = new class_1205;\r\n var10001.method_6469(2, class_1192.field_6028);\r\n var1.add(var10001);\r\n var1 = var0.method_6440();\r\n var10001 = new class_1205;\r\n var10001.method_6469(1, class_1192.field_6027);\r\n var1.add(var10001);\r\n var0.method_6441();\r\n Map var2 = var0.method_6439();\r\n String[] var3 = field_6229;\r\n var2.put(\"village\", new HashMap());\r\n return var0;\r\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The array of suffixes must not be null\", \"O8\", \"wheel.asm.MethodWriter\", (Object) null);\n fieldWriter0.visitAnnotation(\"O8\", false);\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n int int0 = 8;\n ClassWriter classWriter0 = new ClassWriter(8);\n String[] stringArray0 = new String[7];\n stringArray0[0] = \"oc[MfnZM[~xMHOK iO\";\n stringArray0[1] = \"oc[MfnZM[~xMHOK iO\";\n stringArray0[2] = \"oc[MfnZM[~xMHOK iO\";\n stringArray0[3] = \"oc[MfnZM[~xMHOK iO\";\n stringArray0[4] = \"<init>\";\n stringArray0[5] = \"oc[MfnZM[~xMHOK iO\";\n stringArray0[6] = \"oc[MfnZM[~xMHOK iO\";\n MethodWriter methodWriter0 = null;\n try {\n methodWriter0 = new MethodWriter(classWriter0, 2048, \"<init>\", \"oc[MfnZM[~xMHOK iO\", \"oc[MfnZM[~xMHOK iO\", stringArray0, true, true);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public class_1069 method_104(int var1, int var2) {\r\n class_1069 var10000 = new class_1069;\r\n var10000.method_6013(this.field_5907, var1, var2);\r\n class_1069 var4 = var10000;\r\n String[] var15 = class_752.method_4253();\r\n int var5 = 0;\r\n String[] var3 = var15;\r\n\r\n int var7;\r\n label84:\r\n while(true) {\r\n int var16 = var5;\r\n\r\n label81:\r\n while(var16 < this.field_5909.length) {\r\n aji var6 = this.field_5909[var5];\r\n if(var3 == null) {\r\n break label84;\r\n }\r\n\r\n if(var6 != null) {\r\n var7 = var5 >> 4;\r\n class_1072 var8 = var4.method_6019()[var7];\r\n if(var8 == null) {\r\n class_1072 var17 = new class_1072;\r\n var17.method_6072(var5, !this.field_5907.field_1820.field_5736);\r\n var8 = var17;\r\n var4.method_6019()[var7] = var8;\r\n }\r\n\r\n int var9 = 0;\r\n\r\n while(var9 < 16) {\r\n var16 = 0;\r\n if(var3 == null) {\r\n continue label81;\r\n }\r\n\r\n int var10 = 0;\r\n\r\n while(true) {\r\n if(var10 < 16) {\r\n var8.method_6074(var9, var5 & 15, var10, var6);\r\n var8.method_6076(var9, var5 & 15, var10, this.field_5910[var5]);\r\n ++var10;\r\n if(var3 == null) {\r\n break;\r\n }\r\n\r\n if(var3 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n ++var9;\r\n break;\r\n }\r\n\r\n if(var3 == null) {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n ++var5;\r\n if(var3 != null) {\r\n continue label84;\r\n }\r\n break;\r\n }\r\n\r\n var4.method_6021();\r\n break;\r\n }\r\n\r\n class_985[] var11 = this.field_5907.method_2041().method_5541((class_985[])null, var1 * 16, var2 * 16, 16, 16);\r\n byte[] var12 = var4.method_6060();\r\n var7 = 0;\r\n\r\n while(var7 < var12.length) {\r\n var12[var7] = (byte)var11[var7].field_5050;\r\n ++var7;\r\n if(var3 == null) {\r\n break;\r\n }\r\n }\r\n\r\n Iterator var13 = this.field_5912.iterator();\r\n\r\n while(true) {\r\n if(var13.hasNext()) {\r\n class_1051 var14 = (class_1051)var13.next();\r\n var14.method_5961(this, this.field_5907, var1, var2, (aji[])null);\r\n if(var3 == null) {\r\n break;\r\n }\r\n\r\n if(var3 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n var4.method_6021();\r\n break;\r\n }\r\n\r\n return var4;\r\n }", "H create(Method method);", "public static byte[] classWithStrings(@NonNull String className, int cntStringsToGenerate)\n throws Exception {\n\n ClassWriter cw = new ClassWriter(0);\n MethodVisitor mv;\n\n cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, className, null, \"java/lang/Object\", null);\n\n {\n mv = cw.visitMethod(ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n mv.visitCode();\n mv.visitVarInsn(ALOAD, 0);\n mv.visitMethodInsn(INVOKESPECIAL, \"java/lang/Object\", \"<init>\", \"()V\", false);\n mv.visitInsn(RETURN);\n mv.visitMaxs(1, 1);\n mv.visitEnd();\n }\n {\n mv = cw.visitMethod(ACC_STATIC, \"<clinit>\", \"()V\", null, null);\n mv.visitCode();\n for (int i = 0; i < cntStringsToGenerate; i++) {\n mv.visitFieldInsn(GETSTATIC, \"java/lang/System\", \"out\", \"Ljava/io/PrintStream;\");\n mv.visitLdcInsn(\"generated_string_\" + className + \"_\" + i);\n mv.visitMethodInsn(\n INVOKEVIRTUAL,\n \"java/io/PrintStream\",\n \"println\",\n \"(Ljava/lang/String;)V\",\n false);\n }\n mv.visitInsn(RETURN);\n mv.visitMaxs(2, 0);\n mv.visitEnd();\n }\n cw.visitEnd();\n\n return cw.toByteArray();\n }", "public static void main(String[] args) {\n\t\tStudent2 s2 = new Student2(123, \"Hans\", \"UP\", 'I');\r\n\t\tSystem.out.println(s2.id + \" \" + s2.name + \" \" + s2.address);\r\n\t\t// creating multiple object of same type.\r\n\t\tStudent2 s3 = new Student2(123, \"mohan\", \"Naini\", 'N'), s4 = new Student2(123, \"rani\", \"nainital\", 'u');\r\n\t}", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\t \r\n\tClass<?> t = Class.forName(\"Java_Oops.ForNameObjectCreation\");\r\n\tObjectCreation_1 obj = ((ObjectCreation_1) t.newInstance());\r\n\t \t\t\t\t obj.display();\t\r\n\t\t\t\t\t }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2320);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"xp:%03,6Y\";\n stringArray0[1] = \"StackMap\";\n stringArray0[2] = \"Signature\";\n stringArray0[3] = \"StackMap\";\n stringArray0[4] = \"StackMap\";\n stringArray0[5] = \"StackMap\";\n stringArray0[6] = \"StackMap\";\n stringArray0[7] = \"Signature\";\n stringArray0[8] = \"Signature\";\n MethodVisitor methodVisitor0 = classWriter0.visitMethod(54, \"Signature\", \"StackMap\", \"Signature\", stringArray0);\n String[] stringArray1 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2127, \"c6c)y~[K\", \"c6c)y~[K\", \"c6c)y~[K\", stringArray1, true, true);\n methodWriter0.visitAnnotation(\"c6c)y~[K\", true);\n Object[] objectArray0 = new Object[5];\n objectArray0[0] = (Object) methodWriter0;\n objectArray0[2] = (Object) classWriter0;\n Object object0 = new Object();\n objectArray0[3] = object0;\n objectArray0[4] = (Object) classWriter0;\n methodWriter0.visitFrame(115, 2320, objectArray0, 2764, objectArray0);\n assertFalse(methodWriter0.equals((Object)methodVisitor0));\n }", "public static void main(String[] args) {\n\t\tBook b1=new Book();\n\t\t//Who is setting all these values?programmer\n\t\tb1.setAuther(\"Robert\");\n\t\tb1.setBookid(123);\n\t\tb1.setPrice(9202);\n\t\tb1.setPublication(\"TMH\");\n\t\t//who is managing the life cycle of the book object which b1?programming\n\t\t//who is managing the dependency of book ? programmer\n\t\t\n\t\tString result=b1.print();\n\t\tSystem.out.println(result);\n\t}", "public static void main(String args[]){\n //---------------------------------------------------------------------------\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassVariables classVariables=new ClassVariables(sqlTagsGeneratorTable);\n System.out.println(classVariables.getClassVariablesMethods());\n\t}", "public static void main(String[] args) {\nConstructor x=new Constructor(32,10000,2,\"lavanya\");\r\nSystem.out.println(\"age is\"+a);\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2452);\n classWriter0.index = (-4211);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2452, \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\", \"jyY)^e *Uz#>@n8v((\");\n ByteVector byteVector0 = new ByteVector();\n fieldWriter0.put(byteVector0);\n }", "public static void main(String[] args) {\n\t\tObject o1=new Object();\r\n\t\tObject o2=new RbiBank();\r\n\t\tObject o3=new HdfcBank();\r\n\t\tObject o4=new IciciBank();\r\n\t\tObject o5=\"RBG Technologies\";\r\n\t\tObject o6=10;\r\n\t\tObject o7=true;\r\n\t\r\n\t\t\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"oc[MnZM[~MHOK iO\");\n ClassWriter classWriter0 = new ClassWriter(184);\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 184, \"oc[MnZM[~MHOK iO\", \"Fj)3/|(;sZXz$\", \"oc[MnZM[~MHOK iO\", (String[]) null, true, false);\n classWriter0.newFloat(184);\n Object object0 = new Object();\n methodWriter0.visitFrame(184, 1, (Object[]) null, 178, (Object[]) null);\n classWriter0.newUTF8(\"oc[MnZM[~MHOK iO\");\n methodWriter0.visitFieldInsn(178, \"KY0B/+MuB[P.E(8)u)\", \"oc[MnZM[~MHOK iO\", \"Fj)3/|(;sZXz$\");\n MethodWriter methodWriter1 = methodWriter0.next;\n byte[] byteArray0 = new byte[8];\n byteArray0[0] = (byte)63;\n byteArray0[1] = (byte)18;\n byteArray0[2] = (byte) (-117);\n byteArray0[3] = (byte)40;\n byteArray0[4] = (byte) (-74);\n byteArray0[5] = (byte) (-126);\n byteArray0[6] = (byte)6;\n byteArray0[7] = (byte) (-116);\n ClassReader classReader0 = null;\n try {\n classReader0 = new ClassReader(byteArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 8\n //\n verifyException(\"org.objectweb.asm.jip.ClassReader\", e);\n }\n }", "public static void main(String args[]) { \r\n\tCW27FebClass dog =new CW27FebClass(); //Constructor declaration\r\n\tdog.bark(); // Object creation & Calling the Class method execution \r\n\tdog.walk();\r\n\tSystem.out.println(\"Print the Class Method Declaration tail variable :\" +dog.tail);\r\n\tSystem.out.println(\"Print the Class Method Declaration legs variable :\" +dog.legs);\r\n\t\r\n}", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(9);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 9, \"jyY)^e *=Uz#>@n8v((\", \"jyY)^e *=Uz#>@n8v((\", (String) null, \"jyY)^e *=Uz#>@n8v((\");\n ByteVector byteVector0 = classWriter0.pool;\n fieldWriter0.put(byteVector0);\n }", "public static void main(String[] args) {\nSystem.out.println(\"Hello World.....!!!!\");\r\nHello_World e3=new Hello_World(1,2,3);\r\nHello_World e6=new Hello_World(1,2,3);\r\nHello_World e7=new Hello_World(1,2,3);\r\nHello_World e4=new Hello_World();\r\nHello_World e5=new Hello_World();\r\nHello_World e1=new Hello_World(\"ABC\",\"1\"); \r\nHello_World e2=new Hello_World(\"ABC\",\"1\"); \r\nSystem.out.println(\"Number of Hello_World objects created =\"+ objectcount);\r\n}", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"tE\", \"Class not found\", \"&h'pH__a\", stringArray0, false, false);\n Object object0 = new Object();\n methodWriter0.visitFrame(76, (-1840700267), stringArray0, (-3070), stringArray0);\n methodWriter0.visitTypeInsn((-1739978762), \"Label offset position has not been resolved yet\");\n methodWriter0.visitAnnotation(\"^(V^iU1h\", false);\n methodWriter0.visitTypeInsn(218, \"xp:%03,6Y\");\n int int0 = methodWriter0.getSize();\n assertEquals(72, int0);\n }", "public static byte[] classWithEmptyMethods(String className, String... namesAndDescriptors)\n throws Exception {\n\n ClassWriter cw = new ClassWriter(0);\n MethodVisitor mv;\n\n cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, \"test/\" + className, null, \"java/lang/Object\", null);\n\n {\n mv = cw.visitMethod(ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n mv.visitCode();\n mv.visitVarInsn(ALOAD, 0);\n mv.visitMethodInsn(INVOKESPECIAL, \"java/lang/Object\", \"<init>\", \"()V\", false);\n mv.visitInsn(RETURN);\n mv.visitMaxs(1, 1);\n mv.visitEnd();\n }\n for (String namesAndDescriptor : namesAndDescriptors) {\n int colon = namesAndDescriptor.indexOf(':');\n String methodName = namesAndDescriptor.substring(0, colon);\n String descriptor =\n namesAndDescriptor.substring(colon + 1, namesAndDescriptor.length());\n {\n mv = cw.visitMethod(ACC_PUBLIC, methodName, descriptor, null, null);\n mv.visitCode();\n // This bytecode is only valid for some signatures (void methods). This class is used\n // for testing the parser, we don't ever load these classes to a running VM anyway.\n mv.visitInsn(RETURN);\n mv.visitMaxs(0, 1);\n mv.visitEnd();\n }\n }\n cw.visitEnd();\n\n return cw.toByteArray();\n }", "public static void main(String[]args) { \n Box box1 = new Box();\n box1.setHeight(4);\n box1.setLength(4);\n box1.setWidth(6);\n System.out.println(box1);\n/** part 12 call method */ \n Box box2 = new Box( 3, 4, 5);\n System.out.println(box2);\n/** part 16 call method */ \n Box box3 = new Box(5);\n System.out.println(box3);\n \n }", "BOpMethod createBOpMethod();", "public static void main(String[] args) {\nconstructorDemo obj=new constructorDemo();\nconstructorDemo obj1=new constructorDemo(\"My Parameter\");\nconstructorDemo obj2=new constructorDemo(123);\nconstructorDemo obj3=new constructorDemo(123,6);\nSystem.out.println(\"code after creating object\");\nobj.hello();\nobj.hello(\"hi\");\n\t}", "private void initMethods(Method[] _methods, ConstantPoolGen cp)\n\t\tthrows ReadAttributeException {\n\t\tmethods = new HashMap();\n\t\t//\tfor (int i = 0; i < _methods.length; i++) {\n\t\tfor (int i = 0; i < _methods.length ;i++) {\n\t\t\tMethodGen mg = new MethodGen(_methods[i], className, cp);\n\t\t\tBCMethod bcm = new BCMethod(mg, this, cp);\n\t\t\tString signature = mg.getSignature();\t\n\t\t\tString key = MethodSignature.getSignature(bcm.getName(), bcm.getArgTypes(), bcm.getReturnType());\n\t\t\t/*Util.dump(\" add method \" + key + \" in class \" + getName() );*/\n\t\t\tmethods.put(key,bcm);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\tBook b2=Book.getinstanceof();\r\n\t\t\t\r\n\t\t\tBook b3=Book.getinstanceof();\r\n\t\t\tSystem.out.println(b2==b3);\r\n\t\t\r\n\t}", "public Book create(String title,double price, Author author)\r\n {\r\n return new Book(title,price,author);\r\n }", "public BookAuthor(){}", "Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }", "NewClass1 createNewClass1();", "private BookReader() {\r\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter((-2252));\n String[] stringArray0 = new String[5];\n stringArray0[0] = \"Code\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"Code\";\n stringArray0[3] = \"Code\";\n stringArray0[4] = \"Code\";\n MethodWriter methodWriter0 = null;\n try {\n methodWriter0 = new MethodWriter(classWriter0, 1, \"\", \"\", \"Code\", stringArray0, true, false);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public Person createPerson(String fullName, int age, String phone, String email, String favMovie, String city, String street, Profession profession, HashMap<String, Double> weightTable, ArrayList<String> hobbies) {\n startMetrics();\n String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();\n\n Person p = new Person(fullName,age,phone,email,favMovie,city,street,profession,weightTable,hobbies);\n p.setFullName(fullName);\n p.setAge(age);\n p.setPhone(phone);\n p.setEmail(email);\n p.setFavouriteMovie(favMovie);\n p.setCityName(city);\n p.setStreetName(street);\n p.setProfession(profession);\n p.setWeightTable(weightTable);\n p.setHobbies(hobbies);\n\n System.out.println(p.toString());\n\n printMethodName(methodName);\n stopMetrics();\n gatherPerformance(methodName);\n return p;\n }", "public BookT(String bookTitle, String bookAuthor, String bookISBN){\r\n\t\tthis.title = bookTitle;\r\n\t\tthis.author = bookAuthor;\r\n\t\tthis.ISBN = bookISBN;\r\n\t}", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(958);\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"O8\";\n classWriter0.visit(50, 50, \"K#fa'T}Gl(X;x\", \"O8\", \"O8\", stringArray0);\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, (byte) (-82), \"The array of suffixes must not be null\", \"O8\", \"wheel.asm.MethodWriter\", (Object) null);\n int int0 = fieldWriter0.getSize();\n assertEquals(22, int0);\n }", "void method_106(class_25 var1, int var2, int var3);", "private static void Demo3() {\n\t\tClass<?> class1 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\ttry {\r\n\t\t\t\tPerson person = (Person) class1.newInstance();\r\n\t\t\t\tperson.setAge(20);\r\n\t\t\t\tperson.setName(\"mark\");\r\n\t\t\t\tSystem.out.println(person.getName() + \" : \" + person.getAge());\r\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(218);\n String string0 = \"'0\";\n String string1 = \"Label offset position has not been resolved yet\";\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"Label offset position has not been resolved yet\";\n stringArray0[1] = \"'0\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2, \"'0\", \"Label offset position has not been resolved yet\", \"'0\", stringArray0, false, false);\n Label label0 = new Label();\n Label label1 = label0.successor;\n Label[] labelArray0 = new Label[3];\n labelArray0[0] = null;\n int int0 = 787;\n String string2 = \"Ljava/lang/Synthetic;\";\n String[] stringArray1 = new String[5];\n stringArray1[0] = \"Label offset position has not been resolved yet\";\n stringArray1[1] = \"'0\";\n stringArray1[2] = \"Label offset position has not been resolved yet\";\n stringArray1[3] = \"<init>\";\n stringArray1[4] = \"2a'9\";\n // Undeclared exception!\n try { \n classWriter0.visitMethod(218, \"Label offset position has not been resolved yet\", \"2a'9\", \"Label offset position has not been resolved yet\", stringArray1);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "public static void main(String[] args) {\n\t\tClass1 words = new Class1(100); //takes constructor and size\r\n\t\twords.load();\r\n\t\tString ssize = 100;\r\n\t\tString [] stuff = new String[ssize];\r\n\t}", "private static void Demo5() {\n\t\tClass<?> class1 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\ttry {\r\n\t\t\t\tObject obj = class1.newInstance();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tField f = class1.getDeclaredField(\"name\");\r\n\t\t\t\t\tf.setAccessible(true);\r\n\t\t\t\t\tf.set(obj, \"HONGHENG\");\r\n\t\t\t\t\tSystem.out.println(f.get(obj));\r\n\t\t\t\t} catch (NoSuchFieldException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (SecurityException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private BookReader() {\n\t}", "public static void main(String[] args) {\n\t\ttoString Obj = new toString(7,7,2015);\n\n\t}", "public static void main(String[] args) {\n NonGenericClass nonGen1 = new NonGenericClass(123);\n \n //Creating object by passing String as an argument\n NonGenericClass nonGen2 = new NonGenericClass(\"abc\");\n \n //Creating object by passing Double as an argument\n NonGenericClass nonGen3 = new NonGenericClass(25.69);\n }", "public static void main(String[] args) {\n Person p = new Person();\n p.hello();\n int age = 19;\n Integer arg2 = 19;\n// arg2.intValue();\n char c = 'A';\n byte b = 120;\n float weight = 66.5f;\n boolean adult = true;\n boolean enroll = false;\n String name = \"Richard\";\n\n\n }", "public static void main(String[] args) {\n\t\tString title =\"Hover car racer\";\nbook Newnovel =new Mybook();\nNewnovel.settitle(title);\nSystem.out.println(\"The title of book:\" +Newnovel.gettitle());\n\t}", "private static Book createFirstBookTest() {\n var book = new Book();\n book.setOriginalPriceNumber(1760);\n book.setDescription(\"52ヘルツのクジラとは―他の鯨が聞き取れない高い周波数で鳴く\");\n book.setCategory(\"トップページ > 本・コミック > 文芸 > 文芸(日本) > 現代小説 \");\n return book;\n }", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "@Test(timeout = 4000)\n public void test15() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(1062);\n classWriter0.visitInnerClass(\"StackMapTable\", \"h=~V}s\", \"<init>\", 1928);\n String[] stringArray0 = new String[1];\n stringArray0[0] = \"StackMapTable\";\n MethodWriter methodWriter0 = null;\n try {\n methodWriter0 = new MethodWriter(classWriter0, 1, \"<init>\", \"StackMapTable\", \"3W'(!2iG\", stringArray0, true, true);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }" ]
[ "0.5974858", "0.5948454", "0.5841124", "0.579659", "0.5746668", "0.57299656", "0.5559946", "0.5557512", "0.55316275", "0.551686", "0.54956055", "0.54548967", "0.5421942", "0.5417119", "0.5380808", "0.5344206", "0.53383315", "0.53360856", "0.5316877", "0.5310093", "0.53081304", "0.5306593", "0.5301906", "0.5291171", "0.52632445", "0.523155", "0.5222534", "0.52195126", "0.52110285", "0.52093136", "0.5207112", "0.52038354", "0.51866007", "0.51844233", "0.51839787", "0.5166357", "0.51655227", "0.51646394", "0.5164374", "0.5161059", "0.516053", "0.5148255", "0.51449513", "0.51372766", "0.51355755", "0.5135203", "0.51330703", "0.5125434", "0.5121207", "0.51182264", "0.51161563", "0.5115419", "0.51113546", "0.51094645", "0.5108957", "0.5107018", "0.50939846", "0.5088297", "0.5071015", "0.50699353", "0.505751", "0.50564235", "0.5053591", "0.5046952", "0.5042291", "0.5036622", "0.5036273", "0.5029443", "0.50252414", "0.5023538", "0.50217056", "0.50195664", "0.50073844", "0.50029266", "0.50028145", "0.49932796", "0.49895114", "0.49891135", "0.4988418", "0.49882263", "0.49875042", "0.49855828", "0.49828994", "0.49804097", "0.49793804", "0.4976198", "0.4975352", "0.49732003", "0.49714017", "0.49704623", "0.49689934", "0.4961607", "0.4958993", "0.49574396", "0.49495506", "0.49490148", "0.49457508", "0.49377745", "0.49369892", "0.49279925", "0.49235734" ]
0.0
-1
/ public java.lang.String getSignalName(); Code: 0: aload_0 1: getfield 2 // Field name:Ljava/lang/String; 4: areturn
public void setName(String name) { this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSignal();", "public String getSignalName(int index);", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n signal_ = s;\n }\n return s;\n }\n }", "public java.lang.String getSignal() {\n java.lang.Object ref = signal_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n signal_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public int getSignalNameNumber(String name);", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Field(1) \n\tpublic Pointer<Byte > Name() {\n\t\treturn this.io.getPointerField(this, 1);\n\t}", "java.lang.String getField1009();", "public String name()\r\n/* 256: */ {\r\n/* 257:465 */ return this.name;\r\n/* 258: */ }", "java.lang.String getField1486();", "java.lang.String getField1786();", "java.lang.String getField1186();", "public static native String GetName(long lpjFbxDataType);", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSignalBytes() {\n java.lang.Object ref = signal_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n signal_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getField1286();", "java.lang.String getField1086();", "java.lang.String getField1481();", "java.lang.String getField1781();", "java.lang.String getField1886();", "java.lang.String getField1488();", "java.lang.String getField1681();", "java.lang.String getField1586();", "java.lang.String getField1108();", "java.lang.String getField1788();", "java.lang.String getField1789();", "java.lang.String getCodeName();", "java.lang.String getField1188();", "java.lang.String getField1487();", "java.lang.String getField1477();", "java.lang.String getField1187();", "java.lang.String getField1688();", "java.lang.String getField1687();", "java.lang.String getField1686();", "java.lang.String getField1338();", "java.lang.String getField1787();", "java.lang.String getField1483();", "java.lang.String getField1482();", "java.lang.String getField1783();", "java.lang.String getField1782();", "java.lang.String getField1181();", "public String getName()\n/* */ {\n/* 94 */ return this._name;\n/* */ }", "java.lang.String getField1779();", "public String getName()\r\n/* 23: */ {\r\n/* 24:20 */ return \"Wire demo receiver\";\r\n/* 25: */ }", "java.lang.String getField1442();", "java.lang.String getField1689();", "java.lang.String getField1777();", "java.lang.String getField1427();", "java.lang.String getField1881();", "java.lang.String getField1479();", "java.lang.String getField1183();", "java.lang.String getField1474();", "java.lang.String getField1581();", "java.lang.String getField1168();", "java.lang.String getField1386();", "java.lang.String getField1784();", "Signal getSignal();", "java.lang.String getField1088();", "java.lang.String getField1184();", "java.lang.String getField1428();", "java.lang.String getField1484();", "public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }", "java.lang.String getField1478();", "java.lang.String getField1682();", "java.lang.String getField1189();", "java.lang.String getField1182();", "java.lang.String getField1443();", "java.lang.String getField1476();", "java.lang.String getField1888();", "java.lang.String getField1588();", "java.lang.String getField1757();", "java.lang.String getField1429();", "public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }", "java.lang.String getField1776();", "java.lang.String getField1778();", "java.lang.String getField1081();", "java.lang.String getField1127();", "java.lang.String getField1774();", "java.lang.String getField1727();", "@VTID(7)\r\n java.lang.String name();", "java.lang.String getField1411();", "java.lang.String getField1087();", "java.lang.String getField1179();", "java.lang.String getField1485();", "java.lang.String getField1381();", "java.lang.String getField1744();", "java.lang.String getField1177();", "public String getName()\r\n\t{\r\n\t\treturn name; // gives the value of the name to the caller\r\n\t}", "java.lang.String getField1714();", "java.lang.String getField1674();", "java.lang.String getField1018();", "java.lang.String getField1742();", "java.lang.String getField1444();", "java.lang.String getField1114();", "java.lang.String getField1678();", "java.lang.String getField1288();", "public String name() {\n return myStrVal;\n }", "public String getName()\r\n/* */ {\r\n/* 130 */ return this.name;\r\n/* */ }", "java.lang.String getField1174();", "java.lang.String getField1679();", "java.lang.String getField1109();" ]
[ "0.724697", "0.71326935", "0.6898097", "0.6854777", "0.6652825", "0.65187097", "0.65113944", "0.6460522", "0.64352506", "0.62606317", "0.6256554", "0.6217995", "0.61880726", "0.6180401", "0.61642873", "0.6131155", "0.6130617", "0.611745", "0.6116642", "0.6097398", "0.6095963", "0.6091833", "0.60855836", "0.6081408", "0.6080981", "0.606295", "0.6059507", "0.6059294", "0.6058098", "0.6045859", "0.6042443", "0.6035852", "0.6035794", "0.6032461", "0.60176873", "0.6013089", "0.60111547", "0.60103905", "0.60030776", "0.6001424", "0.59979105", "0.5996523", "0.59943366", "0.59926885", "0.5984447", "0.598411", "0.59837526", "0.59816617", "0.5981614", "0.59756905", "0.59754264", "0.59749746", "0.597291", "0.59719074", "0.5965869", "0.5964738", "0.5962558", "0.59606385", "0.5959688", "0.5959599", "0.5958887", "0.59579533", "0.5954463", "0.5952989", "0.59526336", "0.5951534", "0.59499407", "0.59498125", "0.59482044", "0.5943848", "0.59348893", "0.5934719", "0.5933782", "0.59307754", "0.59307206", "0.5930692", "0.59292346", "0.5929153", "0.5926817", "0.59264714", "0.59257156", "0.5923751", "0.5922084", "0.59214544", "0.59178096", "0.5917302", "0.59156644", "0.5913017", "0.5912261", "0.59119153", "0.590927", "0.59085333", "0.5905245", "0.59043413", "0.589934", "0.5898237", "0.589815", "0.58971095", "0.5895646", "0.58953995", "0.5895396" ]
0.0
-1
/ public void setSignalName(java.lang.String); Code: 0: aload_0 1: aload_1 2: putfield 2 // Field name:Ljava/lang/String; 5: return
public int getPages() { return pages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setSignal(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00020000;\n signal_ = value;\n onChanged();\n return this;\n }", "public void setName(String name)\n/* */ {\n/* 84 */ this._name = name;\n/* */ }", "public void setName(String name)\r\n/* */ {\r\n/* 137 */ this.name = name;\r\n/* */ }", "public void setName(String name)\n/* */ {\n/* 53 */ this.name = name;\n/* */ }", "public void setName(String name)\r\n/* 29: */ {\r\n/* 30:23 */ this.name = name;\r\n/* 31: */ }", "public void setName(String n){ name=n; }", "@VTID(18)\n void setName(\n java.lang.String rhs);", "public String getSignalName(int index);", "void setName(String s);", "public void set(String name, PyObject value) {\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setName(String string) {\n\t\t\n\t}", "public void setName(final String pName){this.aName = pName;}", "java.lang.String getSignal();", "public final void setName(String name) {_name = name;}", "void setName(String strName);", "public void setName(String name) {\n this.name = name; // assigning a local variable value to a global variable\r\n }", "private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }", "void setName(String name_);", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setName(String name){this.name=name;}", "public void setName(String name) {\n fName= name;\n }", "public void setName(java.lang.String aName);", "public void setName(String name){this.name = name;}", "protected abstract void setName(String string);", "public void setNameString(String s) {\n nameString = s;\r\n }", "@DISPID(5)\n\t// = 0x5. The runtime will prefer the VTID if present\n\t@VTID(12)\n\tvoid name(java.lang.String pVal);", "public void setName (String Name);", "public void setName (String Name);", "public void setName (String Name);", "@Override\n\tpublic void setName(String name) {\n\t\theldObj.setName(name);\n\t}", "public int getSignalNameNumber(String name);", "public void setName(java.lang.String value);", "public void setName(java.lang.String value);", "public void setName(String inName)\n {\n\tname = inName;\n }", "@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid name(java.lang.String pVal);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }", "public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }", "public void setName(String newname){\n name = newname; \n }", "public void setName (String newName)\n {\n this.name = newName; \n }", "public void setName(String n);", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }", "public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }", "public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "private void setNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n name_ = value.toStringUtf8();\n }", "public void setName(String name) {\n//\t\tif((name==null) || (name.length()<2)){\n//\t\t\tthrow new RuntimeException(\"Name muss mindestens 2 Zeichen enthalten!\");\n//\t\t}\n\t\tthis.name = name;\n\t}", "protected abstract void setMyName(String name);", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }", "public void setName(String arg0) {\n\t\t\n\t}", "@Override\n\tpublic void setName(String arg0) {\n\n\t}", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "void setName(String name);", "private void setNewNameBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n newName_ = value.toStringUtf8();\n }", "private native static int shout_set_name(long shoutInstancePtr, String name);", "public static String setterName(String name) {\n return genMethodName(name, \"set\", null);\n }", "@Override\r\n public void setName(String name) {\n }", "public static void setName(String n){\n\t\tname = n;\n\t}", "public void setString(String parName, String parVal) throws HibException;", "public void setName(java.lang.String newName)\r\n{\r\n\tname = newName;\r\n}", "public void setName(String inName)\n {\n name = inName;\n }", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name);", "public void setName(String name){\n this.name = name;\n }", "@Override\n public void setName(String name) {\n\n }", "public abstract void setName( String name ) throws SourceException;", "private void setName() {\n\t\t//MAKE SURE NOT TO GET ACCIDENTAL RECURSION HERE\n\t\t//DO NOT JUST MAKE A NEW TRIAD AND COMPARE TO CURRENT TRIAD\n\t\t//UNLESS ??? MAYBEDON\"T PUT SET NAME IN THE CONSTRUCTOR?\n\t\t//SIMILAR PROBLEM TO SETINVERSION\n\t\t\n\t\t//major, minor, diminished, augmented\n\t\t//this.name = name;\n\t}", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "protected void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name)\n {\n _name = name;\n }", "protected void setPatchName(Patch p, String name) {\n if (patchNameSize == 0) {\n ErrorMsg.reportError(\"Error\", \"The Driver for this patch does not support Patch Name Editing.\");\n return;\n }\n \n while (name.length() < patchNameSize)\n name = name + \" \";\n \n byte[] namebytes = new byte[patchNameSize];\n try {\n namebytes = name.getBytes(\"US-ASCII\");\n for (int i = 0; i < patchNameSize; i++)\n p.sysex[patchNameStart + i] = namebytes[i];\n } catch (UnsupportedEncodingException ex) {\n return;\n }\n }", "public void setName(String new_name){\n this.name=new_name;\n }", "public void setName(String name) throws Exception;", "@Override\n public void setLabel(String arg0)\n {\n \n }", "public native void setIdentifier (String identifier);", "public abstract void setString(String paramString1, String paramString2) throws InvalidDLNAProtocolAttributeException;" ]
[ "0.6774108", "0.6447041", "0.64104307", "0.63821834", "0.637256", "0.6250107", "0.62300503", "0.6192945", "0.6178019", "0.6158047", "0.61237305", "0.61237305", "0.61237305", "0.61138695", "0.61075383", "0.6084698", "0.60731345", "0.60718", "0.60645026", "0.6045492", "0.6044034", "0.6038484", "0.6032513", "0.6004702", "0.599034", "0.59802306", "0.59752595", "0.5934282", "0.5924197", "0.5919729", "0.5919729", "0.5919729", "0.59090245", "0.58923954", "0.58867407", "0.58867407", "0.58758783", "0.58697647", "0.5868123", "0.5868123", "0.5868123", "0.58451086", "0.58431953", "0.5839347", "0.58334225", "0.5831225", "0.58226645", "0.58138955", "0.58138955", "0.58138955", "0.58135843", "0.58135843", "0.58135843", "0.5812827", "0.5806595", "0.5801705", "0.5801359", "0.5800907", "0.5798213", "0.5797236", "0.5797236", "0.5797236", "0.5797236", "0.5797236", "0.5797236", "0.579692", "0.5785118", "0.57729584", "0.5764376", "0.575771", "0.5755858", "0.575269", "0.57419455", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.57406545", "0.5735126", "0.57272005", "0.5724422", "0.57223773", "0.5720946", "0.5713449", "0.57104146", "0.57104146", "0.57104146", "0.57104146", "0.5706163", "0.56975675", "0.5692155", "0.5687066", "0.5684227", "0.56804705", "0.5679197" ]
0.0
-1
/ public int getPages(); Code: 0: aload_0 1: getfield 3 // Field pages:I 4: ireturn
public void setPages(int pages) { this.pages = pages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPages()\n {\n return pages;\n }", "public int getPages() {\n return pages;\n }", "public int getPages(){\n return pages;\n }", "Pages getPages();", "int getPagesAmount();", "public int getPages() {\n return pages;\n }", "public int getPages() {\n return pages;\n }", "Integer getPage();", "int getPage();", "int getNumPages();", "int getPageNumber();", "public String getPages() {\n return pages;\n }", "public int getPageCount() { return _pages.size(); }", "private int pagesLeft() {\n return this.pages - this.pagesRead;\n }", "public int getNumPages()\n {\n return numPages;\n }", "int getPagesize();", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "long getAmountPage();", "public Vector<WbRecord> getAllPages() {\n\t\tVector<WbRecord> content = getNPages(130000000);\n\t\tSystem.out.println(\"Number of pages expected:\t\" + this.numPagesRequested);\n\t\tSystem.out.println(\"Actual number of pages wbRecordReader crawl:\t\" + this.totalNumPagesRetrieved);\n\t\treturn content;\n\t}", "public int getGatheredPages() {\r\n return gatheredPages;\r\n }", "public Set getPages () {\n return pages;\n }", "public int getTotalPages() {\r\n return totalPages;\r\n }", "@Override\n public int numberOfPages() {\n // TODO Auto-generated method stub\n throw new UnsupportedOperationException(\"Unsupported operation\");\n }", "public int numPages() {\n return numPages;\n }", "public Integer getPage() {\n return page;\n }", "public int getTotalPages()\r\n {\r\n return pageNames.size()-1;\r\n }", "@Override\r\n\tpublic int getPaging() {\n\t\treturn 0;\r\n\t}", "public Integer getPerPage();", "public int numPages() {\n // some code goes here\n return (int)Math.ceil(f.length()/BufferPool.PAGE_SIZE);\n \n }", "int getPageSize();", "int getPageSize();", "int getPageSize();", "int getPageSize();", "List<? extends Page> getPages();", "public synchronized byte[] nextPage() throws IOException {\n if (curPageId < numPages) {\n long offset = poList.get(curPageId);\n long length = curPageId == numPages - 1 ? clusterOffset + clusterLength - offset :\n poList.get(curPageId + 1) - offset;\n System.out.println(\"1567 byte[] nextPage() length \"+length+\" clusterId \"+clusterId+\" curPageId \"+curPageId+\" offset \"+offset);\n byte[] page = sr.readPage(clusterId, curPageId, offset, length, cachePage).array();\n curPageId++;\n return page;\n } else {\n return null;\n }\n }", "public Integer getPageCount();", "public SQLInteger getPage() {\n\t\treturn page;\n\t}", "public List<Page> getPages() {\r\n\t\treturn immutablePageList;\r\n\t}", "Page getPage();", "public PDFPage getPage(int anIndex) { return _pages.get(anIndex); }", "public void setPages(int pages) {\n this.pages = pages;\n }", "public int numPages() {\n // some code goes here\n return (int) Math.ceil(m_f.length() / BufferPool.PAGE_SIZE);\n }", "public Set<IPage> getPages() {\n\t\treturn pages;\n\t}", "public int numPages() {\n \t//numOfPages = (int)(this.fileName.length()/BufferPool.PAGE_SIZE);\n return numOfPages;\n }", "public Integer getPageIdx() {\n return pageIdx;\n }", "long getPageSize();", "long getPageSize();", "long getPageSize();", "public int getPageCount()\n {\n return _pages.size();\n }", "public List<PdfPage> getPages() {\n return this.pages;\n }", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPage();", "PageAgent getPage();", "public int getPagesCrawled() {\n return pagesCrawled;\n }", "public int getPageNo() {\n return pageNo;\n }", "int getCurrentPage();", "private ArrayList<Integer> getPageLinks() {\n int numberOfPages = sqlData.getNumberOfPages();\n\n int n = (pageNumInt / numberOfPages);\n Integer startPage = n * numberOfPages;\n\n ArrayList<Integer> pageLinks = new ArrayList<Integer>();\n\n // iterate and add to the array\n for(int i=0; i < numberOfPages; i++) {\n pageLinks.add(++startPage); \n }\n\n return pageLinks;\n \n }", "public abstract int getPageFreeSpace(int bucket);", "public Page getPage() {return page;}", "@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}", "io.dstore.values.IntegerValue getPageNo();", "io.dstore.values.IntegerValue getPageNo();", "public int getTotalPages() {\r\n\t\treturn page.getTotalPages();\r\n\t}", "io.dstore.values.StringValueOrBuilder getPageOrBuilder();", "public ArrayList<DiscoveryPage> getPages() {\n return pages;\n }", "public int numPages() {\n // some code goes here\n //System.out.println(\"File length :\" + f.length());\n\n return (int) Math.ceil(f.length() * 1.0 / BufferPool.PAGE_SIZE * 1.0);\n }", "List<T> findPage(int pageNumber);", "private int readPage(String loc) throws SAXException\r\n\t{\r\n\t\tif(loc.startsWith(\"page\"))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tint page = Integer.parseInt(loc.substring(4));\r\n\t\t\t\tif(page < 0 || page > 15) throw new SAXException(\"RAM page \" + page + \" is not valid.\");\r\n\t\t\t\treturn page;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tthrow new SAXException(\"Cannot decode RAM page \" + loc + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Variable.ACCESS_BANK;\r\n\t}", "public Collection<Page> getPages() {\n return Collections.unmodifiableCollection(pages);\n }", "lanyotech.cn.park.protoc.CommonProtoc.PageHelperOrBuilder getPageOrBuilder();", "private int getFastForwardPages() {\r\n\t\tint pageSize = getPageSize();\r\n\t\treturn pageSize > 0 ? fastForwardRows / pageSize : 0;\r\n\t}", "public Integer getCurrentPage();", "io.dstore.values.StringValue getPage();", "public List<PageNode> getPages() {\n\t\treturn page_terms;\n\t}", "public int indexOf(PDFPage aPage) { return _pages.indexOf(aPage); }", "public String getReturnPage() {return returnPage;}", "public int getCurrentPage();", "public ArrayList<PageNumber> getPageNumbers()\r\n\t{\r\n\t\tArrayList<PageNumber> returnVal = new ArrayList<PageNumber>();\r\n\t\t\r\n\t\tif (((this.pageBackingBean.getCurrentUser() != null && this.pageBackingBean.getCurrentUser().isActive()) || this.settingEjb\r\n\t\t .getBooleanSettingByName(Constants.SETTING_SEARCH_ALLOW_NON_USERS))\r\n\t\t && !(this.settingEjb.getBooleanSettingByName(Constants.SETTING_SEARCH_INDEXING_COMMENCED)))\r\n\t\t{\r\n\t\t\t// The page to stop at\r\n\t\t\tlong endingPage = this.totalHits / this.resultsPerPage;\r\n\t\t\tif ((this.totalHits % this.resultsPerPage) > 0)\r\n\t\t\t{\r\n\t\t\t\tendingPage++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// If we are past the number 6, we need to begin scrolling the result list with the current page\r\n\t\t\tif (this.resultsPage > 6)\r\n\t\t\t{\r\n\t\t\t\tif (endingPage > this.resultsPage + 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tendingPage = this.resultsPage + 4;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = this.resultsPage - 5; i <= endingPage; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\treturnVal.add(new PageNumber(String.valueOf(i), i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If we are at or below page 6, we just show page numbers 1 - 10\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (endingPage > 10)\r\n\t\t\t\t{\r\n\t\t\t\t\tendingPage = 10;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 1; i <= endingPage; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\treturnVal.add(new PageNumber(String.valueOf(i), i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn returnVal;\r\n\t}", "public interface PersonPageIterator extends PageIteratorBase {\n\t\n\tPerson2[] prev() throws RemoteException;\n\t\n\tPerson2[] current() throws RemoteException;\n\t\n\tPerson2[] next() throws RemoteException;\n\t\n\tPerson2[] goTo(int page) throws RemoteException;\n\n}", "public IScapSyncSearchPage[] getPages();", "short getPageStart();", "io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder();", "io.dstore.values.IntegerValueOrBuilder getPageNoOrBuilder();", "static int pageCount(int n, int p) {\n \tint i=1;\n int count=0,mid=0,t=0;\n if(n%2==0)\n {\n t=n;\n\n }\n else\n {\n t=n-1;\n\n }\n \tmid=n/2;\n\n if(n==p)\n return 0;\n if(mid>=p){\n while(i<p){\n i=i+2;\n count++;\n }\n }else{\n while(t>p){\n t=t-2;\n count++;\n }\n }\n return count;\n }", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();", "lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();", "public List<Page> getPageList() {\n return conf.getPages().getPage();\n }", "public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }", "public Iterator<Integer> getPageCountIterator();", "@Override\r\n\t\tpublic int getCurrentpage() throws Exception\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}", "private static int lastPage(PdfReader pdfFile){\n int pages;\n\n pages = pdfFile.getNumberOfPages();\n\n return(pages);\n }", "Page getPage(int index);", "@Override\n\tpublic Integer getTotalPages(ConditionInfo cf) {\n\t\treturn rd.getTotalPages(cf);\n\t}", "public Iterator<T> getPageElements();", "public int getNumPageFrames() {\n return ram.length;\n }", "public String getPageNum() {\r\n return pageNum;\r\n }", "default Integer getPageSize() {\n return 10;\n }" ]
[ "0.7723648", "0.76646066", "0.7660696", "0.76224303", "0.7499715", "0.7496874", "0.7496874", "0.7305816", "0.7287281", "0.7230891", "0.68642634", "0.6842185", "0.682082", "0.67524797", "0.6727606", "0.65794617", "0.654052", "0.654052", "0.654052", "0.654052", "0.6509123", "0.64651304", "0.64260495", "0.6392551", "0.63819665", "0.6370163", "0.6360693", "0.6339354", "0.6304016", "0.626281", "0.62461627", "0.62343997", "0.6199903", "0.6199903", "0.6199903", "0.6199903", "0.6188786", "0.61847633", "0.6184168", "0.6172747", "0.61461526", "0.61447775", "0.61275464", "0.6121341", "0.61200494", "0.6108178", "0.60855097", "0.60710657", "0.60234094", "0.60234094", "0.60234094", "0.60195", "0.5995641", "0.59794974", "0.59710544", "0.5965022", "0.59615856", "0.5946683", "0.5938735", "0.59168077", "0.5888093", "0.5871958", "0.5855496", "0.5855496", "0.5854529", "0.5850663", "0.5838795", "0.58281404", "0.5802505", "0.5797535", "0.57932746", "0.578768", "0.5782607", "0.57794976", "0.5774625", "0.57702243", "0.5750621", "0.57456887", "0.5742081", "0.57373935", "0.5729221", "0.5720727", "0.57140505", "0.5713114", "0.5713114", "0.570823", "0.5702616", "0.5702616", "0.5702616", "0.5696603", "0.56906", "0.5685934", "0.56798786", "0.5676831", "0.5670418", "0.56676126", "0.5655989", "0.5648458", "0.5638058", "0.5632427" ]
0.6042988
48
/ public void setPages(int); Code: 0: aload_0 1: iload_1 2: putfield 3 // Field pages:I 5: return
public int getDate() { return date; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPages(int pages) {\n this.pages = pages;\n }", "public void setPages(int pages) {\n this.pages = pages;\n }", "public void setPage(int value) {\n this.page = value;\n }", "public Set getPages () {\n return pages;\n }", "public void setPage(Page page) {this.page = page;}", "public void setPage(int page) {\n this.page = page;\n }", "public void setPage(Integer page) {\n this.page = page;\n }", "public void setPage(SQLInteger page) {\n\t\tthis.page = page;\n\t}", "public int getPages(){\n return pages;\n }", "public void setPages(List<PdfPage> pages) {\n this.pages = pages;\n }", "public int getPages() {\n return pages;\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public int getPages()\n {\n return pages;\n }", "void setPage(int index) throws IndexOutOfBoundsException;", "public int getPages() {\n return pages;\n }", "public int getPages() {\n return pages;\n }", "public void setPages(String pages) {\n this.pages = pages == null ? null : pages.trim();\n }", "int getPagesAmount();", "public void setPageableParams(Page pageObj) {\n\n if(pageObj ==null){\n\n return;\n\n }\n // Set the current page number\n setPageNumber(pageObj.getNumber());\n\n // Set the total pages\n setTotalPages(pageObj.getTotalPages());\n\n // Set the total elements in all pages\n setTotalElements(pageObj.getTotalElements());\n\n }", "public void setPage(ICPage page) {\n \t\t_page = page;\n \t}", "public void setPageIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n pageIncrement = value;\n }\n }", "public void run() {\n int lastpage = 0xFFFFFFFF - 0xFFF;\n Page P = (Page) MAGIC.cast2Struct(lastpage);\n P.data[0] = 2;\n\n }", "public void setPage(Page page) {\n\t\tthis.page = page;\n\t}", "void setPageStart(short start);", "public void setPage(org.biocatalogue.x2009.xml.rest.PageParameter page)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.PageParameter target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.PageParameter)get_store().find_element_user(PAGE$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.PageParameter)get_store().add_element_user(PAGE$2);\r\n }\r\n target.set(page);\r\n }\r\n }", "public void setPage(Page page)\r\n {\r\n this.pageId = page.getId();\r\n }", "Pages getPages();", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n PageId pid= page.getId();\n HeapPageId hpid= (HeapPageId)pid;\n\n RandomAccessFile rAf=new RandomAccessFile(f,\"rw\");\n int offset = pid.pageNumber()*BufferPool.PAGE_SIZE;\n byte[] b=new byte[BufferPool.PAGE_SIZE];\n b=page.getPageData();\n rAf.seek(offset);\n rAf.write(b, 0, BufferPool.PAGE_SIZE);\n rAf.close(); \n page.markDirty(false,null); \n }catch (IOException e){\n e.printStackTrace();\n }\n\n }", "public void setPageNo(int pageNo) {\n this.pageNo = pageNo;\n }", "public void setPage(Page page) throws SQLException {\n\t\tif (page.getId() == -1) {\n\t\t\tpage.setId(upodDao.nextAvailableId(Table.PAGE));\n\t\t}\n\t\tupodDao.setPage(page);\n\t}", "Cluster (Set pages) {\n this.pages = pages;\n }", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n PageId pid = page.getId();\n HeapPageId hpid = (HeapPageId) pid;\n\n RandomAccessFile accessor = new RandomAccessFile(f, \"rw\");\n int offset = pid.pageNumber() * BufferPool.PAGE_SIZE;\n byte[] data = new byte[BufferPool.PAGE_SIZE];\n data = page.getPageData();\n\n accessor.seek(offset);\n accessor.write(data, 0, BufferPool.PAGE_SIZE);\n accessor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setPageNumber(String id, int pageNumber)\n { \n IDNode node=(IDNode)idReferences.get(id); \n node.setPageNumber(pageNumber); \n }", "public void setCurrentPage(int pageNumber) {\n\t\t\n\t}", "public void setPage(String page) {\r\n pageEL = page;\r\n }", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for lab1\n }", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n \ttry {\n\t \tRandomAccessFile raf = new RandomAccessFile(m_f, \"rw\");\n\t \traf.seek(page.getId().pageNumber() * BufferPool.PAGE_SIZE);\n\t\t\traf.write(page.getPageData(), 0, BufferPool.PAGE_SIZE);\n\t\t\traf.close();\n \t} catch (IOException e){\n \t\te.printStackTrace();\n \t}\n \t\n }", "int getNumPages();", "public void setStartPage(java.math.BigInteger startPage)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STARTPAGE$12);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STARTPAGE$12);\n }\n target.setBigIntegerValue(startPage);\n }\n }", "private final static void storeIntInPage(final String fileName, final long posInFile, final long value) throws IOException{\n\t\tfinal int defaultPageSize = PageManager.getDefaultPageSize();\n\t\tfinal int pageNumber = (int) (posInFile / defaultPageSize);\n\t\tPageAddress pageAddress = new PageAddress(pageNumber, fileName);\n\t\tbyte[] page = BufferManager.getBufferManager().getPage(defaultPageSize, pageAddress);\n\t\tint posInPage = (int) (posInFile % defaultPageSize);\n\t\tlong toBeStored = value;\n\t\tif(posInPage+3 >= defaultPageSize){\n\t\t\t// the integer must be stored over two pages!\n\t\t\tfor(int i=0; i<4; i++){\n\t\t\t\tif(posInPage>=defaultPageSize){\n\t\t\t\t\t// next page is affected!\n\t\t\t\t\tBufferManager.getBufferManager().modifyPage(defaultPageSize, pageAddress, page);\n\t\t\t\t\tpageAddress = new PageAddress(pageAddress.pagenumber+1, pageAddress.filename);\n\t\t\t\t\tpage = BufferManager.getBufferManager().getPage(defaultPageSize, pageAddress);\n\t\t\t\t\tposInPage %= defaultPageSize;\n\t\t\t\t}\n\t\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\t\ttoBeStored/=256;\n\t\t\t\tposInPage++;\n\t\t\t}\n\t\t} else {\n\t\t\t// optimize the normal case!\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t}\n\n\t\tBufferManager.getBufferManager().modifyPage(defaultPageSize, pageAddress, page);\n\t}", "public void setPageItemCount(Integer pageItemCount) {\n this.pageItemCount = pageItemCount;\n }", "public int getNumPages()\n {\n return numPages;\n }", "public String getPages() {\n return pages;\n }", "public void setPageSize(int value) {\n this.pageSize = value;\n }", "void setPageHeader(PageHeader pageHeader);", "void setPageHeader(PageHeader pageHeader);", "boolean put(PageId pageId, byte[] page);", "public void setPagesPerBatch(int p_int)\n {\n m_pagesPerBatch = p_int < 1 ? DEFAULT_PPB : p_int;\n }", "private int pagesLeft() {\n return this.pages - this.pagesRead;\n }", "public void setPageNo(long pageNo) {\r\n\t\tif (pageNo < 1) {\r\n\t\t\tthis.pageNo = 1;\r\n\t\t} else {\r\n\t\t\tthis.pageNo = pageNo;\r\n\t\t}\r\n\t}", "public Builder setPagesize(int value) {\n bitField0_ |= 0x00000400;\n pagesize_ = value;\n\n return this;\n }", "public Set<IPage> getPages() {\n\t\treturn pages;\n\t}", "public void writePage(Page page) throws IOException {\n \tHeapPage heapPage = (HeapPage)page;\n \tbyte[] byteArray = heapPage.getPageData();\n \t\n \tint pageNumber = heapPage.getId().pageno();\n \tint offSet = (pageNumber)*BufferPool.PAGE_SIZE;\n \t\n \tRandomAccessFile oStream = null;\n \t\n \toStream = new RandomAccessFile(file,\"rw\");\n \toStream.skipBytes(offSet);\n \toStream.write(byteArray);\n }", "public interface HasPages {\n\n void setPageNumberChangedHandler(@Nonnull HasPagination.PageNumberChangedHandler pageNumberChangedHandler);\n\n int getPageNumber();\n\n void setPageNumber(int pageNumber);\n\n void setPageCount(int pageCount);\n\n void setElementCount(long elementCount);\n}", "public void setPageNum(String pageNum) {\r\n this.pageNum = pageNum;\r\n }", "public void set(int category, int page) {\n\t\tthis.category = category;\n\t\tthis.page = page;\n\t}", "@Override\n public int numberOfPages() {\n // TODO Auto-generated method stub\n throw new UnsupportedOperationException(\"Unsupported operation\");\n }", "void setPagination(Pagination pagination);", "@Override\n\tpublic void setPaging(PagingInterface paging) {\n\t\t\n\t}", "@Override\n\tpublic void setPaging(PagingInterface paging) {\n\t\t\n\t}", "public void addPage(int newPage) {\r\n\t\tpage.addAtTail(newPage);\r\n\t}", "int getPage();", "protected void setPageSizeInternal(final int pageSize) {\r\n\t\tthis.pageSize = pageSize;\r\n\t}", "public PageUtil(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}", "int getPageNumber();", "public int getPageCount() { return _pages.size(); }", "@Override\n\tpublic Pool addPage(Page page, Pool pool) {\n\t\tBoolean added = false;\n\t\tclockwise = 0;\n\t\t\n\t\tpage.flag = 1;\n\t\tif ( pool.slots.size() < size) {\n\t\t\twhile (clockwise < pool.slots.size()) { \n\t\t\t\tif(pool.slots.get(clockwise).flag != 0 )\n\t\t\t\t\tpool.slots.get(clockwise).flag = 0;\n\t\t\t\telse {\n\t\t\t\t\tpool.slots.set(clockwise, page);\n\t\t\t\t\tpool.addMiss();\n\t\t\t\t\tadded = true;\n\t\t\t\t}\n\t\t\t\tclockwise++;\n\t\t\t}\n\t\t\tclockwise = clockwise % size;\n\t\t\tif (!added ) {\n\t\t\t\tSystem.out.println(clockwise);\n\t\t\t\tpool.slots.add(page);\n\t\t\t\tpool.addMiss();\n\t\t\t\tadded = true;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if( !added ) {\n\t\t\twhile(pool.slots.get(clockwise).flag != 0) {\n\t\t\t\tpool.slots.get(clockwise).flag = 0;\n\t\t\t\tclockwise++;\n\t\t\t\tclockwise = clockwise % size;\n\t\t\t}\n\t\t\tpool.slots.set(clockwise, page);\n\t\t\tpool.addMiss();\n\t\t\tadded = true;\n\t\t}\n\t\t\n\t\treturn pool;\n\t}", "public Builder page(final int page) {\n if (page >= 0) {\n this.page = page;\n } else {\n throw new IllegalArgumentException(WRONG_PAGE_VALUE);\n }\n\n return this;\n }", "Integer getPage();", "protected void setCurrentPageInternal(final int currentPage) {\r\n\t\tthis.currentPage = currentPage;\r\n\t}", "public PDFPagesTree(PDFFile file) { _dict.put(\"Type\", \"/Pages\"); }", "public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public interface PageSwapper {\n public List<Student> getPage(int currentPage, int ammountOfRecords);\n public int getAmountOfRecords();\n}", "public void addPage(PDFPage aPage) { _pages.add(aPage); }", "private final static void storeLongInPage(final String fileName, final long posInFile, final long value) throws IOException{\n\t\tfinal int defaultPageSize = PageManager.getDefaultPageSize();\n\t\tfinal int pageNumber = (int) (posInFile / defaultPageSize);\n\t\tPageAddress pageAddress = new PageAddress(pageNumber, fileName);\n\t\tbyte[] page = BufferManager.getBufferManager().getPage(defaultPageSize, pageAddress);\n\t\tint posInPage = (int) (posInFile % defaultPageSize);\n\t\tlong toBeStored = value;\n\t\tif(posInPage+7 >= defaultPageSize){\n\t\t\t// the long must be stored over two pages!\n\t\t\tfor(int i=0; i<8; i++){\n\t\t\t\tif(posInPage>=defaultPageSize){\n\t\t\t\t\t// next page is affected!\n\t\t\t\t\tBufferManager.getBufferManager().modifyPage(defaultPageSize, pageAddress, page);\n\t\t\t\t\tpageAddress = new PageAddress(pageAddress.pagenumber+1, pageAddress.filename);\n\t\t\t\t\tpage = BufferManager.getBufferManager().getPage(defaultPageSize, pageAddress);\n\t\t\t\t\tposInPage %= defaultPageSize;\n\t\t\t\t}\n\t\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\t\ttoBeStored/=256;\n\t\t\t\tposInPage++;\n\t\t\t}\n\t\t} else {\n\t\t\t// optimize the normal case!\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t\ttoBeStored/=256;\n\t\t\tposInPage++;\n\t\t\tpage[posInPage] = (byte)((toBeStored % 256)-128);\n\t\t}\n\n\t\tBufferManager.getBufferManager().modifyPage(defaultPageSize, pageAddress, page);\n\t}", "public void setStartPage(int value) {\n this.startPage = value;\n }", "public void setCp(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}", "public PageList(){\n count = 0;\n capacity = 4;\n itemArray = new int[capacity];\n }", "public void setRecordsPerPage(int p_int)\n {\n m_recsPerPage = p_int < 1 ? DEFAULT_RPP : p_int;\n }", "public int accessMemory(int id, int pageNumber)\n\t{ \n\t\treturn 0;\n\t}", "public native static int ULTRALIGHT_LockPage(long hr ,long ht,byte pageType);", "public void incrementPages(String page)\r\n {\r\n // Check if page already Indexed.\r\n\tif(checkAlreadyFound(page))\r\n\t return;\r\n pageNames.addElement(page);\r\n\t\r\n\t// provide feedback to the user.\r\n\tstatusArea.setText(\"Search Page: \"+pageNames.size());\r\n }", "void setUsePage(boolean page);", "protected void doAdditionalPageInitialization(IPage page) {\n }", "@RecentlyNonNull\n/* */ public PdfDocument.Page startPage(int pageNumber) {\n/* 106 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test//ExSkip\n public void fieldPageRef() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n insertAndNameBookmark(builder, \"MyBookmark1\");\n\n // Insert a PAGEREF field that displays what page a bookmark is on.\n // Set the InsertHyperlink flag to make the field also function as a clickable link to the bookmark.\n Assert.assertEquals(\" PAGEREF MyBookmark3 \\\\h\",\n insertFieldPageRef(builder, \"MyBookmark3\", true, false, \"Hyperlink to Bookmark3, on page: \").getFieldCode());\n\n // We can use the \\p flag to get the PAGEREF field to display\n // the bookmark's position relative to the position of the field.\n // Bookmark1 is on the same page and above this field, so this field's displayed result will be \"above\".\n Assert.assertEquals(\" PAGEREF MyBookmark1 \\\\h \\\\p\",\n insertFieldPageRef(builder, \"MyBookmark1\", true, true, \"Bookmark1 is \").getFieldCode());\n\n // Bookmark2 will be on the same page and below this field, so this field's displayed result will be \"below\".\n Assert.assertEquals(\" PAGEREF MyBookmark2 \\\\h \\\\p\",\n insertFieldPageRef(builder, \"MyBookmark2\", true, true, \"Bookmark2 is \").getFieldCode());\n\n // Bookmark3 will be on a different page, so the field will display \"on page 2\".\n Assert.assertEquals(\" PAGEREF MyBookmark3 \\\\h \\\\p\",\n insertFieldPageRef(builder, \"MyBookmark3\", true, true, \"Bookmark3 is \").getFieldCode());\n\n insertAndNameBookmark(builder, \"MyBookmark2\");\n builder.insertBreak(BreakType.PAGE_BREAK);\n insertAndNameBookmark(builder, \"MyBookmark3\");\n\n doc.updatePageLayout();\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.PAGEREF.docx\");\n testPageRef(new Document(getArtifactsDir() + \"Field.PAGEREF.docx\")); //ExSkip\n }", "public int numPages() {\n return numPages;\n }", "void setPageSize(DriveRequest<?> request, Integer pageSize);", "public int numPages() {\n \t//numOfPages = (int)(this.fileName.length()/BufferPool.PAGE_SIZE);\n return numOfPages;\n }", "public int numPages() {\n // some code goes here\n return (int)Math.ceil(f.length()/BufferPool.PAGE_SIZE);\n \n }", "public void setPageInfo(){\n\t\tif(AllP>=1){\n\t\t\tPageInfo=\"<table border='0' cellpadding='3'><tr><td>\";\n\t\t\tPageInfo+=\"Show: \"+PerR+\"/\"+AllR+\" Records!&nbsp;\";\n\t\t\tPageInfo+=\"Current page: \"+CurrentP+\"/\"+AllP;\n\t\t\tPageInfo+=\"</td></tr></table>\";\t\t\t\n\t\t}\t\t\t\t\n\t}", "public void setPageX(Integer pageX) {\n this.pageX = pageX;\n }", "public static void\tset(IntPar par, int val)\n\t{ if (par != NULL) par.value = val; }", "@Override\n public void onPageChanged(int page, int pageCount) {\n }", "@Override\r\n\tpublic int[] calPageParameter(int curPage) {\n\t\tint start = curPage*BATCH_NUM+1;\r\n\t\tint end = (curPage+1)*BATCH_NUM;\r\n return new int[]{start,end};\r\n\t}", "private void setUpPageItem() {\n displaylimit = xmlhandler.getItemDisplayLimit();\n itemrow = inventory.getItemRow();\n Back.setEnabled(false);\n Begin.setEnabled(false);\n if(getPageEnd()==1) {\n Forward.setEnabled(false);\n End.setEnabled(false);\n }\n }", "public void setProfilePages(List<ProfilePage> profilepages) {\n this.profilepages = profilepages;\n }", "public void setEndPage(int value) {\n this.endPage = value;\n }", "public PageId newPage(Page firstpage, int howmany) throws Exception {\n\t\tPageId firstPageId = null;\n\t\t// if the number of pages less than 0 throw exception\n\t\tif (howmany <= 0) {\n\t\t\tthrow new InvalidRunSizeException(null,\n\t\t\t\t\t\"error .. invalid number of pages entered\");\n\n\t\t} else if (firstpage == null) {\n\t\t\t// if the firstpage == null this mean wrong entery and throw\n\t\t\t// exception\n\t\t\tthrow new PageException(null, \"check the page inialisation\");\n\n\t\t} else if (pageHashtable.size() < numbufs) {// check if there is place\n\t\t\t\t\t\t\t\t\t\t\t\t\t// and then allocate and pin\n\t\t\t\t\t\t\t\t\t\t\t\t\t// it\n\t\t\tfirstPageId = new PageId();\n\t\t\t(SystemDefs.JavabaseDB).allocate_page(firstPageId, howmany);\n\t\t\tpinPage(firstPageId, firstpage, false);\n\t\t}\n\t\treturn firstPageId;\n\t}", "public int getPage() {\n return page;\n }" ]
[ "0.77441", "0.7642619", "0.6956056", "0.6827284", "0.6748042", "0.67463595", "0.6685768", "0.6580491", "0.6578234", "0.64792717", "0.6396742", "0.6314143", "0.6314143", "0.6301009", "0.62095314", "0.6176032", "0.6176032", "0.61533946", "0.6062585", "0.6045681", "0.5996458", "0.5935692", "0.5930249", "0.5929812", "0.59148926", "0.5905048", "0.5843501", "0.5800996", "0.5790924", "0.57358456", "0.57265097", "0.57069933", "0.5704257", "0.56797093", "0.5672915", "0.56655777", "0.5660684", "0.5657977", "0.56483716", "0.56303096", "0.5605794", "0.55893207", "0.55827755", "0.5538968", "0.5532422", "0.55144286", "0.55144286", "0.5510028", "0.55041724", "0.54911363", "0.5487329", "0.54802054", "0.54764605", "0.547517", "0.5454268", "0.5446731", "0.54424655", "0.5439683", "0.5439397", "0.5434793", "0.5434793", "0.5434489", "0.543177", "0.5430563", "0.54269713", "0.54233253", "0.5406033", "0.53959244", "0.5384424", "0.5349745", "0.53313065", "0.5328556", "0.5327572", "0.53268194", "0.53246534", "0.53207535", "0.53178006", "0.53110456", "0.5302887", "0.52944845", "0.5287168", "0.52611697", "0.5259797", "0.5246746", "0.52408695", "0.5238341", "0.52268016", "0.52232903", "0.5222098", "0.5219395", "0.520856", "0.52036846", "0.5199326", "0.51942533", "0.51887906", "0.51823395", "0.5177899", "0.5173447", "0.51660746", "0.5165652", "0.5155077" ]
0.0
-1
Gets the list of average fitness scores for each generation. The index of each entry corresponds to the generation number minus one.
public ArrayList<Double> getAverageFitnesses() { return avgFitnesses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getAvgPopulationFitness() {\n\t\tdouble sum=0;\n\t\tfor (int i = 0; i < individuals.length; i++) {\n\t\t\tsum+=individuals[i].getFitness();\n\t\t}\n\t\treturn sum/(double)individuals.length;\n\t}", "public double getGradeAverage() {\n int gradesTotal = 0;\n for (int grade : grades) {\n gradesTotal += grade;\n }\n return gradesTotal / grades.size();\n }", "public double getAverageGrade(){\n double totalGrade = 0;\n double averageGrade = 0;\n // for loop to iterate over the array\n for(int i = 0; i<students.size(); i++){\n totalGrade += students.get(i).getGrades();\n } // end for\n \n averageGrade = totalGrade / students.size();\n return averageGrade;\n }", "public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }", "public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }", "public double getAverage() {\n int total = 0;\n\n // sum grades of the student\n for (int grade : grades)\n total += grade;\n\n // return average of the grade\n return (double) total / grades.length;\n }", "private List<Integer> gradeExams() {\r\n\t\tlog(mName + \": grading exams\");\r\n\t\tRandom rand = new Random();\r\n\t\tList<Integer> scores = new ArrayList<Integer>();\r\n\r\n\t\tfor (Contestant c : mContestants) {\r\n\t\t\tint score = rand.nextInt(101);\r\n\t\t\tlog(mName + \": \" + c.getName() + \" has scored \" + score);\r\n\t\t\tc.setExamScore(score);\r\n\t\t\tscores.add(score);\r\n\t\t}\r\n\r\n\t\treturn scores;\r\n\t}", "public double averageFitness()\r\n {\r\n\treturn averageFitness;\r\n }", "public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }", "public double[] getAverages() {\n\t\t\n\t\t// initialize array\n\t\taverages = new double[5];\n\t\t\n\t\t// used with calcAverage for the startIndex\n\t\tint curIndex = 0;\n\t\taverages[ASSIGNMENTS] = calcAverage(curIndex, curIndex += NUM_ASSIGNMENTS);\n\t\taverages[QUIZZES] = calcAverage(curIndex, curIndex += NUM_QUIZZES);\n\t\taverages[TESTS] = calcAverage(curIndex, curIndex += NUM_TESTS);\n\t\taverages[FINAL] = calcAverage(curIndex, curIndex + 1);\n\t\t\n\t\t// get the overall average\n\t\tdouble quizTestAverage = (averages[QUIZZES] + averages[TESTS]) * PERCENT_QUIZ_AND_TESTS / 2;\n\t\tdouble assignmentAverage = averages[ASSIGNMENTS] * PERCENT_ASSIGNMENTS;\n\t\tdouble finalAverage = averages[FINAL] * PERCENT_FINAL;\n\t\taverages[OVERALL] = quizTestAverage + assignmentAverage + finalAverage;\n\t\t\n\t\t// return the array\n\t\treturn averages;\n\t}", "public Double[] getAverageGradeStatistic(String mode) {\n double totalPoints = 0.0;\n double totalWorth = 0.0;\n for (int i=0; i < assignments.size(); i++) {\n Assignment ass = assignments.get(i);\n ArrayList<Integer> assGrades = ass.getAllGrades();\n int assWorth = ass.getWorth();\n for (int j=0; j < assGrades.size(); j++) {\n Integer assGrade = assGrades.get(j);\n if (assGrade != null) {\n totalPoints += assGrade;\n totalWorth += assWorth;\n }\n else if (mode.equals(\"best\")) {\n totalPoints += assWorth;\n totalWorth += assWorth;\n }\n else if (mode.equals(\"worst\")) {\n totalWorth += assWorth;\n }\n }\n }\n\n Double[] ret = {totalPoints, totalWorth};\n return ret;\n }", "private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}", "private List<Tuple> avgGradeMap(Tuple input) {\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String pairs = input.snd(); //class1 grade1 class2 grade2...\n \n String[] classAndGrade = pairs.split(\"\\\\s+\");\n for(int i=0;i<classAndGrade.length;i+=2){\n output.add(new Tuple(classAndGrade[i],classAndGrade[i+1]));\n }\n \n lolligag();\n \n //<class1, grade1>, <class2, grade2> ...\n return output;\n }", "private double[] mean(Population pop) {\n double[] value = new double[pop.getIndividual(0).getNumGenes()];\n //for all individuals\n Iterator<Individual> it = pop.getIterator();\n while (it.hasNext()) {\n Individual ind = it.next();\n //sum the value of the gene\n for (int i = 0; i < value.length; i++) {\n value[i] += ind.getGeneValue(i);\n }\n }\n //divide by the number of individuals\n double factor = 1.0 / pop.getNumGenotypes();\n for (int i = 0; i < value.length; i++) {\n value[i] *=factor;\n }\n return value;\n }", "public Grade grade() {\n ////\n return Grade.average(grades.values());\n }", "Score getScores(int index);", "@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }", "public double getFitness(){\n return averageFitness;\n }", "public double calcFitness(int[] genes) {\n\t\treturn 0;\n\t}", "@Override\n public Double average() {\n return (sum() / (double) count());\n }", "public double getAverageScore() {\n\t return this.totalScore / this.count; \n\t }", "public List<Integer> getIterations() {\n int totalit = 0;\n int largestit = 0;\n int averageit = 0;\n for (Integer i : recGraphs) {\n totalit += i;\n averageit += i / recGraphs.size();\n if (i > largestit) {\n largestit = i;\n }\n }\n List<Integer> list = new ArrayList<>();\n list.add(totalit);\n list.add(largestit);\n list.add(averageit);\n return list;\n }", "protected abstract List<Double> calcScores();", "private double getAvg() {\n\n double sum = 0;\n\n for (Map.Entry<Integer, Double> entry : values.entrySet()) {\n sum += entry.getValue();\n }\n\n if (values.size() > 0) {\n return sum / values.size();\n } else {\n throw new IllegalStateException(\"no values\");\n }\n }", "private ArrayList<Integer> possibleScores() {\n return new ArrayList<Integer>();\n }", "public double getAverage(){\r\n\t\tdouble sum=0;\r\n\t\tfor(Iterator<T> it=this.iterator();it.hasNext();){\r\n\t\t\tsum+=it.next().doubleValue();\r\n\t\t}\r\n\t\treturn sum/this.size();\r\n\t}", "public static int[] getStat() {\n\t\t\n\t\tint[] grades = new int[students.size()];\n\t\tfor(int i=0;i<students.size();i++) {\n\t\t\tgrades[i] = students.get(i).getGrade().getRawGrade();\n\t\t\t\n\t\t}\n\t\tArrays.sort(grades);\n\t\tint median = 0;\n\t\tif((int)grades.length/2 == grades.length/2.0)\n\t\t\tmedian = grades[grades.length/2];\n\t\telse\n\t\t\tmedian = (grades[grades.length/2] + grades[grades.length/2 + 1])/2;\n\t\tint [] ret = {grades[0], grades[grades.length-1], grades[grades.length/4], grades[3*grades.length/4], median};\n\t\treturn ret;\n\t}", "public double getAverage()\n {\n if (test1 < 0 || test2 < 0)\n {\n System.out.println(\"Warning: one or more grades have not been entered.\");\n return -1;\n }\n return (test1 + test2) / 2;\n }", "public Score getScores(int index) {\n return scores_.get(index);\n }", "double getFitnessScore(){\n return fitnessScore;\n }", "private Double calculateTotalFitness() {\n double totalFitnessScore = 0;\n\n IgniteCache<Long, Chromosome> cache = ignite.cache(GAGridConstants.POPULATION_CACHE);\n\n SqlFieldsQuery sql = new SqlFieldsQuery(\"select SUM(FITNESSSCORE) from Chromosome\");\n\n // Iterate over the result set.\n try (QueryCursor<List<?>> cursor = cache.query(sql)) {\n for (List<?> row : cursor)\n totalFitnessScore = (Double)row.get(0);\n }\n\n return totalFitnessScore;\n }", "public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }", "public int[] getScores() {\n return this.scores;\n }", "public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}", "public static double getAveg(int[] scores) {\r\n\t\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < scores.length; ++i) {\r\n\t\t\tsum += scores[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn ((double)(sum))/(scores.length);\r\n\t\r\n\t}", "public double averageEuclideanDistance() {\n\n\t\tdouble sumEuclideanDistances = 0;\n\t\tdouble nDistances = popSize * popSize;\n\t\t// double distance = 0;\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tfor (int j = 0; j < popSize; j++){\n\t\t\t\tIndividual oneIndividual = getIndividualAtIndex(i);\n\t\t\t\tIndividual otherIndividual = getIndividualAtIndex(j);\n\t\t\t\tdouble[] genotypeOneIndidivual = oneIndividual.getGenotype();\n\t\t\t\tdouble[] genotypeOtherIndidivual = otherIndividual.getGenotype();\n\t\t\t\tdouble distance = euclideanDistanceMetric(genotypeOneIndidivual, genotypeOtherIndidivual);\n\t\t\t\tsumEuclideanDistances += distance;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t// double average = sumEuclideanDistances / nDistances;\n\n\t\treturn sumEuclideanDistances / nDistances;\n\t}", "public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }", "private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }", "public List<Pair<String, Integer>> getScores() {\n if (!this.list.isPresent()) {\n this.readScores();\n }\n return new ArrayList<>(this.list.get());\n }", "public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }", "double fitness(int gene) {\r\n \tint sum = 0;\r\n \tint prod= 1;\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tif (oldpop[gene][j]==0) {\r\n \t\t\tsum += (j+1);\r\n \t\t} else {\r\n \t\t\tprod *= (j+1);\r\n \t\t}\r\n \t}\r\n \treturn Math.abs(sum - SUMTARG)/SUMTARG \r\n \t + Math.abs(prod - PRODTARG)/PRODTARG;\r\n }", "public static void meanGPA(Student[] student){\n double count=0;//there is count value to find total grade in student array\n for(int i=0;i<student.length;i++){\n count=student[i].getGPA()+count;\n }\n double result=count/student.length;\n System.out.println(result);\n }", "public double getQuizAverage() {\r\n \r\n double[] quizScores = getLargestQuizGrades();\r\n double quizSum = 0;\r\n int quizzes = 0;\r\n \r\n for(double score : quizScores) {\r\n quizzes++;\r\n quizSum += score;\r\n }\r\n \r\n quizAverage = quizSum / quizzes; \r\n \r\n return quizAverage;\r\n }", "@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}", "public void evaluatePopulation() {\n // reset the total fitness score\n totalFitness = 0;\n\n for (int i = 0; i < populationSize; i++) {\n population.get(i).setRawFitness(\n FeederCollection.getFeeders().get(i).GetFitness());\n totalFitness += population.get(i).getRawFitness();\n }\n\n // set the normalized fitness for each population member\n for (Genotype g : population) {\n // normalized fitness = raw fitness / total fitness\n g.setNormalizedFitness((g.getRawFitness() / totalFitness));\n }\n\n // sort the popoulation\n Collections.sort(population, Genotype.FitnessOrder);\n\n highFitnesses.add(population.get(0).getRawFitness());\n avgFitnesses.add(totalFitness / population.size());\n\n\n }", "public double getAverage()\n {\n return getSum() / 2.0;\n }", "public int getFitness()\n {\n return this.fitness;\n }", "public double getAverage(){\n return getTotal()/array.length;\n }", "public double average(){\n\t\t// computes the overall grade\n\t\tfinal double\n\t\t\tPROGRAM_WEIGHT = .40,\n\t\t\tEXAM_WEIGHT = 1 - PROGRAM_WEIGHT;\n\t\t\n\t\tdouble overallGrade;\n\t\t\n\t\toverallGrade = programGrade * PROGRAM_WEIGHT + examGrade * EXAM_WEIGHT;\n\t\t\n\t\treturn overallGrade;\n\t}", "public int getFitness(){\n return fitness;\n }", "private List<String> calculateAverageAge(List<Person> population)\n\t{\n\t\tdouble average = population\n\t\t\t .stream()\n\t\t\t .mapToInt(Person::getAge) // Converts this to an int stream...could also have called p->p.getAge()\n\t\t\t .average() // operates on a numeric stream...to perform an aggregate operation on it (OptionalDouble if you have an empty stream)\n\t\t\t .getAsDouble(); // converts it to a specific data type\n\t\tString output = String.format(\"%.1f\", average);\n\t\t\n\t\tList<String> results = new ArrayList<String>();\n\t\tresults.add(output);\n\t\t\n\t\treturn results;\n\t}", "public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.genotipo[x+1]];\r\n }else{\r\n fit+=distancias[this.genotipo[x]][this.genotipo[0]];\r\n }\r\n }\r\n this.fitness = fit;\r\n }", "void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}", "public void average(){\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\tw.average();\n\t\t}\n\t}", "Execution getAverageExecutions();", "public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }", "public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}", "public void getAvg()\n {\n this.avg = sum/intData.length;\n }", "public double[] getFitness() {\n return this.m_Fitness;\n }", "public Double getGigRanking() {\n return gigRanking;\n }", "@Override\r\n\tpublic double getStoredGazeScore() {\n\t\treturn this.gazeScore;\r\n\t}", "@Override\r\n\tpublic int average(GradeBean param) {\n\t\treturn 0;\r\n\t}", "public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }", "List<Map<String, Object>> listGrades()throws BusinessException;", "public List<KeyValue<Integer>> getAvg() {\n\t\tList<KeyValue<Integer>> result = new ArrayList<KeyValue<Integer>>();\n\t\tJavaRDD<Document> rdd = dal.getRDD();\n\t\tList<Tuple2<String, Iterable<Document>>> list = rdd.groupBy(new Function<Document, String>() {\n\t\t\t// 分组\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\tpublic String call(Document v1) throws Exception {\n\t\t\t\tString province = v1.getString(\"province\");\n\t\t\t\tDouble price = v1.getDouble(\"unitPrice\");\n\t\t\t\tif (v1.getString(\"province\") != null && price > 0) {\n\t\t\t\t\treturn province;\n\t\t\t\t}\n\t\t\t\treturn \"other\";\n\t\t\t}\n\t\t}).collect();\n\t\tfor (Tuple2<String, Iterable<Document>> tuple2 : list) {\n\t\t\t// 循环遍历,统计平均数\n\t\t\tif (tuple2._1.equals(\"other\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tIterator<Document> iterator = tuple2._2.iterator();\n\t\t\tList<Double> prices = new ArrayList<Double>();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tprices.add(iterator.next().getDouble(\"unitPrice\"));\n\t\t\t}\n\t\t\tdouble sum = dal.getSparkContext().parallelize(prices).reduce(new Function2<Double, Double, Double>() {\n\n\t\t\t\t/**\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t\tpublic Double call(Double v1, Double v2) throws Exception {\n\t\t\t\t\treturn v1 + v2;\n\t\t\t\t}\n\t\t\t});\n\t\t\tresult.add(new KeyValue<Integer>(tuple2._1, (int) sum / prices.size()));\n\t\t}\n\t\t// dal.destroy();\n\t\treturn result;\n\t}", "private void calculateOverall()\n {\n ArrayList<Integer> average = new ArrayList<Integer>(1);\n ArrayList<Integer> median = new ArrayList<Integer>(1);\n ArrayList<Integer> mode = new ArrayList<Integer>();\n ArrayList<Integer> stdDev = new ArrayList<Integer>(1);\n \n int avg = 0;\n int med = 90;\n int mod = 90;\n int dev = 0;\n \n int[] modeArray = new int[100];\n \n for (int i = 0; i < 100; i++) {\n \tmodeArray[i] = 0;\n }\n \n for (Integer score : allScores) {\n \tavg += score;\n \tmodeArray[score]++;\n }\n \n for (int i = 0; i < 100; i++) {\n \tif (modeArray[i] > mod) {\n \t\tmod = modeArray[i];\n \t}\n }\n \n avg = avg / allScores.size();\n \n Collections.sort(allScores);\n med = allScores.get(allScores.size() / 2);\n \n for (Integer score : allScores) {\n \tdev += Math.pow(score - avg, 2);\n }\n dev = (int)Math.floor(Math.sqrt(dev / allScores.size()));\n\n // TODO: Perform the actual calculations here\n average.add(avg);\n median.add(med);\n mode.add(mod);\n stdDev.add(dev);\n\n this.overallAnalytics.put(\"Average\", average);\n this.overallAnalytics.put(\"Median\", median);\n this.overallAnalytics.put(\"Mode\", mode);\n this.overallAnalytics.put(\"Standard Deviation\", stdDev);\n }", "public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }", "@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}", "public ArrayList<Individual> getSortedPopulation(){\n ArrayList<Individual> sortedIndividuals = new ArrayList<Individual>();\n\n for(Individual individual: individuals){\n int indexToadd = 0;\n\n if(sortedIndividuals.isEmpty()){\n sortedIndividuals.add(individual);\n }\n else {\n for(Individual sortedIndividual : sortedIndividuals){\n if(individual.getFitness() > sortedIndividual.getFitness()){\n indexToadd = sortedIndividuals.indexOf(sortedIndividual);\n break;\n }\n }\n if(indexToadd == 0 ){\n sortedIndividuals.add(individual);\n }\n else {\n sortedIndividuals.add(indexToadd,individual);\n }\n }\n }\n return sortedIndividuals;\n }", "public double getAverageGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100.\");\n }\n double sumOfGrades = 0.0;\n double averageGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n sumOfGrades += grades[studentId];\n }\n averageGrade = sumOfGrades / NUMBER_OF_STUDENTS;\n return averageGrade;\n }", "public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}", "java.util.List<Score>\n getScoresList();", "@Test \n\tpublic void TestStudentGPA() throws PersonException{\n\t\tArrayList<Enrollment> EnrolledStudents = new ArrayList<Enrollment>();\n\t\tfor (int i = 0; i < Students.size(); i++){\n\t\t\tStudent student = Students.get(i);\n\t\t\tfor (int j = 0; j < Sections.size(); j++){\n\t\t\t\tSection section = Sections.get(j);\n\t\t\t\tEnrollment enrolled = new Enrollment(student.getStudentID(),section.getSectionID());\n\t\t\t\tenrolled.setGrade((i*10)); // Assumes each student gets a consistent grade in every section! (Otherwise average GPAs would be a bit tougher)\n\t\t\t\tEnrolledStudents.add(enrolled);\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Double> StudentsGPA = new ArrayList<Double>();\n\t\tfor (int i = 0; i < EnrolledStudents.size(); i+=6) {\n\t\t\t\tif (EnrolledStudents.get(i).getGrade() >= 90)\n\t\t\t\t\tStudentsGPA.add(4.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 80)\n\t\t\t\t\tStudentsGPA.add(3.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 70)\n\t\t\t\t\tStudentsGPA.add(3.33);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 60)\n\t\t\t\t\tStudentsGPA.add(3.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 50)\n\t\t\t\t\tStudentsGPA.add(2.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 40)\n\t\t\t\t\tStudentsGPA.add(2.33);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 30)\n\t\t\t\t\tStudentsGPA.add(2.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 20)\n\t\t\t\t\tStudentsGPA.add(1.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 10)\n\t\t\t\t\tStudentsGPA.add(1.33);\n\t\t\t\telse \n\t\t\t\t\tStudentsGPA.add(1.0);\n\t\t}\n\t\tassertTrue(StudentsGPA.get(0) == 1.0);\n\t\tassertTrue(StudentsGPA.get(1) == 1.33);\n\t\tassertTrue(StudentsGPA.get(2) == 1.66);\n\t\tassertTrue(StudentsGPA.get(3) == 2.0);\n\t\tassertTrue(StudentsGPA.get(4) == 2.33);\n\t\tassertTrue(StudentsGPA.get(5) == 2.66);\n\t\tassertTrue(StudentsGPA.get(6) == 3.0);\n\t\tassertTrue(StudentsGPA.get(7) == 3.33);\n\t\tassertTrue(StudentsGPA.get(8) == 3.66);\n\t\tassertTrue(StudentsGPA.get(9) == 4.0);\n\t\t\n\t\tArrayList<Double> CoursesGPA = new ArrayList<Double>();\n\t\tdouble count = 0;\n\t\tfor (int i = 0; i < EnrolledStudents.size(); i+=6){\n\t\t\tcount += EnrolledStudents.get(i).getGrade();\n\t\t}\n\t\tif (count == 450){ // Again, assumes a simple case (average grade = 45 -> average GPA = 2.497)\n\t\t\tCoursesGPA.add(2.497);\n\t\t}\n\t\tassertTrue(CoursesGPA.get(0) == 2.497);\n\t\t\n\t}", "protected float getFitness()\t\t\t{\treturn fitness;\t\t}", "public float waitingAvg() {\r\n int total = 0;\r\n float avg;\r\n\r\n for (Person temp : saf) {\r\n total += temp.getExitTime();\r\n\r\n }\r\n avg = (float) total / saf.size();\r\n return avg;\r\n }", "public ArrayList<Double> averageSalaries(){\n\t\tArrayList<Double> averageSalaries = new ArrayList<Double>();\n for(int i=0;i<allSalaries.size();i++) {\n \ttry {\n \t\tdouble averageEmployee=average(allSalaries.get(i));\n \t\taverageSalaries.add(averageEmployee);\n \t}catch(IllegalArgumentException e) {\n \t\tSystem.out.println(\"There is something wrong with input\");\n \t} \t\n\t\t}\n return averageSalaries;\n\t}", "public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }", "@External(readonly = true)\n\tpublic List<Address> get_score_list(){\n\t\t\n\t\tAddress[] proposal_list = new Address[this.proposal_list.size()];\n\n\t\tfor(int i= 0; i< this.proposal_list.size(); i++) {\n\t\t\tproposal_list[i] = this.proposal_list.get(i);\n\t\t}\t\t\n\t\treturn List.of(proposal_list);\n\t}", "public double weightedGPA() {\r\n\t\t\tdouble average = 0; \r\n\t\t\tdouble gradePoint = 0;\r\n\t\t\tdouble credit = 0;\r\n\t\t\t// Grade points\r\n\t\t\tfor (int i = 0; i < finalGrade.size(); i++) {\r\n\t\t\t\tif (finalGrade.get(i) >= 90 && finalGrade.get(i) <= 100) {\r\n\t\t\t\t\tgradePoint = gradePoint + (9*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 80 && finalGrade.get(i) <= 89.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (8*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 75 && finalGrade.get(i) <= 79.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (7*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 70 && finalGrade.get(i) <= 74.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (6*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 65 && finalGrade.get(i) <= 69.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (5*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 60 && finalGrade.get(i) <= 64.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (4*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 55 && finalGrade.get(i) <= 59.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (3*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 50 && finalGrade.get(i) <= 54.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (2*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) >= 47 && finalGrade.get(i) <= 49.99) {\r\n\t\t\t\t\tgradePoint = gradePoint + (1*courseTaken.get(i).getCredit());\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t\telse if (finalGrade.get(i) > 47) {\r\n\t\t\t\t\tgradePoint = gradePoint + 0;\r\n\t\t\t\t\tcredit = credit + courseTaken.get(i).getCredit();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\taverage = gradePoint/credit; // GPA\r\n\t\t\treturn Math.round(average*10)/10.0; // GPA is returned\r\n\t\t}", "private int[] sauvegarde_scores() {\r\n\t\tint n = moteur_joueur.getJoueurs().length;\r\n\t\tint[] scores_precedents = new int[n];\r\n\t\t\t\t\r\n\t\tfor(int i = 0 ; i < n ; i++) {\r\n\t\t\tscores_precedents[i] = (int)moteur_joueur.getJoueurs()[i].getScore();\r\n\t\t}\r\n\t\t\r\n\t\treturn scores_precedents;\r\n\t}", "public int getAverage() { return (int)Math.ceil(getSumOfMarks()/ numberOfCourses); }", "public ArrayList<gameModel> getScoreList() {\n\t\tLoadingDatabaseScores();\n\t\treturn SCORE_LIST;\n\t}", "public double getAvgDraws() {\n\t\tdouble result = -1.0, sum = 0.0;\n\t\tint count = 0;\n\t\ttry {\n\t\t\tthis.rs = smt.executeQuery(\"SELECT SUM(drawCnt) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tsum = this.rs.getDouble(1) ;\n\t\t\t}\n\t\t\tthis.rs = smt.executeQuery(\"SELECT COUNT(id) FROM tp.gamerecord\");\n\t\t\tif(this.rs.next()) {\n\t\t\t\tcount = this.rs.getInt(1);\n\t\t\t\tresult = sum / count;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Query is Failed!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public int getFitness(Graph_GA obj)\r\n\t{\r\n\t\tint fitness_score = 0;\r\n\t\tSet<DefaultEdge> edges= obj.graph_inp.edgeSet();\r\n Iterator<DefaultEdge> edges_list = edges.iterator();\r\n \r\n while(edges_list.hasNext())\r\n {\r\n \tDefaultEdge new_edge = edges_list.next();\r\n \tGA_Graph_Node source = obj.graph_inp.getEdgeSource(new_edge);\r\n \tGA_Graph_Node target = obj.graph_inp.getEdgeTarget(new_edge);\r\n \tif(chromosome[source.numID-1] == chromosome[target.numID-1])\r\n \t{\r\n \t\tfitness_score = fitness_score-1;\r\n \t}\r\n }\r\n\t\treturn fitness_score;\r\n\t}", "public int getPointsJuggernaut(){\n\treturn scores.get(juggernaut);\n }", "public Double[] getStudentGradeStatistic(String pseudoName, String mode) {\n double totalPoints = 0.0;\n double totalWorth = 0.0;\n for (int i=0; i < assignments.size(); i++) {\n Assignment ass = assignments.get(i);\n Integer assGrade = ass.getGrade(pseudoName);\n int assWorth = ass.getWorth();\n if (assGrade != null) {\n totalPoints += assGrade;\n totalWorth += assWorth;\n }\n else if (mode.equals(\"best\")) {\n totalPoints += assWorth;\n totalWorth += assWorth;\n }\n else if (mode.equals(\"worst\")) {\n totalWorth += assWorth;\n }\n }\n\n Double[] ret = {totalPoints, totalWorth};\n return ret;\n }", "double getGapScore();", "public double getAssignmentsAvg(long course_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n double sum = 0.0;\n double count = 0.0;\n\n\n List<Assignment> assignmentList = new ArrayList<>();\n Cursor cursor = null;\n try {\n cursor = db.query(Config.TABLE_NAME_ASSIGNMENT, null, null,\n null, null, null, null);\n\n if (cursor != null) {\n if (cursor.moveToFirst()) {\n\n do {\n if (cursor.getInt(cursor.getColumnIndex(\n Config.COLUMN_COURSE_ID)) == course_id) {\n long a_id = cursor.getInt(cursor.getColumnIndex(\n Config.COLUMN_ASSIGNMENT_ID));\n long c_id = cursor.getInt(cursor.getColumnIndex(\n Config.COLUMN_COURSE_ID));\n String title = cursor.getString(cursor.getColumnIndex(\n Config.COLUMN_ASSIGNMENT_TITLE));\n double grade = cursor.getDouble(cursor.getColumnIndex(\n Config.COLUMN_ASSIGNMENT_GRADE));\n assignmentList.add(new Assignment(a_id, c_id, title, grade));\n }\n\n } while (cursor.moveToNext());\n\n for (int i = 0; i < assignmentList.size(); i++) {\n sum += assignmentList.get(i).getGrade();\n count++;\n }\n\n return sum / count;\n }\n }\n\n } catch (Exception e) {\n Log.d(TAG, \"Exception: \" + e.getMessage());\n } finally {\n if (cursor != null)\n cursor.close();\n db.close();\n }\n\n return 0.0;\n }", "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "public double getAverageGoldByWins(int wins) {\n return statistics.getAvgGoldByWins().get(wins);\n }", "public static double averagePPG(int[][] scores, int p)\n {\n \n int row = p; \n double total = 0; \n \n //the column index changes, but the row index stays the same\n for(int col = 0; col < scores[row].length; col++)\n {\n total = total + scores[row][col]; \n }\n \n double average = (total / scores[row].length); //average the total for that row (player)\n return average;\n \n }", "private double[] std(Population pop) {\n double[] value = new double[pop.getIndividual(0).getNumGenes()];\n double [] m = mean(pop);\n //for all individuals\n Iterator<Individual> it = pop.getIterator();\n while (it.hasNext()) {\n Individual ind = it.next();\n //sum the value of the gene\n for (int i = 0; i < value.length; i++) {\n value[i] += Math.pow( ind.getGeneValue(i) - m[i],2);\n }\n }\n //divide by the number of individuals - 1\n for (int i = 0; i < value.length; i++) {\n value[i] = Math.sqrt( value[i] /(pop.getNumGenotypes()-1));\n }\n return value;\n }", "private Tuple avgGradeReduce(List<Tuple> input) {\n int sum = 0;\n String className = input.get(0).fst();\n \n for(Tuple classAndGrade : input) {\n sum += Integer.parseInt(classAndGrade.snd());\n }\n \n Integer average = Math.round((float) sum / input.size());\n \n lolligag();\n \n // output <same class, average grade from all kids>\n return new Tuple(className, average.toString());\n }", "public double getAverageGoldCardsByWins(int wins) {\n return statistics.getAvgGoldCardsByWins().get(wins);\n }", "public int getAverageScore() {\n\t\treturn totalScore / quizCount;\n\t}", "double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}", "private List<BarEntry> getAverageValuesFromDB(Activity activity, String selectedOperationIssue, String gameType) {\n List<BarEntry> yValues = new ArrayList<>();\n if (selectedOperationIssue != null) {\n double averagePreOperationValue = new ReactionGameManager(activity).getFilteredReactionGames(selectedOperationIssue, gameType, Type.getTestType(Type.TestTypes.PreOperation), \"AVG\");\n double averageInOperationValue = new ReactionGameManager(activity).getFilteredReactionGames(selectedOperationIssue, gameType, Type.getTestType(Type.TestTypes.InOperation), \"AVG\");\n double averagePostOperationValue = new ReactionGameManager(activity).getFilteredReactionGames(selectedOperationIssue, gameType, Type.getTestType(Type.TestTypes.PostOperation), \"AVG\");\n\n // pre, in and post operation values\n yValues.add(new BarEntry(0, (float) averagePreOperationValue));\n yValues.add(new BarEntry(1, (float) averageInOperationValue));\n yValues.add(new BarEntry(2, (float) averagePostOperationValue));\n yValues.add(new BarEntry(3, 0f)); // dummy\n }\n return yValues;\n }", "public void printAverageRatingsByGenre(){\n ThirdRatings sr = new ThirdRatings();\n int raters = sr.getRaterSize();\n System.out.println(\"read data for \" + raters + \" raters\");\n System.out.println(\"-------------------------------------\");\n \n //MovieDatabase.initialize(\"ratedmovies_short.csv\");\n MovieDatabase.initialize(\"ratedmoviesfull.csv\");\n System.out.println(\"read data for \" + MovieDatabase.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n \n Filter f = new GenreFilter(\"Comedy\"); \n int minRatings = 20;\n ArrayList<Rating> aveRat = sr.getAverageRatingsByFilter(minRatings, f);\n System.out.println(\"Found \" + aveRat.size() + \" movies\");\n System.out.println(\"-------------------------------------\");\n // sort arraylist\n Collections.sort(aveRat);\n for(Rating r: aveRat){\n System.out.println(r.getValue() + \"\\t\" + MovieDatabase.getYear(r.getItem()) + \"\\t\" \n + MovieDatabase.getTitle(r.getItem()) + \"\\t\" + MovieDatabase.getGenres(r.getItem()));\n }\n System.out.println(\"-------------------------------------\");\n \n \n }", "protected float[] getGenes() {\n\t\t\treturn genes;\n\t\t}", "double average();" ]
[ "0.65770787", "0.6502318", "0.6312537", "0.62453073", "0.6213012", "0.6203028", "0.61342007", "0.6119096", "0.6113729", "0.6092723", "0.6010432", "0.5892354", "0.58863103", "0.58806336", "0.5876923", "0.585288", "0.5843406", "0.58305204", "0.5747856", "0.5732025", "0.57287425", "0.57110953", "0.5702153", "0.569564", "0.56926584", "0.5636044", "0.5629769", "0.5626866", "0.5624979", "0.5622817", "0.5611504", "0.5569025", "0.5568203", "0.5560704", "0.5558344", "0.55567217", "0.55396396", "0.55371386", "0.55214", "0.5519433", "0.54835576", "0.54835445", "0.5481432", "0.54797494", "0.5473455", "0.5473421", "0.5472338", "0.547094", "0.5469419", "0.54621506", "0.5460319", "0.5449464", "0.5438399", "0.54372025", "0.5413334", "0.54120016", "0.5400249", "0.54001224", "0.53940094", "0.5383676", "0.53731555", "0.5369199", "0.5367973", "0.5359269", "0.5348946", "0.53442174", "0.53427225", "0.5322752", "0.5320337", "0.5314707", "0.53138816", "0.5313799", "0.52976954", "0.529351", "0.52927", "0.5287966", "0.52615845", "0.52525204", "0.5251657", "0.525016", "0.52462536", "0.5228643", "0.5210187", "0.5204401", "0.52031463", "0.51899195", "0.5188996", "0.5179698", "0.51725024", "0.5168406", "0.5167198", "0.5166169", "0.5164451", "0.5156046", "0.5155235", "0.5154391", "0.51540923", "0.5148854", "0.5144765", "0.5142227" ]
0.55541503
36
Gets the list of highest fitness scores found for each generation. The index of each entry corresponds to the generation number minus one.
public ArrayList<Double> getHighestFitnesses() { return highFitnesses; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getHighestFitness() {\r\n\t\treturn highestScore;\r\n\t}", "private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}", "public Fitness worstScore() {\r\n Map.Entry<Fitness, List<Element>> worstEntry\r\n = elementsByFitness.firstEntry();\r\n if (worstEntry == null) {\r\n return null;\r\n }\r\n Fitness result = worstEntry.getKey();\r\n\r\n return result;\r\n }", "public double getHighestGrade(){\n double highestGrade = 0;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()> highestGrade)\n highestGrade = students.get(i).getGrades();\n }// end for\n return highestGrade;\n }", "public Fitness bestScore() {\r\n Map.Entry<Fitness, List<Element>> bestEntry\r\n = elementsByFitness.lastEntry();\r\n if (bestEntry == null) {\r\n return null;\r\n }\r\n Fitness result = bestEntry.getKey();\r\n\r\n return result;\r\n }", "public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}", "public Building mostFitInPopulation(){\n\t\tCollections.sort(population);\n\t\treturn population.get(population.size() - 1);\n\t}", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "private <T> GeneticResult<T> maxFitness(List<Chromosome<T>> chromosomes, int totalBreedings){\n\t\tChromosome<T> bestFit = fittestChromosome(chromosomes);\n\t\treturn new GeneticResult<T>(bestFit, bestFit.getFitness(), totalBreedings);\n\t}", "public ArrayList<Double> getFiveHighestScore() {\n int size = scoreList.size();\n ArrayList<Double> fiveHighestList = new ArrayList<>();\n if (size <= 5) {\n for (Double score: scoreList) {\n fiveHighestList.add(score);\n }\n } else {\n for (int i = 0; i < 5; i++)\n fiveHighestList.add(scoreList.get(i));\n }\n return fiveHighestList;\n }", "public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }", "public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }", "public int getWorstScore()\n {\n return -1;\n }", "public Individual getWorst() {\n\t\treturn individuals[individuals.length-1];\n\t}", "public String findHighestScorers() {\n ArrayList<String> names = new ArrayList<String>();\n String theirNames = \"\";\n int highest = findHighestScore();\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) == 0) {\n //note that each quiz taker's arraylist of scores is already sorted in descending order post-constructor\n boolean alreadyThere = false;\n for(String name: names) {\n if(name.equals(allQuizTakers.get(i).getName())) {\n alreadyThere = true;\n }\n }\n if (!alreadyThere) {\n theirNames += allQuizTakers.get(i).getName() + \" \";\n names.add(allQuizTakers.get(i).getName());\n }\n }\n }\n return theirNames;\n }", "public List<ScoreInfo> getHighScores() {\n List<ScoreInfo> highScoreList = new ArrayList<>();\n if (scoreInfoList.size() <= size) {\n highScoreList = scoreInfoList;\n } else {\n for (int i = 0; i < size; i++) {\n highScoreList.add(scoreInfoList.get(i));\n }\n }\n return highScoreList;\n }", "Integer getMaximumResults();", "public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}", "public HighScore getMaxScore(){\n HighScore hs;\n db = helper.getReadableDatabase();\n Cursor scoreCursor = db.query(SQLHelper.DB_TABLE_SCORES, SCORES_COLUMNS, null, null, null, null, SQLHelper.KEY_SCORE + \" DESC\", null);\n scoreCursor.moveToFirst();\n if(scoreCursor.getCount() == 0){\n hs = null;\n }\n else{\n hs = new HighScore(scoreCursor.getString(0), scoreCursor.getLong(1),\n scoreCursor.getLong(2), scoreCursor.getString(3), scoreCursor.getString(4));\n scoreCursor.moveToNext();\n if (scoreCursor != null && !scoreCursor.isClosed()) { // Close cursor\n scoreCursor.close();\n }\n }\n db.close();\n return hs; // Return max high score\n }", "public ArrayList<Individual> getSortedPopulation(){\n ArrayList<Individual> sortedIndividuals = new ArrayList<Individual>();\n\n for(Individual individual: individuals){\n int indexToadd = 0;\n\n if(sortedIndividuals.isEmpty()){\n sortedIndividuals.add(individual);\n }\n else {\n for(Individual sortedIndividual : sortedIndividuals){\n if(individual.getFitness() > sortedIndividual.getFitness()){\n indexToadd = sortedIndividuals.indexOf(sortedIndividual);\n break;\n }\n }\n if(indexToadd == 0 ){\n sortedIndividuals.add(individual);\n }\n else {\n sortedIndividuals.add(indexToadd,individual);\n }\n }\n }\n return sortedIndividuals;\n }", "public List<Integer> findTopGenesByRanking( Integer n ) throws DAOException;", "public int getFitness()\n {\n return this.fitness;\n }", "public double getBestScore();", "public String getHighscore() {\n String str = \"\";\n\t int max = 10;\n \n ArrayList<Score> scores;\n scores = getScores();\n \n int i = 0;\n int x = scores.size();\n if (x > max) {\n x = max;\n } \n while (i < x) {\n \t str += (i + 1) + \".\\t \" + scores.get(i).getNaam() + \"\\t\\t \" + scores.get(i).getScore() + \"\\n\";\n i++;\n }\n if(x == 0) str = \"No scores for \"+SlidePuzzleGUI.getRows()+\"x\"+SlidePuzzleGUI.getCols()+ \" puzzle!\";\n return str;\n }", "public int fitness() {\n\t\t//System.out.println(\"/!\\\\ WARNING: Full fitness() called!\");\n\t\tint fitness = 0;\n\t\tint fitnessCases = (int) Math.pow(2, circuit.order);\n\t\tfor (int i=0; i<fitnessCases; i++) {\n\t\t\tValuation v = new Valuation(i, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = null;\n\t\t\n\t\treturn fitness;\n\t}", "public double worstFitness()\r\n {\r\n\treturn worstFitness;\r\n }", "public String getHighscores(){\r\n\t\tString returnString = \"\";\r\n\t\tList<Score> allScores = database.getAllScores(\"hard\");\r\n\t\t\r\n\t\t//loop through top 4 entries of table as obtained in the allScores list\r\n\t\tfor(int i = allScores.size()-1, j = 3; i>=0 && j>=0; j--, i--){\r\n\t\t\treturnString += String.valueOf(allScores.get(i).score + \" | \" + allScores.get(i).time + \"\\n\");\r\n\t\t}\r\n\t\treturn returnString;\r\n\t}", "private static double getHighestScore (List<Double> inputScores) {\n\n\t\tCollections.sort(inputScores, Collections.reverseOrder());\n\n\t\treturn inputScores.get(0);\n\n\t}", "public double getMaximumScore() {\n return 0.9; // TODO: parameter\n }", "public static int singleGameTopScoringPlayer(int[][] scores, int g)\n {\n \n int index = 0;\n int row = 0;\n int max = scores[row][g]; //by default we assign the max value as the first value\n int nextrow = row + 1;\n \n while ( nextrow < scores.length) //total up the rows for that column\n {\n //compare if the max value is smaller than its successive value\n if (max < scores[nextrow][g])\n {\n max = scores[nextrow][g]; //if it is larger, then it becomes the new max value\n index = nextrow; //save the index in the variable called index\n }\n \n nextrow++;\n }\n \n return index;\n \n }", "public Double getHighestMainScore() {\n return highestMainScore;\n }", "public List<ScoreInfo> getHighScores() {\n List<ScoreInfo> l = new ArrayList<ScoreInfo>();\n l.addAll(this.highScores); //make a copy;\n return l;\n }", "public OptionalDouble getBestScore()\n {\n if (scores.size() > 0)\n {\n return OptionalDouble.of(scores.lastKey());\n }\n else\n {\n return OptionalDouble.empty();\n }\n }", "public int getFitness(Graph_GA obj)\r\n\t{\r\n\t\tint fitness_score = 0;\r\n\t\tSet<DefaultEdge> edges= obj.graph_inp.edgeSet();\r\n Iterator<DefaultEdge> edges_list = edges.iterator();\r\n \r\n while(edges_list.hasNext())\r\n {\r\n \tDefaultEdge new_edge = edges_list.next();\r\n \tGA_Graph_Node source = obj.graph_inp.getEdgeSource(new_edge);\r\n \tGA_Graph_Node target = obj.graph_inp.getEdgeTarget(new_edge);\r\n \tif(chromosome[source.numID-1] == chromosome[target.numID-1])\r\n \t{\r\n \t\tfitness_score = fitness_score-1;\r\n \t}\r\n }\r\n\t\treturn fitness_score;\r\n\t}", "public int getMaxScore() {\r\n return maxScore;\r\n\t}", "public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}", "void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}", "public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }", "public int getMax() {\r\n // get root\r\n RedBlackTree.Node<Grade> max = rbt.root;\r\n // loop to right of tree\r\n while (max.rightChild != null) {\r\n max = max.rightChild;\r\n }\r\n\r\n return max.data.getGrade();\r\n }", "public ResultSet getHighestScore(String map) {\n return query(SQL_SELECT_HIGHEST_SCORE, map);\n }", "public double calcFitness(int[] genes) {\n\t\treturn 0;\n\t}", "public int maxGrowths(){\n\t\tint max = -1;\n\t\tfor(CircosNode tempNode : nodes){\n\t\t\tfor(int entry : tempNode.getGrowthsPerYear().values()){\n\t\t\t\tif(entry > max){\n\t\t\t\t\tmax = entry;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public int getFitness(){\n return fitness;\n }", "public static rk getBestSolutionMax(ArrayList<rk> Sched) {\n\n rk best = Sched.get(0).copyOf();\n for (int i = 1; i < Sched.size(); i++) {\n rk S = Sched.get(i).copyOf();\n if (S.getFitness() > best.getFitness()) {\n\n best = S;\n }\n }\n return best;\n }", "protected int getHighestInnovation() {\n\t\treturn highest;\n\t}", "public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }", "public void findH()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n if(scores[i][j] > high)\n high = scores[i][j];\n }\n }\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n if(scores[i][j] == high)\n System.out.println(names[i] + \" had the highest score of \" + high);\n break;\n \n }\n \n }\n }", "public int[] getHighScore() {\n return HighScore;\n }", "public int getFitness() {\n\t\treturn getEnergy() * -1;\n\t}", "@Override\n public Score getBest() {\n Session session = FACTORY.openSession();\n\n try {\n List<Score> bestScores = session.createQuery(\"FROM Score s WHERE s.value = (SELECT max(s.value) FROM Score s)\", Score.class)\n .list();\n\n session.close();\n\n return bestScores.isEmpty() ? new Score(0L) : bestScores.get(0);\n } catch (ClassCastException e) {\n LOG.error(\"Error happened during casting query results.\");\n return null;\n }\n }", "public static List<Double> selection(PolyPopulation pop, double cutoff) {\n\t\tint lastGenerationNum = pop.getGroupCapacity();\n\t\tList<PolyIndividual> nextGeneration = new ArrayList<>();\n\t\tList<Double> fitList = new ArrayList<>();\n\t\tList<Double> valueList = new ArrayList<>();\n\t\tList<Double> actValueList = new ArrayList<>();\n\t\tdouble max = 0.0;\n\t\tdouble totalFit = 0.0;\n\t\t//calculate the value of each individual in the population\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble val = f(pop.getIndis().get(i).getGenotype());\n\t\t\tvalueList.add(val);\n\t\t\t//get the Max value, use it\n\t\t\tif(i == 0) max = val;\n\t\t\telse if(val > max) max = val;\n\t\t}\n\t\t//based on the value insists now, calculate the fitness of each individual and their total fitness\n\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\tdouble fit = 1/(max - valueList.get(i) + 10);\n\t\t\tfitList.add(fit);\n\t\t\ttotalFit+=fit;\n\t\t}\n\t\t\n\t\twhile(nextGeneration.size() < lastGenerationNum*cutoff) {\t\t\t\n\t\t\tdouble selectionVal = Math.random();\n\t\t\tdouble accumulateVal = 0.0;\n\t\t\tfor(int i = 0; i < pop.getGroupCapacity(); i++) {\n\t\t\t\tif(selectionVal >= accumulateVal && selectionVal < (accumulateVal+fitList.get(i)/totalFit)) {\n\t\t\t\t\tnextGeneration.add(pop.getIndis().get(i));\n\t\t\t\t\tactValueList.add(valueList.get(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\taccumulateVal+=(fitList.get(i)/totalFit);\n\t\t\t}\n\t\t}\n\t\tpop.setIndis(nextGeneration);\n\t\tpop.setGroupCapacity(nextGeneration.size());\n\t\treturn actValueList;\n\t}", "public static TrigramsOcurrence greatest(ArrayList<TrigramsOcurrence> frequencies) {\n TrigramsOcurrence greatest = frequencies.get(0);\n for (TrigramsOcurrence frecuency : frequencies) {\n if (greatest.getFrequency() < frecuency.getFrequency()) {\n greatest = frecuency;\n }\n }\n return greatest;\n }", "public int getHighScore(int i) {\n return topScores.get(i);\n }", "public void printBestIndividual() {\n\t\tSystem.out.println(\"Finalizing\");\n\t\tQuoridorBoard board;\n\t\tfor (int t = 0; t < (Math.log(individuals.length) / Math.log(2)); t++) {\n\t\t\tfor (int i = 0; i < individuals.length - 1; i++) {\n\t\t\t\tif (individuals[i].fitness == t) {\n\t\t\t\t\tfor (int j = i + 1; j < individuals.length; j++) {\n\t\t\t\t\t\tif (individuals[j].fitness == t) {\n\t\t\t\t\t\t\tboard = new QuoridorBoard(individuals[i],\n\t\t\t\t\t\t\t\t\tindividuals[j]);\n\t\t\t\t\t\t\tboard.play();\n\t\t\t\t\t\t\tif (board.getWinner() != null) {\n\t\t\t\t\t\t\t\tAI winner = board.getWinner();\n\t\t\t\t\t\t\t\tAI loser = board.getLoser();\n\t\t\t\t\t\t\t\twinner.fitness++;\n\t\t\t\t\t\t\t\tindividuals[i] = winner;\n\t\t\t\t\t\t\t\tindividuals[j] = loser;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tFileWriter fstream = new FileWriter(\"evoOutput.txt\");\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tint max1 = 0;\n\t\t\tint max2 = 0;\n\t\t\tAI best1 = new AI();\n\t\t\tAI best2 = new AI();\n\t\t\tfor (AI ai : individuals) {\n\t\t\t\tif (ai.fitness > max1) {\n\t\t\t\t\tmax1 = ai.fitness;\n\t\t\t\t\tbest1 = ai.clone();\n\t\t\t\t} else if (ai.fitness > max2) {\n\t\t\t\t\tmax2 = ai.fitness;\n\t\t\t\t\tbest2 = ai.clone();\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.write(best1.outputString() + \"\\r\\n\" + best2.outputString()\n\t\t\t\t\t+ \"\\r\\n\");\n\t\t\tout.close();\n\t\t\tSystem.out.println(\"Done\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public ArrayList<Configuration> choixMax()\r\n\t{\r\n\t\tArrayList<Configuration> Filles=ConfigurationsFilles();\r\n\t\tArrayList<Configuration> FillesMax = new ArrayList<>();\r\n\t\tif(Filles==null) return null;\r\n\t\tint max = Filles.get(0).maxscore;\r\n\t\tfor(Configuration c : Filles)\r\n\t\t{\r\n\t\t\tif(max == c.maxscore)\r\n\t\t\t{\r\n\t\t\t\tFillesMax.add(c);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FillesMax;\r\n\t}", "public double bestFitness()\r\n {\r\n\treturn bestFitness;\r\n }", "public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}", "public int getBestScore() {\n\t\tInteger score = this.hand.countValue().lower(22);\n\t\tif(score!=null) {\n\t\t\treturn score;\n\t\t}\n\t\telse {\n\t\t\treturn this.hand.countValue().higher(21);\n\t\t}\n\t}", "private int[] getHighestPricesInTerm(int[] prices){\n int highest = -1;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]>highest){\n highest = prices[i];\n index = i;\n }\n }\n return new int[]{highest,index};\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "protected float getFitness()\t\t\t{\treturn fitness;\t\t}", "private int postprocess() {\n // Index with highest probability\n int maxIndex = -1;\n float maxProb = 0.0f;\n for (int i = 0; i < outputArray[0].length; i++) {\n if (outputArray[0][i] > maxProb) {\n maxProb = outputArray[0][i];\n maxIndex = i;\n }\n }\n return maxIndex;\n }", "public int getFitness(){\n\t\treturn getEnergy()*-1; \n\t}", "double getFitnessScore(){\n return fitnessScore;\n }", "public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }", "public int getMax(){\n return tab[rangMax()];\n }", "private int getBestGuess(double values[]){\n int maxIndex=0;\n double max=0;\n for(int i=0;i<4;i++){\n if(values[i]>max) {\n max = values[i];\n maxIndex=i;\n }\n }\n return maxIndex+1;\n }", "public int maximum() {\n \n if (xft.size() == 0) {\n return -1;\n }\n \n Integer maxRepr = xft.maximum();\n \n assert(maxRepr != null);\n \n int index = maxRepr.intValue()/binSz;\n \n TreeMap<Integer, Integer> map = getTreeMap(index);\n \n assert(map != null);\n \n Entry<Integer, Integer> lastItem = map.lastEntry();\n \n assert(lastItem != null);\n \n return lastItem.getKey();\n }", "private static int maximum() {\n\t\tint popSize = 0;\n\t\tChromosome thisChromo = null;\n\t\tChromosome thatChromo = null;\n\t\tint winner = 0;\n\t\tboolean foundNewWinner = false;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\tfoundNewWinner = false;\n\t\t\tpopSize = population.size();\n\t\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\t\tif (i != winner) { // Avoid self-comparison.\n\t\t\t\t\tthisChromo = population.get(i);\n\t\t\t\t\tthatChromo = population.get(winner);\n\t\t\t\t\tif (thisChromo.conflicts() > thatChromo.conflicts()) {\n\t\t\t\t\t\twinner = i;\n\t\t\t\t\t\tfoundNewWinner = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (foundNewWinner == false) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\treturn winner;\n\t}", "private PMCGenotype[] advanceGeneration()\n\t{\n\t\tPMCGenotype[] newPop = new PMCGenotype[population.length];\n\t\tPMCGenotype[] parents = selectParents();\n\t\tArrayList<PMCGenotype> candidates = new ArrayList<PMCGenotype>();\n\n\t\t// Add the current population to the list of candidates.\n\t\tfor (PMCGenotype pmcg : population)\n\t\t{\n\t\t\tcandidates.add(pmcg);\n\t\t}\n\n\t\t// For each parent, generate a number of mutations (children), calculate their fitness\n\t\t// and add them to the list of candidates.\n\t\tint childrenPerParent = this.childrenPerGeneration / this.parentsToSelect;\n\t\tfor (PMCGenotype p : parents)\n\t\t{\n\t\t\tfor (int i = 0; i < childrenPerParent; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = PMCGenotype.mutate(p, r);\n\t\t\t\tpmcg.setFitness(fitness(pmcg, this.trials));\n\t\t\t\tcandidates.add(pmcg);\n\t\t\t}\n\t\t}\n\n\t\t// Find candidate with the best fitness and add it to the new population.\n\t\t// Repeat this until the new population size matches the previous population size.\n\t\tint candidatesChosen = 0;\n\t\twhile (candidatesChosen < this.population.length)\n\t\t{\n\t\t\tint numberOfRemainingCandidates = candidates.size();\n\t\t\tdouble currentBestFitnessScore = 0;\n\t\t\tint currentBestFitnessScoreIndex = 0;\n\n\t\t\tfor (int i = 0; i < numberOfRemainingCandidates; i++)\n\t\t\t{\n\t\t\t\tPMCGenotype pmcg = candidates.get(i);\n\t\t\t\tif (pmcg.getFitness() > currentBestFitnessScore)\n\t\t\t\t{\n\t\t\t\t\tcurrentBestFitnessScore = pmcg.getFitness();\n\t\t\t\t\tcurrentBestFitnessScoreIndex = i;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnewPop[candidatesChosen] = candidates.get(currentBestFitnessScoreIndex);\n\t\t\tcandidatesChosen++;\n\n\t\t\tcandidates.remove(currentBestFitnessScoreIndex);\n\t\t}\n\n\t\treturn newPop;\n\t}", "public int getMaxGenerations() { return maxGenerations; }", "int getHighScore() {\n return getStat(highScore);\n }", "int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}", "private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "public static int getMax(int[] scores) {\r\n\t\r\n\t\tint temp = scores[0];\r\n\t\tfor(int i = 1; i < scores.length; ++i) {\r\n\t\t\r\n\t\t\tif (scores[i] > temp) {\r\n\t\t\t\ttemp = scores[i];\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t\r\n\t}", "public ArrayList<Tuple> getResults() {\n ArrayList<Tuple> result = new ArrayList<Tuple>();\n\n switch (this.ag) {\n case COUNT:\n if (!gb) {\n int res = 0;\n for (Tuple a : tupleList) {\n res++;\n }\n Tuple newTup = new Tuple(this.tdc);\n newTup.setField(0, new IntField(res));\n result.add(newTup);\n } else {\n for (Tuple ca : compareList) {\n int res = 0;\n for (Tuple tl : tupleList) {\n if (tl.equals(ca))\n res++;\n }\n Tuple newTup = new Tuple(this.tdc);\n newTup.setField(0, ca.getField(0));\n newTup.setField(1, new IntField(res));\n result.add(newTup);\n }\n }\n break;\n\n case MAX:\n if (!gb) {\n int max = Integer.MIN_VALUE;\n boolean whetherInt = false;\n String firstVal = \"\";\n\n if (tupleList.get(0).getField(0).getType().equals(Type.INT)) {\n whetherInt = true;\n }\n if (!whetherInt) {\n StringField first = (StringField) tupleList.get(0).getField(0);\n firstVal = first.toString();\n }\n\n for (Tuple tp : tupleList) {\n if (tp.getDesc().getType(0).equals(Type.STRING)) {\n StringField val = (StringField) tp.getField(0);\n String actualv = val.toString();\n\n if (actualv.compareTo(firstVal) == 1) { // if the new string is supposed to be lexicographically greater than the cu\n // max, set the cur max to be the new\n firstVal = actualv;\n }\n\n\n } else {\n IntField intFl = new IntField(tp.getField(0).toByteArray());\n int actualVal = intFl.getValue();\n if (actualVal > max) {\n max = actualVal;\n }\n }\n }\n if (whetherInt) {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, new IntField(max));\n result.add(maxTup);\n } else {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, new StringField(firstVal));\n result.add(maxTup);\n }\n\n } else {\n int max = Integer.MIN_VALUE;\n boolean whetherInt = false;\n\n String firstVal = \"\";\n\n if (compareList.get(0).getField(0).getType().equals(Type.INT)) {\n whetherInt = true;\n }\n if (!whetherInt) {\n StringField first = (StringField) tupleList.get(0).getField(1);\n firstVal = first.toString();\n }\n\n for (Tuple a : compareList) {\n Type aTp = a.getDesc().getType(0);\n IntField intVal = (IntField) a.getField(0);\n int actualVal = intVal.getValue();\n\n for (Tuple b : tupleList) {\n if (b.getDesc().getType(0) == Type.INT) {\n IntField intVal1 = (IntField) b.getField(0);\n int actualVal1 = intVal1.getValue();\n if (actualVal1 == actualVal) {\n IntField compareVal = (IntField) b.getField(1);\n int valueb = compareVal.getValue();\n if (valueb > max) {\n max = valueb;\n }\n }\n\n } else {\n StringField val = (StringField) b.getField(1);\n String actualv = val.toString();\n\n if (actualv.compareTo(firstVal) == 1) { // if the new string is supposed to be lexicographically greater than the cu\n // max, set the cur max to be the new\n firstVal = actualv;\n }\n }\n }\n if (whetherInt) {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, a.getField(0));\n maxTup.setField(1, new IntField(max));\n result.add(maxTup);\n } else {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, a.getField(0));\n maxTup.setField(1,new StringField(firstVal));\n result.add(maxTup);\n }\n }\n }\n break;\n case MIN:\n if (!gb) {\n int min = Integer.MAX_VALUE;\n boolean whetherInt = false;\n String firstVal = \"\";\n if (tupleList.get(0).getField(0).getType().equals(Type.INT)) {\n whetherInt = true;\n }\n if (!whetherInt) {\n StringField first = (StringField) tupleList.get(0).getField(0);\n firstVal = first.toString();\n\n }\n for (Tuple tp : tupleList) {\n if (tp.getDesc().getType(0).equals(Type.STRING)) {\n StringField val = (StringField) tp.getField(0);\n String actualv = val.toString();\n\n if (actualv.compareTo(firstVal) == -1) { // if the new string is supposed to be lexicographically SMALLER than the cu\n // max, set the cur mIN to be the new\n firstVal = actualv;\n }\n\n } else {\n IntField intFl = new IntField(tp.getField(0).toByteArray());\n int actualVal = intFl.getValue();\n if (actualVal < min) {\n min = actualVal;\n }\n }\n }\n if (whetherInt) {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, new IntField(min));\n result.add(maxTup);\n } else {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, new StringField(firstVal));\n result.add(maxTup);\n }\n } else {\n int min = Integer.MAX_VALUE;\n boolean whetherInt = false;\n\n String firstVal = \"\";\n\n if (compareList.get(0).getField(0).getType().equals(Type.INT)) {\n whetherInt = true;\n }\n if (!whetherInt) {\n StringField first = (StringField) tupleList.get(0).getField(1);\n firstVal = first.toString();\n\n }\n for (Tuple a : compareList) {\n Type aTp = a.getDesc().getType(0);\n\n\n IntField intVal = (IntField) a.getField(0);\n int actualVal = intVal.getValue();\n\n for (Tuple b : tupleList) {\n if (b.getDesc().getType(0) == Type.INT) {\n IntField intVal1 = (IntField) b.getField(0);\n int actualVal1 = intVal1.getValue();\n if (actualVal1 == actualVal) {\n IntField compareVal = (IntField) b.getField(1);\n int valueb = compareVal.getValue();\n if (valueb > min) {\n min = valueb;\n }\n }\n } else {\n StringField val = (StringField) b.getField(1);\n String actualv = val.toString();\n\n if (actualv.compareTo(firstVal) == 1) { // if the new string is supposed to be lexicographically greater than the cu\n // max, set the cur max to be the new\n firstVal = actualv;\n }\n\n }\n }\n if (whetherInt) {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, a.getField(0));\n maxTup.setField(1, new IntField(min));\n result.add(maxTup);\n } else {\n Tuple maxTup = new Tuple(this.tdc);\n maxTup.setField(0, a.getField(0));\n maxTup.setField(1,new StringField(firstVal));\n result.add(maxTup);\n }\n }\n }\n break;\n case AVG:\n int sum = 0;\n\n if (!gb) {\n for (Tuple tp : tupleList) {\n if (tp.getDesc().getType(0).equals(Type.STRING)) {\n System.out.println(\"cannot call avg on string\");\n } else {\n int val = ((IntField) tp.getField(0)).getValue();\n sum += val;\n\n }\n\n\n }\n int avgValue = sum / tupleList.size();\n // not sure what the new tuple's pid and id should be\n Tuple avgTup = new Tuple(this.tdc);\n avgTup.setField(0, new IntField(avgValue));\n\n } else {\n // now it is group by avg\n for (Tuple a : compareList) {\n Type aTp = a.getDesc().getType(0);\n int sumt = 0;\n int ct = 0;\n if (aTp.equals(Type.STRING)) {\n System.out.println(\"cannot call avg on string\");\n\n } else {\n IntField intVal = (IntField) a.getField(0);\n int actualVal = intVal.getValue();\n\n for (Tuple b : tupleList) {\n if (b.getDesc().getType(0) == Type.INT) {\n IntField intVal1 = (IntField) b.getField(0);\n int actualVal1 = intVal1.getValue();\n if (actualVal1 == actualVal) {\n IntField compareVal = (IntField) b.getField(1);\n int valueb = compareVal.getValue();\n sum += valueb;\n ct++;\n }\n } else {\n System.out.println(\"cannot call group by avg on string \");\n }\n }\n }\n int trueAvg = sum / ct;\n Tuple avgTup = new Tuple(this.tdc);\n avgTup.setField(0, a.getField(0));\n avgTup.setField(1, new IntField(trueAvg));\n result.add(avgTup);\n }\n }\n\n break;\n case SUM:\n int sumA = 0;\n if (!gb) {\n for (Tuple tp : tupleList) {\n if (tp.getDesc().getType(0).equals(Type.STRING)) {\n System.out.println(\"cannot call sUM on string\");\n } else {\n int val = ((IntField) tp.getField(0)).getValue();\n sumA += val;\n }\n }\n\n // not sure what the new tuple's pid and id should be\n Tuple avgTup = new Tuple(this.tdc);\n avgTup.setField(0, new IntField(sumA));\n result.add(avgTup);\n\n } else {\n // now it is group by sum\n int sumt = 0;\n for (Tuple a : compareList) {\n sumt = 0;\n Type aTp = a.getDesc().getType(0);\n\n if (aTp.equals(Type.STRING)) {\n System.out.println(\"cannot call sum on string\");\n\n } else {\n IntField intVal = (IntField) a.getField(0);\n int actualVal = intVal.getValue();\n\n for (Tuple b : tupleList) {\n if (b.getDesc().getType(0) == Type.INT) {\n IntField intVal1 = (IntField) b.getField(0);\n int actualVal1 = intVal1.getValue();\n if (actualVal1 == actualVal) {\n IntField compareVal = (IntField) b.getField(1);\n int valueb = compareVal.getValue();\n sumt += valueb;\n }\n\n } else {\n System.out.println(\"cannot call SUM on string \");\n }\n\n }\n }\n Tuple avgTup = new Tuple(this.tdc);\n avgTup.setField(0, a.getField(0));\n avgTup.setField(1, new IntField(sumt));\n if (!result.contains(avgTup)) {\n result.add(avgTup);\n }\n }\n\n }\n break;\n }// this is the closing for switch\n return result;\n }", "private ArrayList<Integer> possibleScores() {\n return new ArrayList<Integer>();\n }", "public ArrayList<Integer> max(int index)\n\t{\n\t\tArrayList<Integer> array2 = new ArrayList<Integer>();\n\t\tif(4*index + 3 >= size )\n\t\t{\n\t\t\tarray2.add(0);\n\t\t\treturn array2;\n\t\t}\n\n\t\tint maxIndex;\n\t\tint maxIndex2;\n\t\tint max = 0;\n\n\t\tif(4*index + 6 < size)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t\tmaxIndex = grandChildMax(4*(index)+3, 4*index + 4);\n\t\t\t\tmaxIndex2 = grandChildMax(4*(index)+5, 4*index + 6);\n\t\t\t\tmax = grandChildMax(maxIndex, maxIndex2);\n\t\t\t\tarray2.add(max);\n\t\t\t\treturn array2;\n\t\t\t\n\t\t}\n\t\tif(4*index+5 < size)\n\t\t{\n\n\t\t\tmaxIndex = grandChildMax(4*(index)+3, 4*index + 4);\n\t\t\tmax = grandChildMax(maxIndex, 4*index+5);\n\t\t\tarray2.add(max);\n\t\t\treturn array2;\n\n\n\t\t}\n\t\tif(4*index+4 < size)\n\t\t{\n\t\t\t\tmaxIndex = grandChildMax(4*(index)+3, 4*(index)+4);\n\t\t\t\tmax = grandChildMax(maxIndex, 2*index+2);\n\n\t\t\t\tarray2.add(0, max) ;\n\t\t\t\tarray2.add(1, 0);\n\t\t\t\treturn array2;\n\t\t}\n\n\n\n\t\tif(4*index + 3 < size)\n\t\t{\n\t\t\t\tmax = grandChildMax(4*index+3, 2*index + 2);\n\t\t\t\tarray2.add(0, max) ;\n\t\t\t\tarray2.add(1, 0);\n\t\t\t\treturn array2;\n\t\t\t\n\t\t}\n\n\t\treturn array2;\n\n\t}", "public void countHighest (int score){\r\n\t\tif (score > highest){\r\n\t\t\thighest = score;\r\n\t\t}\r\n\t}", "private static int[] FindHighest(int[][] terrainMap) {\n\n int[] highestPosition = {-1, -1};\n int highestValue = terrainMap[0][0];\n\n int i, j;\n\n for (i = 0; i < terrainMap.length; i++) {\n for (j = 0; j < terrainMap[0].length; j++) {\n if (terrainMap[i][j] > highestValue) {\n highestValue = terrainMap[i][j];\n highestPosition[0] = i;\n highestPosition[1] = j;\n }\n }\n }\n\n return highestPosition;\n }", "Score getScores(int index);", "public Individual getSecondFittest() {\n int maxFit1 = 0;\n int maxFit2 = 0;\n for (int i = 0; i < m_individual.length; i++) {\n if (m_individual[i].fitness > m_individual[maxFit1].fitness) {\n maxFit2 = maxFit1;\n maxFit1 = i;\n } else if (m_individual[i].fitness > m_individual[maxFit2].fitness) {\n maxFit2 = i;\n }\n }\n return m_individual[maxFit2];\n }", "public final void max() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue > topMostValue) {\n\t\t\t\tpush(secondTopMostValue);\n\t\t\t} else {\n\t\t\t\tpush(topMostValue);\n\t\t\t}\n\t\t}\n\t}", "public Individual getBest() {\n\t\treturn individuals[0];\n\t}", "String highscore(int max) {\r\n\t\tString str = highscoreToSortedMap().toString().replaceAll(\" \", \"\").replaceAll(\"}\", \"\").substring(1);\r\n\t\tString[] a = str.split(\",\");\r\n\t\tString result = \"\";\r\n\t\tif(a.length < max) { // wenn weniger als zehn Spieler im Highscore stehen\r\n\t\t\tfor(int i = 0; i < a.length; i++) { // ... werden je nach dem wie viele es sind an den String angehangen\r\n\t\t\t\tresult += a[i] + \",\";\r\n\t\t\t}\r\n\t\t} else { // wenn mehr als 10 Spieler im Highscore stehen\r\n\t\t\tfor(int i = 0; i < max; i++) { // werden nur die ersten zehn an den String angehangen\r\n\t\t\t\tresult += a[i] + \",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static <K, V extends Comparable<? super V>> List<Map.Entry<K, V>>\n findGreatest(Map<K, V> map, int n)\n {\n Comparator<? super Map.Entry<K, V>> comparator =\n new Comparator<Map.Entry<K, V>>()\n {\n @Override\n public int compare(Map.Entry<K, V> e0, Map.Entry<K, V> e1)\n {\n V v0 = e0.getValue();\n V v1 = e1.getValue();\n return v0.compareTo(v1);\n }\n };\n PriorityQueue<Map.Entry<K, V>> highest =\n new PriorityQueue<Map.Entry<K,V>>(n, comparator);\n for (Map.Entry<K, V> entry : map.entrySet())\n {\n highest.offer(entry);\n while (highest.size() > n)\n {\n highest.poll();\n }\n }\n\n List<Map.Entry<K, V>> result = new ArrayList<Map.Entry<K,V>>();\n while (highest.size() > 0)\n {\n result.add(highest.poll());\n }\n return result;\n }", "public int getHighScore() {\n return highScore;\n }", "public double[] getFitness() {\n return this.m_Fitness;\n }", "int getMaxResults();", "public int getHighestLevel()\n\t{\n\t\tint h = 0;\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null && h < m_pokemon[i].getLevel())\n\t\t\t\th = m_pokemon[i].getLevel();\n\t\treturn h;\n\t}", "public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }", "public int getMaximumGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100\");\n }\n \n int maxGrade = 0;\n int currentGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n currentGrade = grades[studentId];\n if (currentGrade > maxGrade) {\n maxGrade = currentGrade;\n }\n }\n return maxGrade;\n }", "public String getHighestInterest(){\n if(!interestsNotFilled()) {\n Object highestInterest = interestMap.keySet().toArray()[0];\n for (String interest : interestMap.keySet()) {\n float score = interestMap.get(interest);\n if (score > interestMap.get(highestInterest)) {\n highestInterest = interest;\n }\n }\n return (String) highestInterest;\n }else{\n return null;\n }\n }", "@Override\n public int higherScore() {\n if (!scoresUpToDate) {\n updateScores();\n }\n return higherScore;\n }", "public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }", "public int getMaximumPoints();", "public void evaluatePopulation() {\n // reset the total fitness score\n totalFitness = 0;\n\n for (int i = 0; i < populationSize; i++) {\n population.get(i).setRawFitness(\n FeederCollection.getFeeders().get(i).GetFitness());\n totalFitness += population.get(i).getRawFitness();\n }\n\n // set the normalized fitness for each population member\n for (Genotype g : population) {\n // normalized fitness = raw fitness / total fitness\n g.setNormalizedFitness((g.getRawFitness() / totalFitness));\n }\n\n // sort the popoulation\n Collections.sort(population, Genotype.FitnessOrder);\n\n highFitnesses.add(population.get(0).getRawFitness());\n avgFitnesses.add(totalFitness / population.size());\n\n\n }", "private void getBest()\n\t{\n\t\tSystem.out.println();\n\t\tSystem.out.println();\n\t\tSystem.out.println(bestTour + \" \" + bestScore);\n\t}", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}" ]
[ "0.6641527", "0.66082925", "0.65484333", "0.6459164", "0.6425596", "0.6356277", "0.62394387", "0.60545844", "0.60004616", "0.59384745", "0.593594", "0.59330046", "0.59100413", "0.5883253", "0.58789784", "0.58717155", "0.5853535", "0.58200884", "0.5819476", "0.5809736", "0.57403266", "0.573571", "0.57352626", "0.57169324", "0.5712685", "0.57089484", "0.5673478", "0.56657696", "0.5663187", "0.56574327", "0.5650524", "0.5649197", "0.5637665", "0.56336653", "0.5599726", "0.55937505", "0.55924773", "0.55921113", "0.5591598", "0.5581102", "0.55431443", "0.5535864", "0.5530095", "0.5527271", "0.55215526", "0.5512714", "0.55071265", "0.54938996", "0.54831696", "0.54784274", "0.54620105", "0.5459698", "0.5454624", "0.5450321", "0.54493576", "0.5449326", "0.5445525", "0.54434824", "0.5434217", "0.5425499", "0.54164904", "0.5403362", "0.5399471", "0.5397579", "0.53929895", "0.53922135", "0.53846925", "0.5380568", "0.53750795", "0.535847", "0.5344853", "0.5343043", "0.53320825", "0.53303605", "0.532783", "0.5315786", "0.5309254", "0.53083414", "0.5308341", "0.5306596", "0.5303549", "0.5296471", "0.5294425", "0.5289212", "0.5285784", "0.52642417", "0.5262366", "0.526207", "0.5258413", "0.52542144", "0.5254098", "0.5252565", "0.52430296", "0.5241062", "0.52380866", "0.52378666", "0.5233018", "0.5227912", "0.52226454", "0.52195376" ]
0.5852693
17
Gets the probability of crossover.
public static double getCrossoverProbability() { return crossoverProbability; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getProbCross () {\r\n return cross_prob;\r\n }", "public static void setCrossoverProbability(double value) { crossoverProbability = value; }", "public int getCrossoverPoints() {\n\t\treturn 1;\r\n\t}", "public int nPercentileCrossover(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.percentileCrossover;\n }", "public int nMeanCrossover(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.meanCrossover;\n }", "public void setProbCross (float value) {\r\n cross_prob = value;\r\n }", "private int getCrossoverPoint(int mode) {\n int cPoint = 0;\n\n switch (mode) {\n case Defines.CP_PURE_RANDOM:\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n break;\n\n case Defines.CP_NO_BOUNDARY:\n do {\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n } while (cPoint % Defines.GROUP_SIZE == 0 || cPoint % Defines.GROUP_SIZE == 3);\n break;\n }\n\n return cPoint;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "public OnePointCrossoverOne(Population p) {\n\t\tdoCrossover(p);\n\t}", "public void origCrossover() {\n\n ArrayList<Integer> crossPoints;\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n // Choose random crossover points within the chromosome\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n crossPoints = new ArrayList<Integer>();\n for (int i = 0; i < Defines.crossoverPoints; i++) {\n crossPoints.add(Defines.randNum(0, Defines.chromosomeSize - 1));\n }\n } else {\n // Parents are used without crossover - no crossover points; \n crossPoints = null;\n }\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspring(this.parents, crossPoints)));\n }", "public double getProbability() {\n return probability;\n }", "public Population doCrossover(Population p) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"Performing 1 point crossover for config1's selection population.\");\n\t\tSystem.out.println(\"Selecting bits to crossover.\");\n\t\tSystem.out.println(\"Completed.\");\n\t\treturn p;\n\t }", "public void crossover() {\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n this.crossoverOX();\n } else {\n // randomly select one of the parents to copy without crossover\n int idx = Defines.randNum(0, this.parents.size() - 1);\n Chromosome newChild = this.parents.get(idx);\n this.offspring = new ArrayList<Chromosome>();\n this.offspring.add(newChild);\n }\n }", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public double getProbCatch() {\n\t\treturn probCatch;\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "double getTransProb();", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "private double cross(Point A, Point B, Point C) {\n\t\tdouble AB_X = B.x - A.x;\n\t\tdouble AB_Y = B.y - A.y;\n\t\tdouble AC_X = C.x - A.x;\n\t\tdouble AC_Y = C.y - A.y;\n\t\tdouble cross = AB_X * AC_Y - AB_Y * AC_X;\n\t\treturn cross;\n\t}", "float getSpecialProb();", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "abstract double leftProbability();", "public double probability(double x){\n\t\tdouble firstTerm = 1.0 / Math.sqrt(2 * Math.PI * variance);\n\t\tdouble secondTerm = Math.exp( -(Math.pow((x-mean),2.0)) / (2 * variance) );\n\t\treturn firstTerm * secondTerm;\n\t}", "public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }", "public void calculateProbabilities(){\n\t}", "private int getPoisson() {\n\t\treturn (int) (-INCOMING_MY * Math.log(Math.random()));\n\t}", "public static double[] binomialCrossover(double[] populationIndividual, double[] mutantIndividual, double crossoverRate, int problemDimensionality)\n\t{\n\t\tint problemDimension = problemDimensionality; // Store the dimensionality of the problem domain\n\t\tint randomIndex = RandUtils.randomInteger(problemDimension - 1); // Generate a random index sampled from the range of [0, n]\n\t\t\n\t\tdouble[] offspringSolution = new double[problemDimension]; // Initialise the offspring solution variable\n\t\t\n\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t{\n\t\t\tif (RandUtils.random() < crossoverRate || i == randomIndex) // If the randomly generated number (within the range of [0, 1]) is smaller than the crossover rate or the increment counter is equal to the randomly generated index, do the following\n\t\t\t{\n\t\t\t\toffspringSolution[i] = mutantIndividual[i]; // Set the iterated design variable of the offspring solution (individual) to the iterated design variable of the mutated individual (solution)\n\t\t\t}\n\t\t\telse // Else if the randomly generated number is not smaller than the crossover rate or the increment counter is not equal to the randomly generated index, do the following\n\t\t\t{\n\t\t\t\toffspringSolution[i] = populationIndividual[i]; // Set the iterated design variable of the offspring solution to the iterated design variable of the original individual (solution)\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn offspringSolution; // Return the offspring solution\n\t}", "float genChance();", "public static int cross(Point a, Point b, Point c) {\n return (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y);\n }", "protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}", "private float getHitProbability(int x, int y) {\n\t\tfloat probability = 0;\n\t\t\n\t\tfor (int i = -TOWER_RANGE; i <= TOWER_RANGE; i++) {\n\t\t\tfor (int j = -TOWER_RANGE; j <= TOWER_RANGE; j++) {\n\t\t\t\tint curX = x + i;\n\t\t\t\tint curY = y + j;\n\t\t\t\tif (currentState.inBounds(curX, curY)\n\t\t\t\t\t\t&& distance(x, y, curX, curY) <= TOWER_RANGE) { // tower shoots in a circular range\n\t\t\t\t\tprobability = (probability + board.getTowerProbability(curX, curY)) - (probability * board.getTowerProbability(curX, curY));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn probability * TOWER_ACCURACY;\n\t}", "public void MultipointCrossoverCAN (TableVar Variables) {\r\n int i, mom, dad, xpoint1, xpoint2;\r\n \r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n \r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n Des.setCromElem (0, i, Inter.getCromElem(mom,i));\r\n Des.setCromElem (1, i, Inter.getCromElem(dad,i));\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n Des.setCromElem(mom, i, Inter.getCromElem(dad,i));\r\n Des.setCromElem(dad, i, Inter.getCromElem(mom,i));\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n \r\n }", "private float crossProduct(Vec2 X, Vec2 Y, Vec2 Z)\n {\n float x1 = Z.x - X.x;\n float y1 = Z.y - X.y;\n float x2 = Y.x - X.x;\n float y2 = Y.y - X.y;\n\n return x1*y2 - x2*y1;\n }", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "double getBranchProbability();", "public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}", "public void MultipointCrossoverDNF (TableVar Variables) {\r\n int i, j, mom, dad, xpoint1, xpoint2;\r\n\r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n\r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(0, i, j, Inter.getCromElemGene(mom,i, j));\r\n Des.setCromElemGene (1, i, j, Inter.getCromElemGene(dad,i, j));\r\n }\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(mom, i, j, Inter.getCromElemGene(dad,i,j));\r\n Des.setCromElemGene(dad, i, j, Inter.getCromElemGene(mom,i,j));\r\n }\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n\r\n }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}", "public double getAbandonmentProbability() {\n return Math.random();\n }", "private double getPerc(int n) {\n\t\tdouble total = n*n;\n\t\tPercolation p = new Percolation(n);\n\t\twhile(!p.percolates()) {\n\t\t\tint row = StdRandom.uniform(n)+ 1;\n\t\t\tint col = StdRandom.uniform(n) + 1;\n\t\t\tp.open(row, col);\n\t\t}\n\t\tdouble openSites = (double)(p.numberOfOpenSites());\n\t\treturn openSites/total;\n\t}", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "static double cross(Vec a, Vec b) {\n return a.x * b.y - a.y * b.x;\n }", "abstract double rightProbability();", "public Evolvable cross(Evolvable parent1, Evolvable parent2, int crossoverPoint)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t}\n\t\t\t\n\t\t\telse if(crossBehavior.equals(\"smartCross\")) {\n\t\t\t\tint split = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "double getMissChance();", "public void crossoverOX() {\n\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n ArrayList<Integer> crossPoints = getCrossoverPoints(Defines.cpMode);\n\n Collections.sort(crossPoints);\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspringOX(this.parents, crossPoints)));\n\n }", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "private Double getProzent(Double points)\r\n \t{\r\n \t\treturn points / totalPoints;\r\n \t}", "public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public double getChance() {\n return this.chance;\n }", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "public int getProbOfFailure() {\n return this.probOfFailure;\n }", "public Bounds getProbabilityBounds();", "public int getCrossingTime() {\n return crossingTime;\n }", "double getCritChance();", "public float getProbMut () {\r\n return mut_prob;\r\n }", "public void doMutation(double probability, Solution offsbring) throws JMException {\r\n\t\r\n\t\r\n\t\t \r\n\t\t try {\r\n\t\t \t//System.out.println(offsbring.get);\r\n\t\t int chrmosomesize= offsbring.getCompositionService().size();\r\n\t\t //int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t if (random<probability){\r\n\t\t \t System.out.println(\" classs \"+offsbring.getCompositionService().get(random).getServiceClass());//getSeviceClass();\r\n\t\t\t \r\n\t\t \t String Sclass=(String) offsbring.getCompositionService().get(random).getServiceClass();//getSeviceClass();\r\n\t\t \r\n\t\t for (int i=0; i<z.ServicePool.size();i++){\r\n\t// if (z.ServicePool.get(i).getServiceFunctionality().equalsIgnoreCase(Sclass))\r\n\t\t \t if (z.ServicePool.get(i).getServiceClass().equalsIgnoreCase(Sclass))\r\n\t\t\tRequiredClass.add(z.ServicePool.get(i));\r\n\t\t }\r\n\t\t // z.ServicePool.get(9).\r\n\t\tint random2 = (PseudoRandom.randInt())%(RequiredClass.size());\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\r\n\t\t \t\t\r\n\t\t\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\t\t \t \r\n\t\t \r\n\t\t }\r\n\t\t } catch (ClassCastException e1) {\r\n\t\t Configuration.logger_.severe(\"SinglePointCrossover.doCrossover: Cannot perfom \" +\r\n\t\t \"SinglePointCrossover\");\r\n\t\t Class cls = java.lang.String.class;\r\n\t\t String name = cls.getName();\r\n\t\t throw new JMException(\"Exception in \" + name + \".doCrossover()\");\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t }", "public Individual crossover1Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint = Service.rand(0, parent1.getChromosomeLength());\n for (int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n // Use half of parent1's genes and half of parent2's genes\n if (crossoverPoint > geneIndex) {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n }\n }\n return offspring;\n }", "public double crossSubCurveCorrelation()\n\t{\n\t\treturn _crossSubCurveCorrelation;\n\t}", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "public double getPvpExpLoss() \r\n\t{\treturn this.pvpExpLoss;\t}", "private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}", "public double awayWin() {\n\t\treturn this.bp.P2();\n\t}", "public float getChance()\n {\n return 1.0f;\n }", "int givePropScore(int propSize, int crownNum) throws Exception;", "public float translationProbability(Frame sinceFrame) {\r\n\t\treturn LeapJNI.Hand_translationProbability(this.swigCPtr, this, Frame.getCPtr(sinceFrame), sinceFrame);\r\n\t}", "public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }", "double getExtremeSpikeProbability();", "public double getCurrentProb(int x, int y) {\n\t\treturn hmm.getProb(x, y);\n\t}", "public float getChance() {\n return chance;\n }", "public static Double[] crossover(Double[] g1, Double[] g2){\n\t\tRandom random = new Random();\n\t\tint start = random.nextInt(variableNum-1);\n\t\tint end = start + 1 + random.nextInt(variableNum-start);\n\t\t//which one is better, why\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i] + Math.random()*(g1[i]-g2[i]);\n//\t\tfor(int i = start; i < end; i++) g1[i] = g2[i];\n\t\tfor(int i = start; i < end; i++) {\n\t\t\tg1[i] = g2[i] + (Math.random()*2-1)*(g1[i]-g2[i]);\n\t\t\tif(g1[i] > maxValue) g1[i] = maxValue;\n\t\t\tif(g1[i] < minValue) g1[i] = minValue;\n\t\t}\n\t\treturn Arrays.copyOf(g1, g1.length);\n\t}", "Point getRandomPoint() {\n\t\t\t\t\tdouble val = Math.random() * 3;\n\t\t\t\t\tif (val >=0.0 && val <1.0)\n\t\t\t\t\t\treturn p1;\n\t\t\t\t\telse if (val >=1.0 && val <2.0)\n\t\t\t\t\t\t\treturn p2;\n\t\t\t\t\telse\n\t\t\t\t\t\t\treturn p3;\n\t\t\t\t\t}", "abstract int[] crossOver();", "public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}", "public double getPowerUpProbabilityBox() {\n \t\treturn 0.4;\n \t}", "int getPercentageHeated();", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "public double[] cumulativePercentage(){\n if(!this.pcaDone)this.pca();\n return this.cumulativePercentage;\n }", "public static void main(String args[]) {\n\t\t\n\t\tint populationSize = 5;\n\t\tint crossCount = (int)(populationSize * 0.9);\n\t\tint mutCount = (int)(populationSize * 0.05);\n\t\tint copyCount = populationSize - crossCount - mutCount;\n\n\t\t//90% through crossover\n\t\tfor(int i = 0; i < crossCount; i++) \n\t\t\tSystem.out.println(\"Cross: \" + i);\n\t\t\n\t\t//5% by copying\n\t\tfor(int i = crossCount; i < crossCount + copyCount; i++) \n\t\t\tSystem.out.println(\"Copy: \" + i);\n\t\t\n\t\t\n\t\t//5% by mutation\n\t\tfor(int i = crossCount + copyCount; i < populationSize; i++) \n\t\t\tSystem.out.println(\"Mut: \" + i);\n\t\t\n\t\tfor(int i = 0; i < 60; i++) {\n\t\t\t\n\t\t\tPoint p1 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //bot's point\n\t\t\tPoint p2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //enemy point\n\t\t\twhile(p2.equals(p1))\n\t\t\t\tp2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600));\n\t\t\t\n\t\t\tfloat angle = (float) Math.atan2(p2.y - p1.y, p2.x - p1.x);\n\t\t\tDecimalFormat df = new DecimalFormat(\"0.0000\");\n\t\t\tSystem.out.println(p1.x + \" \" + p1.y + \" \" + p2.x + \" \" + p2.y + \" \" + df.format(angle));\n\t\t\t\n\t\t}\n\t\t\n\t}", "public double cross(Vector2D v)\n\t{\n\t\treturn this.x * v.y - this.y * v.x;\n\t}", "private static double crossProduct(Point2D a, Point2D b) {\r\n return a.getX() * b.getY() - b.getX() * a.getY();\r\n }", "public double getTransferEffeciency() {\n double w;\n w = (x < y ? x : y);\n return w / thickness;\n\n }", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public String CPUDepartProb()\r\n\t{\r\n\t\tdouble prob = Math.random();\r\n\t\t//System.out.println(\"prob: \" + prob);\r\n\t\t\r\n\t\tif(prob<=0.5) //0.5 chance\r\n\t\t{\r\n\t\t\treturn (\"Leave system\");\r\n\t\t}\r\n\t\telse if(prob>0.5 && prob<=(0.5+0.1)) //0.1 chance\r\n\t\t{\r\n\t\t\treturn (\"To Disk\");\r\n\t\t}\r\n\t\telse\t//0.4 chance\r\n\t\t{\r\n\t\t\treturn (\"To network\");\r\n\t\t}\r\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "public int fetchDisplacementValue(Problem prob)\n\t\t{\n\t\t\tdouble moveSample = rng.nextDouble();\n\t\t\tint displacement = 1;\n\t\t\tdouble totalProb = 0;\n\n\t\t\tfor (int p = 0; p <= prob.moveProbs.length; p++) {\n\t\t\t\ttotalProb += prob.moveProbs[p];\n\t\t\t\tif (moveSample <= totalProb) {\n\t\t\t\t\tdisplacement = p+1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn displacement;\n\t\t}", "POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();", "public List<Chromosome> doCrossover(Chromosome other, String crossoverType){\n int geneSize = this.knapsackSelection.size();\n\n ArrayList<Chromosome> children = new ArrayList<>();\n\n //Allow for multiple crossover attempts to better the chance of a valid crossover.\n //Note that this can be disabled by setting GAConfiguration.CONCEPTION_ATTEMPTS = 1.\n for(int i = 0; i < PopulationConfiguration.CONCEPTION_ATTEMPTS; i++){\n\n //Set first crossover point to 0 if 1PX Crossover.\n int crossPoint1 = crossoverType.equals(\"1PX\") ? 0 : Configuration.RANDOM_GENERATOR.nextInt(geneSize);\n int crossPoint2 = Configuration.RANDOM_GENERATOR.nextInt(geneSize - crossPoint1) + crossPoint1;\n\n ArrayList<Boolean> c1 = new ArrayList<>();\n ArrayList<Boolean> c2 = new ArrayList<>();\n\n c1.addAll(this.knapsackSelection.subList(0, crossPoint1));\n c1.addAll(other.getKnapsackSelection().subList(crossPoint1, crossPoint2));\n c1.addAll(this.knapsackSelection.subList(crossPoint2, geneSize));\n Chromosome child1 = new Chromosome(c1).withFitnessCalculated();\n\n c2.addAll(other.getKnapsackSelection().subList(0, crossPoint1));\n c2.addAll(this.knapsackSelection.subList(crossPoint1, crossPoint2));\n c2.addAll(other.getKnapsackSelection().subList(crossPoint2, geneSize));\n Chromosome child2 = new Chromosome(c2).withFitnessCalculated();\n \n if(child1.isValid() && children.size() < 2){\n children.add(child1);\n }\n if(child2.isValid() && children.size() < 2){\n children.add(child2);\n }\n if(children.size() == 2){\n break;\n }\n }\n //If the crossover failed to generate a valid child, return the parents.\n if(children.size() == 0){\n children.add(other);\n children.add(this);\n }\n else if(children.size() == 1){\n children.add(this);\n }\n return children;\n }", "public double prom () {\n return this.sum()/this.size();\n }", "public void croisements(double probability) {\n\t\tRandom rand = new Random();\n\t\tint nbCroisements = rand.nextInt(10);\n\t\tfor (int i = 0; i < nbCroisements; i++) {\n\t\t\tint index1 = 0, index2 = 0;\n\t\t\twhile(index1 == index2) {\n\t\t\t\tindex1 = rand.nextInt(this.individus.size());\n\t\t\t\tindex2 = rand.nextInt(this.individus.size());\n\t\t\t}\n\t\t\tif(rand.nextDouble() <= probability) {\n\t\t\t\tthis.individus.get(index1).cross(this.individus.get(index2));\n\t\t\t}\n\t\t}\n\t}", "public double getPX(){\n\t\treturn previousX;\n\t}", "public double getSumOfCrossProducts() {\n return sumXY;\n }", "public int applyNutrientCoefficient() {\n int deadGuppyCount = 0;\n\n Iterator<Guppy> it = guppiesInPool.iterator();\n while (it.hasNext()) {\n Guppy currentGuppy = it.next();\n\n randomNumberGenerator = new Random();\n double generatedDouble = randomNumberGenerator.nextDouble();\n\n if (generatedDouble > this.getNutrientCoefficient()) {\n currentGuppy.setIsAlive(false);\n deadGuppyCount++;\n }\n }\n return deadGuppyCount;\n }", "public abstract double getLinkProbability(int linkId);", "public Individual crossover2Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint1 = Service.rand(0, parent1.getChromosomeLength()-1);\n int crossoverPoint2 = Service.rand(crossoverPoint1 + 1, crossoverPoint1 + parent1.getChromosomeLength());\n\n for(int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n if (crossoverPoint2 >= parent1.getChromosomeLength()) {\n if(geneIndex >= crossoverPoint1 || geneIndex < (crossoverPoint2 - parent1.getChromosomeLength())) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }else {\n if(geneIndex >= crossoverPoint1 && geneIndex < crossoverPoint2) {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n }\n }\n }\n return offspring;\n }" ]
[ "0.7559638", "0.72415245", "0.6996236", "0.6798722", "0.6459056", "0.6237282", "0.61431944", "0.59189993", "0.5798485", "0.5791319", "0.56945807", "0.56478596", "0.56339604", "0.55289036", "0.55258083", "0.54963726", "0.5478085", "0.54295754", "0.5429299", "0.54200816", "0.54049677", "0.5361315", "0.5352989", "0.5296198", "0.5293165", "0.5290192", "0.5287738", "0.52808446", "0.52766323", "0.52701133", "0.5263382", "0.5249424", "0.5233645", "0.5212866", "0.51972204", "0.5195568", "0.51847166", "0.5182575", "0.517025", "0.51437426", "0.513943", "0.5122459", "0.5077994", "0.50734365", "0.5061835", "0.5059269", "0.5050185", "0.50467867", "0.5037667", "0.501854", "0.50172", "0.50141746", "0.50077933", "0.50027907", "0.49977046", "0.49937975", "0.49880844", "0.4978172", "0.49731985", "0.49685803", "0.49653473", "0.49581212", "0.49559915", "0.49456242", "0.4939514", "0.49382612", "0.49325696", "0.49264836", "0.49190605", "0.49157757", "0.49152872", "0.4910864", "0.4910372", "0.48960868", "0.48914066", "0.4878789", "0.48667246", "0.48567024", "0.48545527", "0.48490593", "0.4847713", "0.48476595", "0.48468637", "0.4843984", "0.48431152", "0.4835539", "0.48270682", "0.481627", "0.4815409", "0.48146635", "0.48080987", "0.4807482", "0.48052472", "0.48034048", "0.48002553", "0.4796975", "0.479231", "0.4779354", "0.47788197", "0.4773381" ]
0.87063354
0
Sets the crossover probability.
public static void setCrossoverProbability(double value) { crossoverProbability = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProbCross (float value) {\r\n cross_prob = value;\r\n }", "public static double getCrossoverProbability() { return crossoverProbability; }", "public void origCrossover() {\n\n ArrayList<Integer> crossPoints;\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n // Choose random crossover points within the chromosome\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n crossPoints = new ArrayList<Integer>();\n for (int i = 0; i < Defines.crossoverPoints; i++) {\n crossPoints.add(Defines.randNum(0, Defines.chromosomeSize - 1));\n }\n } else {\n // Parents are used without crossover - no crossover points; \n crossPoints = null;\n }\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspring(this.parents, crossPoints)));\n }", "public void crossover() {\n\n // Perform crossover with probability Defines.PROB_CROSSOVER\n if (Defines.probCrossover > Math.random()) {\n this.crossoverOX();\n } else {\n // randomly select one of the parents to copy without crossover\n int idx = Defines.randNum(0, this.parents.size() - 1);\n Chromosome newChild = this.parents.get(idx);\n this.offspring = new ArrayList<Chromosome>();\n this.offspring.add(newChild);\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {\r\n\t\t\t\tArrayList<Integer> chr1 = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\t\tArrayList<Integer> chr2 = (ArrayList<Integer>) this.chromosomes.get(i+1);\r\n\t\t\t\t// Uniform crossover\r\n\t\t\t\tif (!chr1.equals(chr2)) {\r\n\t\t\t\t\tfor (int j=0; j<this.nViaPoints; j=j+2) {\r\n\t\t\t\t\t\t// swap via points between 2 chromosomes\r\n\t\t\t\t\t\tInteger tmp = chr2.get(j);\r\n\t\t\t\t\t\tchr2.remove(j);\r\n\t\t\t\t\t\tchr2.add(j, chr1.get(j));\r\n\t\t\t\t\t\tchr1.remove(j);\r\n\t\t\t\t\t\tchr1.add(j, tmp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.printChromosomes(\"After crossover\");\r\n\t}", "public void setProbability(double v) {\n probability = v;\n }", "public void setCrossoverRate(double rate) { this.exec = this.exec.withProperty(\"ux.rate\", rate); }", "@Override\r\n\tpublic void setProbability(double probability) {\n\t\tthis.probability = probability;\r\n\t}", "public void setCrossoverMethod(Crossover c){\n crossType = c;\n }", "public float getProbCross () {\r\n return cross_prob;\r\n }", "public void setProbability(double pProbability) throws Exception{\r\n\t\tif (pProbability >= 0) probability = pProbability;\r\n\t\telse throw new Exception(\"02; sPro,ProEle\");\r\n\t}", "public Population doCrossover(Population p) {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"Performing 1 point crossover for config1's selection population.\");\n\t\tSystem.out.println(\"Selecting bits to crossover.\");\n\t\tSystem.out.println(\"Completed.\");\n\t\treturn p;\n\t }", "public void crossoverOX() {\n\n // [TODO: consider usefulness of a crossover point that coincides with\n // group boundary. If both crossovers are group boundaries, the crossover does nothing.]\n ArrayList<Integer> crossPoints = getCrossoverPoints(Defines.cpMode);\n\n Collections.sort(crossPoints);\n\n ChromosomeGenerator chromoGen = new ChromosomeGenerator(this.pool);\n\n this.offspring = new ArrayList<Chromosome>(Arrays.asList(chromoGen.generateOffspringOX(this.parents, crossPoints)));\n\n }", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "public int getCrossoverPoints() {\n\t\treturn 1;\r\n\t}", "public OnePointCrossoverOne(Population p) {\n\t\tdoCrossover(p);\n\t}", "public CrossoverOrder() {\n\t\tthis.randomGenerator = new Random(System.currentTimeMillis());\n\t}", "public void doMutation(double probability, Solution offsbring) throws JMException {\r\n\t\r\n\t\r\n\t\t \r\n\t\t try {\r\n\t\t \t//System.out.println(offsbring.get);\r\n\t\t int chrmosomesize= offsbring.getCompositionService().size();\r\n\t\t //int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t int random = PseudoRandom.randInt()%chrmosomesize;\r\n\t\t if (random<probability){\r\n\t\t \t System.out.println(\" classs \"+offsbring.getCompositionService().get(random).getServiceClass());//getSeviceClass();\r\n\t\t\t \r\n\t\t \t String Sclass=(String) offsbring.getCompositionService().get(random).getServiceClass();//getSeviceClass();\r\n\t\t \r\n\t\t for (int i=0; i<z.ServicePool.size();i++){\r\n\t// if (z.ServicePool.get(i).getServiceFunctionality().equalsIgnoreCase(Sclass))\r\n\t\t \t if (z.ServicePool.get(i).getServiceClass().equalsIgnoreCase(Sclass))\r\n\t\t\tRequiredClass.add(z.ServicePool.get(i));\r\n\t\t }\r\n\t\t // z.ServicePool.get(9).\r\n\t\tint random2 = (PseudoRandom.randInt())%(RequiredClass.size());\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\r\n\t\t \t\t\r\n\t\t\r\n\t\toffsbring.getCompositionService().set(random,RequiredClass.get(random2));\t\t \t \r\n\t\t \r\n\t\t }\r\n\t\t } catch (ClassCastException e1) {\r\n\t\t Configuration.logger_.severe(\"SinglePointCrossover.doCrossover: Cannot perfom \" +\r\n\t\t \"SinglePointCrossover\");\r\n\t\t Class cls = java.lang.String.class;\r\n\t\t String name = cls.getName();\r\n\t\t throw new JMException(\"Exception in \" + name + \".doCrossover()\");\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t }", "@Override\r\n\tpublic void setNextProbability(double probability) {\n\t\tthis.nextProbability = probability;\r\n\t}", "public static void setMutationProbability(double value) { mutationProbability = value; }", "public int nPercentileCrossover(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.percentileCrossover;\n }", "void setExtremeSpikeProbability(double p);", "public void setPennies(int p)\n {\n\tthis.pennies = p;\n\tchangeChecker();\n }", "public void MultipointCrossoverCAN (TableVar Variables) {\r\n int i, mom, dad, xpoint1, xpoint2;\r\n \r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n \r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n Des.setCromElem (0, i, Inter.getCromElem(mom,i));\r\n Des.setCromElem (1, i, Inter.getCromElem(dad,i));\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n Des.setCromElem(mom, i, Inter.getCromElem(dad,i));\r\n Des.setCromElem(dad, i, Inter.getCromElem(mom,i));\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n \r\n }", "@Test\n\tpublic void testCrossover() {\n\t\tint pivot = 5;\n\t\tint size = g10.getUnits().size();\n\t\tArrayList<GenomeDouble> expectedWeights1;\n\t\tArrayList<GenomeDouble> expectedWeights2;\n\t\t\n\t\texpectedWeights1 = new ArrayList<GenomeDouble>(g10.getUnits().size());\n\t\texpectedWeights2 = new ArrayList<GenomeDouble>(g10_2.getUnits().size());\n\t\t\n\t\texpectedWeights1.addAll(g10.getUnits().subList(0, pivot));\n\t\texpectedWeights1.addAll(g10_2.getUnits().subList(pivot, size));\n\t\texpectedWeights2.addAll(g10_2.getUnits().subList(0, pivot));\n\t\texpectedWeights2.addAll(g10.getUnits().subList(pivot, size));\n\t\t\n\t\tList<Genome<GenomeDouble>> results = Genome.crossover(g10, g10_2, 0.7, 10);\n\t\tassertEquals(expectedWeights1, results.get(0).getUnits());\n\t\tassertEquals(expectedWeights2, results.get(1).getUnits());\n\t}", "public void MultipointCrossoverDNF (TableVar Variables) {\r\n int i, j, mom, dad, xpoint1, xpoint2;\r\n\r\n // We cross the two better individuals (the first ones)\r\n mom = 0; // Better individual\r\n dad = 1; // Second individual\r\n\r\n // Copy the individuals to cross\r\n for (i=0; i<Variables.getNVars(); i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(0, i, j, Inter.getCromElemGene(mom,i, j));\r\n Des.setCromElemGene (1, i, j, Inter.getCromElemGene(dad,i, j));\r\n }\r\n }\r\n\r\n // Generation of the two points for the crossover\r\n xpoint1 = Randomize.Randint (0,(Variables.getNVars()-1));\r\n if (xpoint1!=Variables.getNVars()-1)\r\n xpoint2 = Randomize.Randint ((xpoint1+1),(Variables.getNVars()-1));\r\n else\r\n xpoint2 = Variables.getNVars()-1;\r\n\r\n // Cross the parts between both points\r\n for (i=xpoint1;i<=xpoint2;i++) {\r\n for (j=0; j<=Variables.getNLabelVar(i); j++) {\r\n Des.setCromElemGene(mom, i, j, Inter.getCromElemGene(dad,i,j));\r\n Des.setCromElemGene(dad, i, j, Inter.getCromElemGene(mom,i,j));\r\n }\r\n }\r\n\r\n // New individuals are not evaluated\r\n Des.setIndivEvaluated (mom, false);\r\n Des.setIndivEvaluated (dad, false);\r\n\r\n }", "public abstract Individual doCrossover(Individual ind1, Individual ind2, MOEAD init);", "public int nMeanCrossover(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.meanCrossover;\n }", "private void setCrossRef(CrossRef crossRef) { this.crossRef = crossRef; }", "public void setPrice(double price){\r\n Random chance = new Random();\r\n int crashChance = chance.nextInt(100);\r\n double droppedPrice = price * ThreadLocalRandom.current().nextDouble(0.6, 0.8);\r\n if (crashChance > 95) {\r\n setPlusMinus(\"Down\");\r\n System.out.println(\"This stock has crashed.\");\r\n super.setPrice(price - droppedPrice);\r\n } else if(crashChance < 5){\r\n setPlusMinus(\"Up\");\r\n System.out.println(\"This stock has surged.\");\r\n super.setPrice(price + droppedPrice);\r\n } else {\r\n super.setPrice(price);\r\n }\r\n }", "private void crossover() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < pop_size; i++) { // go through population\r\n\r\n int a = new Random().nextInt(this.pop_size);\r\n int b = new Random().nextInt(this.pop_size);\r\n\r\n int split_point = new Random().nextInt(this.gene_size);\r\n\r\n float[] p1_genes = this.parent_population.getPopulation()[a].getGenes();\r\n float[] p2_genes = this.parent_population.getPopulation()[b].getGenes();\r\n\r\n float[] c1_genes = new float[gene_size];\r\n float[] c2_genes = new float[gene_size];\r\n\r\n for (int j = 0; j < gene_size; j++) {\r\n\r\n if (j < split_point) {\r\n c1_genes[j] = p1_genes[j];\r\n c2_genes[j] = p2_genes[j];\r\n } else {\r\n c2_genes[j] = p1_genes[j];\r\n c1_genes[j] = p2_genes[j];\r\n }\r\n }\r\n individual child1 = new individual(c1_genes, solutions, output);\r\n individual child2 = new individual(c2_genes, solutions, output);\r\n\r\n if (child1.getFitness() > child2.getFitness()) {\r\n temp_pop[i] = child1;\r\n } else {\r\n temp_pop[i] = child2;\r\n }\r\n }\r\n this.offspring_population.setPopulation(temp_pop);\r\n this.offspring_population.update_population();\r\n }", "public void setProbCatchFire(double probCatchFire) {\n\t\tmyProbCatchFire = probCatchFire;\n\t}", "@Override\n public void SetSpawnProb(double SP){\n if(SP > 0.5){\n spawn = true;\n }else{\n spawn = false;\n }\n }", "public T setTargetPercentage(float perc)\n\t{\n\t\tif (isStarted())\n\t\t{\n\t\t\tLttl.Throw(\"Can't change target percentage after tween has started.\");\n\t\t}\n\t\ttargetPercentage = LttlMath.Clamp01(perc);\n\t\treturn (T) this;\n\t}", "public void setProbOfFailure(int prob) {\n \tif( prob <= 100 || prob >= 0){\n \t\tthis.probOfFailure = prob;\n \t}\n }", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "public void croisements(double probability) {\n\t\tRandom rand = new Random();\n\t\tint nbCroisements = rand.nextInt(10);\n\t\tfor (int i = 0; i < nbCroisements; i++) {\n\t\t\tint index1 = 0, index2 = 0;\n\t\t\twhile(index1 == index2) {\n\t\t\t\tindex1 = rand.nextInt(this.individus.size());\n\t\t\t\tindex2 = rand.nextInt(this.individus.size());\n\t\t\t}\n\t\t\tif(rand.nextDouble() <= probability) {\n\t\t\t\tthis.individus.get(index1).cross(this.individus.get(index2));\n\t\t\t}\n\t\t}\n\t}", "private void crossover(Chromosome c1, Chromosome c2){\n int split = (int)(Math.random()*c1.getNumWeights());\n \n double[][] m1 = c1.getGeneData();\n double[][] m2 = c2.getGeneData();\n double store;\n \n //Begin the switch\n for(int r=0; r<m1.length; r++){\n //Stop spliting\n if(split <= 0){\n break;\n }\n for(int c=0; c<m1[r].length;c++){\n store = m1[r][c];\n m1[r][c] = m2[r][c];\n m2[r][c] = store;\n split--;\n //Stop spliting\n if(split <= 0){\n break;\n }\n }\n }\n }", "public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }", "protected void setDistribution(ProbabilityDistribution distribution)\r\n\t{\r\n\t\tthis.distribution = distribution;\r\n\t}", "public void set(BezierBoardCrossSection crossSection) {\n while (mCrossSectionSpline.getNrOfControlPoints() > crossSection.mCrossSectionSpline.getNrOfControlPoints()) {\n mCrossSectionSpline.remove(0);\n }\n // Add extra control points\n while (mCrossSectionSpline.getNrOfControlPoints() < crossSection.mCrossSectionSpline.getNrOfControlPoints()) {\n mCrossSectionSpline.append(new BezierKnot());\n }\n\n int nrControlPoints = mCrossSectionSpline.getNrOfControlPoints();\n for (int i = 0; i < nrControlPoints; i++) {\n mCrossSectionSpline.getControlPoint(i).set(crossSection.mCrossSectionSpline.getControlPoint(i));\n }\n\n }", "void setCopies(short copies);", "void setProbables(boolean probables);", "public void setProbMut(double d){\n if ((d < 0) || (d > 1)){\n throw new IllegalArgumentException(\"Mutation probability cannot be less than 0 or greater than 1.\");\n }\n mutationProb = d;\n }", "private static Set<Chromosome> crossoverPopulation(ArrayList<Chromosome> population, int populationSize, int crossoverSize) {\n\n // declare a set of chromosomes which will store all thr chromosomes generated by the crossover operation\n Set<Chromosome> crossoverChromosomes = new HashSet<>();\n\n while (crossoverChromosomes.size() < crossoverSize) {\n // retrieve a set of chromosomes (of size 2) on which crossover will occur\n // using the Rank-Based Roulette Wheel Selection method\n Set<Chromosome> selectedChromosomes = rankBasedRouletteWheelSelection(population, populationSize);\n\n // store the 2 Chromosomes in parent 1 and parent 2\n Chromosome parent1 = selectedChromosomes.iterator().next();\n selectedChromosomes.remove(parent1);\n Chromosome parent2 = selectedChromosomes.iterator().next();\n\n // perform crossover using the crossoverChromosomes method\n // the method is called twice, switching the order of the parents for the second time, since SCX produces only\n // one child, however produces a different child when the parents are switched\n crossoverChromosomes.add(crossover(parent1, parent2));\n crossoverChromosomes.add(crossover(parent2, parent1));\n }\n\n return crossoverChromosomes;\n }", "public void setP(Double p);", "public void setPvpExpLoss(double pvpExpLoss) \r\n\t{\tthis.pvpExpLoss = pvpExpLoss;\t}", "public void setActionProbability(final State state, final Action action, final double probability) {\r\n getProperties(state).setActionProbability(action, probability);\r\n }", "public TesteCrossover() {\n initComponents();\n }", "public void setSleepPoints(int param) {\n // setting primitive attribute tracker to true\n localSleepPointsTracker = param != java.lang.Integer.MIN_VALUE;\n\n this.localSleepPoints = param;\n }", "public void setProbability(int informationSetNumber, double probability,\n\t\t\tString moveName) throws Exception {\n\n\t\tint iMove;\n\n\t\tArrayList movesList = movesLists[informationSetNumber - 1];\n\n\t\tfor (iMove = 0; iMove < movesList.size(); iMove++) {\n\t\t\tif (movesList.get(iMove).equals(moveName)) {\n\t\t\t\t// System.out.println(\"Player : \" + (iPlayer + 1) + \"\\tInfo Set\n\t\t\t\t// : \" + informationSetNumber + \"\\tMove : \" + moveName);\n\t\t\t\tprobsLists[informationSetNumber - 1].add(iMove, new Double(\n\t\t\t\t\t\tprobability));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Bug!! Bug!! inform to the Author\");\n\t}", "public void simulatedBinaryCrossover(MersenneTwisterFast random, TraceableFloatVectorIndividual other, float eta_c)\n {\n final double EPS = FloatVectorSpecies.SIMULATED_BINARY_CROSSOVER_EPS;\n FloatVectorSpecies s = (FloatVectorSpecies) species;\n TraceableFloat[] parent1 = genome;\n TraceableFloat[] parent2 = other.genome;\n // double[] min_realvar = s.minGenes;\n // double[] max_realvar = s.maxGenes;\n \n \n double y1, y2, yl, yu;\n double c1, c2;\n double alpha, beta, betaq;\n double rand;\n \n for(int i = 0; i < parent1.length; i++)\n {\n if (random.nextBoolean()) // 0.5f\n {\n if (Math.abs(parent1[i].getValue() - parent2[i].getValue()) > EPS)\n {\n if (parent1[i].getValue() < parent2[i].getValue())\n {\n y1 = parent1[i].getValue();\n y2 = parent2[i].getValue();\n }\n else\n {\n y1 = parent2[i].getValue();\n y2 = parent1[i].getValue();\n }\n yl = s.minGene(i); //min_realvar[i];\n yu = s.maxGene(i); //max_realvar[i]; \n rand = random.nextFloat();\n beta = 1.0 + (2.0*(y1-yl)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c1 = 0.5*((y1+y2)-betaq*(y2-y1));\n beta = 1.0 + (2.0*(yu-y2)/(y2-y1));\n alpha = 2.0 - Math.pow(beta,-(eta_c+1.0));\n if (rand <= (1.0/alpha))\n {\n betaq = Math.pow((rand*alpha),(1.0/(eta_c+1.0)));\n }\n else\n {\n betaq = Math.pow((1.0/(2.0 - rand*alpha)),(1.0/(eta_c+1.0)));\n }\n c2 = 0.5*((y1+y2)+betaq*(y2-y1));\n if (c1<yl)\n c1=yl;\n if (c2<yl)\n c2=yl;\n if (c1>yu)\n c1=yu;\n if (c2>yu)\n c2=yu;\n if (random.nextBoolean())\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n else\n {\n parent1[i] = this.recombineGenes(parent1[i], parent2[i], (float) c2);\n parent2[i] = this.recombineGenes(parent2[i], parent1[i], (float) c1);\n }\n }\n else\n {\n // do nothing\n }\n }\n else\n {\n // do nothing\n }\n }\n }", "public void setNewPrediction()\n\t{\n\t\tfor (int i=0;i<NUM_GOODS;i++)\n\t\t{\n\t\t\tfor (int j=0;j<VALUE_UPPER_BOUND+1;j++)\n\t\t\t{\n\t\t\t\tcumulPrediction[i][j] = 0;\n\t\t\t\t//System.out.println(pricePrediction[i][j]);\n\t\t\t\tprevPrediction[i][j] = pricePrediction[i][j];\n\t\t\t\t// 0.1 corresponds infestismal amount mentioned in the paper.\n\t\t\t\tpricePrediction[i][j] = priceObservation[i][j] + 0.1;\n\t\t\t\tcumulPrediction[i][j] += pricePrediction[i][j];\n\t\t\t\tif (j>0)\n\t\t\t\t{\n\t\t\t\t\tcumulPrediction[i][j] += cumulPrediction[i][j-1];\n\t\t\t\t}\n\t\t\t\tpriceObservation[i][j] = 0; \n\t\t\t}\n\t\t}\n\t\tthis.observationCount = 0;\n\t\tthis.isPricePredicting = true;\n\t\t//buildCumulativeDist();\n\t}", "@Generated\n @Selector(\"setLoadingPriority:\")\n public native void setLoadingPriority(double value);", "@DISPID(-2147412112)\n @PropPut\n void onmouseover(\n java.lang.Object rhs);", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Set Threshold Probability\")\n public void setThreshold() {\n if(Tools.getGlobalTime()!=0){\n JOptionPane.showMessageDialog(null, \"You can change this probability only when the simulation start\",\"Alert\", JOptionPane.INFORMATION_MESSAGE);\n return;\n }\n String answer = JOptionPane.showInputDialog(null, \"Set the probability that a node can be selected to run.\");\n // Show an information message\n try{\n double k = Double.parseDouble(answer);\n Iterator<Node> it = Tools.getNodeList().iterator();\n while(it.hasNext()){\n Node n = it.next();\n if(n.getClass() == MSNode.class){\n MSNode n1 = (MSNode)n;\n n1.setThresholdProbability(k);\n }\n if(n.getClass() == MS2Node.class){\n MS2Node n1 = (MS2Node)n;\n n1.setThresholdProbability(k);\n }\n }\n JOptionPane.showMessageDialog(null, \"Well done you have set this value:\"+k,\"Notice\", JOptionPane.INFORMATION_MESSAGE);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null, \"You must insert a valid double \", \"Alert\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "public void setPointOpacity(int pointOpacity)\n {\n myPointOpacity = pointOpacity;\n }", "public void evel_threshold_cross_data_collector_set(String sheader)\r\n\t {\r\n\t\t EVEL_ENTER();\r\n\r\n\t\t /***************************************************************************/\r\n\t\t /* Check preconditions. */\r\n\t\t /***************************************************************************/\r\n\t\t assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t\t \r\n\t\t assert(sheader != null);\r\n\r\n\t\t dataCollector.SetValuePr(\r\n\t\t sheader,\r\n\t\t \"Datacollector value\");\r\n\t\t EVEL_EXIT();\r\n\t }", "public static void main(String args[]) {\n\t\t\n\t\tint populationSize = 5;\n\t\tint crossCount = (int)(populationSize * 0.9);\n\t\tint mutCount = (int)(populationSize * 0.05);\n\t\tint copyCount = populationSize - crossCount - mutCount;\n\n\t\t//90% through crossover\n\t\tfor(int i = 0; i < crossCount; i++) \n\t\t\tSystem.out.println(\"Cross: \" + i);\n\t\t\n\t\t//5% by copying\n\t\tfor(int i = crossCount; i < crossCount + copyCount; i++) \n\t\t\tSystem.out.println(\"Copy: \" + i);\n\t\t\n\t\t\n\t\t//5% by mutation\n\t\tfor(int i = crossCount + copyCount; i < populationSize; i++) \n\t\t\tSystem.out.println(\"Mut: \" + i);\n\t\t\n\t\tfor(int i = 0; i < 60; i++) {\n\t\t\t\n\t\t\tPoint p1 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //bot's point\n\t\t\tPoint p2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600)); //enemy point\n\t\t\twhile(p2.equals(p1))\n\t\t\t\tp2 = new Point((int)(Math.random() * 600) , (int)(Math.random() * 600));\n\t\t\t\n\t\t\tfloat angle = (float) Math.atan2(p2.y - p1.y, p2.x - p1.x);\n\t\t\tDecimalFormat df = new DecimalFormat(\"0.0000\");\n\t\t\tSystem.out.println(p1.x + \" \" + p1.y + \" \" + p2.x + \" \" + p2.y + \" \" + df.format(angle));\n\t\t\t\n\t\t}\n\t\t\n\t}", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public void setCrossingTime(int crossingTime) {\n this.crossingTime = crossingTime;\n }", "private int getCrossoverPoint(int mode) {\n int cPoint = 0;\n\n switch (mode) {\n case Defines.CP_PURE_RANDOM:\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n break;\n\n case Defines.CP_NO_BOUNDARY:\n do {\n cPoint = Defines.randNum(0, Defines.chromosomeSize - 1);\n } while (cPoint % Defines.GROUP_SIZE == 0 || cPoint % Defines.GROUP_SIZE == 3);\n break;\n }\n\n return cPoint;\n }", "public void setPropertyPenalty(float value) {\n this.propertyPenalty = value;\n }", "public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}", "public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}", "public void setPrice(double p){\n\t\t// store into the instance variable price the value of the parameter p\n\t\tprice = p;\n\t}", "private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }", "public void setPotatoesPrice(double p);", "public void setOver(boolean over) {\r\n isOver = over;\r\n }", "public void setOnmouseover(String val)\r\n\t{\r\n\t\t_onMouseOver = val;\r\n\t}", "public void setTipPercentage(double newTip) {\n tip = newTip;\n }", "public Evolvable cross(Evolvable parent1, Evolvable parent2, int crossoverPoint)\n\t{\n\t\tif(((SNSAgent)parent1).getBehavior().equals(\"RuleBased\"))\n\t\t{\t\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn ruleZipperCross(parent1, parent2);\n\t\t\telse if(crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse if(crossBehavior.equals(\"smartCross\"))\n\t\t\t\treturn ruleSplitCross(parent1, parent2, crossoverPoint);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(crossBehavior.equals(\"zipperCross\"))\n\t\t\t\treturn zipperCross(parent1, parent2);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"splitCross\"))\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t\n\t\t\telse if (crossBehavior.equals(\"freeSplitCross\")){\n\t\t\t\treturn splitCross(parent1, parent2, crossoverPoint);\n\t\t\t}\n\t\t\t\n\t\t\telse if(crossBehavior.equals(\"smartCross\")) {\n\t\t\t\tint split = ((SNSAgent)parent1).getCurrentMove() - R.nextInt(30);\n\t\t\t\treturn splitCross(parent1, parent2, split);\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(\"WARNING: Cross Behavior not defined.\");\n\t\t}\n\n\t\treturn zipperCross(parent1, parent2);\n\t}", "public void setCurve (IPoint p1, IPoint cp, IPoint p2) {\n setCurve(p1.x(), p1.y(), cp.x(), cp.y(), p2.x(), p2.y());\n }", "public void setProbabilityEnabled(boolean probabilityEnabled) {\n isProbabilityEnabled = probabilityEnabled;\n }", "public Individual crossover1Point(Individual parent1, Individual parent2) {\n Individual offspring = new Individual(parent1.getChromosomeLength());\n int crossoverPoint = Service.rand(0, parent1.getChromosomeLength());\n for (int geneIndex = 0; geneIndex < parent1.getChromosomeLength(); geneIndex++) {\n // Use half of parent1's genes and half of parent2's genes\n if (crossoverPoint > geneIndex) {\n offspring.setGene(geneIndex, parent1.getGene(geneIndex));\n } else {\n offspring.setGene(geneIndex, parent2.getGene(geneIndex));\n }\n }\n return offspring;\n }", "public void setPrevCount(double n)\n {\n\n this.prevCount = n;\n }", "private void mate(NeuralPlayer org1, NeuralPlayer org2, NeuralPlayer offspring)\n\t{\n\t\tBasicNetwork newGuy = (BasicNetwork)org1.net.clone();\n\t\tRandom g = new Random();\n\t\tdouble[] genome1 = NetworkCODEC.networkToArray(org1.net);\n\t\tdouble[] genome2 = NetworkCODEC.networkToArray(org2.net);\n\t\t\n\t\tint numCrosses = 1;//g.nextInt(20)+2;//g.nextInt(genome1.length/4)+1;\n\t\tfor (int j = 0; j< numCrosses; j++)\n\t\t{\n\t\t\tint crossIndex = g.nextInt(genome1.length);\n\t\t\t//int crossLength = g.nextInt(genome1.length)+1;//g.nextInt(50);\n\t\t\t//int stop = Math.min(crossIndex+crossLength,genome1.length);\n\t\t\tfor (int i = crossIndex; i<genome1.length; i++)\n\t\t\t\tgenome2[i] = genome1[i]; // 1 point crossover\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome2, newGuy);\n\t\toffspring.net = newGuy;\n\t}", "public void setX(int xpos) {\r\n this.xpos = xpos;\r\n }", "public void setOnion(double countNo) {\n onion = countNo;\r\n }", "public void crossover(){\n \t\n \t//int cut2 = ((NODELENGTH * 3 + 1) / 3) + cut;\n \tfor (int g = 0; g < (wallpapers.size() - 1); g += 2){\n \t\tint cut = getCutPoint();\n \t\tint[] parent1 = wallpapers.get(g);\n \t\tint[] parent2 = wallpapers.get(g + 1);\n \t\t\n \t\tint[] child1 = new int[parent1.length];\n \t\tint[] child2 = new int[parent2.length];\n \t\tfor (int i = 0; i < (cut); i++){\n \t\t\tchild1[i] = parent1[i];\n \t\t\tchild2[i] = parent2[i];\n \t\t}\n \t\tfor (int j = cut; j < parent1.length; j++){\n \t\t\tchild1[j] = parent2[j];\n \t\t\tchild2[j] = parent1[j];\n \t\t}\n \t\t\n \t\t\n \t\twallpapers.set(g, child1);\n \t\twallpapers.set(g + 1, child2);\n \t}\n \tfor (int d = 0; d < (wallpapers.size() * 2); d++){\n \t\tif (d < wallpapers.size()){\n \t\t\ttemp_wallpapers.add(wallpapers.get(d));\n \t\t}\n \t\telse {\n \t\t\ttemp_wallpapers.add(node());\n \t\t}\n \t}\n \twallpapers.clear();\n \tfor (int u = 0; u < temp_wallpapers.size(); u++){\n\t\t\twallpapers.add(u, temp_wallpapers.get(u));\n\t\t}\n \ttemp_wallpapers.clear();\n }", "public void mover() {\n\t}", "public void mutate() {\n if (this.offspring != null) {\n for (int i = 0; i < this.offspring.size(); i++) {\n\n if (Defines.probMutate > Math.random()) {\n // OK, choose two genes to switch\n int nGene1 = Defines.randNum(0, Defines.chromosomeSize - 1);\n int nGene2 = nGene1;\n // Make sure gene2 is not the same gene as gene1\n while (nGene2 == nGene1) {\n nGene2 = Defines.randNum(0, Defines.chromosomeSize - 1);\n }\n\n // Switch two genes\n String temp = this.offspring.get(i).getGene(nGene1);\n\n this.offspring.get(i).setGene(nGene1, this.offspring.get(i).getGene(nGene2));\n this.offspring.get(i).setGene(nGene2, temp);\n }\n // Regenerate the chromosome\n ChromosomeGenerator chromoGen = new ChromosomeGenerator();\n chromoGen.update(this.offspring.get(i));\n }\n\n }\n\n }", "private void setPrice(Integer nb_numeros, Integer nb_n_chances) {\n\t\tInteger base = null;\n\t\tif (nb_numeros == 5) {\n\t\t\tbase = 2;\n\t\t}\n\t\telse if (nb_numeros == 6) {\n\t\t\tbase = 12;\n\t\t}\n\t\telse if (nb_numeros == 7) {\n\t\t\tbase = 42;\n\t\t}\n\t\telse if (nb_numeros == 8) {\n\t\t\tbase = 112;\n\t\t}\n\t\telse if (nb_numeros == 9) {\n\t\t\tbase = 252;\n\t\t}\n\t\telse {\n\t\t\tbase = 0;\n\t\t}\n\t\tthis.price = base*nb_n_chances;\n\t}", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public static void setXoRate(double xoRate) {\n\t\tCrossOver.xoRate = xoRate;\n\t}", "private void setTipPercentage(){\n System.out.println(\"You indicated the service quality was \"+\n serviceQuality+\". What percentage tip would you like to leave?\");\n tipRate=keyboard.nextDouble();\n \n \n }", "public ChocolateDistribution(int noOfChocolate, int noOfStudents) {\n this.noOfChocolate = noOfChocolate;\n this.noOfStudents = noOfStudents;\n }", "public void setPoputlation (double population) { n.setPopulation(population); }", "@JSProperty(\"overscroll\")\n void setOverscroll(double value);", "@Override\n\tpublic void setScatterTarget(){\n\t\tthis.setTarget(22*Constants.SQUARE_SIDE,0); \n\t}", "public static void crossover(Individual[] parent) {\n Individual[] children = new Individual[POP_SIZE];\n for (int i = 0; i < POP_SIZE; i += 2) {\n Individual child1 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child1.generateRulebase();\n Individual child2 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN);\n child2.generateRulebase();\n\n int crossOverPoint = new Random().nextInt(GENE_SIZE);\n for (int j = 0; j < crossOverPoint; j++) {\n child1.gene[j] = parent[i].gene[j];\n child2.gene[j] = parent[i + 1].gene[j];\n }\n\n for (int j = crossOverPoint; j < GENE_SIZE; j++) {\n child1.gene[j] = parent[i + 1].gene[j];\n child2.gene[j] = parent[i].gene[j];\n }\n\n child1.generateRulebase();\n child2.generateRulebase();\n children[i] = new Individual(child1);\n children[i + 1] = new Individual(child2);\n }\n\n matingPool = Arrays.copyOf(children, parent.length);\n }", "protected void onChange_BirthProbability() {\n onChange_BirthProbability_xjal( BirthProbability );\n }", "public static double[] binomialCrossover(double[] populationIndividual, double[] mutantIndividual, double crossoverRate, int problemDimensionality)\n\t{\n\t\tint problemDimension = problemDimensionality; // Store the dimensionality of the problem domain\n\t\tint randomIndex = RandUtils.randomInteger(problemDimension - 1); // Generate a random index sampled from the range of [0, n]\n\t\t\n\t\tdouble[] offspringSolution = new double[problemDimension]; // Initialise the offspring solution variable\n\t\t\n\t\tfor (int i = 0; i < problemDimension; i++) // For the dimensionality of the problem, do the following\n\t\t{\n\t\t\tif (RandUtils.random() < crossoverRate || i == randomIndex) // If the randomly generated number (within the range of [0, 1]) is smaller than the crossover rate or the increment counter is equal to the randomly generated index, do the following\n\t\t\t{\n\t\t\t\toffspringSolution[i] = mutantIndividual[i]; // Set the iterated design variable of the offspring solution (individual) to the iterated design variable of the mutated individual (solution)\n\t\t\t}\n\t\t\telse // Else if the randomly generated number is not smaller than the crossover rate or the increment counter is not equal to the randomly generated index, do the following\n\t\t\t{\n\t\t\t\toffspringSolution[i] = populationIndividual[i]; // Set the iterated design variable of the offspring solution to the iterated design variable of the original individual (solution)\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn offspringSolution; // Return the offspring solution\n\t}", "public void setArgOfPerhelion(double value) {\n this.argOfPerhelion = value;\n }", "public void setPoistumisaika(double poistumisaika) {\n\t\tthis.poistumisaika = poistumisaika + ThreadLocalRandom.current().nextDouble(1, 10);\n\t}", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public void setX(double X)\r\n {\r\n curX = X;\r\n }", "public void evel_threshold_cross_alertvalue_set(String sheader)\r\n\t {\r\n\t\t EVEL_ENTER();\r\n\r\n\t\t /***************************************************************************/\r\n\t\t /* Check preconditions. */\r\n\t\t /***************************************************************************/\r\n\t\t assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t\t \r\n\t\t assert(sheader != null);\r\n\r\n\t\t alertValue.SetValuePr(\r\n\t\t sheader,\r\n\t\t \"Alert value\");\r\n\t\t EVEL_EXIT();\r\n\t }", "@Override\n\tpublic void setPrice(double price) {\n\t\tconstantPO.setPrice(price);\n\t}", "public List<Chromosome> doCrossover(Chromosome other, String crossoverType){\n int geneSize = this.knapsackSelection.size();\n\n ArrayList<Chromosome> children = new ArrayList<>();\n\n //Allow for multiple crossover attempts to better the chance of a valid crossover.\n //Note that this can be disabled by setting GAConfiguration.CONCEPTION_ATTEMPTS = 1.\n for(int i = 0; i < PopulationConfiguration.CONCEPTION_ATTEMPTS; i++){\n\n //Set first crossover point to 0 if 1PX Crossover.\n int crossPoint1 = crossoverType.equals(\"1PX\") ? 0 : Configuration.RANDOM_GENERATOR.nextInt(geneSize);\n int crossPoint2 = Configuration.RANDOM_GENERATOR.nextInt(geneSize - crossPoint1) + crossPoint1;\n\n ArrayList<Boolean> c1 = new ArrayList<>();\n ArrayList<Boolean> c2 = new ArrayList<>();\n\n c1.addAll(this.knapsackSelection.subList(0, crossPoint1));\n c1.addAll(other.getKnapsackSelection().subList(crossPoint1, crossPoint2));\n c1.addAll(this.knapsackSelection.subList(crossPoint2, geneSize));\n Chromosome child1 = new Chromosome(c1).withFitnessCalculated();\n\n c2.addAll(other.getKnapsackSelection().subList(0, crossPoint1));\n c2.addAll(this.knapsackSelection.subList(crossPoint1, crossPoint2));\n c2.addAll(other.getKnapsackSelection().subList(crossPoint2, geneSize));\n Chromosome child2 = new Chromosome(c2).withFitnessCalculated();\n \n if(child1.isValid() && children.size() < 2){\n children.add(child1);\n }\n if(child2.isValid() && children.size() < 2){\n children.add(child2);\n }\n if(children.size() == 2){\n break;\n }\n }\n //If the crossover failed to generate a valid child, return the parents.\n if(children.size() == 0){\n children.add(other);\n children.add(this);\n }\n else if(children.size() == 1){\n children.add(this);\n }\n return children;\n }" ]
[ "0.75608313", "0.68994445", "0.6577615", "0.6538651", "0.6507472", "0.60021603", "0.5968832", "0.5930447", "0.59264904", "0.59002817", "0.5892742", "0.5839167", "0.5821907", "0.567351", "0.5620685", "0.5582957", "0.5480596", "0.53762776", "0.52503663", "0.52398133", "0.5233984", "0.51838034", "0.51420844", "0.51080555", "0.5095882", "0.509163", "0.50389004", "0.5013825", "0.49788815", "0.4970866", "0.49624607", "0.49249843", "0.4916898", "0.4880238", "0.48673078", "0.48585477", "0.4836501", "0.48338634", "0.48273885", "0.48055607", "0.47948834", "0.4769718", "0.4755845", "0.47523826", "0.47514218", "0.47399855", "0.47252247", "0.4723791", "0.47218835", "0.47144595", "0.46900105", "0.4686654", "0.4683388", "0.4674188", "0.46570033", "0.4643013", "0.46155334", "0.46086577", "0.4606684", "0.46046272", "0.46020532", "0.45923263", "0.45792693", "0.45743555", "0.45713356", "0.4556917", "0.4555922", "0.45532602", "0.45520264", "0.45492524", "0.45462474", "0.45431864", "0.4523202", "0.45186278", "0.45087236", "0.45072636", "0.4500538", "0.44996226", "0.44888252", "0.4478399", "0.44776365", "0.447329", "0.4468673", "0.44576114", "0.44572467", "0.4451687", "0.444843", "0.44450498", "0.44443688", "0.44296205", "0.44145897", "0.4401621", "0.43993634", "0.43919092", "0.43829954", "0.43733573", "0.43711925", "0.4366757", "0.43655777", "0.43650255" ]
0.88332653
0
Gets the probability of mutation.
public static double getMutationProbability() { return mutationProbability; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float getProbMut () {\r\n return mut_prob;\r\n }", "public double getProbability() {\n return probability;\n }", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "public static void setMutationProbability(double value) { mutationProbability = value; }", "public double getProbabilityP() {\n return this.mProbabilityP;\n }", "public double getUniformMutationRatio(){\n return delta;\n }", "public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}", "@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}", "public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }", "float getSpecialProb();", "public double prom () {\n return this.sum()/this.size();\n }", "public void calculateProbabilities(){\n\t}", "public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }", "public double getAbandonmentProbability() {\n return Math.random();\n }", "public double getProbabilityQ() {\n return this.mProbabilityQ;\n }", "protected ProbabilityDistribution getDistribution()\r\n\t{\r\n\t\treturn this.distribution;\r\n\t}", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public float getSpecialProb() {\n return specialProb_;\n }", "public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }", "abstract double rightProbability();", "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }", "public double getProb(double value) {\n checkHasParams();\n if (value < 0) {\n return 0;\n } else {\n return (lambda * Math.exp((-lambda) * value));\n }\n }", "public void setProbMut(double d){\n if ((d < 0) || (d > 1)){\n throw new IllegalArgumentException(\"Mutation probability cannot be less than 0 or greater than 1.\");\n }\n mutationProb = d;\n }", "public double probability(double x){\n\t\tdouble firstTerm = 1.0 / Math.sqrt(2 * Math.PI * variance);\n\t\tdouble secondTerm = Math.exp( -(Math.pow((x-mean),2.0)) / (2 * variance) );\n\t\treturn firstTerm * secondTerm;\n\t}", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public int getPotion() {\n return getStat(potion);\n }", "public double numPermutations()\r\n\t{\r\n\t\treturn this.numPermutations;\r\n\t}", "public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }", "@Override\n public int viability() {\n int[] newStats = getNewStats();\n return newStats[0] * newStats[1];\n }", "public double getMutationStep() {\n // The variable mutationStep is obtained from the parameter file\n if(!mutStepFromSD){\n return mutationStep;\n }\n else{\n return mutationStep * experimentalData.getDataset(DatasetType.TRAINING).getOutputSD();\n }\n }", "public double getPowerUpProbabilityPillar() {\n \t\treturn 0.15;\n \t}", "public ReporteProblema getProb() {\n return prob;\n }", "public double getFitness() {\n if (fitness == 0) {\n fitness = 1/(double)getDistance();\n }\n return fitness;\n }", "public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}", "public double getProgress()\n {\n return ((double)getCount() / (double)getGoal());\n }", "public static double uniform() {\n return random.nextDouble();\n }", "public static double uniform() {\r\n return random.nextDouble();\r\n }", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}", "public float getChance() {\n return chance;\n }", "public BigInteger getP() {return(p);}", "public double getPER() {\n\t\tint nq = q0.length;\n double sum = 0.0;\n for (int i=0; i<nq; i++) sum += q0[i];\n\t\treturn Math.min(1.0, 0.5*(1.0-(sum/(double)nq))/initPER); // 0.5 * proba erreur\t\t\n\t}", "public int getFitness(){\n return fitness;\n }", "int getPercentageHeated();", "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "public double getPowerUpProbabilityBox() {\n \t\treturn 0.4;\n \t}", "public static int createnumOfMutationss(){\n\t\tint totalMut = 0;\n\t\t\n\t\tint[] gen0 = new int[(int) Math.pow(2,0)]; //size of numOfMutations is based on exponential growth by generation number\n\t\t\tmutate(gen0); //function to mutate\n\t\t\ttotalMut = totalMut + totalMutations(gen0);\n\t\tint[] gen1 = new int[(int) Math.pow(2,1)];\n\t\t\tcheckMutations(gen0, gen1); //checks for previous generation mutations\n\t\t\tmutate(gen1);\n\t\t\ttotalMut = totalMut + totalMutations(gen1);\n\t\tint[] gen2 = new int[(int) Math.pow(2,2)];\n\t\t\tcheckMutations(gen1, gen2);\n\t\t\tmutate(gen2);\n\t\t\ttotalMut = totalMut + totalMutations(gen2);\n\t\tint[] gen3 = new int[(int) Math.pow(2,3)];\n\t\t\tcheckMutations(gen2, gen3);\n\t\t\tmutate(gen3);\n\t\t\ttotalMut = totalMut + totalMutations(gen3);\n\t\tint[] gen4 = new int[(int) Math.pow(2,4)];\n\t\t\tcheckMutations(gen3, gen4);\n\t\t\tmutate(gen4);\n\t\t\ttotalMut = totalMut + totalMutations(gen4);\n\t\tint[] gen5 = new int[(int) Math.pow(2,5)];\n\t\t\tcheckMutations(gen4, gen5);\n\t\t\tmutate(gen5);\n\t\t\ttotalMut = totalMut + totalMutations(gen5);\n\t\tint[] gen6 = new int[(int) Math.pow(2,6)];\n\t\t\tcheckMutations(gen5, gen6);\n\t\t\tmutate(gen6);\n\t\t\ttotalMut = totalMut + totalMutations(gen6);\n\t\tint[] gen7 = new int[(int) Math.pow(2,7)];\n\t\t\tcheckMutations(gen6, gen7);\n\t\t\tmutate(gen7);\n\t\t\ttotalMut = totalMut + totalMutations(gen7);\n\t\tint[] gen8 = new int[(int) Math.pow(2,8)];\n\t\t\tcheckMutations(gen7, gen8);\n\t\t\tmutate(gen8);\n\t\t\ttotalMut = totalMut + totalMutations(gen8);\n\t\tint[] gen9 = new int[(int) Math.pow(2,9)];\n\t\t\tcheckMutations(gen8, gen9);\n\t\t\tmutate(gen9);\n\t\t\ttotalMut = totalMut + totalMutations(gen9);\n\t\tint[] gen10 = new int[(int) Math.pow(2,10)];\n\t\t\tcheckMutations(gen9, gen10);\n\t\t\tmutate(gen10);\n\t\t\ttotalMut = totalMut + totalMutations(gen10);\n\t\t\t\n\t\t\treturn totalMut;\n\t\n\t}", "@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}", "public double[] getProbabilities() { return getProbabilities((int[])null); }", "double getTransProb();", "public abstract float getProbability(String singleToken);", "private int getPoisson() {\n\t\treturn (int) (-INCOMING_MY * Math.log(Math.random()));\n\t}", "public double getSigProp(){\n\t\tdouble s=0, n=0;\n\t\tfor(ControlledExperiment rep : replicates){\n\t\t\ts+=rep.getSigCount();\n\t\t\tn+=rep.getNoiseCount();\n\t\t}return(s/(s+n));\n\t}", "public int getProbOfFailure() {\n return this.probOfFailure;\n }", "abstract double leftProbability();", "public int getFitness()\n {\n return this.fitness;\n }", "int getLikelihoodValue();", "protected double get_breeding_probability()\n {\n return breeding_probability;\n }", "public double getPressure() {\n\t\treturn 1000+(int)(Math.random()*1001);//模拟一个随机气压数\n\t}", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public double entropyPotential() {\n \n return (-1.0);\n}", "public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}", "private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}", "public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}", "public static double random() {\r\n return uniform();\r\n }", "public double getArgOfPerhelion() {\n return argOfPerhelion;\n }", "public Double getProtein() {\n return product.getProtein() * weight / 100;\n }", "public double getChance() {\n return this.chance;\n }", "public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }", "public double progress() {\n if (damage <= 0) {\n return damage;\n }\n double n = noise.nextValue();\n damage = damage + (k * damage * damage) + l + n;\n return damage;\n }", "public double getLikePercentMath() {\n return likePercentMath;\n }", "public float getChance()\n {\n return 1.0f;\n }", "float genChance();", "public double calculateRatio() {\n \tdouble ratioCalc = new Double(0);\n \tif(this.count_human_dna > 0) {\n \t\tratioCalc = (double) this.count_mutant_dna / this.count_human_dna;\n \t}\n \tthis.setRatio(ratioCalc);\n \treturn ratioCalc;\n }", "@Override\n public Map<SquadronConfig, Double> getHitIndividualProbability(final AttackType attackType, final Target target, final int modifier) {\n return probability.getIndividualHitProbability(attackMap.get(attackType).execute(), modifier);\n }", "double fitness(int gene) {\r\n \tint sum = 0;\r\n \tint prod= 1;\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tif (oldpop[gene][j]==0) {\r\n \t\t\tsum += (j+1);\r\n \t\t} else {\r\n \t\t\tprod *= (j+1);\r\n \t\t}\r\n \t}\r\n \treturn Math.abs(sum - SUMTARG)/SUMTARG \r\n \t + Math.abs(prod - PRODTARG)/PRODTARG;\r\n }", "public Lambda_phage(double prob_surface, double prob_enzymes) {\n\t\t\n\t\tcurrent_ba = null;\n\t\t\n\t\t/* check for mutation probability */\n\t\tif (mutate_prob >= Sim.randy.nextDouble()) { \n\t\t\tdouble new_prob_surface, new_prob_enzymes;\n\t\t\t\n\t\t\t/* check for helpful mutation probability */\n\t\t\tif (Sim.randy.nextDouble() > mutate_helps) {\n\t\t\t\tnew_prob_surface = prob_surface + Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (1 - prob_surface);\n\t\t\t\tnew_prob_enzymes = prob_enzymes + Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (prob_surface);\n\t\t\t\n\t\t\t/* check for harmful mutation probability */\n\t\t\t} else { // If mutation hurts\n\t\t\t\tnew_prob_surface = prob_surface - Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (1 - prob_enzymes);\n\t\t\t\tnew_prob_enzymes = prob_enzymes - Sim.randy.nextDouble()\n\t\t\t\t\t\t* mutate_amount * (prob_enzymes);\n\t\t\t}\n\t\t\tthis.prob_surface = new_prob_surface;\n\t\t\tthis.prob_enzymes = new_prob_enzymes;\n\t\t\t\n\t\t/* mutation does not occur */\n\t\t} else { \n\t\t\tthis.prob_surface = prob_surface;\n\t\t\tthis.prob_enzymes = prob_enzymes;\n\t\t}\n\n\t\t/* add events */\n\t\tSim.events.add(new Event(this, rate_denature, EVENT_TYPE.DENATURE)); \n\t\tSim.events.add(new Event(this, rate_infection,EVENT_TYPE.INFECT)); \n\n\t\t/* update simulation counters */\n\t\tSim.lps_sum_sr += this.prob_surface;\n\t\tSim.lps_sum_enz += this.prob_enzymes;\n\t}", "@Override\r\n\t\tpublic Double get() {\n\t\t\treturn Math.random();\r\n\t\t}", "public void calcP() {\r\n\t\tthis.setP(sick/people.size());\r\n\t}", "public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }", "public double randomValue(){\n\t\treturn _randomValue() + _randomValue() + _randomValue();\n\t}", "public int getDamage() {\n\t\treturn (int) (Math.random() * damageVariance) + damage;\n\t}", "public double probabilidadTotal(){\n return probabilidadTotal;\n }", "public double getRatio() {\n return (double) vector.length / size;\n }", "Permeability getPermeability();", "public int dropPotion() {\r\n\t\t// If the random number generated is larger than the \r\n\t\t// drop chance, at least one health potion is dropped\r\n\t\tif (rnd.nextInt(100) < HEALTH_POTION_DROP_CHANCE) {\r\n\t\t\treturn rnd.nextInt(MAX_NO_HEALTH_POTION_DROP) + 1;\r\n\t\t}\r\n\t\t// no health potions dropped\r\n\t\treturn 0;\r\n\t}", "public double getWeightChangeGoal() {\n return weightChangeGoal;\n }", "public double populationVariance() {\n/* 215 */ Preconditions.checkState((this.count > 0L));\n/* 216 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 217 */ return Double.NaN;\n/* */ }\n/* 219 */ if (this.count == 1L) {\n/* 220 */ return 0.0D;\n/* */ }\n/* 222 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / count();\n/* */ }", "private double throttlingProbability(Instant instantSinceEpoch) {\n if (!allRequestsMovingFunction.isSignificant()) {\n return 0;\n }\n long nowMsSinceEpoch = instantSinceEpoch.getMillis();\n long allRequestsCount = allRequestsMovingFunction.get(nowMsSinceEpoch);\n long successfulRequestsCount = successfulRequestsMovingFunction.get(nowMsSinceEpoch);\n\n double overloadMaxCount = overloadRatio * successfulRequestsCount;\n double overloadUsage = allRequestsCount - overloadMaxCount;\n\n double calcProbability = overloadUsage / (allRequestsCount + MIN_REQUESTS);\n allRequestsCountDist.update(allRequestsCount);\n successfulRequestsCountDist.update(successfulRequestsCount);\n overloadMaxCountDist.update((long) overloadMaxCount);\n overloadUsageDist.update((long) (overloadUsage * 100));\n throttleProbabilityDist.update((long) (calcProbability * 100));\n return Math.max(0, calcProbability);\n }", "public long getMutationIndex() {\n return mutationIndex;\n }", "public static double random()\n {\n return _prng2.nextDouble();\n }", "public static int geometric( double p ) {\n // using algorithm given by Knuth\n return (int) Math.ceil( Math.log( uniform() ) / Math.log( 1.0 - p ) );\n }", "public double getPercepcion(){\n return localPercepcion;\n }", "public int calculateVotes() {\n return 1;\n }", "double getPerimetro();", "public float getProbCross () {\r\n return cross_prob;\r\n }" ]
[ "0.76699305", "0.7411026", "0.7081902", "0.69713616", "0.68518466", "0.67429256", "0.6634567", "0.6627757", "0.6548154", "0.6487983", "0.64162487", "0.63524365", "0.6213081", "0.61739993", "0.61709726", "0.615252", "0.6120002", "0.6112103", "0.60881066", "0.6078831", "0.6058287", "0.6055103", "0.605458", "0.6050033", "0.6039715", "0.5936512", "0.5912586", "0.5901295", "0.588526", "0.5862326", "0.58346844", "0.5831138", "0.58100575", "0.5783927", "0.5766679", "0.5748359", "0.57339907", "0.57288986", "0.5722039", "0.5698921", "0.56962705", "0.5685976", "0.5677635", "0.56532216", "0.56450963", "0.56433827", "0.5633267", "0.56196004", "0.5614437", "0.56117386", "0.5593144", "0.5590916", "0.559036", "0.55811644", "0.55760866", "0.5575524", "0.55716103", "0.55526775", "0.55444264", "0.5541574", "0.5538409", "0.5528891", "0.55148464", "0.549948", "0.54964286", "0.54746467", "0.54743457", "0.5467767", "0.54638165", "0.54563844", "0.5453238", "0.54410475", "0.5437342", "0.5435508", "0.5433516", "0.5426368", "0.54239446", "0.5418626", "0.54115707", "0.5409629", "0.5409503", "0.54082173", "0.5406394", "0.5388234", "0.5385963", "0.5384732", "0.5377896", "0.5375227", "0.5367233", "0.5361009", "0.5353645", "0.53316265", "0.5325339", "0.5323788", "0.5322933", "0.532148", "0.53202105", "0.5316392", "0.5313646", "0.531108" ]
0.8259988
0
Sets the mutation probability.
public static void setMutationProbability(double value) { mutationProbability = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setProbMut (float value) {\r\n mut_prob= value;\r\n }", "public void setProbMut(double d){\n if ((d < 0) || (d > 1)){\n throw new IllegalArgumentException(\"Mutation probability cannot be less than 0 or greater than 1.\");\n }\n mutationProb = d;\n }", "@Override\r\n\tpublic void setProbability(double probability) {\n\t\tthis.probability = probability;\r\n\t}", "public void setProbability(double v) {\n probability = v;\n }", "public Builder setSamplingProbability(double value) {\n \n samplingProbability_ = value;\n onChanged();\n return this;\n }", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public static double getMutationProbability() { return mutationProbability; }", "public void setProbability(double pProbability) throws Exception{\r\n\t\tif (pProbability >= 0) probability = pProbability;\r\n\t\telse throw new Exception(\"02; sPro,ProEle\");\r\n\t}", "@Override\r\n\tpublic void setNextProbability(double probability) {\n\t\tthis.nextProbability = probability;\r\n\t}", "public void setUniformMutationRatio(double delta){\n this.delta = delta;\n }", "public float getProbMut () {\r\n return mut_prob;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "public void MutatePlayer(int PercentOfMutation) {\n\t\tint NoOfMutations = CalculateGeneModifications(PercentOfMutation);\n\t\tRandom mutate = new Random();\n\t\tfor (int i = 0; i < NoOfMutations; i++) {\n\t\t\tmoveOrder[mutate.nextInt(moveOrder.length)] = r.nextInt(3);\n\t\t}\n\t\tthis.ResetPlayer();\n\t}", "public void setPotion(int p) {\n setStat(p, potion);\n }", "protected void setDistribution(ProbabilityDistribution distribution)\r\n\t{\r\n\t\tthis.distribution = distribution;\r\n\t}", "public Builder setSpecialProb(float value) {\n \n specialProb_ = value;\n onChanged();\n return this;\n }", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "public void setActionProbability(final State state, final Action action, final double probability) {\r\n getProperties(state).setActionProbability(action, probability);\r\n }", "public void mutate(NeuralPlayer p)\n\t{\n\t\tdouble[] genome = NetworkCODEC.networkToArray(p.net);\n\t\tRandom g = new Random();\n\t\tfor (int i = 0; i< genome.length; i++)\n\t\t{\n\t\t\tif (g.nextDouble() <= mutationPer)\n\t\t\t\tgenome[i] = randomNum(g) + genome[i];\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome, p.net);\n\t}", "public SO_Mutation(HashMap<String, Object> parameters) {\n super(parameters);\n if (parameters.get(\"probability\") != null)\n mutationProbability_ = (Double) parameters.get(\"probability\");\n }", "public void setMutationRate(double rate) { this.exec = this.exec.withProperty(\"svum.rate\", rate); }", "public void mutate(float mutationProbability, float connectionMutationProbability, float mutationFactor) {\r\n for (int i = 1; i < neurons.length; i++) // layers (skip input layer)\r\n {\r\n for (int j = 0; j < neurons[i].length; j++) // neurons per layer\r\n {\r\n if (Math.random() <= mutationProbability) {\r\n neurons[i][j].setWeights(neurons[i][j].getMutatedWeights(connectionMutationProbability, mutationFactor));\r\n }\r\n }\r\n }\r\n }", "void setProbables(boolean probables);", "@Override\n\tpublic void applyMutation(int index, double a_percentage) {\n\n\t}", "public void setPoputlation (double population) { n.setPopulation(population); }", "public void setP(Double p);", "public void mutate(float p)\n {\n int regCount = this.registers.size();\n\n /**\n * Parameter mutation replace parameters by random terminals\n */\n for (int i = 0; i < registers.size(); i++)\n {\n LinearRegister reg = this.registers.get(i);\n \n if (1 - GPRunner.RANDOM.nextFloat() <= p)\n {\n if (reg.parameters.length == 0)\n {\n /**\n * Mutate whole register\n */\n this.registers.set(i, randomRegister());\n }\n else\n {\n int parameter = GPRunner.RANDOM\n .nextInt(reg.parameters.length + 1);\n \n if (parameter >= reg.parameters.length)\n {\n /**\n * Mutate whole register\n */\n this.registers.set(i, randomRegister());\n }\n else\n {\n /**\n * Mutate parameter\n */\n reg.parameters[parameter] = randomTerminal();\n }\n }\n }\n }\n\n /**\n * Mutate output register\n */\n\t\t// if(1 - Register.RANDOM.nextFloat() <= p)\n // {\n // this.outputRegister = Register.RANDOM.nextInt(registers.size());\n // }\n }", "public void setProbabilites(String name, double[] probabilities) \r\n\t\t\tthrows JayesException{\r\n\t\t// checks if new node\r\n\t\tif (! nodeExists(name)) {\r\n\t\t\tthrow new JayesException(\"Node '\" + name + \"' does not exist.\");\r\n\t\t}\r\n\t\tBayesNode node = getNode(name);\r\n\t\tint prob = probabilities.length;\r\n\t\tint expected = node.getOutcomeCount();\r\n\t\tfor (BayesNode n:node.getParents()){\t\t\t\r\n\t\t\texpected *= n.getOutcomeCount();\r\n\t\t}\r\n\t\tif (expected != prob) {\r\n\t\t\tthrow new JayesException(\"Incorrect number of probabilities for '\" + name + \r\n\t\t\t\t\t\"' (Expected \" + expected + \", Given \" + prob + \").\");\r\n\t\t}\r\n\t\t// save the cpt\r\n\t\tnode.setProbabilities(probabilities);\r\n\t}", "public void setProbabilityEnabled(boolean probabilityEnabled) {\n isProbabilityEnabled = probabilityEnabled;\n }", "public ProbabilityDistribution() {\n\t\trandom_ = new Random();\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public void setProbability(int informationSetNumber, double probability,\n\t\t\tString moveName) throws Exception {\n\n\t\tint iMove;\n\n\t\tArrayList movesList = movesLists[informationSetNumber - 1];\n\n\t\tfor (iMove = 0; iMove < movesList.size(); iMove++) {\n\t\t\tif (movesList.get(iMove).equals(moveName)) {\n\t\t\t\t// System.out.println(\"Player : \" + (iPlayer + 1) + \"\\tInfo Set\n\t\t\t\t// : \" + informationSetNumber + \"\\tMove : \" + moveName);\n\t\t\t\tprobsLists[informationSetNumber - 1].add(iMove, new Double(\n\t\t\t\t\t\tprobability));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Bug!! Bug!! inform to the Author\");\n\t}", "public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}", "public ProbabilityDistribution(Random random) {\n\t\trandom_ = random;\n\t\titemProbs_ = new MutableKeyMap<T, Double>();\n\t}", "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_Genotype.set(mutationIndex);\n //if (mutationIndex > 28) System.out.println(this.getSolutionRepresentationFor());\n }", "private void setnewFitnessValue(double fitnessValue) {\n this.newfitnessValue = fitnessValue;\r\n }", "@Override\n public void SetSpawnProb(double SP){\n if(SP > 0.5){\n spawn = true;\n }else{\n spawn = false;\n }\n }", "public void setGov(int value);", "protected void onChange_BirthProbability() {\n onChange_BirthProbability_xjal( BirthProbability );\n }", "void setFitness(double fitness) throws UnsupportedOperationException;", "private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }", "public void setProbCross (float value) {\r\n cross_prob = value;\r\n }", "void setVariation(double variation);", "public void setFitness(int f){\n this.fitness = f;\n }", "void setExtremeSpikeProbability(double p);", "public void setProb(ReporteProblema Prob) {\n this.bandera=true;\n this.prob = Prob;\n }", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Set Threshold Probability\")\n public void setThreshold() {\n if(Tools.getGlobalTime()!=0){\n JOptionPane.showMessageDialog(null, \"You can change this probability only when the simulation start\",\"Alert\", JOptionPane.INFORMATION_MESSAGE);\n return;\n }\n String answer = JOptionPane.showInputDialog(null, \"Set the probability that a node can be selected to run.\");\n // Show an information message\n try{\n double k = Double.parseDouble(answer);\n Iterator<Node> it = Tools.getNodeList().iterator();\n while(it.hasNext()){\n Node n = it.next();\n if(n.getClass() == MSNode.class){\n MSNode n1 = (MSNode)n;\n n1.setThresholdProbability(k);\n }\n if(n.getClass() == MS2Node.class){\n MS2Node n1 = (MS2Node)n;\n n1.setThresholdProbability(k);\n }\n }\n JOptionPane.showMessageDialog(null, \"Well done you have set this value:\"+k,\"Notice\", JOptionPane.INFORMATION_MESSAGE);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null, \"You must insert a valid double \", \"Alert\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}", "public double getProbability() {\n return probability;\n }", "public static void setCrossoverProbability(double value) { crossoverProbability = value; }", "public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}", "public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}", "public void MutationCAN (TableVar Variables) {\r\n\r\n int posiciones, i, j, h, eliminar;\r\n float m;\r\n\r\n posiciones = Variables.getNVars()*long_poblacion;\r\n\r\n if (mut_prob > 0)\r\n while (Mu_next < posiciones) {\r\n // Determine the chromosome and gene to be muted\r\n i = Mu_next/Variables.getNVars();\r\n j = Mu_next%Variables.getNVars();\r\n\r\n // Copy the chromosome\r\n for (h=0; h<Variables.getNVars(); h++) {\r\n Des.setCromElem(descendientes, h, Inter.getCromElem(i,h));\r\n }\r\n\r\n // Make the mutation\r\n // Half the mutations eliminates the variable from the rule\r\n // The others sets a random value (including the elimination)\r\n eliminar = Randomize.Randint (0,10);\r\n if (eliminar <=5){\r\n if (!Variables.getContinuous(j))\r\n Des.setCromElem(descendientes, j, (int)Variables.getMax(j)+1);\r\n else\r\n Des.setCromElem(descendientes, j, Variables.getNLabelVar(j));\r\n }\r\n else {\r\n if (!Variables.getContinuous(j))\r\n Des.setCromElem(descendientes, j, Randomize.Randint((int)Variables.getMin(j), (int)Variables.getMax(j)));\r\n else\r\n Des.setCromElem(descendientes, j, Randomize.Randint(0,(Variables.getNLabelVar(j)-1)));\r\n }\r\n descendientes++;\r\n\r\n // Marks the chromosome as no evaluated\r\n Des.setIndivEvaluated(i,false);\r\n\r\n // Compute next position to be muted\r\n if (mut_prob<1) {\r\n m = (float) Randomize.Rand();\r\n Mu_next += Math.ceil (Math.log(m) / Math.log(1.0 - mut_prob));\r\n }\r\n else\r\n Mu_next += 1;\r\n\r\n }\r\n Mu_next -= posiciones;\r\n\r\n }", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "public void set(float x, float y, float orientation, double prob) throws Exception {\r\n if(x < 0 || x >= worldWidth) {\r\n throw new Exception(\"X coordinate out of bounds\");\r\n }\r\n if(y < 0 || y >= worldHeight) {\r\n throw new Exception(\"Y coordinate out of bounds\");\r\n }\r\n if(orientation < 0 || orientation >= 2 * Math.PI) {\r\n throw new Exception(\"X coordinate out of bounds\");\r\n }\r\n this.x = x;\r\n this.y = y;\r\n this.orientation = orientation;\r\n this.probability = prob;\r\n }", "public void setDistribution(TDistribution value) {\n distribution = value;\n\n // modify degrees of freedom\n if (n > 2) {\n distribution.setDegreesOfFreedom(n - 2);\n }\n }", "void setGensNoImprovement(int gensNoImprovement);", "public void setArgOfPerhelion(double value) {\n this.argOfPerhelion = value;\n }", "public void setDistribution(int distribution) {\n this.distribution = distribution;\n }", "public void setFitness(int newFitness) {\n fitness = newFitness;\n }", "public abstract void setGen(int i, double value);", "public void mutate() {\n if (this.offspring != null) {\n for (int i = 0; i < this.offspring.size(); i++) {\n\n if (Defines.probMutate > Math.random()) {\n // OK, choose two genes to switch\n int nGene1 = Defines.randNum(0, Defines.chromosomeSize - 1);\n int nGene2 = nGene1;\n // Make sure gene2 is not the same gene as gene1\n while (nGene2 == nGene1) {\n nGene2 = Defines.randNum(0, Defines.chromosomeSize - 1);\n }\n\n // Switch two genes\n String temp = this.offspring.get(i).getGene(nGene1);\n\n this.offspring.get(i).setGene(nGene1, this.offspring.get(i).getGene(nGene2));\n this.offspring.get(i).setGene(nGene2, temp);\n }\n // Regenerate the chromosome\n ChromosomeGenerator chromoGen = new ChromosomeGenerator();\n chromoGen.update(this.offspring.get(i));\n }\n\n }\n\n }", "public double getUniformMutationRatio(){\n return delta;\n }", "public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }", "@Override\n\tpublic void setMontant(double s) {\n\t\t\n\t}", "PermutationGenerator(Random random) {\n\t\tm_random = random;\n\t}", "public abstract void setMontant(Double unMontant);", "public void setMultiplier(int newValue) {\n multiplier = newValue;\n }", "public void MutationDNF (TableVar Variables) {\r\n\r\n int posiciones, interv, i, j, l, h, eliminar;\r\n float m;\r\n \r\n posiciones = Variables.getNVars()*long_poblacion;\r\n \r\n if (mut_prob > 0)\r\n while (Mu_next < posiciones) {\r\n // Determine the chromosome and gene to be muted\r\n i = Mu_next/Variables.getNVars();\r\n j = Mu_next%Variables.getNVars();\r\n \r\n // Copy the chromosome\r\n for (h=0; h<Variables.getNVars(); h++) {\r\n for (l=0; l<=Variables.getNLabelVar(h); l++)\r\n Des.setCromElemGene(descendientes, h, l, Inter.getCromElemGene(i,h,l));\r\n }\r\n \r\n // Make the mutation\r\n // Half the mutations eliminates the variable from the rule\r\n // The others sets a random value (including the elimination)\r\n eliminar = Randomize.Randint (0,10);\r\n if (eliminar <=5){\r\n for (l=0; l<=Variables.getNLabelVar(j); l++)\r\n Des.setCromElemGene(descendientes, j, l, 0);\r\n }\r\n else {\r\n interv = 0;\r\n for (l=0; l<Variables.getNLabelVar(j); l++) {\r\n Des.setCromElemGene(descendientes, j, l, Randomize.Randint(0,1));\r\n if (Des.getCromElemGene(descendientes, j, l)==1)\r\n interv ++;\r\n }\r\n // si no interviene ningún valor o intervienen todos, la variable no interviene\r\n if (interv==0 || interv==Variables.getNLabelVar(j))\r\n Des.setCromElemGene(descendientes, j, Variables.getNLabelVar(j), 0);\r\n else\r\n Des.setCromElemGene(descendientes, j, Variables.getNLabelVar(j), 1);\r\n }\r\n descendientes++;\r\n\r\n // Marks the chromosome as no evaluated\r\n Des.setIndivEvaluated(i,false);\r\n\r\n // Compute next position to be muted\r\n if (mut_prob<1) {\r\n m = (float) Randomize.Rand();\r\n Mu_next += Math.ceil (Math.log(m) / Math.log(1.0 - mut_prob));\r\n }\r\n else\r\n Mu_next += 1;\r\n\r\n }\r\n Mu_next -= posiciones;\r\n \r\n }", "public void setMutationMethod(Mutation m){\n mutationType = m;\n }", "default void setRandomModifier(double value, int duration){\n Random random = new Random();\n Modifier.ModifierType[] modifierTypes = Modifier.ModifierType.values();\n Modifier.ModifierType randomType = modifierTypes[random.nextInt(modifierTypes.length)];\n Modifier randomModifier = new Modifier(randomType, value, duration);\n this.setModifier(randomModifier);\n }", "public void setProbOfFailure(int prob) {\n \tif( prob <= 100 || prob >= 0){\n \t\tthis.probOfFailure = prob;\n \t}\n }", "public void setPoistumisaika(double poistumisaika) {\n\t\tthis.poistumisaika = poistumisaika + ThreadLocalRandom.current().nextDouble(1, 10);\n\t}", "private void setGBest(Particle p) {\n\t\tadjustGBest(p);\n\t\tgBest = p.copy();\n\t}", "public void setPheromones(double v) {\n\t\tthis.Pheromones = new Matrix(this.Graph.getM().getRows(), this.Graph.getM().getColumns());\n\t\tPheromones.setValue(v);\n\t}", "public void setProgress(float p) {\n _progress = Math.max(0.0f, Math.min(1.0f, p));\n }", "public void siguinteProbabilidad(double probabilidad){\n probabilidadEstados[contadorEstados] = probabilidad;\n probabilidadTotal += probabilidad;\n contadorEstados += 1;\n }", "private void setProbElement(ProbElement pProbElement, String pName, double pProbability) throws Exception {\r\n\t\tif (pProbElement != null) {\r\n\t\t\tpProbElement.setName(pName);\r\n\t\t\tpProbElement.setProbability(pProbability);\r\n\t\t} else throw new Exception(\"04; sProE,Edi\");\r\n\t}", "public void setReputation(double reputation) {\n if(reputation >= 0.0 && reputation <= 100.0){\n this.reputation = reputation;\n }\n else if(reputation > 100.0){\n this.reputation = 100.0;\n }\n else{\n this.reputation = 0.0;\n }\n}", "public void setModifierPercentage(Double modifierPercentage) {\n this.modifierPercentage = modifierPercentage;\n }", "public void setModifierPercentage(Double modifierPercentage) {\n this.modifierPercentage = modifierPercentage;\n }", "public void setPercentage(Number value) {\n setAttributeInternal(PERCENTAGE, value);\n }", "public void setPotatoesPrice(double p);", "public void setExecutionPercentage(double percentage);", "public T setTargetPercentage(float perc)\n\t{\n\t\tif (isStarted())\n\t\t{\n\t\t\tLttl.Throw(\"Can't change target percentage after tween has started.\");\n\t\t}\n\t\ttargetPercentage = LttlMath.Clamp01(perc);\n\t\treturn (T) this;\n\t}", "public void setResponseAndProb( int item, String resp, double pr )\n {\n if( item == 1 )\n {\n response1 = resp;\n probability1 = pr;\n }\n else if( item == 2 )\n {\n response2 = resp;\n probability2 = pr;\n }\n else if( item == 3 )\n {\n response3 = resp;\n probability3 = pr;\n }\n }", "public void doMutation(double probability, Solution solution) throws JMException {\n try {\n //Gene part\n int length = ((Binary) solution.getDecisionVariables()[0]).getNumberOfBits();\n for (int j = 0; j < length - 12; j++) {\n if (PseudoRandom.randDouble() < probability) {\n ((Binary) solution.getDecisionVariables()[0]).bits_.flip(j);\n }\n }\n //Condition Part\n if (PseudoRandom.randDouble() < 0.1) {\n for (int j = length - 12; j < length; j++) {\n int c = 0;\n for (int i = length - 12; i < length; i++) {\n if (((Binary) solution.getDecisionVariables()[0]).bits_.get(i) ) {\n c++;\n }\n }\n if (c > 1)\n ((Binary) solution.getDecisionVariables()[0]).bits_.flip(j);\n }\n }\n\n for (int i = 0; i < solution.getDecisionVariables().length; i++) {\n ((Binary) solution.getDecisionVariables()[i]).decode();\n }\n } catch (ClassCastException e1) {\n Configuration.logger_.severe(\"BitFlipMutation.doMutation: \" +\n \"ClassCastException error\" + e1.getMessage());\n Class cls = java.lang.String.class;\n String name = cls.getName();\n throw new JMException(\"Exception in \" + name + \".doMutation()\");\n }\n }", "public static void permute()\n\t{\n\t\t/* INITIALIZE FOR PERMUTATION TESTING */\n\t\t//int l, r, s, T, K;\n\t\t//Random random = new Random();\n\t\tRandom random = new Random(13);\n\n\t\tclade = clad[k];\n\t\tclade.chiPvalue = 0;\n\n\t\tfor(int l = 0; l < 2; l++)\n\t\t{\n\t\t\tclade.ITcPvalue[l] = 0;\n\t\t\tclade.ITnPvalue[l] = 0;\n\t\t\tclade.corrDcWPvalue[l] = 0;\n\t\t\tclade.corrDnWPvalue[l] = 0;\n\t\t \n\t\t for(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tclade.DcPvalue[i][l] = 0;\n\t\t\t\tclade.DnPvalue[i][l] = 0;\n\t\t\t}\n\t\t}\n\n\n\t/*\n\t\tfprintf(stderr, \"\\n\\n\"); \n\t\tfor (i=0; i<numSubClades; i++)\n\t\tfprintf(stderr,\" rowTotal(%d):%d \", i, rowTotal[i]);\n\t\tfprintf(stderr, \"\\n\"); \n\t\tfor (j=0; j<numCladeLocations; j++)\n\t\tfprintf(stderr,\" columnTotal(%d):%d \", j, columnTotal[j]);\n\t\tfprintf(stderr, \"\\n\\n\");\n\t\t\n\t\tfprintf(stderr,\"\\n\\n Permuting %s\", title);\n\t\tfprintf(stderr,\"\\n 0 %d permutations\\n \",numPermutations);\n*/\t\t\n\t\tfor (int K = 0; K < GeoDis.numPermutations; K++)\n\t\t{\t\n\t\t\t\t\n\t\t\tprogress++;\n\t\t\tpercentage = ((double)progress * 100)/((double)numPermutations*(double)numClades); \n\t\n\t\t\trandObsChi = 0;\n\n\t\t\tfor(int l = 0; l < clade.totaNumObs; l++)\n\t\t\t\tclade.RBMatrix[l][0] = random.nextInt(); /* 0 - 32767\t*/\t\n\t\t\t \n\t\t\tclade.cumColTotal = 0; /* cumColTotal is the cumulative column total */\n\n\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t{\t\n\t\t\t\tif (j == 0)\n\t\t\t\t\tclade.cumColTotal = 0;\n\t\t\t\telse\t\t\t\t\n\t\t\t\tclade.cumColTotal = clade.cumColTotal + clade.columnTotal[j-1];\n\t\t\t\t\n\t\t\t\tfor (int s = 0; s < clade.columnTotal[j]; s++)\n\t\t\t\t{\n\t\t\t\t\tint l = s + clade.cumColTotal;\n\t\t\t\t\tclade.RBMatrix[l][1] = j+1;\n\t\t\t\t}\n\t\t\t}\n\t\t/*for (l=0; l<totaNumObs; l++)\n\t\t\t\tfprintf(stderr,\"\\nB: %6d %d\", RBMatrix[l][0], RBMatrix[l][1]);*/\n\n\n\n\t\t\t/* * * ORDER BY RANDOM NUMBERS * * */\n\t\t\tfor(int l = 0; l < (clade.totaNumObs - 1); l++)\n\t\t\t{\t\n\t\t\t\tfor(int r = l +1; r < clade.totaNumObs; r++)\n\t\t\t \t{\t\t\t\n\t\t\t\t\tif(clade.RBMatrix[r][0] < clade.RBMatrix[l][0])\n\t\t\t\t\t//\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t//else\n\t\t\t\t\t{\t\n\t\t\t\t\t\tint T = clade.RBMatrix[r][0];\n\t\t\t\t\t\tclade.RBMatrix[r][0] = clade.RBMatrix[l][0];\n\t\t\t\t\t\tclade.RBMatrix[l][0] = T;\n\t\t\t\t\t\tT = clade.RBMatrix[r][1];\n\t\t\t\t\t\tclade.RBMatrix[r][1] = clade.RBMatrix[l][1];\n\t\t\t\t\t\tclade.RBMatrix[l][1] = T;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t \t}\n\t/*for (l=0; l<totaNumObs; l++)\n\t\t\tfprintf(stderr,\"\\nAfter: %6d %d\", RBMatrix[l][0], RBMatrix[l][1]);*/\n\n\n\t\t\t/* * * CALCULATE RANDOM OBSERVATIONS * * */\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\tclade.randMatrix[i][j] = 0;\n\n\t\t\t \n\t\t\tclade.cumRowTotal = 0; /* cumulative row totals */\n\t\t\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tif (i == 0)\n\t\t\t\tclade.cumRowTotal = 0;\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\tclade.cumRowTotal += clade.rowTotal[i-1];\t\n\t\t\t\t\n\t\t\t\t/*fprintf(stderr, \"\\n\\nRow %d: rowTotal[i]:%d\",i, rowTotal[i]); */\n\t\t\t\t\n\t\t\t\tfor(int s = 0; s < clade.rowTotal[i]; s++)\n\t\t\t\t{\n\t\t\t\t\tint l = s + clade.cumRowTotal;\n\t\t\t\t\tindex = clade.RBMatrix[l][1]-1;\n\t\t\t\t\t/*fprintf(stderr, \"rowTotal= %d index=%d s=%d \",rowTotal[i], index, s); */\n\t\t\t\t\tclade.randMatrix[i][index]++;\n\t\t\t\t}\n\t\t\t}\n\n\n\n\n\t\t/* prints the randomized table of contingency\n\t\t\t\tfor(i = 0; i < numSubClades; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tfprintf(stderr, \"\\n\");\n\t\t\t\t\t\tfor(j = 0; j < numCladeLocations; j++)\n\t\t\t\t\t\t\tfprintf(stderr, \"%d \", randMatrix[i][j]);\n\t\t\t\t\t}\n\t\t*/\t\t\n\n\n\t\t\t/* * CALCULATE RANDOM CHI - SQUARE STATISTIC * */\n\t\t\trandObsChi = 0;\n\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\trandObsChi += Math.pow( (double) clade.randMatrix[i][j] - clade.expObsMatrix[i][j], 2) / clade.expObsMatrix[i][j];\n\t\t\t\t\t\n\t\t\t/*fprintf(fpout,\"\\n%f \", randObsChi);\t\t*/\n\t\t\t\t\t\n\t\t\tif(randObsChi - clade.obsChi >= ROUNDING_ERROR)\n\t\t\t\tclade.chiPvalue++;\n\n\n\t\t\tif (doingDistances)\n\t\t\t{\n\t\t\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t\t\t{\n\t\t\t\t\tclade.randDc[c]=0.0;\n\t\t\t\t\tclade.randDn[c]=0.0;\n\t\t\t\t\t//clade.varDc[c]=0;\n\t\t\t\t\t//clade.varDn[c]=0;\n\t\t\t\t\tsum1 = sum2 = sum3 = 0.0;\n\t\t\t\t\tsumc1 = sumc2 = sumc3 = 0.0;\n\n\t\t\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t\t\t{\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum2 += clade.randMatrix[c][i] * (clade.randMatrix[c][i]-1) / 2 ;\n\t\t\t\t\t\tsumc2 += (clade.randMatrix[c][i] * (clade.randMatrix[c][i]-1) / 2) + \n\t\t\t\t\t (clade.randMatrix[c][i] * (clade.columnTotal[i] - clade.randMatrix[c][i]));\t\n\t\t\t\t\t\n\t\t\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (j != i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tsum1 += (double) clade.randMatrix[c][i] * clade.randMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\t\t\tsum3 += clade.randMatrix[c][i] * clade.randMatrix[c][j];\t\t\t\n\t\t\t\t\t\t\t\tsumc1 += (double) clade.randMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\t\t\tsumc3 += clade.randMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.randMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t\t\t//System.err.println(\"\\nROBS[\" + c +\"][\" + i+ \"]= \" + clade.randMatrix[c][i]); \n\t\t\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (sum3 == 0)\n\t\t\t\t\t\tclade.randDc[c] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tclade.randDc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\tif (sumc3 == 0)\n\t\t\t\t\t\tclade.randDn[c] = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tclade.randDn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t // \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\n\t\t\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \n\n\n\t\t\t\t\tif(clade.Dc[c] - clade.randDc[c] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DcPvalue[c][0]++;\n\n\t\t\t\t\tif(clade.randDc[c] - clade.Dc[c] >= ROUNDING_ERROR )\n\t\t\t\t\t\tclade.DcPvalue[c][1]++;\n\n\t\t\t\t\tif(clade.Dn[c] - clade.randDn[c] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[c][0]++;\n\n\t\t\t\t\tif(clade.randDn[c] - clade.Dn[c] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[c][1]++;\n\n\n\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* * CALCULATE DISTANCE TEST STATISTIC * */\n\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\tclade.randMeanLatitude[i] = 0;\n\t\t\t\t\tclade.randMeanLongitude[i] = 0;\n\t\t\t\t\tclade.randDc[i] = 0;\n\t\t\t\t\tclade.randDn[i] = 0;\n\t\t\t\t\tclade.subCladeSum[i] = 0;\n\t\t\t\t\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = clade.cladeLocIndex[j] - 1;\n\t\t\t\t\t\tclade.absFreq[i][j] = (double) clade.randMatrix[i][j] / (double) sampleSize[index];\t\t\n\t\t\t\t\t\tclade.subCladeSum[i] = clade.subCladeSum[i] + clade.absFreq[i][j];\n\t\t\t\t\t}\t\n\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t\tclade.relFreq[i][j] = clade.absFreq[i][j]/clade.subCladeSum[i];\n\t\t\t\t}\n\t\t/*\t\t\n\t\t\t\tfor(i = 0; i < numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\tfprintf(stderr,\"\\n\");\n\t\t\t\t\tfor(j = 0; j < numCladeLocations; j++)\n\t\t\t\t\t\tfprintf(stderr,\"Asim: %f \", relFreq[i][j]);\n\t\t\t\t}\n\t\t*/\n\t\t\t\t\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t{\t\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tindex = clade.cladeLocIndex[j]-1;\n\t\t\t\t\t\tclade.randMeanLatitude[i] = clade.randMeanLatitude[i] + clade.relFreq[i][j] * Latitude[index];\n\t\t\t\t\t\tclade.randMeanLongitude[i] = clade.randMeanLongitude[i] + clade.relFreq[i][j] * Longitude[index];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(j = 0; j < clade.numCladeLocations; j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (clade.relFreq[i][j] == 0)\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tindex = clade.cladeLocIndex[j] - 1;\n\t\t\t\t\t\tif (Latitude[index] == clade.randMeanLatitude[i] && Longitude[index] == clade.randMeanLongitude[i]) \n\t\t\t\t\t\t\tZ = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tZ = Math.sin(Latitude[index]) * Math.sin(clade.randMeanLatitude[i]) + Math.cos(Latitude[index]) * \n\t\t\t\t\t\t\tMath.cos(clade.randMeanLatitude[i]) * Math.cos(clade.randMeanLongitude[i] - Longitude[index]);\n\t\t\t\t\t\n\t\t\t\t\t\tif (Math.abs(Z) < 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRVZ = RADIUS * Math.acos (Z); \n\t\t\t\t\t\t\tclade.randDc[i] += clade.relFreq[i][j] * RVZ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Latitude[index] == clade.meanLatNest && Longitude[index] == clade.meanLonNest) \n\t\t\t\t\t\t\tZB = 1;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tZB = Math.sin(Latitude[index]) * Math.sin(clade.meanLatNest) + Math.cos(Latitude[index]) * \n\t\t\t\t\t\t\tMath.cos(clade.meanLatNest) * Math.cos(clade.meanLonNest - Longitude[index]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Math.abs(ZB) < 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tRVZ = RADIUS * Math.acos (ZB);\n\t\t\t\t\t\t\tclade.randDn[i] += clade.relFreq[i][j] * RVZ;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(clade.Dc[i] - clade.randDc[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DcPvalue[i][0]++;\n\n\t\t\t\t\tif(clade.randDc[i] - clade.Dc[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DcPvalue[i][1]++;\n\n\t\t\t\t\tif(clade.Dn[i] - clade.randDn[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[i][0]++;\n\n\t\t\t\t\tif(clade.randDn[i] - clade.Dn[i] >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.DnPvalue[i][1]++;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t/* * TEST STATISTICS FOR POSITION VS. INTERIOR * */\n\n\t\t\trandTipDistance = 0;\n\t\t\trandIntDistance = 0;\n\t\t\trandTipDisNested = 0;\n\t\t\trandIntDisNested = 0;\n\t\t\t\n\t\t\tif(clade.check != (double) clade.numSubClades && clade.check != 0)\n\t\t\t{\t\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t{\n\t\t\t\t\trandTipDistance += clade.Position[i] * clade.randDc[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\t\trandTipDisNested += clade.Position[i] * clade.randDn[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\t\trandIntDistance += (1 - clade.Position[i]) * clade.randDc[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\t\trandIntDisNested += (1 - clade.Position[i]) * clade.randDn[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(clade.tipIntDistance - (randIntDistance - randTipDistance) >= ROUNDING_ERROR)\n\t\t\t\t\tclade.ITcPvalue[0]++;\n\n\t\t\t\tif((randIntDistance - randTipDistance) - clade.tipIntDistance >= ROUNDING_ERROR)\n\t\t\t\t \tclade.ITcPvalue[1]++;\n\n\t\t\t\tif(clade.tipIntDisNested - (randIntDisNested - randTipDisNested) >= ROUNDING_ERROR)\n\t\t\t\t\tclade.ITnPvalue[0]++;\n\t\t\t\t\n\t\t\t\tif((randIntDisNested - randTipDisNested) - clade.tipIntDisNested >= ROUNDING_ERROR)\n\t\t\t\t\tclade.ITnPvalue[1]++;\n\t\t\t\t\n\t\t\t}\n\n\t\t\tif(!weights){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//{\n\t\t\t\t/* * CORRELATION TESTS OF DISTANCE WITH OUTGROUP WEIGHTS * */\n\n\t\t\t\t //double c, n, w;\n\t\t\t\t \n\t\t\t\t clade.meanDc = 0;\n\t\t\t\t clade.meanDn = 0;\n\t\t\t\t clade.sumDcxWeight = 0;\n\t\t\t\t clade.sumDnxWeight = 0;\n\t\t\t\t clade.sumDcSq = 0;\n\t\t\t\t clade.sumDnSq = 0;\n\n\t\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t\t\t{\n\t\t\t\t \tclade.meanDc += clade.randDc[i] / (double) clade.numSubClades;\n\t\t\t\t \tclade.meanDn += clade.randDn[i] / (double) clade.numSubClades;\n\t\t\t\t \tclade.sumDcxWeight += clade.randDc[i] * clade.weight[i];\n\t\t\t\t \tclade.sumDnxWeight += clade.randDn[i] * clade.weight[i];\n\t\t\t\t \tclade.sumDcSq += Math.pow(clade.randDc[i],2); \n\t\t\t\t \tclade.sumDnSq += Math.pow(clade.randDn[i],2);\n\t\t\t\t\t}\n\t\t\t\t\n\t \t\tdouble c = clade.sumDcSq - (double) clade.numSubClades * Math.pow(clade.meanDc,2);\n\t \t\tdouble n = clade.sumDnSq - (double) clade.numSubClades * Math.pow(clade.meanDn,2);\n\t \t\t\tdouble w = clade.sumWeightSq - (double) clade.numSubClades * Math.pow(clade.meanWeight,2); \n\n\t\t\t\tif (clade.corrDcWeights != NA && c > 0 && w > 0)\n\t\t\t\t\t//;\n\t\t\t\t//else\n\t\t\t\t \t{\n\t\t\t\t \tclade.randCorrDcWeights = (clade.sumDcxWeight - (double) clade.numSubClades * clade.meanDc * clade.meanWeight)/ \n\t\t\t\t \t(Math.sqrt(c*w));\n\n\t\t\t\t\tif(clade.randCorrDcWeights > 1)\n\t\t\t\t\t\t\tclade.randCorrDnWeights = 1;\n\t\t\t\t\t\n\t\t\t\t\tif(clade.randCorrDcWeights < -1)\n\t\t\t \t\tclade.randCorrDcWeights = -1;\n\t\t\t\t\n\t\t\t\t\tif(clade.corrDcWeights - clade.randCorrDcWeights >= ROUNDING_ERROR)\n\t\t\t\t \t\tclade.corrDcWPvalue[0]++;\n\t\t\t\t\t \n\t\t\t\t\tif(clade.randCorrDcWeights - clade.corrDcWeights >= ROUNDING_ERROR)\n\t\t\t\t \tclade.corrDcWPvalue[1]++;\n\t\t\t\t\t}\n\n\n\t\t\t\tif (clade.corrDnWeights == NA || n <= 0 || w <= 0)\n\t\t\t\t\tcontinue;\t\t\n\t\t\t\t//else\n\t\t\t\t\t//{\n\t\t\t\t \tclade.randCorrDnWeights = (clade.sumDnxWeight - (double) clade.numSubClades * clade.meanDn * clade.meanWeight)/ \n\t\t\t\t \t(Math.sqrt(n*w));\n\t\t\t\t\n\t\t\t\t\tif(clade.randCorrDnWeights > 1)\n\t\t\t\t\t\tclade.randCorrDnWeights = 1;\n\n\t\t\t\t\tif(clade.randCorrDnWeights < -1)\n\t\t\t\t\t\tclade.randCorrDnWeights = -1;\n\n\t\t\t\t\tif(clade.corrDnWeights - clade.randCorrDnWeights >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.corrDnWPvalue[0]++;\n\n\t\t\t\t\tif(clade.randCorrDnWeights - clade.corrDnWeights >= ROUNDING_ERROR)\n\t\t\t\t\t\tclade.corrDnWPvalue[1]++;\n\t\t\t\t\t//}\n\t\t\t\t//}\n\t} // end of 1 replicate\n\n\n\t\tclade.chiPvalue /= (double) GeoDis.numPermutations;\n\n\t\tfor(int l = 0; l < 2; l++)\n\t\t{\n\t\t\tclade.ITcPvalue[l] /= (double) GeoDis.numPermutations;\n\t\t\tclade.ITnPvalue[l] /= (double) GeoDis.numPermutations;\n\t\t\tclade.corrDcWPvalue[l] /= (double) GeoDis.numPermutations;\n\t\t\tclade.corrDnWPvalue[l] /= (double) GeoDis.numPermutations;\n\n\t\t\tfor (i =0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t clade.DcPvalue[i][l] /= (double) GeoDis.numPermutations;\n\t\t\t clade.DnPvalue[i][l] /= (double) GeoDis.numPermutations;\n\t\t\t}\n\t\t}\n\n\t}", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "public void setValuePotongan(Number value) {\n setAttributeInternal(VALUEPOTONGAN, value);\n }", "public void mutate() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutate = rand.nextInt(4);\n\t\t\twhile (mutate == 0) {\n\t\t\t\tmutateHelper();\n\t\t\t\tmutate = rand.nextInt(4);\n\t\t\t}\n\t\t}\n\t}", "public void setMontantOp(double montantOp) {\n this.montantOp = montantOp;\n }", "public Chromosome doInsertionMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n int allele2 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n boolean value = newSelection.get(allele2);\n\n newSelection.remove(allele2);\n try{\n newSelection.add(allele1 + 1, value);\n }\n catch(IndexOutOfBoundsException e){\n newSelection.add(value);\n }\n \n Chromosome mutatedKnapsack = new Chromosome(newSelection).withFitnessCalculated();\n if(mutatedKnapsack.isValid())\n return mutatedKnapsack;\n }\n return this;\n }", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "public void setpopulationdensity(int x) {\r\n populationdensity = x;\r\n }", "public void setSmartMutationRate(double rate) { this.exec = this.exec.withProperty(\"sm.rate\", rate); }", "public double getProbability() {\r\n\t\treturn Probability;\r\n\t}", "public double getPercentMutants() {\n\t\tdouble count = (double) getNumMutants();\n\t\tdouble pSize = (double) this.getPopSize();\n\n\t\treturn count*100.0 / pSize;\n\t}", "public void setPercent(float value) {\n this.percent = value;\n }", "public abstract void setPercentDead(double percent);", "void setRandomize(Boolean setting);" ]
[ "0.76518136", "0.7650244", "0.72454077", "0.6950708", "0.6488851", "0.6453925", "0.64409536", "0.6440413", "0.63980436", "0.6242966", "0.6134654", "0.6130618", "0.60675067", "0.6067467", "0.6037516", "0.5971806", "0.59320116", "0.5895231", "0.5778212", "0.5762223", "0.57493055", "0.56821215", "0.5585319", "0.5545749", "0.55334884", "0.5504966", "0.55022", "0.5486487", "0.54773754", "0.5444865", "0.54373884", "0.54340845", "0.5431009", "0.5369998", "0.5368316", "0.53434956", "0.5342213", "0.5330731", "0.53247416", "0.5312884", "0.53098446", "0.52992046", "0.52879673", "0.5284358", "0.5267961", "0.5246707", "0.5243363", "0.5239518", "0.5225566", "0.5194473", "0.5179332", "0.51686007", "0.5154675", "0.5153639", "0.5131412", "0.5131256", "0.5128425", "0.512484", "0.511214", "0.51119477", "0.5110925", "0.51042247", "0.50852233", "0.5081504", "0.5078388", "0.5076431", "0.5055894", "0.50522745", "0.50478506", "0.5038714", "0.5005678", "0.50043184", "0.49988815", "0.49808857", "0.4975846", "0.4965293", "0.493956", "0.49337563", "0.49237093", "0.49237093", "0.4921524", "0.49168172", "0.49150944", "0.49079794", "0.49075848", "0.4904037", "0.4903368", "0.49013954", "0.4901147", "0.48956373", "0.48879722", "0.48850858", "0.48814392", "0.48738608", "0.4869897", "0.48669204", "0.48609918", "0.48552504", "0.4854139", "0.4854108" ]
0.8574286
0
Gets the number of maximum generations in each run.
public int getMaxGenerations() { return maxGenerations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMaximalIterationCount();", "protected int get_max_iter() {\n\t\treturn iterationsMaximum;\n\t}", "public final int getMaxIterations()\r\n\t{\r\n\t\treturn maxIterations;\r\n\t}", "public void setMaxGenerations(int value) { maxGenerations = value; }", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int getMaxIterations() {\n return mMaxIterations;\n }", "public int getMaxAttemptCount() {\n return maxAttemptCount;\n }", "int getMaxCount();", "int getMaxCount();", "public int getMaxCount() {\n return maxCount_;\n }", "public int getNumGenerations() {\n return numGenerations;\n }", "public int getGenerations() {\n return generations;\n }", "public int getMaxCount() {\n return maxCount_;\n }", "public int getAttemptCount() {\n return maxAttemptCount;\n }", "public static int getMaxSessionCount() {\n\t\treturn (maxSessionCount);\n\t}", "Integer getMaximumResults();", "default int getMaximumCount(int slot) {\n\t\treturn 64;\n\t}", "public int getMaximumPoints();", "int getGenerations();", "public final int getMaxForKernels()\r\n\t{\r\n\t\treturn maxForKernels;\r\n\t}", "protected int numGenes() {\n\t\treturn genes.size();\n\t}", "int getMaxInstances();", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "public int getMaxRunTime() {\n return maxRunTime;\n }", "public int getMaximumPlayers() {\n return getOption(ArenaOption.MAXIMUM_PLAYERS);\n }", "public int getMaxInstances() {\n return maxInstances;\n }", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public int getMaximum() {\r\n return max;\r\n }", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public java.lang.Integer getMaxRunningVMs() {\r\n return maxRunningVMs;\r\n }", "@Override\n\tpublic long getMaxnum() {\n\t\treturn _esfTournament.getMaxnum();\n\t}", "public int getMaxNumOfStages() {\n return maxNumOfStages;\n }", "public int getMaxPartitionsRunInParallel() {\n return maxThreads;\n }", "public int getMaxCalls();", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "protected int getMaxResults() {\n\t\treturn maxResults;\n\t}", "public int getMaxElements() {\n return maxElements;\n }", "public java.lang.Integer getMaxRegisteredVMs() {\r\n return maxRegisteredVMs;\r\n }", "private int getMaxConfiguredReplicaCount() {\n if (maxConfiguredReplicaCount > 0) {\n return maxConfiguredReplicaCount;\n } else {\n ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);\n ClientMessage response = invoke(request);\n maxConfiguredReplicaCount = PNCounterGetConfiguredReplicaCountCodec.decodeResponse(response);\n }\n return maxConfiguredReplicaCount;\n }", "public int countOfGenerations ();", "public int getMaxAdsPerIteration() {\n return this.mMaxAdsPerIteration;\n }", "public String getIterationSurMax() { return (actuelIteration + 1) + \"/\" + totalIteration; }", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "public int getMaxDias() {\n\t\treturn maxDias;\n\t}", "public int maxDistinction() {\n\n int distinctTiles = this.distincts().size(); // # of unique Scrabble tiles\n int maxDistinction = distinctTiles; // maximum # of distinct possibilities\n\n // If there are wildcards...\n int wilds = this.count(WILDCARD);\n if (wilds > 0) {\n int uniqueHardLetters = distinctTiles - 1; // # of unique letters (w/o wildcards)\n maxDistinction = uniqueHardLetters + wilds; // REVISED MAXIMUM DISTINCTION\n }\n\n return maxDistinction;\n }", "@Override\n\tpublic int getMaxNumMonitors() {\n\t\treturn getMaxNumMonitors(this.rootMonitor);\n\t}", "int getMaximum();", "public int getMaxRetries() {\n\t return maxRetries.get();\n\t}", "public int getMaxRoundsPerBattle() {\n return maxRoundsPerBattle;\n }", "public int getMaxRange() {\n\t\treturn max_range;\n\t}", "public long getMaxRIT() {\n return localMaxRIT;\n }", "public int getMaximumNumber() {\n\t\treturn 99999;\n\t}", "public double getMaxGs()\n {\n return this.max_gs;\n }", "public int max() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic int getMaxEvaluations() {\n\t\treturn 0;\r\n\t}", "public int getMaxItems()\n {\n return maxItems;\n }", "public int getMaxFiles()\n\t{\n\t\treturn maxFiles;\n\t}", "public int getMaxMappings() {\n\t\treturn maxMappings;\n\t}", "public abstract int getMaximumArguments();", "public Integer getMaxTimerDrivenThreads() {\n return maxTimerDrivenThreads;\n }", "protected final int getMax() {\n\treturn(this.max);\n }", "private int getMaxSize() {\r\n return PropUtils.getValue(sizeLimitProp, DEFAULT_MAX_SIZE);\r\n }", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public int getGenCount(){\n return generationCount;\n }", "public java.lang.Integer getMaxVcpusPerFtVm() {\r\n return maxVcpusPerFtVm;\r\n }", "public int getMaximum() {\n return this.iMaximum;\n }", "public int getMaxSlots() {\n return maxSlots;\n }", "int getMinimalIterationCount();", "public int getResult() {\n return this.max;\n }", "public int getMaxTasksPerNode() {\n return maxTasksPerNode;\n }", "int getMaxConcurrent();", "public BigInteger getMaxUses() {\r\n return maxUses;\r\n }", "int askForTempMax();", "public int getNumOfMaxActions() {\n return numOfMaxActions;\n }", "public int getMax() {\n\t\treturn mMax;\n\t}", "public int getMaximumInteger() {\n/* 244 */ return (int)this.max;\n/* */ }", "public int getMaxInteger() {\n\t\treturn this.maxInteger;\n\t}", "public double calculateMaximumAmount() {\n\t\t\n\t\tdouble maxAmount = 0;\n\t\t\n /**\n * The max(Collection<? extends T>, Comparator<? super T>) method is used \n * to return the maximum element of the given collection, according to the \n * order induced by the specified comparator\t\t\t\n */\t\n\t\tmaxAmount = (double)getMaximumSize()/Collections.max(tokenSizes.values());\n\t\t\n\t\treturn maxAmount;\t\n\t}", "public Integer getMaxItems() {\n\t\treturn maxItems;\n\t}", "public double getMaxNumberOfEpochs() {\n return maxNumberOfEpochs;\n }", "public int getMaximalSize() {\n return maximalSize;\n }", "public int getNbIterations() {\n\t\treturn this.nbIterations;\n\t}", "public static double GetMaxPassengers() \r\n {\r\n return maxPassengers;\r\n }", "public int getMax() {\n\t\treturn this.questions.size();\n\t}", "public Integer getMaxResults() {\n return maxResults;\n }", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int getMaxRows()\r\n\t{\r\n\t\treturn maxRows;\r\n\t}", "public int maxLen() {\n if (compositions == null) {\n return Math.max(maxLen(getAllele(0)), maxLen(getAllele(1)));\n } else {\n if (compositions.isEmpty())\n return 0;\n int maxLen = compositions.get(0).maxLen();\n for (Variant c : compositions) {\n maxLen = Math.max(maxLen, c.maxLen());\n }\n return maxLen;\n }\n }", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMaxRows()\n\t{\n\t\treturn maxRows;\n\t}", "public int getMax()\n {\n return 0;\n }", "public int donnePoidsMax() { return this.poidsMax; }", "public int getMaxHits() {\n\t\treturn maxHits;\n\t}", "public int getMaxFPS() {\n return getValue(PROP_MAX_FPS);\n }" ]
[ "0.73700464", "0.71817327", "0.71733254", "0.70247704", "0.7023468", "0.6996975", "0.6996975", "0.694638", "0.6904866", "0.6904866", "0.6898421", "0.6884361", "0.68691814", "0.6849113", "0.6663361", "0.66512376", "0.6617891", "0.6593703", "0.6588903", "0.65854985", "0.6554912", "0.6529245", "0.6527596", "0.6520925", "0.64954996", "0.6490896", "0.6487396", "0.64823663", "0.64702106", "0.6454301", "0.6454301", "0.6454248", "0.6434027", "0.642923", "0.64060766", "0.64041555", "0.6389978", "0.6389978", "0.6389978", "0.6345311", "0.633243", "0.63270724", "0.6323127", "0.6308575", "0.6304579", "0.6303712", "0.63016737", "0.6258822", "0.6258503", "0.6252725", "0.6246911", "0.6243353", "0.6241722", "0.6214682", "0.6206357", "0.6205785", "0.6177282", "0.61695915", "0.6160891", "0.61599016", "0.6151904", "0.61478597", "0.6145247", "0.6138688", "0.613556", "0.6128589", "0.6125486", "0.6124049", "0.61189437", "0.61143917", "0.6111649", "0.60966027", "0.6095155", "0.60931295", "0.6090813", "0.6087561", "0.60844356", "0.6063331", "0.60615784", "0.60610956", "0.6047788", "0.60465205", "0.604425", "0.60384643", "0.60355484", "0.6028249", "0.6023285", "0.60232437", "0.6014438", "0.601426", "0.6011148", "0.6010734", "0.6010734", "0.60078543", "0.6005317", "0.6005317", "0.5999101", "0.5988534", "0.598416", "0.59764326" ]
0.8200335
0
Sets the maximum number of generations per run.
public void setMaxGenerations(int value) { maxGenerations = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMaxIterations(int number) {\r\n if (number < CurrentIteration) {\r\n throw new Error(\"Cannot be lower than the current iteration.\");\r\n }\r\n MaxIteration = number;\r\n Candidates.ensureCapacity(MaxIteration);\r\n }", "public int getMaxGenerations() { return maxGenerations; }", "public void setGenerations(int generations) {\n this.generations = generations;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "@Override\n\tpublic void setMaxnum(long maxnum) {\n\t\t_esfTournament.setMaxnum(maxnum);\n\t}", "void setMaximum(int max);", "public void setMAX_ITERACOES(int MAX_ITERACOES) \r\n {\r\n if(MAX_ITERACOES > 0)\r\n this.MAX_ITERACOES = MAX_ITERACOES;\r\n }", "public void InitializeMaxNumInstances(int num) {\n }", "public void setMaxThreads(int maxThreads)\r\n {\r\n this.maxThreads = maxThreads;\r\n }", "public void setMaxSize(int maxSize) {\n this.maxSize = maxSize;\n }", "public void setMaximumPoints(int maximum);", "public void setMaximum(Number max) {\n this.max = max;\n }", "@Override\r\n\tpublic void setMaxEvaluations(int maxEvaluations) {\n\t\t\r\n\t}", "public void setMaximum(Number max) {\n ((ADocument) getDocument()).setMaximum(max);\n }", "public void setMaxThreadNumber(int maxThreadNumber) {\n\t\tthis.maxThreadNumber = maxThreadNumber;\n\t\tthis.maxThreadNumberSeedWorker = maxThreadNumber / 5 == 0 ? 1 : maxThreadNumber / 5;\n\t\tthis.maxThreadNumberResourceWorker = this.maxThreadNumber - this.maxThreadNumberSeedWorker;\n\t}", "public void setMax(int max)\n\t{\n\t\tif (max < 0)\n\t\t\tthrow new IllegalArgumentException(\"max < 0\");\n\t\tthis.max = max;\n\t}", "public void setMaxInteger(final int maxInteger) {\n\t\tthis.maxInteger = maxInteger;\n\t}", "public void setMaxConnections(int maxConnections) {\n this.maxConnections = maxConnections;\n saveProperties();\n }", "public void setMaxConnections(int maxConnections)\n {\n _maxConnections = maxConnections;\n }", "public void setMaxValue(int maxValue) {\n this.maxValue = maxValue;\n }", "@Override\n public void setMaxRange(int maxRange) {\n this.maxRange = maxRange;\n }", "public void setMaxNumDisksSVMotion(java.lang.Integer maxNumDisksSVMotion) {\r\n this.maxNumDisksSVMotion = maxNumDisksSVMotion;\r\n }", "public void setMaxRunTime(int maxRunTime) {\n this.maxRunTime = maxRunTime;\n }", "protected void setMaxSize(int size) {\n maxSize = size;\n }", "void setMaximumCacheSize(int maximumCacheSize);", "public void SetMaxVal(int max_val);", "void setMaxValue();", "public Builder setMaxSize(int value) {\n \n maxSize_ = value;\n onChanged();\n return this;\n }", "public void setMaxUnit(int max) {\n maxUnit = max;\n }", "void setLimit(int limit);", "private void setConfigNumMaxBgJobs(int value) {\n this.bitField0_ |= 2;\n this.configNumMaxBgJobs_ = value;\n }", "public void setMaxNumClusters(final int maxNumClusters) {\n this.maxNumClusters = maxNumClusters;\n getPrefs().putInt(\"RectangularClusterTracker.maxNumClusters\", maxNumClusters);\n }", "public void setMaxNumOfStages(int s) {\n maxNumOfStages = s;\n }", "public void setVarimaxMaximumIterations(int max){\n this.nVarimaxMax = max;\n }", "public void setMaxSlots(int value) {\n this.maxSlots = value;\n }", "public void setIterationLimit(int limit) {\n\t\titerationLimit = limit;\n\t }", "public void setMaxRunningVMs(java.lang.Integer maxRunningVMs) {\r\n this.maxRunningVMs = maxRunningVMs;\r\n }", "public void setMaxGs(double max_gs)\n {\n this.max_gs = max_gs;\n }", "public void setMaxFiles(int maxFiles)\n\t{\n\t\tthis.maxFiles = maxFiles;\n\t}", "public void setMaximumPlayers(int maximumPlayers) {\n setOptionValue(ArenaOption.MAXIMUM_PLAYERS, maximumPlayers);\n }", "public void setMaxRegisteredVMs(java.lang.Integer maxRegisteredVMs) {\r\n this.maxRegisteredVMs = maxRegisteredVMs;\r\n }", "public void setMaxSize(int c) {\n maxSize = c;\n }", "public void\tsetMaxNumberToken (int maximalNumberOfToken) {\n\t\tthis.maximalNumberOfToken=maximalNumberOfToken;\n\t}", "public static void SetMaxPassengers(double inLimit) \r\n {\r\n if (inLimit > 0) \r\n {\r\n maxPassengers = inLimit;\r\n } \r\n else \r\n {\r\n maxPassengers = 0;\r\n }\r\n }", "public void setMiterLimit(float limit);", "private void setMax(int max) { this.max = new SimplePosition(false,false,max); }", "public void setMaxmemory(String max) {\r\n getCommandLine().setMaxmemory(max);\r\n }", "@Override\n public void setMiterLimit(double limit) {\n graphicsEnvironmentImpl.setMiterLimit(canvas, limit);\n }", "public Builder setMaxCount(int value) {\n bitField0_ |= 0x00000002;\n maxCount_ = value;\n onChanged();\n return this;\n }", "private void setConfigNumMaxTotalJobs(int value) {\n this.bitField0_ |= 1;\n this.configNumMaxTotalJobs_ = value;\n }", "public void setMaxSpringSize(float maxSpringSize) {\r\n\t\tthis.maxSpringSize = maxSpringSize;\r\n\t\tspringSize = springSize > maxSpringSize ? maxSpringSize : springSize;\r\n\t}", "public void setMaximumCacheSize(int i) {\n this.maximumCacheSize = i;\n shrinkCacheToMaximumSize();\n }", "public void setMaxIterations(int maxIterations) throws LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n if (maxIterations < MIN_ITERATIONS) {\n throw new IllegalArgumentException();\n }\n mMaxIterations = maxIterations;\n }", "public void setMaxIterations(int maxIterations) throws LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n if (maxIterations < MIN_ITERATIONS) {\n throw new IllegalArgumentException();\n }\n mMaxIterations = maxIterations;\n }", "public void setMaxResults(int max) {\n\r\n\t}", "public void setMaxattempts(int maxattempts) {\n this.maxattempts = maxattempts;\n }", "public void setMaxAmount(int max) {\n _max = max;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000040;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public void setMaxVcpusPerFtVm(java.lang.Integer maxVcpusPerFtVm) {\r\n this.maxVcpusPerFtVm = maxVcpusPerFtVm;\r\n }", "public void setMaxThreadNumberSeedWorker(int maxThreadNumberSeedWorker) {\n\t\tif (maxThreadNumberSeedWorker < maxThreadNumber) {\n\t\t\tthis.maxThreadNumberResourceWorker = this.maxThreadNumber - this.maxThreadNumberSeedWorker;\n\t\t}\n\t}", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public Builder setMaxSize(int value) {\n bitField0_ |= 0x00000001;\n maxSize_ = value;\n onChanged();\n return this;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00008000;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public void setMaxEntries(int maxEntries) {\n this.maxEntries = maxEntries;\n }", "public Builder setMaxMP(int value) {\n bitField0_ |= 0x00000080;\n maxMP_ = value;\n onChanged();\n return this;\n }", "public void setMaxValue(int x) {\r\n\t\tmaxValue = x;\r\n\t}", "public void setMaxCalls(int max);", "public void setMaxArray(int max_array_elements)\n {\n this.max_array_elements = max_array_elements;\n }", "public void setMaxFeatures(int maxFeatures) {\n this.maxFeatures = maxFeatures;\n }", "public void setMaxBufferSize(int value) {\n this.maxBufferSize = value;\n }", "public void setMaxRows(int maxRows)\r\n\t{\r\n\t\tthis.maxRows = maxRows;\r\n\t}", "public void setMaxRows(int maxRows)\r\n\t{\r\n\t\tthis.maxRows = maxRows;\r\n\t}", "public void setMaxsize(int maxsize) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "private void setBatchSize( int aValue ) {\n GlobalParametersFake lConfigParms = new GlobalParametersFake( ParmTypeEnum.LOGIC.name() );\n lConfigParms.setInteger( PARAMETER_NAME, aValue );\n GlobalParameters.setInstance( lConfigParms );\n }", "public void setMax( float max )\n { \n this.max = max;\n show_text();\n }", "public void setMaxPlayers(int maxPlayers) {\n\t\tthis.maxPlayers = maxPlayers;\n\t}", "public void setMaxLength(int value) {\n this.maxLength = value;\n }", "public void setMaxMemoryMigrationPercentile(double max_mig_percentile) {\n this.max_mig_percentile = max_mig_percentile;\n reset();\n }", "public void setMaxTime(Integer maxTime) {\n this.maxTime = maxTime;\n }", "public void setMAX_EXECUCOES(int MAX_EXECUCOES)\r\n {\r\n if(MAX_EXECUCOES > 0)\r\n this.MAX_EXECUCOES = MAX_EXECUCOES;\r\n }", "static public void setMaxMigrationAsyncPollingRetries(int maxRetries) {\n maxMigrationAsyncPollingRetries = maxRetries;\n }", "public final void setMaxStepSize( long micros )\n {\n if ( ( micros < 1L ) && ( micros != -1L ) )\n throw new IllegalArgumentException( \"micros must be -1 or greater then 0\" );\n \n this.maxStepMicros = micros;\n }" ]
[ "0.7271038", "0.7204827", "0.7177446", "0.7148762", "0.7148762", "0.7061572", "0.68838185", "0.6744752", "0.6739151", "0.67387456", "0.67143035", "0.6659836", "0.66490644", "0.65603876", "0.6544072", "0.6543032", "0.65364367", "0.6484324", "0.6450201", "0.6424511", "0.64236796", "0.64203155", "0.6415545", "0.64051765", "0.6404573", "0.6402381", "0.64018124", "0.63959014", "0.639324", "0.6392948", "0.63899624", "0.63878644", "0.6384906", "0.637886", "0.636707", "0.63660216", "0.63560104", "0.6346886", "0.6340747", "0.63363534", "0.6332977", "0.63255835", "0.63235265", "0.6322642", "0.6322525", "0.63105285", "0.63029516", "0.62973654", "0.6280237", "0.6278116", "0.62722874", "0.6254384", "0.623201", "0.6230622", "0.6230622", "0.6224056", "0.6221778", "0.62207514", "0.6216308", "0.6206174", "0.6202107", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.6200535", "0.61879987", "0.6183801", "0.6182136", "0.6175888", "0.617347", "0.6158278", "0.61470693", "0.6140377", "0.6137602", "0.61297023", "0.61297023", "0.61209714", "0.6111386", "0.61051774", "0.61023873", "0.60948014", "0.6091636", "0.6088403", "0.6086504", "0.6083924", "0.608329" ]
0.88064414
0
Creates a new genetic engine with default values and no population.
public GeneticEngine() { avgFitnesses = new ArrayList<Double>(); highFitnesses = new ArrayList<Double>(); population = null; crossoverProbability = 0.07; mutationProbability = 0.001; maxGenerations = Integer.MAX_VALUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Genetic() {\r\n }", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "public GeneticEngine(int popSize, int maxGen, int chromosomeLength) {\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n populationSize = popSize;\n maxGenerations = maxGen;\n chromosomeSize = chromosomeLength;\n initializePopulation();\n }", "public GeneticEngine(int popSize, double crossoverRate,\n double mutationRate, int maxGen, int chromosomeLength) {\n\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n populationSize = popSize;\n crossoverProbability = crossoverRate;\n mutationProbability = mutationRate;\n maxGenerations = maxGen;\n chromosomeSize = chromosomeLength;\n initializePopulation();\n }", "public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}", "@Override\n public String getName() {\n return \"Genetic\";\n }", "public StrategyByGA(double ProbabilityOfCooperatingGivenCooperation,\n double ProbabilityOfCooperatingGivenDefection) {\n\n name = \"Strategy Developed by the Genetic Algorithm\";\n opponentLastMove = 1;\n proCoopGivCoop = ProbabilityOfCooperatingGivenCooperation;\n proCoopGivDef = ProbabilityOfCooperatingGivenDefection;\n }", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "private void initGP() {\n log.info(\"Initializing GP\");\n geneticProgram.addPopulationObserver(this);\n geneticProgram.initialize();\n frontRunner = geneticProgram.getProgram(0); // A safe default\n }", "public static Gng init() {\n return new Gng();\n }", "public void runGenerational() {\n\n\t\tSystem.out.println(\"Runing pure generational demo.\");\n\t\tFunction<BitSet, Double> knapsackFitnessFunction = new KnapsackFitness(capacity, parseElements());\n\t\tSpace<BitSet> space = new BitSetSpace(weights.length);\n\n\t\tGeneticSelector<BitSet, Double> rouletteSelector = new RouletteGeneticSelector<>(POP_SIZE);\n\t\tGeneticCrossover<BitSet, Double> crossover = new BinaryCrossover<>(0.9);\n\t\tGeneticOperator<BitSet, Double> geneticOperator = new CustomGeneticOperator<>(crossover);\n\t\tGeneticReplacement<BitSet, Double> replacement = new GenerationalReplacement<>();\n\t\tTracer.add(Population.class);\n\t\tTracer.start();\n\n\t\tSearch<BitSet, Double> search = new GeneticAlgorithm<>(POP_SIZE, NUM_ITER, rouletteSelector, geneticOperator,\n\t\t\t\treplacement);\n\t\tOptimizationProblem<BitSet, Double> problem = new OptimizationProblem<>(space, knapsackFitnessFunction,\n\t\t\t\tComparator.reverseOrder());\n\t\tSolution<BitSet, Double> foundSolution = search.solve(problem);\n\n\t\tSystem.out.println(String.format(\"Best found solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(foundSolution.getSolution()), foundSolution.getSolution()));\n\n\t\tBitSet optimalBitSet = parseOptimalBitSet();\n\t\tSystem.out.println(String.format(\"Optimal solution: %f, bitset: %s\",\n\t\t\t\tknapsackFitnessFunction.calculate(optimalBitSet), optimalBitSet));\n\t\tKnapsackMetric metric = new KnapsackMetric();\n\t\tmetric.putDataOfBestInFile(1);\n\t}", "protected Gene newGeneInternal() {\n try {\n \tFloatGene result = new FloatGene(getConfiguration(), m_lowerBound,\n m_upperBound);\n return result;\n }\n catch (InvalidConfigurationException iex) {\n throw new IllegalStateException(iex.getMessage());\n }\n }", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public void setDefaultParameters() {\n\tsetParameterValue(\"genie.param.x\",\"genie.dfwx\");\n\tsetParameterValue(\"genie.param.x.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.x.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.x.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.x.end\",\"0.3\");\n\tsetParameterValue(\"genie.param.y\",\"genie.dfwy\");\n\tsetParameterValue(\"genie.param.y.begin\",\"-0.3\");\n\tsetParameterValue(\"genie.param.y.increment\",\"0.6\");\n\tsetParameterValue(\"genie.param.y.increment.type\",\"linear\");\n\tsetParameterValue(\"genie.param.y.end\",\"0.3\");\n\tsetParameterValue(\"genie.nsteps\",\"1001\");\n\tsetParameterValue(\"genie.npstp\",\"1000\");\n\tsetParameterValue(\"genie.iwstp\",\"1000\");\n\tsetParameterValue(\"genie.itstp\",\"10\");\n\tsetParameterValue(\"genie.restart\",\"n\");\n\tsetParameterValue(\"genie.tv\",\"3.65\");\n\tsetParameterValue(\"genie.ndta\",\"5\");\n\tsetParameterValue(\"genie.temp0\",\"5.0\");\n\tsetParameterValue(\"genie.temp1\",\"5.0\");\n\tsetParameterValue(\"genie.rel\",\"0.9\");\n\tsetParameterValue(\"genie.scf\",\"2.0\");\n\tsetParameterValue(\"genie.diff1\",\"2000.0\");\n\tsetParameterValue(\"genie.diff2\",\"1e-5\");\n\tsetParameterValue(\"genie.adrag\",\"2.5\");\n\tsetParameterValue(\"genie.diffamp1\",\"8111000\");\n\tsetParameterValue(\"genie.diffamp2\",\"79610\");\n\tsetParameterValue(\"genie.betaz1\",\"0.1111\");\n\tsetParameterValue(\"genie.betam1\",\"0.0\");\n\tsetParameterValue(\"genie.betaz2\",\"0.2626\");\n\tsetParameterValue(\"genie.betam2\",\"0.2626\");\n\tsetParameterValue(\"genie.scl_co2\",\"1.0\");\n\tsetParameterValue(\"genie.pc_co2_rise\",\"0.0\");\n\tsetParameterValue(\"genie.diffsic\",\"2000.0\");\n\tsetParameterValue(\"genie.tatm\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_ocean\",\"0.0\");\n\tsetParameterValue(\"genie.relh0_land\",\"0.0\");\n\tsetParameterValue(\"genie.dfwx\",\"0.0\");\n\tsetParameterValue(\"genie.dfwy\",\"0.0\");\n\tsetParameterValue(\"genie.lout\",\"0000\");\n\tsetParameterValue(\"genie.lin\",\"0000.1\");\n }", "public Egrga() {\r\n\t}", "public Genome() {\n this.code = new int[GENOME_SIZE];\n for (int i = 0; i < 8; ++i) {\n this.code[i] = i;\n }\n for (int i = 8; i < Genome.GENOME_SIZE; ++i) {\n this.code[i] = r.nextInt(8);\n }\n this.repairGenome();\n Arrays.sort(this.code);\n this.calculatePopularity();\n }", "TGG createTGG();", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}", "public Gov() {\n }", "public static void genocide() {\n //Assigns fitness levels\n evaluateFitnesses();\n\n //Sorts by fitness\n sortByFitlvl();\n\n //Simple genocide, kills off all until population size.\n for (int i = Population.size() - 1; i >= populationSize; i--) {\n Population.remove(i);\n }\n\n /*\n //Different kind of Genocide, selects organisms based on gaussian distribution\n\n while(Population.size() > populationSize){\n int randomOrganism = (int)(Population.size() - (Population.size()*Utilities.sharpGauss(2)));\n Population.remove(randomOrganism);\n }\n */\n }", "private void createDefaultGalaxy(){\n milkyWay.setGalaxyColonies(37579321);\n milkyWay.setGalaxyPopulation(1967387132);\n milkyWay.setGalaxyFleets(237);\n milkyWay.setGalaxyStarships(34769);\n }", "public GeneticComputer(Role role) {\n super(role);\n }", "public GridSimRandom() {\n // empty\n }", "public GAIndividual()\n {\n m_fitness = 0;\n m_genome = new ArrayList<Integer>();\n }", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public static void main(String[] args)\n\t{\tint generation = 0;\n\t\tint sum = 0;\n\t\tExecutor exec=new Executor();\n\t\t\n\t\tGeneticController pacman = new GeneticController();\n\t\tController<EnumMap<GHOST,MOVE>> ghosts = new Legacy();\n\n\n\t\tLispStatements ls = new LispStatements();\n\t\tArrayList<String> functionSet = new ArrayList<>();\n\t\tfunctionSet.add(\"2ifblue\");\n\t\tfunctionSet.add(\"4ifle\");\n\t\tfunctionSet.add(\"2ifindanger\");\n\t\tfunctionSet.add(\"2ifpowerpillscleared\");\n\t\tfunctionSet.add(\"2istopowersafe\");\n\t\tArrayList<String> terminalSet = new ArrayList<>();\n\t\tterminalSet.add(\"distToPill\");\n\t\tterminalSet.add(\"distToPower\");\n\t\tterminalSet.add(\"distGhost\");\n\t\tterminalSet.add(\"distTo2ndGhost\");\n\t\tterminalSet.add(\"distTo3rdGhost\");\n\t\tterminalSet.add(\"distToEdibleGhost\");\n\t\tterminalSet.add(\"distToNonEdibleGhost\");\n\t\tterminalSet.add(\"moveToFood\");\n\t\tterminalSet.add(\"moveToPower\");\n\t\tterminalSet.add(\"moveToEdibleGhost\");\n\t\tterminalSet.add(\"moveFromNonEdibleGhost\");\n\t\tterminalSet.add(\"moveFromPower\");\n\t\tterminalSet.add(\"runaway\");\n\t\ttry {\n\t\t\tls.setFunctionalSet(functionSet);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\t\tls.setTerminalSet(terminalSet);\n\t\ttry {\n\t\t\tGenetic.Executor.setUp(pacman, ls, 8);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\n\t\tdouble average = 0;\n\n\t\twhile (generation < 51) {\n\t\t\twhile (Generation.isGenFinished()) {\n\n\t\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\t\tint delay = 0;\n\t\t\t\t\t\tboolean visual = false;\n\t\t\t\t\t\tsum += exec.runGame(pacman, ghosts, visual, delay);\n\t\t\t\t\t}\n\n\t\t\t\t\tGeneration.setFitness(50000 - (sum/10));\n\t\t\t\t\tSystem.out.println(sum/10);\n\n\n\t\t\t\t\tsum = 0;\n\n\t\t\t\tGeneration.pointerUpdate();\n\t\t\t}\n\t\t\tSystem.out.println(\"Generation \" + generation);\n\t\t\tGenetic.Executor.newGen();\n\t\t\tSystem.out.println(Generation.getBestRating());\n\t\t\tgeneration ++;\n\t\t}\n\n\t\tSystem.out.println(Generation.getBestTree());\n\t\tSystem.out.println(Generation.getBestRating());\n\n\n\n/*\n\t\tboolean visual=false;\n\t\tString fileName=\"results/replay10.txt\";\n\n\t\tint bestScore = 0;\n\t\tint result = 0;\n\t\tint average = 0;\n\t\tfor(int i = 0; i < 1000 ; i++) {\n\t\t\tresult = exec.runGameTimedRecorded(pacman, ghosts, visual, fileName, bestScore);\n\t\t\taverage +=result;\n\t\t\tif(result > bestScore){\n\t\t\t\tbestScore = result;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tvisual = true;\n\t\tSystem.out.println(average/1000.0);\n\t\texec.replayGame(fileName,visual);\n\t\t*/\n\n\n\t}", "private GeneProduct createGeneProduct( Gene gene ) {\n GeneProduct geneProduct = GeneProduct.Factory.newInstance();\n geneProduct.setGene( gene );\n geneProduct.setName( gene.getName() );\n geneProduct.setDescription( \"Gene product placeholder\" );\n return geneProduct;\n }", "public FVectorGene() {\n\t\t\n\t}", "public Genin(){\n this.ninja_name=null;\n this.power=null;\n this.strength=0;\n }", "public static void main(String[] args) {\n\t\tfinal Engine<DoubleGene, Double> engine = Engine\n\t\t\t\t.builder(JeneticsDemo2::eval, Codecs.ofScalar(DoubleRange.of(0, 2 * Math.PI)))\n\t\t\t\t\t.populationSize(500)\n\t\t\t\t\t.optimize(Optimize.MINIMUM)\n\t\t\t\t\t.offspringSelector(new StochasticUniversalSelector<>())\n\t\t\t\t\t.alterers(new Mutator<>(0.03), new MeanAlterer<>(0.6))\n\t\t\t\t\t.build();\n\n\t\t// Execute the GA (engine).\n\t\tfinal Phenotype<DoubleGene, Double> result = engine.stream()\n\t\t\t\t// Truncate the evolution stream if no better individual could\n\t\t\t\t// be found after 5 consecutive generations.\n\t\t\t\t.limit(Limits.bySteadyFitness(5))\n\t\t\t\t// Terminate the evolution after maximal 100 generations.\n\t\t\t\t.limit(100).collect(EvolutionResult.toBestPhenotype());\n\t\t\n\t\tSystem.out.println(\"Best GenoType: \" + result);\n\t}", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public Genret() {\r\n }", "public interface GeneticOptimizer {\r\n\tpublic int getGenPopulation();\r\n\tpublic void setGenPopulation(Integer popSize);\r\n\tpublic int getGenIterations();\r\n\tpublic void setGenIterations(Integer iterations);\r\n\r\n}", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public Ghoul() {\n super();\n this.setName(\"Default Ghoul\");\n this.addAttack(-1);\n this.addDefense(2);\n this.addToughness(2);\n }", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "public GSRandom() {\r\n\t\t\r\n\t}", "public NextGeneration(){\n this.born[3] = true;\n this.survives[2] = true;\n this.survives[3] = true;\n }", "public Gasto() {\r\n\t}", "public GdGame()\n\t{\n\t\tthis(100);\t\t\n\t}", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "public Genepool(int numGenes) {\n\t\tgeneNumber = numGenes;\n\t\tgenepool = new ArrayList<Gene>();\n\t\toffspringPool = new ArrayList<Gene>();\n\t\tgenerateGenes();\n\t}", "public CellularAutomatonRNG()\n {\n this(DefaultSeedGenerator.getInstance().generateSeed(SEED_SIZE_BYTES));\n }", "public void newExperiment() {\n // default value is negative because newGeneration() increase this value\n // and really start in 0\n currentGeneration = -1;\n this.newGeneration();\n DataCollector collector;\n for (String keyCollector : collectors.keySet()) {\n collector = collectors.get(keyCollector);\n if (!collector.getName().endsWith(HistoricalData.EXPERIMENT)) {\n collectors.remove(collector.getName());\n }\n }\n }", "public Generateur() {\n }", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "public void GeneticAlgorithm (TableVar Variables, TableDat Examples, String nFile) {\r\n\r\n String contents;\r\n\r\n // Creates and initialices the population\r\n poblac = new Population(long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n poblac.RndInitPop (Variables);\r\n\r\n // Creates the populations \"Inter\" and \"Des\" to aply the genetic operations\r\n Inter = new Population(long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n Des = new Population(2*long_poblacion, Variables.getNVars(), RulesRep, Variables);\r\n \r\n // Inicialisation of variables\r\n Trials = 0;\r\n Gen = 0;\r\n\r\n // Evaluation of the individuals of the initial population\r\n Trials+=poblac.evalPop (this, Variables, Examples, false);\r\n \r\n // Increments the generation number\r\n Gen++; \r\n \r\n // General cycle of the genetic algorithm\r\n do {\r\n // Selection by Baker method\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n SelectCAN (Variables);\r\n else SelectDNF (Variables);\r\n\r\n // Crossover\r\n descendientes = 0;\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n MultipointCrossoverCAN (Variables);\r\n else MultipointCrossoverDNF (Variables);\r\n descendientes = 2;\r\n \r\n // Mutation\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n MutationCAN (Variables);\r\n else MutationDNF (Variables);\r\n\r\n // Reproduction\r\n if(RulesRep.compareTo(\"CAN\")==0)\r\n SteadyStepReproductionCAN(Variables);\r\n else SteadyStepReproductionDNF(Variables);\r\n\r\n // Evaluation of the new population\r\n Trials+=poblac.evalPop (this, Variables, Examples, false);\r\n\r\n // Next generation\r\n Gen++;\r\n\r\n // GA finishes when the number of evaluations is reached\r\n } while (Trials <= n_eval); \r\n\r\n contents = \" # \" + (Gen-1) + \" generations, \" + Trials + \" evaluations\\n\";\r\n Files.addToFile(nFile, contents);\r\n \r\n }", "public Heuristic() {\n this(HeuristicUtils.defaultValues);\n }", "public int randomGene();", "public void newGameJBJ() {\n newGame();\n min = 0; max = 1000;\n myctr.setMinMaxLabel();\n myctr.setLabels();\n }", "public interface Population {\n public List<Individual> selectRandomIndividuals(int n, boolean withReplacement);\n\n public void evaluateFitnesses();\n\n public Individual crossoverOnePoint(Individual a, Individual b);\n\n public Individual crossoverTwoPoint(Individual a, Individual b);\n\n public Individual crossoverUniform(Individual a, Individual b);\n\n public void evolveMuLambda(int numParents, int numChildren, double mean, double variance);\n\n public void evolveMuPlusLambda(int numParents, int numChildren, double mean, double mutationRate);\n\n public void evolveGeneticAlgorithm();\n\n public void saveIndividualsAsPlayersInDb();\n\n public void addListener(EvolutionCompleteListener listener);\n\n}", "public GantBuilder ( ) { }", "@Override\n public HashProbDef generateProblemDefinition(HashProbGen hashProbGen) throws Exception {\n \n /* En caso de que recibamos un hash con el grafo en vez de\n * un grafo con las opciones de generacion. */\n \n if(hashProbGen.containsKey(E.filename)){\n HashGraphDef graphDef = new HashGraphDef();\n String filename = hashProbGen.get(E.filename);\n String extension = filename.substring(filename.length()-4);\n switch(extension){\n case \".txt\": graphDef = ReaderGraph.optFromTXT(new File(filename)); break;\n case \".xml\": graphDef = GraphProblemFromXML.graphDefFromXML(new File(filename)); break;\n default: throw new Exception(\"Unknown file extension.\");\n }\n HashProbDef probDef = new HashProbDef();\n probDef.putAll(graphDef);\n return probDef;\n }\n \n // HACK\n if(hashProbGen.containsKey(\"0,0\") || hashProbGen.containsKey(\"1,1\")){\n HashProbDef h = new HashProbDef();\n h.putAll(hashProbGen);\n return h;\n }\n \n if(hashProbGen.containsKey(E.generationMode)){\n switch(hashProbGen.getIndispensable(E.generationMode)){\n case E.genModeUniDist: genType = GenType.UNIFORM_DISTRIBUTION; break;\n case E.genModeBiased: genType = GenType.BIASED; break;\n }\n }\n \n \n if(hashProbGen.containsKey(E.randomSeed)) \n Rand.setSeed(Long.valueOf(hashProbGen.get(E.randomSeed)));\n \n /** Hash con la definicion arista por arista del grafo generado. */\n HashProbDef optDef = new HashProbDef();\n optDef.put(E.numOfCities, hashProbGen.get(E.numOfCities));\n // opt.putAll(optArg);\n \n // Hay que generarlos.\n int numOfCities = Integer.valueOf(hashProbGen.getIndispensable(E.numOfCities));\n float minDist = Float.valueOf(hashProbGen.getIndispensable(E.minDist));\n float maxDist = Float.valueOf(hashProbGen.getIndispensable(E.maxDist));\n \n for(int i=0; i<numOfCities; i++){\n for(int j=i; j<numOfCities; j++){\n if(j == i){\n optDef.put(String.format(\"%s,%s\", i,j), \"0\");\n }\n else {\n switch(genType){\n case BIASED:\n optDef.put(String.format(\"%s,%s\", i,j), \n String.valueOf(maxDist)); break;\n case UNIFORM_DISTRIBUTION:\n optDef.put(String.format(\"%s,%s\", i,j), \n String.valueOf(Rand.randFloat(minDist, maxDist))); break;\n }\n }\n if(genType == GenType.BIASED){\n int randSisterCity;\n do{\n randSisterCity = Rand.randInt(0, numOfCities-1);\n }while(randSisterCity == i);\n optDef.put(String.format(\"%s,%s\", i, randSisterCity), \n String.valueOf(minDist));\n }\n }\n }\n \n return optDef;\n }", "public God() {}", "protected Individual(Infrastructure infra)\n\t\t{\tint num_genes = 0;\n\t\t\tfor(int i=0;i<num_nodes;i++) {\n\t\t\t\tnum_genes += tld[i].length;\n\t\t\t}\n\t\t\t\n\t\t\tgenes = new float[num_genes];\n\t\t\tfor(int i=0;i<num_genes;i++)\n\t\t\t\tgenes[i] = random.nextFloat();\n\t\t\t\t\n\t\t\tcreateMe();\n\t\t\twait = 0;\n\t\t\tmove = 0;\n\t\t}", "public simulation() {\n\n }", "public FloatGene()\n throws InvalidConfigurationException {\n this(Genotype.getStaticConfiguration());\n }", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "public void createG1(String eq){\n graph1 = false;\n Equation e1 = new Equation(eq);\n q1 = new XYPoints(e1, range);\n createCP(range);\n executeGraphs();\n updateGraph(q1);\n graph1 = true;\n }", "public BasicSpecies() {\r\n\r\n\t}", "@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "private void createGrape(Element temp) {\n Grape grape = new Grape(); //new instance of Objects.Grape\n for(int i = 0; i < temp.getAttributeCount(); i++) { //iterates through all the attributes placed by the user\n Attribute attribute = temp.getAttribute(i); //instantiates a specific attribute (eg. id = \"1\")\n String name = attribute.getQualifiedName(); //takes the attribute name (eg. id)\n String value = attribute.getValue(); //takes the attribute value (eg. \"1\")\n\n switch (name) {\n case(\"id\"):\n grape.setId(value);\n break;\n\n case (\"class\"):\n try {\n grape.setGrapeClass(Class.forName(\"Examples.\"+value)); //creates a new Class based on the attribute's value\n\n } catch (ReflectiveOperationException e) {\n e.printStackTrace();\n\n }\n break;\n\n case (\"scope\"):\n if(value.equals(\"singleton\")) {\n grape.setSingleton(true);\n super.singletonGrapes.put(grape.getId(), null); //create a new instance of the grape and store it in its map\n }\n else\n grape.setSingleton(false);\n\n break;\n\n case (\"init-method\"):\n if (grape.getGrapeClass() != null) {\n Class grapeClass = grape.getGrapeClass();\n try {\n grape.setInitMethod(grapeClass.getMethod(value, null));\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n case (\"destroy-method\"):\n if (grape.getGrapeClass() != null) {\n Class grapeClass = grape.getGrapeClass();\n try {\n grape.setDestroyMethod(grapeClass.getMethod(value, null));\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n case (\"property\"):\n if (grape.getGrapeClass() != null) {\n if (value.equals(\"type\")) {\n autowired =! autowired;\n grape.setAutowiring(\"type\");\n } else if (value.equals(\"name\")) {\n autowired =! autowired;\n grape.setAutowiring(\"name\");\n } else if (value.equals(\"no\") && autowired) {\n if (searchAndCreateDep(grape)) {\n return;\n }\n }\n } else {\n System.err.print(\"Objects.Grape parameters not in correct order. Class should be before methods. \");\n }\n break;\n\n default:\n System.err.print(\"Invalid parameter \" + name);\n break;\n }\n }\n super.grapes.put(grape.getId(), grape);\n }", "public PedGenie ( IOManager im, String application_id ) throws GEException\n {\n io_mgr = im;\n spec = io_mgr.getSpecification();\n Study[] study = io_mgr.getStudy();\n tSim = spec.getTopSim();\n dSim = spec.getDropSim();\n theAnalyses = spec.getCCAnalyses();\n nCycles = spec.getNumberOfSimulations();\n \n if( nCycles < 1000 )\n {\n sigCycles = nCycles;\n }\n else\n {\n sigCycles = 1000;\n }\n \n numGDef = spec.getGDef().getLocusCount();\n app_id = application_id;\n \n initializeSimulator(tSim, spec, study);\n initializeSimulator(dSim, spec, study);\n \n if( app_id.equals(\"hapConstructor\") )\n {\n int[] loci = new int[numGDef];\n \n for( int j =0; j < numGDef; j ++ )\n {\n loci[j] = j;\n }\n \n Study[] istudy = spec.getStudy();\n study_Gtypes = new compressGtype[istudy.length];\n initiate_cGtypes(istudy,loci);\n \n String[] models = spec.gethapC_models();\n List<String>a = new ArrayList<String>();\n \n for( int j = 0; j < models.length; j++ )\n {\n a.add(models[j]);\n }\n setupModels(a, spec);\n }\n \n if ( theAnalyses.length > 0 )\n {\n System.out.println(\"Getting subjects...\");\n for ( int i = 0; i < theAnalyses.length; ++i )\n {\n theAnalyses[i].setStudySubjects(study);\n }\n }\n }", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public static GenomeAdapter createGenome(String name, int length) {\n return new Genome(name, length);\n }", "public WorldGenGrassUnderbean()\n {\n }", "public BaseGearPiece generateGearPiece();", "public GeneralParameters instantiate() {\n return instantiate(null);\n }", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "protected Gene getRandomGene() {\n\t\tArrayList<Gene> genearr = new ArrayList<Gene>();\n\t\tgenearr.addAll(genes.values());\n\t\treturn genearr.get(Braincraft.randomInteger(genearr.size()));\n\t}", "protected Population(Infrastructure infra)\n\t\t{\tinds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++)\n\t\t\t\tinds[i] = new Individual(infra);\n\t\t\tthis_ind = 0;\n\t\t\tthis_gen = 0;\n\t\t}", "public OrchardGame() {\n\t\t\n\t}", "public GTFTranslator()\r\n {\r\n // do nothing - no variables to instantiate\r\n }", "public interface IEngineGenerator extends IEnergyProviders {\n\n\t/**\n\t * Check if there is no fuel\n\t * @return true if there is no fuel\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsEmpty() throws Exception;\n\n\t/**\n\t * Check if the engine generator is full\n\t * @return true if the engine generator is full\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsFull() throws Exception;\n\n\t/**\n\t * Get the quantity of fuel in the engine generator\n\t * @return quantity of fuel in the engine generator\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic double fuelQuantity() throws Exception;\n\n\t/**\n\t * Add fuel into the engine generator\n\t * @param quantity of fuel put into the engine generator (can't exceed the max capacity of the engine generator)\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void addFuel(int quantity) throws Exception;\n\n\t/**\n\t * Turn on the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void on() throws Exception; // use fuel to prod electricity\n\n\t/**\n\t * Turn off the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void off() throws Exception;\n\n\t/**\n\t * Check if the engine generator is on\n\t * @return\ttrue if the engine generator is on\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean isOn() throws Exception;\n\n}", "public GameConfig createDefaultConfig() {\n\n return null;\n }", "public EnsembleLettre() {\n\t\t\n\t}", "private Agent createAgent(Class agentClass, Vertex vertex,\n Hashtable defaultAgentValues) {\n Agent ag;\n\n try {\n\n ProcessData data = new ProcessData();\n\n ag = (Agent) agentClass.getConstructor().newInstance();\n ag.setSimulator(this);\n ag.setWhiteBoard(defaultAgentValues);\n\t data.vertex = vertex;\n data.agent = ag;\n agents.put(ag, data);\n\n\t addAgentToVertex(vertex, ag);\n\n } catch (Exception e) {\n throw new IllegalArgumentException(e);\n }\n\n stats.add(new AgentCreationStat(ag.getClass()));\n\n return ag;\n }", "public GenerateurImpl() {\n\t\tsuper();\n\t\tthis.value = 0;\n\t}", "protected GameObject() {\r\n\t\tid = \"na\";\r\n\t\tkey = \"_na\";\r\n\t\tname = \"N/A\";\r\n\t\tdrops = false;\r\n\t\tprotection = 0;\r\n\t\tplaysSound = false;\r\n\t\tattackAttempts = 0;\r\n\t\tattackFrequency = 4;\r\n\t\ttakesTwoCells = false;\r\n\t\tmovementFrequency = 10;\r\n\t\tstate = new Basic(this);\r\n\t\tresetAttackAttempts();\r\n\t\tresetMovementAttempts();\r\n\t}", "private RandomLocationGen() {}", "public void defaultGame() {\n //CREATE A BOARD\n Board board = new Board(10, 10, 0);\n ArrayList<Boat> boats = createDefaultBoatArray();\n //CREATE A GAME\n GameData game = new GameData(board, boats, false);\n //POSITION BOATS\n randomPosBoats(game);\n\n //!!tile matrix is empty\n Game.getInstance().setGameData(game);\n Game.getInstance().setEnded(false);\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public interface Population {\n\n /**\n * Add the specified chromosome to the population.\n * If the size of the population has reached to maxSize, eviction is done\n * removing chromosomes with the worst fitness\n * @param chromosome\n */\n void addChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return a random chromosome\n * @return\n */\n Chromosome getRandom();\n\n\n /**\n * Return a random chromosome among the first limit fittest chromosomes\n * @param limit Nth fittest chromosome\n * @return\n */\n Chromosome getRandomAmongFittest(int limit);\n\n /**\n * Remove the specified chromosome from the population\n * @param chromosome\n */\n boolean removeChromosome(@NotNull final Chromosome chromosome);\n\n /**\n * Return the fittest chromosome\n * @return\n */\n Chromosome fittestChromosome();\n\n /**\n * Number of chromosome in the population\n * @return\n */\n int size();\n\n /**\n * Return the hits of each chromosomes\n * @return\n */\n Map<String, Long> hits();\n}", "public static void runGeneticAlgorithm(ArrayList<City> cities) throws IOException {\n\n\t\t//select our strategies for our genetic algorithm\n\t\tPopulationInitialiser initialiser = new RandomGeneration();//random generation of initial population as initialisation strategy\n\t\tPopulationCrossover breeder = new TwoPointCrossOver();//two-point crossover as crossover strategy\n\t\tPopulationMutator mutator = new SwapTwoCities();//swap of two elements as mutation strategy\n\t\tPopulationReplacement selector = new ElitistSelection();//elitism as selection strategy\n\n\t\t//create a generation history object to track all generations\n\t\tArrayList<GAPopulationGeneration> generationHistory = new ArrayList<>();\n\n\t\t//create our first generation and randomly generate its initial solutions\n\t\tGAPopulationGeneration generation = new GAPopulationGeneration(initialiser.initialise(cities, 8));\n\n\t\t// create our output table\n\t\tAsciiTable outputTable = new AsciiTable();\n\t\toutputTable.addHeavyRule();\n\n\t\t// create our incumbent and stopping criterion tracker\n\t\tCandidateSolution incumbent = generation.getParentPopulation().getBestSolution();\n\t\tint generationSinceImprovedIncumbent = 0;\n\n\t\t//loop until 10 iterations without improved incumbent\n\t\twhile (generationSinceImprovedIncumbent <= 10) {\n\n\t\t\t//take parents and crossover to create 6 offspring. record the results for displaying later\n\t\t\tgeneration.setOffspringPopulation(breeder.breed(generation.getParentPopulation(), 6));\n\t\t\tgeneration.setFamilyRecords(breeder.getFamilies());\n\n\t\t\t//take offspring and perform mutation. record the results for displaying later\n\t\t\tgeneration.setMutatedPopulation(mutator.mutatePopulation(generation.getOffspringPopulation()));\n\t\t\tgeneration.setMutantRecords(mutator.getMutations());\n\n\t\t\t//take mutated offspring and perform selection.\n\t\t\tgeneration.setNextPopulation(selector.replace(generation.getParentPopulation(), generation.getMutatedPopulation()));\n\n\t\t\t//if this solution is greater than the incumbent reset stopping criterion and we have new incumbent, else increment stopping criterion\n\t\t\tif (generation.getBestSolutionThisGeneration().compareTo(incumbent) < 0) {\n\t\t\t\tgenerationSinceImprovedIncumbent = 0;\n\t\t\t\tincumbent = generation.getBestSolutionThisGeneration();\n\t\t\t} else\n\t\t\t\tgenerationSinceImprovedIncumbent++;\n\n\t\t\t//record the current generation, and create the new generation from the current one\n\t\t\tgeneration.addToTable(outputTable, incumbent);\n\t\t\tgenerationHistory.add(generation);\n\t\t\tgeneration = generation.initialiseNextGeneration();\n\n\t\t}\n\n\t\t//print out the incumbent at the end\n\t\toutputTable.addRow(\"\", \"\", \"TSP final best solution & fitness : \", incumbent + \" (\" + incumbent.getFitness() + \")\", \"\", \"\", \"\", \"\");\n\t\toutputTable.addHeavyRule();\n\n\n\t\t//format the table, and print to console and output.txt\n\t\tTA_Grid grid = TA_Grid.create(\"an ascii compliant grid\")\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_HEAVY, ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_NORMAL, ' ', '~', ' ', '~', '~', '~', '~', '~', '~', '~', '~', '~')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_LIGHT, ' ', '-', ' ', '-', '-', '-', '-', '-', '-', '-', '-', '-');\n\t\toutputTable.getContext().setGrid(grid);\n\t\toutputTable.setTextAlignment(TextAlignment.CENTER);\n\t\toutputTable.getRenderer().setCWC(new CWC_LongestLine());\n\t\tFileWriter output = new FileWriter(\"output.txt\", true);\n\t\toutput.append(outputTable.render()).append(\"\\n\\n\").close();\n\t\tSystem.out.println(outputTable.render() + \"\\n\\n\");\n\t}", "public VariabilityFactoryImpl() {\n\t\tsuper();\n\t}", "public MgtFactoryImpl()\n {\n super();\n }", "public GroceryStore () {\n aisles = 20;\n freezers = 5;\n inventoryFull = 8;\n fresh = 9;\n liveAnimals = false;\n bakery = true;\n bestSeller = \"Milk\";\n numberOfProducts = 10000;\n }", "static public InstanceGenerator create(String className, Instances training, Instances testing)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(Instances.class, Instances.class).newInstance(training, testing);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "public Greeter() {\n\n\t}", "public TSPChromosome(int size) {\t\n\t\tfor(int g=0; g<size; g++){\n\t\t\tgenes.add(new Integer(-1));\n\t\t}\n\t\tinit();\n\t}", "@Override\n\tpublic void init(graph g) {\n\t\tthis.GA = g;\n\t}", "public OWLAnonymousIndividualHGDB()\r\n\t{\r\n\r\n\t}", "protected abstract S createDefault();" ]
[ "0.70761263", "0.64537066", "0.6396623", "0.62220645", "0.6169256", "0.5935765", "0.5914046", "0.5851614", "0.58377075", "0.5737698", "0.5723978", "0.5675133", "0.56557554", "0.5649991", "0.5629246", "0.5623635", "0.5579655", "0.5530974", "0.5521417", "0.54981244", "0.5488102", "0.5455907", "0.5455741", "0.5438383", "0.54284257", "0.54250556", "0.5419389", "0.54175836", "0.54143095", "0.5405867", "0.53969544", "0.5357374", "0.5356606", "0.53522664", "0.5349686", "0.5315637", "0.5290517", "0.52849495", "0.5273609", "0.5270883", "0.5255173", "0.52360463", "0.5228252", "0.52262527", "0.5221757", "0.520288", "0.5201311", "0.51973444", "0.5187688", "0.5187231", "0.51844627", "0.5183743", "0.51739454", "0.51734453", "0.51685226", "0.5168188", "0.5162368", "0.514364", "0.51431376", "0.514288", "0.513058", "0.5119383", "0.51146734", "0.51112664", "0.5109942", "0.5106376", "0.5105113", "0.5099845", "0.50993097", "0.5097872", "0.50930065", "0.50884324", "0.50829864", "0.5076384", "0.5074731", "0.50723696", "0.5071172", "0.5060546", "0.5054164", "0.5051531", "0.5049672", "0.50370806", "0.5036266", "0.503376", "0.50309485", "0.5022089", "0.5020095", "0.50121015", "0.5011784", "0.50066245", "0.5002281", "0.49975345", "0.49949253", "0.4989334", "0.49891672", "0.49885842", "0.49881428", "0.49752083", "0.49751002", "0.4972607" ]
0.7719474
0
Creates a new genetic engine.
public GeneticEngine(int popSize, double crossoverRate, double mutationRate, int maxGen, int chromosomeLength) { avgFitnesses = new ArrayList<Double>(); highFitnesses = new ArrayList<Double>(); populationSize = popSize; crossoverProbability = crossoverRate; mutationProbability = mutationRate; maxGenerations = maxGen; chromosomeSize = chromosomeLength; initializePopulation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GeneticEngine() {\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n population = null;\n crossoverProbability = 0.07;\n mutationProbability = 0.001;\n maxGenerations = Integer.MAX_VALUE;\n }", "public Genetic() {\r\n }", "TGG createTGG();", "public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "@Override\r\n public EngineInjection createEngineInjection() {\r\n return new Turbofan();\r\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "@Override\n public String getName() {\n return \"Genetic\";\n }", "public GeneticEngine(int popSize, int maxGen, int chromosomeLength) {\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n populationSize = popSize;\n maxGenerations = maxGen;\n chromosomeSize = chromosomeLength;\n initializePopulation();\n }", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public static Gng init() {\n return new Gng();\n }", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public static IXccdfEngine createEngine(IPlugin plugin, SystemEnumeration... systems) {\r\n \treturn new OEMEngine(plugin, systems);\r\n }", "private GeneProduct createGeneProduct( Gene gene ) {\n GeneProduct geneProduct = GeneProduct.Factory.newInstance();\n geneProduct.setGene( gene );\n geneProduct.setName( gene.getName() );\n geneProduct.setDescription( \"Gene product placeholder\" );\n return geneProduct;\n }", "public static IXccdfEngine createEngine(IPlugin plugin) {\r\n \treturn new OEMEngine(plugin, SystemEnumeration.ANY);\r\n }", "public abstract void createGenome(Genome newGenome);", "Analytics_Engine createAnalytics_Engine();", "public Game createGame();", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "IGraphEngine graphEngineFactory();", "public PedGenie ( IOManager im, String application_id ) throws GEException\n {\n io_mgr = im;\n spec = io_mgr.getSpecification();\n Study[] study = io_mgr.getStudy();\n tSim = spec.getTopSim();\n dSim = spec.getDropSim();\n theAnalyses = spec.getCCAnalyses();\n nCycles = spec.getNumberOfSimulations();\n \n if( nCycles < 1000 )\n {\n sigCycles = nCycles;\n }\n else\n {\n sigCycles = 1000;\n }\n \n numGDef = spec.getGDef().getLocusCount();\n app_id = application_id;\n \n initializeSimulator(tSim, spec, study);\n initializeSimulator(dSim, spec, study);\n \n if( app_id.equals(\"hapConstructor\") )\n {\n int[] loci = new int[numGDef];\n \n for( int j =0; j < numGDef; j ++ )\n {\n loci[j] = j;\n }\n \n Study[] istudy = spec.getStudy();\n study_Gtypes = new compressGtype[istudy.length];\n initiate_cGtypes(istudy,loci);\n \n String[] models = spec.gethapC_models();\n List<String>a = new ArrayList<String>();\n \n for( int j = 0; j < models.length; j++ )\n {\n a.add(models[j]);\n }\n setupModels(a, spec);\n }\n \n if ( theAnalyses.length > 0 )\n {\n System.out.println(\"Getting subjects...\");\n for ( int i = 0; i < theAnalyses.length; ++i )\n {\n theAnalyses[i].setStudySubjects(study);\n }\n }\n }", "public static GenomeAdapter createGenome(String name, int length) {\n return new Genome(name, length);\n }", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public void createG1(String eq){\n graph1 = false;\n Equation e1 = new Equation(eq);\n q1 = new XYPoints(e1, range);\n createCP(range);\n executeGraphs();\n updateGraph(q1);\n graph1 = true;\n }", "void create(GameLogic gameLogic);", "public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}", "static public InstanceGenerator create(String className, Instances training, Instances testing)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(Instances.class, Instances.class).newInstance(training, testing);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }", "public StrategyByGA(double ProbabilityOfCooperatingGivenCooperation,\n double ProbabilityOfCooperatingGivenDefection) {\n\n name = \"Strategy Developed by the Genetic Algorithm\";\n opponentLastMove = 1;\n proCoopGivCoop = ProbabilityOfCooperatingGivenCooperation;\n proCoopGivDef = ProbabilityOfCooperatingGivenDefection;\n }", "public Egrga() {\r\n\t}", "public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }", "private Gene createGene( String[] fields, Taxon taxon ) {\n\n assert fields.length > 1;\n\n String geneSymbol = fields[0];\n String geneName = fields[1];\n String uniProt = \"\";\n if ( fields.length > 2 )\n uniProt = fields[2];\n Gene gene;\n // need at least the gene symbol and gene name\n if ( StringUtils.isBlank( geneSymbol ) || StringUtils.isBlank( geneName ) ) {\n log.warn( \"Line did not contain valid gene information; GeneSymbol=\" + geneSymbol + \"GeneName=\" + geneName\n + \" UniProt=\" + uniProt );\n return null;\n }\n\n if ( log.isDebugEnabled() )\n log.debug( \"Creating gene \" + geneSymbol );\n gene = geneService.findByOfficialSymbol( geneSymbol, taxon );\n\n if ( gene != null ) {\n Collection<GeneProductValueObject> existingProducts = geneService.getProducts( gene.getId() );\n if ( existingProducts.isEmpty() ) {\n log.warn( \"Gene \" + gene + \" exists, but has no products; adding one\" );\n gene = geneService.thaw( gene );\n GeneProduct newgp = createGeneProduct( gene );\n newgp = geneProductService.create( newgp );\n gene.getProducts().add( newgp );\n geneService.update( gene );\n return gene;\n }\n log.info( gene + \" already exists and is valid, will not update\" );\n return null; // no need to create it, though we ignore the name.\n\n }\n\n gene = Gene.Factory.newInstance();\n gene.setName( geneSymbol );\n gene.setOfficialSymbol( geneSymbol );\n gene.setOfficialName( StringUtils.lowerCase( geneName ) );\n gene.setDescription( \"Imported from external annotation file\" );\n gene.setTaxon( taxon );\n gene.getProducts().add( createGeneProduct( gene ) );\n gene = ( Gene ) persisterHelper.persistOrUpdate( gene );\n return gene;\n }", "private void initGP() {\n log.info(\"Initializing GP\");\n geneticProgram.addPopulationObserver(this);\n geneticProgram.initialize();\n frontRunner = geneticProgram.getProgram(0); // A safe default\n }", "public Game createGame(int numberOfPlayers) {\n return new Game(numberOfPlayers);\n }", "public void createGame();", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public GameDomainFactory() {\r\n\t\t\r\n\t\tCreateGameDomain = new HashMap<String, GameDomainFactory.gameDomainCreator>();\r\n\t\tCreateGameDomain.put(\"TicTacToe\" , new ticTacToeCreator());\r\n\t\tCreateGameDomain.put(\"Reversi\", new CreatorReversi());\r\n\t}", "SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "public interface IEngineGenerator extends IEnergyProviders {\n\n\t/**\n\t * Check if there is no fuel\n\t * @return true if there is no fuel\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsEmpty() throws Exception;\n\n\t/**\n\t * Check if the engine generator is full\n\t * @return true if the engine generator is full\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsFull() throws Exception;\n\n\t/**\n\t * Get the quantity of fuel in the engine generator\n\t * @return quantity of fuel in the engine generator\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic double fuelQuantity() throws Exception;\n\n\t/**\n\t * Add fuel into the engine generator\n\t * @param quantity of fuel put into the engine generator (can't exceed the max capacity of the engine generator)\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void addFuel(int quantity) throws Exception;\n\n\t/**\n\t * Turn on the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void on() throws Exception; // use fuel to prod electricity\n\n\t/**\n\t * Turn off the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void off() throws Exception;\n\n\t/**\n\t * Check if the engine generator is on\n\t * @return\ttrue if the engine generator is on\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean isOn() throws Exception;\n\n}", "Gtr createGtr();", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public interface TechnologyModuleGUIFactory {\n\n\t/**\n\t * Create a new Browser element for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific element exists.\n\t * \n\t * @param object\n\t * @param browser\n\t * @param parent\n\t * @return the created Browser Element, or null.\n\t */\n\tpublic <T extends TechnologyModelObject> TechnologyModuleBrowserElement<T> createBrowserElement(T object, ProjectBrowser browser,\n\t\t\tBrowserElement parent);\n\n\t/**\n\t * Create a new model view for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific view exists.\n\t * \n\t * @param object\n\t * @param controller\n\t * @param codeGenerationPerspective\n\t * @return the created view or null.\n\t */\n\tpublic <T extends TechnologyModelObject> ModuleView<T> createModelView(T object, SGController controller,\n\t\t\tCodeGenerationPerspective codeGenerationPerspective);\n\n\t/**\n\t * Called at SG Module actions initialization. Used to record all Technology Module specific actions.\n\t * \n\t * @param actionInitializer\n\t */\n\tpublic void initializeActions(SGControllerActionInitializer actionInitializer);\n}", "private Engine() {\n\n }", "public TrainModelGUI CreateNewGUI() {\n //Create a GUI object\n \ttrainModelGUI = new TrainModelGUI(this);\n \tsetValuesForDisplay();\n \treturn trainModelGUI;\n }", "public static NewVehiclePG newVehiclePG(VehiclePG prototype) {\n return new VehiclePGImpl(prototype);\n }", "@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }", "public ObjectFactory() {\n super(grammarInfo);\n }", "public void create(CostEngineering costEngineering) {\n cost_engineering_dao.create(costEngineering);\n }", "public synchronized static void createEverbie (String name, Race race){\n \t\tif(!Everbie.exists()){\n \t\t\teverbie = new Everbie(name, race);\n \t\t}\n \t}", "public static void main(String[] args)\n\t{\tint generation = 0;\n\t\tint sum = 0;\n\t\tExecutor exec=new Executor();\n\t\t\n\t\tGeneticController pacman = new GeneticController();\n\t\tController<EnumMap<GHOST,MOVE>> ghosts = new Legacy();\n\n\n\t\tLispStatements ls = new LispStatements();\n\t\tArrayList<String> functionSet = new ArrayList<>();\n\t\tfunctionSet.add(\"2ifblue\");\n\t\tfunctionSet.add(\"4ifle\");\n\t\tfunctionSet.add(\"2ifindanger\");\n\t\tfunctionSet.add(\"2ifpowerpillscleared\");\n\t\tfunctionSet.add(\"2istopowersafe\");\n\t\tArrayList<String> terminalSet = new ArrayList<>();\n\t\tterminalSet.add(\"distToPill\");\n\t\tterminalSet.add(\"distToPower\");\n\t\tterminalSet.add(\"distGhost\");\n\t\tterminalSet.add(\"distTo2ndGhost\");\n\t\tterminalSet.add(\"distTo3rdGhost\");\n\t\tterminalSet.add(\"distToEdibleGhost\");\n\t\tterminalSet.add(\"distToNonEdibleGhost\");\n\t\tterminalSet.add(\"moveToFood\");\n\t\tterminalSet.add(\"moveToPower\");\n\t\tterminalSet.add(\"moveToEdibleGhost\");\n\t\tterminalSet.add(\"moveFromNonEdibleGhost\");\n\t\tterminalSet.add(\"moveFromPower\");\n\t\tterminalSet.add(\"runaway\");\n\t\ttry {\n\t\t\tls.setFunctionalSet(functionSet);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\t\tls.setTerminalSet(terminalSet);\n\t\ttry {\n\t\t\tGenetic.Executor.setUp(pacman, ls, 8);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\n\t\tdouble average = 0;\n\n\t\twhile (generation < 51) {\n\t\t\twhile (Generation.isGenFinished()) {\n\n\t\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\t\tint delay = 0;\n\t\t\t\t\t\tboolean visual = false;\n\t\t\t\t\t\tsum += exec.runGame(pacman, ghosts, visual, delay);\n\t\t\t\t\t}\n\n\t\t\t\t\tGeneration.setFitness(50000 - (sum/10));\n\t\t\t\t\tSystem.out.println(sum/10);\n\n\n\t\t\t\t\tsum = 0;\n\n\t\t\t\tGeneration.pointerUpdate();\n\t\t\t}\n\t\t\tSystem.out.println(\"Generation \" + generation);\n\t\t\tGenetic.Executor.newGen();\n\t\t\tSystem.out.println(Generation.getBestRating());\n\t\t\tgeneration ++;\n\t\t}\n\n\t\tSystem.out.println(Generation.getBestTree());\n\t\tSystem.out.println(Generation.getBestRating());\n\n\n\n/*\n\t\tboolean visual=false;\n\t\tString fileName=\"results/replay10.txt\";\n\n\t\tint bestScore = 0;\n\t\tint result = 0;\n\t\tint average = 0;\n\t\tfor(int i = 0; i < 1000 ; i++) {\n\t\t\tresult = exec.runGameTimedRecorded(pacman, ghosts, visual, fileName, bestScore);\n\t\t\taverage +=result;\n\t\t\tif(result > bestScore){\n\t\t\t\tbestScore = result;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tvisual = true;\n\t\tSystem.out.println(average/1000.0);\n\t\texec.replayGame(fileName,visual);\n\t\t*/\n\n\n\t}", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "Elevage createElevage();", "public abstract IExperiment createExperiment(String description);", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "@Override\r\n public void execute() throws BuildException { \r\n AbstractGenerator g;\r\n \r\n if (kind == null) {\r\n throw new BuildException(\"kind was not specified\");\r\n }\r\n final String k = kind.getValue();\r\n if (k.equals(INTERFACE)) {\r\n g = new InterfaceGen();\r\n }\r\n else if (k.equals(CRYSTAL)) {\r\n g = new CrystalGen();\r\n }\r\n else if (k.equals(OPERATOR)) {\r\n g = new OperatorGen();\r\n }\r\n else {\r\n throw new BuildException(\"Unknown kind was specified: \"+kind);\r\n }\r\n if (dest != null) {\r\n srcs.add(0, \"-out\");\r\n srcs.add(1, dest);\r\n }\r\n g.generate(srcs.toArray(new String[srcs.size()]));\r\n }", "public void create() {\n\t\t\n\t}", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "void init(@NotNull final AIEngine engine);", "public GeneticComputer(Role role) {\n super(role);\n }", "public static EglBase createEgl14(int[] configAttributes) {\n return new EglBase14(null /* shaderContext */, configAttributes);\n }", "public void newGame();", "public void newGame();", "public void newGame();", "@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}", "public void create() {\n\t\trandomUtil = new RandomUtil();\n\t\t// create the camera using the passed in viewport values\n\t\tcamera = new OrthographicCamera(viewPortWidth, viewPortHeight);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tdebugRender = new Box2DDebugRenderer(true, false, false, false, false, true);\n\t\ttestWorld = new TestWorld(assetManager.blockManager(), new Vector2(0, 0f));\n\t\ttestWorld.genWorld(debugUtil);\n\t\ttestWorld.setCamera(getCamera());\n\t\tplayer.createBody(testWorld.getWorld(), BodyType.DynamicBody);\n\t\ttestWorld.getPlayers().add(player);\n\t\tworldParser = new WorldParser(testWorld, \"Test World\");\n\t\tworldParser = new WorldParser(testWorld, \"Test Write\");\n\t\tworldParser.parseWorld();\n\t\twriter = new WorldWriter(\"Test Write\", testWorld);\n\t}", "public abstract World create(World world);", "public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }", "protected Gene newGeneInternal() {\n try {\n \tFloatGene result = new FloatGene(getConfiguration(), m_lowerBound,\n m_upperBound);\n return result;\n }\n catch (InvalidConfigurationException iex) {\n throw new IllegalStateException(iex.getMessage());\n }\n }", "private Fitness getFitnessObject() throws Exception{\n String fitnessClassname = \"\";\n try {\n fitnessClassname = getStringProperty(ParameterList.FITNESS_FUNCTION, false).replaceAll(\"\\\\s\", \"\");\n Class<?> fitnessClass = Class.forName(fitnessClassname);\n return (Fitness)fitnessClass.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the fitness function. Class \" + fitnessClassname + \" not found\", e);\n } \n }", "Vehicle createVehicle();", "Vehicle createVehicle();", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public Engine() throws Exception {\n\t\t// User interface initialization\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Initializing the user interface\");\n\t\t\t\tui = new UserInterface(this);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Scenario initialization\n\t\tscenario = new Scenario(ui);\n\n\t\t// load tool, drug and patient through scenario\n\t\tTool[] tools = scenario.readTool();\n\t\tDrug[] drugMap = scenario.readDrug();\n\t\tPatient patient = scenario.readPatient();\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\tfor (Tool tool : tools) {\n\t\t\t\tui.addTool(tool);\n\t\t\t}\n\t\t\tui.addDrug(drugMap);\n\t\t\tui.setPatientInfo(patient);\n\t\t}\n\n\t\t// set simulator and evaluator\n\t\tsimulator = new Simulator(patient);\n\t\tevaluator = new Evaluator(this);\n\t\t// Start looping\n\t\ttimer.scheduleAtFixedRate(new CoreTimerTask(1000, this), 0, 1000);\n\t}", "EClass createEClass();", "protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}", "public IChunkProvider createChunkGenerator()\n {\n return new ChunkProviderXirk(this.worldObj, this.worldObj.getSeed(), false);\n }", "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver();\n } else if (browser.equals(\"chrome\")) {\n ChromeOptions options = new ChromeOptions();\n options.setBinary(new File(chromeBinary));\n options.addArguments(\"--lang=\" + language);\n driver = new ChromeDriver(options);\n } else {\n System.out.println(\"can't read browser type\");\n }\n }", "public static void newGame(GameType t) {\n\t\ttype = t;\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "@Override\r\n\tpublic void engine() {\n\t\t\r\n\t}", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "static Game newGame(Player player1, Player player2, String fen) {\n return new GameImpl(player1, player2, fen);\n }", "public interface EncoreFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tEncoreFactory eINSTANCE = Encore.impl.EncoreFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Concierto</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Concierto</em>'.\n\t * @generated\n\t */\n\tConcierto createConcierto();\n\n\t/**\n\t * Returns a new object of class '<em>Cancion</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Cancion</em>'.\n\t * @generated\n\t */\n\tCancion createCancion();\n\n\t/**\n\t * Returns a new object of class '<em>Secuencia</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Secuencia</em>'.\n\t * @generated\n\t */\n\tSecuencia createSecuencia();\n\n\t/**\n\t * Returns a new object of class '<em>Foco</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Foco</em>'.\n\t * @generated\n\t */\n\tFoco createFoco();\n\n\t/**\n\t * Returns a new object of class '<em>Strobo</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Strobo</em>'.\n\t * @generated\n\t */\n\tStrobo createStrobo();\n\n\t/**\n\t * Returns a new object of class '<em>Union Cancion Secuencia</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Union Cancion Secuencia</em>'.\n\t * @generated\n\t */\n\tUnionCancionSecuencia createUnionCancionSecuencia();\n\n\t/**\n\t * Returns a new object of class '<em>Union Secuencia Luz</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Union Secuencia Luz</em>'.\n\t * @generated\n\t */\n\tUnionSecuenciaLuz createUnionSecuenciaLuz();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tEncorePackage getEncorePackage();\n\n}", "Nexo createNexo();", "public static void main(String[] args) {\n \tString file = \"ensembl_genes.txt\";\r\n \tString dbname = \"ensembl_homo_sapiens_38_36\";\r\n \tEnsembl2Visio ensj = new Ensembl2Visio();\r\n // \tensj.fetchFromEnsembl(nrGenes, organism, file); // Do this with perl\r\n \tensj.createGdbFromTxt(file, dbname);\r\n }", "public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}", "public abstract void generate();", "public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }", "public static void main(String[] args) {\n\t\tfinal Engine<DoubleGene, Double> engine = Engine\n\t\t\t\t.builder(JeneticsDemo2::eval, Codecs.ofScalar(DoubleRange.of(0, 2 * Math.PI)))\n\t\t\t\t\t.populationSize(500)\n\t\t\t\t\t.optimize(Optimize.MINIMUM)\n\t\t\t\t\t.offspringSelector(new StochasticUniversalSelector<>())\n\t\t\t\t\t.alterers(new Mutator<>(0.03), new MeanAlterer<>(0.6))\n\t\t\t\t\t.build();\n\n\t\t// Execute the GA (engine).\n\t\tfinal Phenotype<DoubleGene, Double> result = engine.stream()\n\t\t\t\t// Truncate the evolution stream if no better individual could\n\t\t\t\t// be found after 5 consecutive generations.\n\t\t\t\t.limit(Limits.bySteadyFitness(5))\n\t\t\t\t// Terminate the evolution after maximal 100 generations.\n\t\t\t\t.limit(100).collect(EvolutionResult.toBestPhenotype());\n\t\t\n\t\tSystem.out.println(\"Best GenoType: \" + result);\n\t}", "public static NewStockPG newStockPG(StockPG prototype) {\n return new StockPGImpl(prototype);\n }" ]
[ "0.6503695", "0.61801684", "0.61295015", "0.5604171", "0.5595854", "0.5568758", "0.55376774", "0.5529963", "0.55271775", "0.5515152", "0.55031335", "0.54652244", "0.5461561", "0.54511535", "0.5402805", "0.5398136", "0.5352323", "0.5313883", "0.5308805", "0.52984333", "0.5273486", "0.5260385", "0.52575344", "0.52376807", "0.5235196", "0.5224968", "0.5224968", "0.5224968", "0.51938444", "0.51734", "0.5169161", "0.51396453", "0.51334655", "0.5132167", "0.51149815", "0.50920165", "0.5084244", "0.5080721", "0.50762296", "0.50691295", "0.5066027", "0.5056158", "0.50536174", "0.50509816", "0.5045683", "0.5034184", "0.5033357", "0.5032421", "0.50277865", "0.5018635", "0.5016563", "0.49991935", "0.49977353", "0.49956766", "0.49947047", "0.49912804", "0.49894702", "0.4988561", "0.49784964", "0.4973014", "0.49640623", "0.49581802", "0.49522594", "0.4932873", "0.49310362", "0.49232784", "0.4919548", "0.4918386", "0.49181443", "0.49181443", "0.49181443", "0.4914726", "0.49127853", "0.491109", "0.49076876", "0.49009627", "0.48963684", "0.48951334", "0.48951334", "0.48896968", "0.48868236", "0.48848447", "0.48791736", "0.48779204", "0.48757", "0.48727742", "0.4872139", "0.4859929", "0.48570016", "0.4846974", "0.4846974", "0.48443654", "0.48415974", "0.48405394", "0.4840126", "0.4833462", "0.48311958", "0.4830695", "0.48124835", "0.4812417" ]
0.5460583
13
Creates a new genetic engine.
public GeneticEngine(int popSize, int maxGen, int chromosomeLength) { avgFitnesses = new ArrayList<Double>(); highFitnesses = new ArrayList<Double>(); populationSize = popSize; maxGenerations = maxGen; chromosomeSize = chromosomeLength; initializePopulation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GeneticEngine() {\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n population = null;\n crossoverProbability = 0.07;\n mutationProbability = 0.001;\n maxGenerations = Integer.MAX_VALUE;\n }", "public Genetic() {\r\n }", "TGG createTGG();", "public void generateGenes() {\n\t\tfor(int i = 0; i < geneNumber; i++){\n\t\t\tdouble[] vector = new double[NUM_HEURISTICS];\n\t\t\tfor(int j = 0; j < NUM_HEURISTICS; j++){\n\t\t\t\t// To get a number in [-0.5, 0.5)\n\t\t\t\tvector[j] = Math.random() - 0.5;\n\t\t\t}\n\t\t\tGene newGene = new Gene(vector, true);\n\t\t\tgenepool.add(newGene);\n\t\t}\n\t}", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "@Override\r\n public EngineInjection createEngineInjection() {\r\n return new Turbofan();\r\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "@Override\n public String getName() {\n return \"Genetic\";\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public static Gng init() {\n return new Gng();\n }", "public GeneticEngine(int popSize, double crossoverRate,\n double mutationRate, int maxGen, int chromosomeLength) {\n\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n populationSize = popSize;\n crossoverProbability = crossoverRate;\n mutationProbability = mutationRate;\n maxGenerations = maxGen;\n chromosomeSize = chromosomeLength;\n initializePopulation();\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public IntegerGenotype create() \r\n\t{\n\t\tIntegerGenotype genotype = new IntegerGenotype(1,3);\r\n\t\tgenotype.init(new Random(), Data.numeroCuardillas); \r\n\t\t\r\n\t\treturn genotype;\r\n\t}", "public static IXccdfEngine createEngine(IPlugin plugin, SystemEnumeration... systems) {\r\n \treturn new OEMEngine(plugin, systems);\r\n }", "private GeneProduct createGeneProduct( Gene gene ) {\n GeneProduct geneProduct = GeneProduct.Factory.newInstance();\n geneProduct.setGene( gene );\n geneProduct.setName( gene.getName() );\n geneProduct.setDescription( \"Gene product placeholder\" );\n return geneProduct;\n }", "public static IXccdfEngine createEngine(IPlugin plugin) {\r\n \treturn new OEMEngine(plugin, SystemEnumeration.ANY);\r\n }", "public abstract void createGenome(Genome newGenome);", "Analytics_Engine createAnalytics_Engine();", "public Game createGame();", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "IGraphEngine graphEngineFactory();", "public PedGenie ( IOManager im, String application_id ) throws GEException\n {\n io_mgr = im;\n spec = io_mgr.getSpecification();\n Study[] study = io_mgr.getStudy();\n tSim = spec.getTopSim();\n dSim = spec.getDropSim();\n theAnalyses = spec.getCCAnalyses();\n nCycles = spec.getNumberOfSimulations();\n \n if( nCycles < 1000 )\n {\n sigCycles = nCycles;\n }\n else\n {\n sigCycles = 1000;\n }\n \n numGDef = spec.getGDef().getLocusCount();\n app_id = application_id;\n \n initializeSimulator(tSim, spec, study);\n initializeSimulator(dSim, spec, study);\n \n if( app_id.equals(\"hapConstructor\") )\n {\n int[] loci = new int[numGDef];\n \n for( int j =0; j < numGDef; j ++ )\n {\n loci[j] = j;\n }\n \n Study[] istudy = spec.getStudy();\n study_Gtypes = new compressGtype[istudy.length];\n initiate_cGtypes(istudy,loci);\n \n String[] models = spec.gethapC_models();\n List<String>a = new ArrayList<String>();\n \n for( int j = 0; j < models.length; j++ )\n {\n a.add(models[j]);\n }\n setupModels(a, spec);\n }\n \n if ( theAnalyses.length > 0 )\n {\n System.out.println(\"Getting subjects...\");\n for ( int i = 0; i < theAnalyses.length; ++i )\n {\n theAnalyses[i].setStudySubjects(study);\n }\n }\n }", "public static GenomeAdapter createGenome(String name, int length) {\n return new Genome(name, length);\n }", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "Program createProgram();", "Program createProgram();", "Program createProgram();", "public void createG1(String eq){\n graph1 = false;\n Equation e1 = new Equation(eq);\n q1 = new XYPoints(e1, range);\n createCP(range);\n executeGraphs();\n updateGraph(q1);\n graph1 = true;\n }", "void create(GameLogic gameLogic);", "public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}", "static public InstanceGenerator create(String className, Instances training, Instances testing)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(Instances.class, Instances.class).newInstance(training, testing);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }", "public StrategyByGA(double ProbabilityOfCooperatingGivenCooperation,\n double ProbabilityOfCooperatingGivenDefection) {\n\n name = \"Strategy Developed by the Genetic Algorithm\";\n opponentLastMove = 1;\n proCoopGivCoop = ProbabilityOfCooperatingGivenCooperation;\n proCoopGivDef = ProbabilityOfCooperatingGivenDefection;\n }", "public Egrga() {\r\n\t}", "public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }", "private Gene createGene( String[] fields, Taxon taxon ) {\n\n assert fields.length > 1;\n\n String geneSymbol = fields[0];\n String geneName = fields[1];\n String uniProt = \"\";\n if ( fields.length > 2 )\n uniProt = fields[2];\n Gene gene;\n // need at least the gene symbol and gene name\n if ( StringUtils.isBlank( geneSymbol ) || StringUtils.isBlank( geneName ) ) {\n log.warn( \"Line did not contain valid gene information; GeneSymbol=\" + geneSymbol + \"GeneName=\" + geneName\n + \" UniProt=\" + uniProt );\n return null;\n }\n\n if ( log.isDebugEnabled() )\n log.debug( \"Creating gene \" + geneSymbol );\n gene = geneService.findByOfficialSymbol( geneSymbol, taxon );\n\n if ( gene != null ) {\n Collection<GeneProductValueObject> existingProducts = geneService.getProducts( gene.getId() );\n if ( existingProducts.isEmpty() ) {\n log.warn( \"Gene \" + gene + \" exists, but has no products; adding one\" );\n gene = geneService.thaw( gene );\n GeneProduct newgp = createGeneProduct( gene );\n newgp = geneProductService.create( newgp );\n gene.getProducts().add( newgp );\n geneService.update( gene );\n return gene;\n }\n log.info( gene + \" already exists and is valid, will not update\" );\n return null; // no need to create it, though we ignore the name.\n\n }\n\n gene = Gene.Factory.newInstance();\n gene.setName( geneSymbol );\n gene.setOfficialSymbol( geneSymbol );\n gene.setOfficialName( StringUtils.lowerCase( geneName ) );\n gene.setDescription( \"Imported from external annotation file\" );\n gene.setTaxon( taxon );\n gene.getProducts().add( createGeneProduct( gene ) );\n gene = ( Gene ) persisterHelper.persistOrUpdate( gene );\n return gene;\n }", "private void initGP() {\n log.info(\"Initializing GP\");\n geneticProgram.addPopulationObserver(this);\n geneticProgram.initialize();\n frontRunner = geneticProgram.getProgram(0); // A safe default\n }", "public Game createGame(int numberOfPlayers) {\n return new Game(numberOfPlayers);\n }", "public void createGame();", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public GameDomainFactory() {\r\n\t\t\r\n\t\tCreateGameDomain = new HashMap<String, GameDomainFactory.gameDomainCreator>();\r\n\t\tCreateGameDomain.put(\"TicTacToe\" , new ticTacToeCreator());\r\n\t\tCreateGameDomain.put(\"Reversi\", new CreatorReversi());\r\n\t}", "SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "Gtr createGtr();", "public interface IEngineGenerator extends IEnergyProviders {\n\n\t/**\n\t * Check if there is no fuel\n\t * @return true if there is no fuel\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsEmpty() throws Exception;\n\n\t/**\n\t * Check if the engine generator is full\n\t * @return true if the engine generator is full\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsFull() throws Exception;\n\n\t/**\n\t * Get the quantity of fuel in the engine generator\n\t * @return quantity of fuel in the engine generator\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic double fuelQuantity() throws Exception;\n\n\t/**\n\t * Add fuel into the engine generator\n\t * @param quantity of fuel put into the engine generator (can't exceed the max capacity of the engine generator)\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void addFuel(int quantity) throws Exception;\n\n\t/**\n\t * Turn on the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void on() throws Exception; // use fuel to prod electricity\n\n\t/**\n\t * Turn off the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void off() throws Exception;\n\n\t/**\n\t * Check if the engine generator is on\n\t * @return\ttrue if the engine generator is on\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean isOn() throws Exception;\n\n}", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "public interface TechnologyModuleGUIFactory {\n\n\t/**\n\t * Create a new Browser element for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific element exists.\n\t * \n\t * @param object\n\t * @param browser\n\t * @param parent\n\t * @return the created Browser Element, or null.\n\t */\n\tpublic <T extends TechnologyModelObject> TechnologyModuleBrowserElement<T> createBrowserElement(T object, ProjectBrowser browser,\n\t\t\tBrowserElement parent);\n\n\t/**\n\t * Create a new model view for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific view exists.\n\t * \n\t * @param object\n\t * @param controller\n\t * @param codeGenerationPerspective\n\t * @return the created view or null.\n\t */\n\tpublic <T extends TechnologyModelObject> ModuleView<T> createModelView(T object, SGController controller,\n\t\t\tCodeGenerationPerspective codeGenerationPerspective);\n\n\t/**\n\t * Called at SG Module actions initialization. Used to record all Technology Module specific actions.\n\t * \n\t * @param actionInitializer\n\t */\n\tpublic void initializeActions(SGControllerActionInitializer actionInitializer);\n}", "public TrainModelGUI CreateNewGUI() {\n //Create a GUI object\n \ttrainModelGUI = new TrainModelGUI(this);\n \tsetValuesForDisplay();\n \treturn trainModelGUI;\n }", "private Engine() {\n\n }", "public static NewVehiclePG newVehiclePG(VehiclePG prototype) {\n return new VehiclePGImpl(prototype);\n }", "@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }", "public ObjectFactory() {\n super(grammarInfo);\n }", "public void create(CostEngineering costEngineering) {\n cost_engineering_dao.create(costEngineering);\n }", "public static void main(String[] args)\n\t{\tint generation = 0;\n\t\tint sum = 0;\n\t\tExecutor exec=new Executor();\n\t\t\n\t\tGeneticController pacman = new GeneticController();\n\t\tController<EnumMap<GHOST,MOVE>> ghosts = new Legacy();\n\n\n\t\tLispStatements ls = new LispStatements();\n\t\tArrayList<String> functionSet = new ArrayList<>();\n\t\tfunctionSet.add(\"2ifblue\");\n\t\tfunctionSet.add(\"4ifle\");\n\t\tfunctionSet.add(\"2ifindanger\");\n\t\tfunctionSet.add(\"2ifpowerpillscleared\");\n\t\tfunctionSet.add(\"2istopowersafe\");\n\t\tArrayList<String> terminalSet = new ArrayList<>();\n\t\tterminalSet.add(\"distToPill\");\n\t\tterminalSet.add(\"distToPower\");\n\t\tterminalSet.add(\"distGhost\");\n\t\tterminalSet.add(\"distTo2ndGhost\");\n\t\tterminalSet.add(\"distTo3rdGhost\");\n\t\tterminalSet.add(\"distToEdibleGhost\");\n\t\tterminalSet.add(\"distToNonEdibleGhost\");\n\t\tterminalSet.add(\"moveToFood\");\n\t\tterminalSet.add(\"moveToPower\");\n\t\tterminalSet.add(\"moveToEdibleGhost\");\n\t\tterminalSet.add(\"moveFromNonEdibleGhost\");\n\t\tterminalSet.add(\"moveFromPower\");\n\t\tterminalSet.add(\"runaway\");\n\t\ttry {\n\t\t\tls.setFunctionalSet(functionSet);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\t\tls.setTerminalSet(terminalSet);\n\t\ttry {\n\t\t\tGenetic.Executor.setUp(pacman, ls, 8);\n\t\t}catch (Exception ignored){\n\n\t\t}\n\n\t\tdouble average = 0;\n\n\t\twhile (generation < 51) {\n\t\t\twhile (Generation.isGenFinished()) {\n\n\t\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\t\tint delay = 0;\n\t\t\t\t\t\tboolean visual = false;\n\t\t\t\t\t\tsum += exec.runGame(pacman, ghosts, visual, delay);\n\t\t\t\t\t}\n\n\t\t\t\t\tGeneration.setFitness(50000 - (sum/10));\n\t\t\t\t\tSystem.out.println(sum/10);\n\n\n\t\t\t\t\tsum = 0;\n\n\t\t\t\tGeneration.pointerUpdate();\n\t\t\t}\n\t\t\tSystem.out.println(\"Generation \" + generation);\n\t\t\tGenetic.Executor.newGen();\n\t\t\tSystem.out.println(Generation.getBestRating());\n\t\t\tgeneration ++;\n\t\t}\n\n\t\tSystem.out.println(Generation.getBestTree());\n\t\tSystem.out.println(Generation.getBestRating());\n\n\n\n/*\n\t\tboolean visual=false;\n\t\tString fileName=\"results/replay10.txt\";\n\n\t\tint bestScore = 0;\n\t\tint result = 0;\n\t\tint average = 0;\n\t\tfor(int i = 0; i < 1000 ; i++) {\n\t\t\tresult = exec.runGameTimedRecorded(pacman, ghosts, visual, fileName, bestScore);\n\t\t\taverage +=result;\n\t\t\tif(result > bestScore){\n\t\t\t\tbestScore = result;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tvisual = true;\n\t\tSystem.out.println(average/1000.0);\n\t\texec.replayGame(fileName,visual);\n\t\t*/\n\n\n\t}", "public synchronized static void createEverbie (String name, Race race){\n \t\tif(!Everbie.exists()){\n \t\t\teverbie = new Everbie(name, race);\n \t\t}\n \t}", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "Elevage createElevage();", "public abstract IExperiment createExperiment(String description);", "public Guppy() {\n this(DEFAULT_GENUS, DEFAULT_SPECIES, 0, true, 0,\n DEFAULT_HEALTH_COEFFICIENT);\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "@Override\r\n public void execute() throws BuildException { \r\n AbstractGenerator g;\r\n \r\n if (kind == null) {\r\n throw new BuildException(\"kind was not specified\");\r\n }\r\n final String k = kind.getValue();\r\n if (k.equals(INTERFACE)) {\r\n g = new InterfaceGen();\r\n }\r\n else if (k.equals(CRYSTAL)) {\r\n g = new CrystalGen();\r\n }\r\n else if (k.equals(OPERATOR)) {\r\n g = new OperatorGen();\r\n }\r\n else {\r\n throw new BuildException(\"Unknown kind was specified: \"+kind);\r\n }\r\n if (dest != null) {\r\n srcs.add(0, \"-out\");\r\n srcs.add(1, dest);\r\n }\r\n g.generate(srcs.toArray(new String[srcs.size()]));\r\n }", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "public void create() {\n\t\t\n\t}", "public GeneticComputer(Role role) {\n super(role);\n }", "public static EglBase createEgl14(int[] configAttributes) {\n return new EglBase14(null /* shaderContext */, configAttributes);\n }", "void init(@NotNull final AIEngine engine);", "public void newGame();", "public void newGame();", "public void newGame();", "@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}", "public void create() {\n\t\trandomUtil = new RandomUtil();\n\t\t// create the camera using the passed in viewport values\n\t\tcamera = new OrthographicCamera(viewPortWidth, viewPortHeight);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tdebugRender = new Box2DDebugRenderer(true, false, false, false, false, true);\n\t\ttestWorld = new TestWorld(assetManager.blockManager(), new Vector2(0, 0f));\n\t\ttestWorld.genWorld(debugUtil);\n\t\ttestWorld.setCamera(getCamera());\n\t\tplayer.createBody(testWorld.getWorld(), BodyType.DynamicBody);\n\t\ttestWorld.getPlayers().add(player);\n\t\tworldParser = new WorldParser(testWorld, \"Test World\");\n\t\tworldParser = new WorldParser(testWorld, \"Test Write\");\n\t\tworldParser.parseWorld();\n\t\twriter = new WorldWriter(\"Test Write\", testWorld);\n\t}", "public abstract World create(World world);", "public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }", "protected Gene newGeneInternal() {\n try {\n \tFloatGene result = new FloatGene(getConfiguration(), m_lowerBound,\n m_upperBound);\n return result;\n }\n catch (InvalidConfigurationException iex) {\n throw new IllegalStateException(iex.getMessage());\n }\n }", "private Fitness getFitnessObject() throws Exception{\n String fitnessClassname = \"\";\n try {\n fitnessClassname = getStringProperty(ParameterList.FITNESS_FUNCTION, false).replaceAll(\"\\\\s\", \"\");\n Class<?> fitnessClass = Class.forName(fitnessClassname);\n return (Fitness)fitnessClass.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the fitness function. Class \" + fitnessClassname + \" not found\", e);\n } \n }", "Vehicle createVehicle();", "Vehicle createVehicle();", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public Engine() throws Exception {\n\t\t// User interface initialization\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Initializing the user interface\");\n\t\t\t\tui = new UserInterface(this);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\t// Scenario initialization\n\t\tscenario = new Scenario(ui);\n\n\t\t// load tool, drug and patient through scenario\n\t\tTool[] tools = scenario.readTool();\n\t\tDrug[] drugMap = scenario.readDrug();\n\t\tPatient patient = scenario.readPatient();\n\t\tif (Setting.LOCAL_MODE) {\n\t\t\tfor (Tool tool : tools) {\n\t\t\t\tui.addTool(tool);\n\t\t\t}\n\t\t\tui.addDrug(drugMap);\n\t\t\tui.setPatientInfo(patient);\n\t\t}\n\n\t\t// set simulator and evaluator\n\t\tsimulator = new Simulator(patient);\n\t\tevaluator = new Evaluator(this);\n\t\t// Start looping\n\t\ttimer.scheduleAtFixedRate(new CoreTimerTask(1000, this), 0, 1000);\n\t}", "EClass createEClass();", "public IChunkProvider createChunkGenerator()\n {\n return new ChunkProviderXirk(this.worldObj, this.worldObj.getSeed(), false);\n }", "protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}", "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver();\n } else if (browser.equals(\"chrome\")) {\n ChromeOptions options = new ChromeOptions();\n options.setBinary(new File(chromeBinary));\n options.addArguments(\"--lang=\" + language);\n driver = new ChromeDriver(options);\n } else {\n System.out.println(\"can't read browser type\");\n }\n }", "public static void newGame(GameType t) {\n\t\ttype = t;\n\t}", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "@Override\r\n\tpublic void engine() {\n\t\t\r\n\t}", "static Game newGame(Player player1, Player player2, String fen) {\n return new GameImpl(player1, player2, fen);\n }", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "public interface EncoreFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tEncoreFactory eINSTANCE = Encore.impl.EncoreFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Concierto</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Concierto</em>'.\n\t * @generated\n\t */\n\tConcierto createConcierto();\n\n\t/**\n\t * Returns a new object of class '<em>Cancion</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Cancion</em>'.\n\t * @generated\n\t */\n\tCancion createCancion();\n\n\t/**\n\t * Returns a new object of class '<em>Secuencia</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Secuencia</em>'.\n\t * @generated\n\t */\n\tSecuencia createSecuencia();\n\n\t/**\n\t * Returns a new object of class '<em>Foco</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Foco</em>'.\n\t * @generated\n\t */\n\tFoco createFoco();\n\n\t/**\n\t * Returns a new object of class '<em>Strobo</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Strobo</em>'.\n\t * @generated\n\t */\n\tStrobo createStrobo();\n\n\t/**\n\t * Returns a new object of class '<em>Union Cancion Secuencia</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Union Cancion Secuencia</em>'.\n\t * @generated\n\t */\n\tUnionCancionSecuencia createUnionCancionSecuencia();\n\n\t/**\n\t * Returns a new object of class '<em>Union Secuencia Luz</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Union Secuencia Luz</em>'.\n\t * @generated\n\t */\n\tUnionSecuenciaLuz createUnionSecuenciaLuz();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tEncorePackage getEncorePackage();\n\n}", "public static void main(String[] args) {\n \tString file = \"ensembl_genes.txt\";\r\n \tString dbname = \"ensembl_homo_sapiens_38_36\";\r\n \tEnsembl2Visio ensj = new Ensembl2Visio();\r\n // \tensj.fetchFromEnsembl(nrGenes, organism, file); // Do this with perl\r\n \tensj.createGdbFromTxt(file, dbname);\r\n }", "Nexo createNexo();", "public abstract void generate();", "public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}", "public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }", "public static void main(String[] args) {\n\t\tfinal Engine<DoubleGene, Double> engine = Engine\n\t\t\t\t.builder(JeneticsDemo2::eval, Codecs.ofScalar(DoubleRange.of(0, 2 * Math.PI)))\n\t\t\t\t\t.populationSize(500)\n\t\t\t\t\t.optimize(Optimize.MINIMUM)\n\t\t\t\t\t.offspringSelector(new StochasticUniversalSelector<>())\n\t\t\t\t\t.alterers(new Mutator<>(0.03), new MeanAlterer<>(0.6))\n\t\t\t\t\t.build();\n\n\t\t// Execute the GA (engine).\n\t\tfinal Phenotype<DoubleGene, Double> result = engine.stream()\n\t\t\t\t// Truncate the evolution stream if no better individual could\n\t\t\t\t// be found after 5 consecutive generations.\n\t\t\t\t.limit(Limits.bySteadyFitness(5))\n\t\t\t\t// Terminate the evolution after maximal 100 generations.\n\t\t\t\t.limit(100).collect(EvolutionResult.toBestPhenotype());\n\t\t\n\t\tSystem.out.println(\"Best GenoType: \" + result);\n\t}", "public static NewStockPG newStockPG(StockPG prototype) {\n return new StockPGImpl(prototype);\n }" ]
[ "0.65042233", "0.61813843", "0.61318886", "0.5606636", "0.5590519", "0.55648935", "0.5535998", "0.55309504", "0.5529874", "0.5501122", "0.5463428", "0.54625285", "0.546244", "0.54519033", "0.5398963", "0.53975314", "0.534858", "0.53160053", "0.53058183", "0.5297734", "0.5274866", "0.52590984", "0.5258685", "0.5240526", "0.52312547", "0.52233315", "0.52233315", "0.52233315", "0.5195782", "0.5171479", "0.5167246", "0.51408607", "0.5133408", "0.5128801", "0.51183003", "0.50912815", "0.5082513", "0.50815266", "0.5077974", "0.50688004", "0.50648344", "0.5052477", "0.50520366", "0.5050621", "0.50420815", "0.5036076", "0.5033278", "0.50299287", "0.50281024", "0.5015884", "0.5014036", "0.49997607", "0.4995305", "0.49934596", "0.49921003", "0.49897328", "0.49875757", "0.49865916", "0.49765292", "0.49709615", "0.49662495", "0.49566168", "0.49541542", "0.493374", "0.49306816", "0.49196663", "0.49191037", "0.49176714", "0.49173594", "0.49173594", "0.49173594", "0.49115628", "0.49105746", "0.49091175", "0.49072456", "0.49031228", "0.48968586", "0.48931247", "0.48931247", "0.48898593", "0.4884508", "0.48819888", "0.48795998", "0.48762202", "0.48751974", "0.48716372", "0.4871052", "0.4859444", "0.48526666", "0.4843389", "0.48420033", "0.48420033", "0.48410454", "0.48396313", "0.48395348", "0.4832417", "0.48317248", "0.48288786", "0.48133847", "0.48131984" ]
0.5516438
9
Sets a random, starting population.
private void initializePopulation() { // reset the population population = new ArrayList<Genotype>(); // set the population to an array of random genotypes for (int i = 0; i < populationSize; i++) { population.add(new Genotype(chromosomeSize)); } // evaluate the population // evaluatePopulation(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public void initialiseNewRandomPopulation(Random rnd) {\n\t\tthis.population = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < this.popSize; i++) {\t\t\t\t\t//FOR ALL DESIRED POPULATION SIZE\n\t\t\tdouble[] randomValues = new double[DIMENSIONS];\t\t\t//INITIATE RANDOM X ARRAY WITH CORRECT DIMENSIONS\n\t\t\tfor (int j = 0; j < DIMENSIONS; j++) {\t\t\t\t\t//CREATE RANDOM X VALUES\n\t\t\t\trandomValues[j] = -5 + rnd.nextDouble() * 10;\t\t//ASSIGN VALUES TO EACH POSITION IN ARRAY\n\t\t\t}\n\t\t\tIndividual newInd = new Individual(randomValues);\t\t//CREATE NEW INDIVIDUAL WITH RANDOM X VALUES\n\t\t\tthis.population.add(newInd);\t\t\t\t\t\t\t//ADD INDIVIDUAL TO POPULATION\n\t\t}\n\t}", "public void setPoputlation (double population) { n.setPopulation(population); }", "public void setRandom(Random r) {\n this.r = r;\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}", "public void setpopulation(int population) {\n this.population = population;\n }", "public void SetRandom(boolean random);", "public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}", "public void setRandomGenes(int i){\n if (i > populationSize){\n throw new IllegalArgumentException(\"The number of random genes per generation must not be greater than the population size\");\n }\n randGenes = i;\n }", "public void setSeed(int seed){\n\t\tmyRandom = new Random(seed);\n\t}", "@Override\n\tpublic void setStartPopulation(List<BitString> seedPopulation) {\n\t\t\n\t}", "public void setPopulation(int population) {\n this.population = population;\n }", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "public void setPopulation(int population) {\n\n this.population = population;\n }", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "public void setRandom(boolean random){\n this.random = random;\n }", "public static void randomInit(int r) { }", "RoachPopulation(int initial)\n {\n roaches = initial;\n }", "public void setRandomSpawn(final Random random)\r\n {\r\n final List<Double> rows = new ArrayList<>();\r\n \r\n final double column;\r\n \r\n //get a random true/false result\r\n if (random.nextBoolean())\r\n {\r\n //here we will do west\r\n column = 0.5;\r\n }\r\n else\r\n {\r\n //here we will do east\r\n column = COLUMNS - 0.5;\r\n }\r\n \r\n for (double row=0; row < ROWS; row++)\r\n {\r\n //if platform exists add this as a possibility\r\n if (getObject(Type.Platform, (int)column, row) != null)\r\n rows.add(row);\r\n }\r\n \r\n super.setCol(column);\r\n \r\n final int index = random.nextInt(rows.size());\r\n super.setRow(rows.get(index) + 0.5);\r\n }", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "public void setPopulation(Integer population) {\n this.population = population;\n }", "private void random() {\n\n\t}", "public void begin(GameState init_state) {\n rand = new Random();\n }", "public void setToRandomValue(RandomGenerator a_numberGenerator) {\n // maps the randomly determined value to the current bounds.\n // ---------------------------------------------------------\n setAllele(new Float( (m_upperBound - m_lowerBound) *\n a_numberGenerator.nextFloat() + m_lowerBound));\n }", "void reset(int randomseed);", "public void setRandomX(int x) {\r\n\t\tthis.x1 = (int) (Math.random()*1000);\r\n\t}", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "public void setDamage() {\n\t\tRandom rand = new Random();\n\t\tint damage = rand.nextInt(getMaxDamage()) + 1;\n\t\tthis.damage = damage;\n\t}", "public void setRNG(long seed);", "public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}", "public final void randomSeed(long what){\n\t\tsetSeed(what);\n\t\trandom();\n\t}", "@Override\n\tpublic void setToRandomValue(RandomGenerator a_numberGenerator) {\n\n\t}", "public abstract void initiateRandomCells(double probabilityForEachCell);", "private void loadRandomState() {\n patternName = \"Random\";\n\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n\n generations = 0;\n }", "public void setRandomShape()\n\t{\n\t\tvar rand = new Random();\n\t\tint x = Math.abs(rand.nextInt())%7 + 1;\n\t\t\n\t\tTetromino[] values = Tetromino.values();\n\t\tsetShape (values[x]);\n\t}", "public void setSeed(int seed){\n this.seed = seed; \n }", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "protected void onChange_InitPopulation() {\n onChange_InitPopulation_xjal( InitPopulation );\n }", "void setSeed(long seed);", "public void init( int pointDimension, long randomSeed );", "private static void InitRandBag()\n {\n int k=(int)Math.floor(Math.random()*50);\n R[0]=k;\n\n //Generate the rest of the numbers\n for(int i=1;i<950;i++)\n {\n k=k+(int)Math.floor(Math.random()*50);\n R[i]=k;\n }\n\n //Shuffle the list\n for(int i=0;i<950;i++)\n {\n int temp = R[i];\n k = (int)Math.floor(Math.random()*950);\n R[i]=R[k];\n R[k]=temp;\n }\n }", "public void growPop(){\n pop += (int) Math.floor(1 + Math.random()*(0.01*pop));\n if(pop < 0){\n pop = 0;\n }\n }", "public GridSimRandom(long seed) {\n random_.setSeed(seed);\n }", "void setRandomize(Boolean setting);", "@Before\n public void setUp() {\n randSeeder = new Random(42);\n\n //Show we haven't seeded the test's random number generator\n randSeed = RAND_UNSEEDED;\n comp = IntPlus.getIntComparator();\n }", "public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}", "public static void setSeed( long seed ) {\n random = new Random( seed );\n }", "public void setRandomSeed(long seed) {\n randomGenerator.setSeed(seed);\n }", "public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}", "private int[][] generateInitialPopulation(int binCt, int binSize, int pkgCt, int populationSize) {\n\t\tint[][] population = new int[populationSize][pkgCt];\n\t\tfor (int i = 0; i < populationSize; i++) {\n\t\t\tfor (int j = 0; j < pkgCt; j++) {\n\t\t\t\tpopulation[i][j] = rand.nextInt(binCt);\n\t\t\t}\n\t\t}\n\t\treturn population;\n\t}", "public void reset() {\n x = random(-2*width, 3*width); // set the x position\n y = random(-height, 2*height); // set the y position\n c[0] = color(random(150, 255), random(150, 255), random(150, 255)); // set the top color (a bit lighter)\n // randomly set the 4 colors in the base of the shape\n for (int i=1; i<5; i++) {\n c[i] = color(random(255), random(255), random(255)); // random RGB color\n }\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public WB_RandomPoint setSeed(final long seed);", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "void setSeed(final long seed);", "public void setSeed(int seed) {\r\n this.seed = seed;\r\n }", "public void reproduce(){\n\t\t// sort the population from strongest to weakest\n\t\tCollections.sort(population);\n\t\tCollections.reverse(population);\n\t\t\n\t\tfor(int i = 0; i < (int)(POPULATION_SIZE*POPULATION_ACTION_PERCENT); i+=2){\n\t\t\t\n\t\t\t// get two random indexes for reproduction based on the exponential function\n\t\t\t// (1/1000) * (randInt)^2 = index\n\t\t\t// this function favors sequences with higher fitness scores\n\t\t\tint randIndex1 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\tint randIndex2 = randomGenerator.nextInt((int)Math.sqrt(1000*POPULATION_SIZE*(1-POPULATION_ACTION_PERCENT)));\n\t\t\t\n\t\t\trandIndex1 = (int) (Math.pow(randIndex1, 2) / 1000);\n\t\t\trandIndex2 = (int) (Math.pow(randIndex2, 2) / 1000);\n\t\t\t\n\t\t\t// get two pieces\n\t\t\tBuildingPiece[] array1 = population.get(randIndex1).getList();\n\t\t\tBuildingPiece[] array2 = population.get(randIndex2).getList();\n\t\t\t\n\t\t\t// find a splicing point\n\t\t\tint splicePoint = findSplicingPoint(array1, array2);\n\t\t\t\n\t\t\t// generate two new arrays based on the splicing point\n\t\t\tBuildingPiece[] newArray1 = generateNewArray(array1, array2, splicePoint);\n\t\t\tBuildingPiece[] newArray2 = generateNewArray(array2, array1, splicePoint);\n\t\t\t\n\t\t\t// make new buildings with the new arrays\n\t\t\tBuilding bp1 = new Building(newArray1, generation, possiblePieces);\n\t\t\tBuilding bp2 = new Building(newArray2, generation, possiblePieces);\n\t\t\t\n\t\t\t// mutate the new building sequences\n\t\t\tmutateArray(bp1);\n\t\t\tmutateArray(bp2);\n\t\t\t\n\t\t\t// add them into the population\n\t\t\tpopulation.add(randIndex1, bp1);\n\t\t\tpopulation.add(randIndex2, bp2);\n\t\t}\n\t}", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }", "public void randomX() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntX = (int)randomDub*4;\r\n\t\tthis.xcoord = randomIntX;\r\n\t}", "public static void populateTreeRandom(BinarySearchTree tree)\n {\n int currentNumber = 0;\n\n System.out.println(\"RANDOM NUMBERS PRE POPULATION: \" );\n\n for(int i = 1; i < 101; i++)\n {\n currentNumber = (int) (Math.random() * 100);\n\n System.out.printf(\"%3d \", currentNumber);\n\n if(i % 20 == 0)\n {\n System.out.println();\n }\n\n tree.add(currentNumber);\n }\n\n System.out.println();\n }", "public void seed(long seed) {\n }", "public void reproduce() {\n if (getSelfCount() >= getMinMates() && getLocation()\n .getEmptyCount() >= getMinEmpty()\n && getFoodCount() >= getMinFood() && dayCountDown != 0) {\n int index = RandomGenerator.nextNumber(getLocation()\n .getEmptyCount());\n Cell selectedCell = getLocation().getEmptyArray().get(index);\n createLife(selectedCell).init();\n \n }\n \n }", "public ArrayList<Population> InitializePopulations (int NumberOfPopulations, int NumberOfAgents){\n \n ArrayList<Population> PopulationsList = new ArrayList();\n \n if(NumberOfPopulations == 1){\n \n PopulationsList.add(InitSinglePopulation(NumberOfAgents));\n \n }else{\n \n for(int i = 0; i < NumberOfPopulations; i++){ \n double temp = rand.nextDouble();\n PopulationsList.add(InitSinglePopulation(i, NumberOfAgents, temp));\n }\n \n }\n \n \n return PopulationsList;\n }", "SimulatedAnnealing() {\n generator = new Random(System.currentTimeMillis());\n }", "public void setSeed(ArrayList<Cell> newSeed) {\n\t\n\t\t for (int y=0;y<MAX_Y;y++) {\n\t\t\tfor (int x=0;x<MAX_X;x++) {\n\t\t\t\tseed[x][y] = new Cell(x,y,false);\t\t \n\t\t\t}//end for x\n\t\t }//end for y\n\t\t \n\t\t for (int k=0; k<newSeed.size();k++) {\n\t\t\t int x1 = Math.abs(newSeed.get(k).getX()) % MAX_X;\n\t\t\t int y1 = Math.abs(newSeed.get(k).getY()) % MAX_Y;\n\t\t\t \n\t\t\t seed[x1][y1] = newSeed.get(k);\n\t\t }//end for k\n\t\t repaint(); //repaint's the grid with new generation\n\t\t updateUI();\n\t }", "public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}", "public void setRnd (java.lang.String rnd) {\r\n\t\tthis.rnd = rnd;\r\n\t}", "RandomArrayGenerator() {\n this.defaultLaenge = 16;\n }", "private void assuerNN_random() {\n //Check, if the variable is null..\n if (this.random == null) {\n //..and now create it.\n this.random = new Random(10);\n }\n }", "private void SetInitialPoliticalParty() {\n\t\tif(debug) logger.info(\"SetInitialPoliticalParty: Entering\");\n\t\tint rand = Random.randomInt(100);\t\t \n\t\tif(debug) logger.info(\"SetInitialPoliticalParty: rand = \" + rand);\n\t\tif (rand < 50) {\n\t\t\tsetDemocratElected(true);\t\t\t\n\t\t}\n\t\telse {\n\t\t\tsetDemocratElected(false);\n\t\t}\n\t\tif(debug) logger.info(\"SetInitialPoliticalParty: Returning\");\n\t}", "@Test\n\tpublic void testGetRandom() {\n\t\ttestInitializePopulation();\n\t\tassertNotNull(\"no random chromosome\", population.getRandomChromosome());\n\t}", "public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }", "private Random rand()\n\t{\n\t\treturn new Random();\n\t}", "@Override\r\n public void initCreature() \r\n {\n \t\r\n if ( worldObj.provider.dimensionId == 1 && worldObj.rand.nextInt( 5 ) == 0 )\r\n \t{\r\n \tsetCarried( Block.whiteStone.blockID );\r\n \tsetCarryingData( 0 );\r\n \t}\r\n }", "public void randomize() {\r\n\t\tif(randomizzatoreVariazione > 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione() * randomizzatoreVariazione\r\n\t\t\t\t\t+ andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE())\r\n\t\t\t);\r\n\t\telse if(randomizzatoreVariazione < 0.5)\r\n\t\t\tandamentoCurva.setVariazione(\r\n\t\t\t\t\tandamentoCurva.getVariazione()\r\n\t\t\t\t\t- andamentoCurva.getMIN_VARIAZIONE()\r\n\t\t\t\t\t+ Math.random() * (andamentoCurva.getMAX_VARIAZIONE() - andamentoCurva.getMIN_VARIAZIONE() * randomizzatoreVariazione)\r\n\t\t\t);\r\n\t}", "public void initiateRandomCells(double probabilityForEachCell){\n for(int y = 0; y < getHeight(); y++){\n for(int x = 0; x < getWidth(); x++){\n if(rand.nextDouble() < probabilityForEachCell)\n turnToLiving(x, y);\n }\n }\n }", "public void setSeed(String seed) \n\t{\n\t}", "public void setRan(int R)\t\n\t{\t//start of setRan method\n\t\trandomNum = R;\n\t}", "public RandomizedSet() {\n realSet = new HashSet<>();\n allSet = new Integer[10];\n random = new Random();\n }", "public RandomizedSet() {\n nums = new ArrayList<Integer>();\n location = new HashMap<Integer, Integer>();\n }", "public void newGame() {\n\t\ttheNumber = (int)(Math.random()* 100 + 1);\r\n\t\t\r\n\t}", "public void RandomOrientation(){\n\n\t\tfor (int i=0;i<population.length;i++){\n\t\t\tpopulation[i].RandomOrientation();\n\t\t}\n\n\t}", "public double setRandomPrice() {\n\t\tdouble price = dishPrices.get(roll.nextInt(dishPrices.size()));\n\t\treturn price;\n\t}", "public void setSeed(final long seed) {\n random.setSeed(seed);\n }", "public void setWhoGoesFirstRandom() {\n Random ran = new Random();\n int i = ran.nextInt(2) + 1;\n if(i == 1) {\n setWhoGoesFirst(humanPlayer);\n } else {\n setWhoGoesFirst(aiPlayer);\n }\n }", "@ProgrammaticProperty\n public void setSeed(String seed) {\n m_randomSeed = seed;\n }", "private static Set<Chromosome> generateRandomPopulation(int pathLength, int randomPopulationSize) {\n Set<Chromosome> population = new HashSet<>();\n\n // create an arraylist of CityIDs, and initialise it with the cities in order of their ID\n ArrayList<Integer> basePath = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n basePath.add(i);\n }\n\n // repeat the following for as many chromosomes as are required (populationSize)\n while (population.size() < randomPopulationSize) {\n Chromosome chromosome = new Chromosome(pathLength);\n // randomise the order of the arraylist of cities\n Collections.shuffle(basePath);\n for (int j = 0; j < pathLength; j++) {\n chromosome.path[j] = basePath.get(j);\n }\n population.add(chromosome);\n }\n\n return population;\n }", "public Rng(long seed) {\n\t\tr = new Random(seed);\n\t}", "public void step()\n\t{\n\t\t// Reservoir sampling by generating ordered list of numbers\n\t\t// randomly pick a number within length and use that as index\n\t\tRandom rand = new Random();\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < listOfCells.size(); i++) { numbers.add(i); }\n\t\t\n\t\t// Randomly sample from reservoir until empty\n\t\twhile(numbers.size() > 0)\n\t\t{\n\t\t\tint picked_index = rand.nextInt(numbers.size());\n\t\t\tint picked_val = numbers.get(picked_index);\n\t\t\t\n\t\t\t//TODO: Maybe call a function on cell of random action that might occur\n\t\t\t//\tConsider only returning object when necessary, (how it is now)\n\t\t\tPlantCell newObject = listOfCells.get(picked_val).doAction();\n\t\t\tif(newObject != null)\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"New cell generated!\");\n\t\t\t\tlistOfCells.add(newObject);\n\t\t\t}\n\t\t\t\n\t\t\t//Kill spawning cell if its health drops <= 0\n\t\t\t//should die right away to make room for other cell\n\t\t\tif(listOfCells.get(picked_val).getHealth() <= 0)\n\t\t\t{\n\t\t\t\tenvironmentPointer.map[listOfCells.get(picked_val).getX()][listOfCells.get(picked_val).getY()] = null;\n\t\t\t\tlistOfCells.set(picked_val, null); //Set to null as to preserve list integrity for reservoir sampling, will be removed later\n\t\t\t}\n\t\t\t\n\t\t\tnumbers.remove(picked_index);\n\t\t}\n\t\t\n\t\t// All recently dead cells are now null in our cell list, so we are removing them from the list now\n\t\tfor(int i = 0; i < listOfCells.size(); i++)\n\t\t{\n\t\t\tif(listOfCells.get(i) == null)\n\t\t\t{\n\t\t\t\tlistOfCells.remove(i);\n\t\t\t\ti--; //Adjust for changing size\n\t\t\t}\n\t\t}\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public static void runAGeneration() {\n //Breeds Population until max population size for genetic drift\n breedAll();\n\n //Genocides Population by fitness\n genocide();\n\n System.out.println(\"\\nPopulation: \");\n\n //prints population\n printPopulation();\n }", "void setRandomNo() {\n\t\tno = 10000000 + (int) (Math.random() * 90000000);\n\t}", "private RandomLocationGen() {}", "@Test\n public void testSetCantRandom() {\n System.out.println(\"setCantRandom\");\n int cantRandom = 0;\n RandomX instance = null;\n instance.setCantRandom(cantRandom);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}" ]
[ "0.7183215", "0.6926208", "0.6869688", "0.6695815", "0.66498756", "0.662256", "0.65996337", "0.6548817", "0.6515252", "0.6507657", "0.64752716", "0.64133734", "0.6387521", "0.63846576", "0.6371994", "0.6364717", "0.63109666", "0.62786084", "0.626346", "0.6240623", "0.622396", "0.6200629", "0.6188616", "0.6158105", "0.6152594", "0.61508536", "0.61258686", "0.61250335", "0.6124167", "0.6084156", "0.60826087", "0.6059741", "0.6059662", "0.60411155", "0.60219514", "0.5976898", "0.5956431", "0.59158325", "0.58974034", "0.58844763", "0.5873148", "0.58719474", "0.5865432", "0.5861588", "0.5852769", "0.5846144", "0.58395433", "0.58380187", "0.58325946", "0.5832548", "0.5826665", "0.581573", "0.577052", "0.5751713", "0.57486963", "0.5743945", "0.57375306", "0.5736563", "0.57330954", "0.57300663", "0.57280964", "0.57040167", "0.5701671", "0.56980646", "0.56868434", "0.56693816", "0.56519204", "0.5650484", "0.56452256", "0.56424963", "0.56404406", "0.5639675", "0.56349605", "0.5633736", "0.5632953", "0.5627352", "0.5626232", "0.56231433", "0.56204796", "0.5615333", "0.5596919", "0.55962163", "0.55820936", "0.5581578", "0.55803066", "0.558018", "0.55725366", "0.55718905", "0.5566808", "0.55586976", "0.5554501", "0.5550485", "0.5548805", "0.55487823", "0.55459124", "0.5534899", "0.55329555", "0.553221", "0.5531114", "0.5530089" ]
0.6585972
7
Sets the fitness scores for each member of the population.
public void evaluatePopulation() { // reset the total fitness score totalFitness = 0; for (int i = 0; i < populationSize; i++) { population.get(i).setRawFitness( FeederCollection.getFeeders().get(i).GetFitness()); totalFitness += population.get(i).getRawFitness(); } // set the normalized fitness for each population member for (Genotype g : population) { // normalized fitness = raw fitness / total fitness g.setNormalizedFitness((g.getRawFitness() / totalFitness)); } // sort the popoulation Collections.sort(population, Genotype.FitnessOrder); highFitnesses.add(population.get(0).getRawFitness()); avgFitnesses.add(totalFitness / population.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setFitnessScore(double score){\n fitnessScore = score;\n }", "public void setFitness(float fitness)\r\n\t{\r\n\t\tthis.fitness = fitness;\r\n\t}", "public void modifyFitness(Population population) {\n // prepare the calculation\n double[][] data = new double[population.size()][];\n for (int i = 0; i < data.length; i++) {\n data[i] = ((AbstractEAIndividual)population.get(i)).getFitness();\n }\n double min = Double.POSITIVE_INFINITY, fitnessSharing;\n double[] result = new double[data.length];\n AbstractEAIndividual tmpIndy;\n\n for (int x = 0; x < data[0].length; x++) {\n for (int i = 0; i < data.length; i++) data[i][x] = -data[i][x];\n for (int i = 0; i < data.length; i++) {\n if (data[i][x] < min) min = data[i][x];\n }\n\n for (int i = 0; i < data.length; i++) {\n // This will cause the worst individual to have no chance of being selected\n // also note that if all individual achieve equal fitness the sum will be zero\n result[i] = data[i][x] -min + 0.1;\n }\n\n for (int i = 0; i < population.size(); i++) {\n tmpIndy = (AbstractEAIndividual)population.get(i);\n fitnessSharing = 0;\n for (int j = 0; j < population.size(); j++) {\n if (this.m_SharingDistance < this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))) {\n fitnessSharing += 1 - (this.m_Metric.distance(tmpIndy, (AbstractEAIndividual)population.get(j))/this.m_SharingDistance);\n }\n }\n result[i] = result[i]/fitnessSharing;\n }\n\n for (int i = 0; i < population.size(); i++) {\n ((AbstractEAIndividual)population.get(i)).SetFitness(x, result[i]);\n }\n }\n }", "private static void calculateFitnessOfPopulation(ArrayList<Chromosome> population) {\n for (Chromosome chromosome : population) {\n // if the fitness of the chromosome has not yet been calculated (i.e. is still -1)\n fitnessFunction(chromosome);\n }\n }", "public void assignMatingProportions() {\n\t\tdouble totalAverageSpeciesFitness = 0.0;\r\n\r\n\t\t// hold the proportion of offspring each species should generate\r\n\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ttotalAverageSpeciesFitness += s.getAverageAdjustedFitness();\r\n\t\t}\r\n\r\n\t\t// set map values to be a proportion of the total adjusted\r\n\t\t// fitness\r\n\t\tfor (Species s : speciesList) {\r\n\r\n\t\t\ts.assignProp(totalAverageSpeciesFitness);\r\n\t\t}\r\n\t}", "void setFitness(double fitness) throws UnsupportedOperationException;", "public void setFitness(int f){\n this.fitness = f;\n }", "void ComputeFitness(){\n\t\tint i, pos;\n\t\t// individual t;\n\t\tdouble min, sum = 0, sumSize = 0, tm;\n\t\t// First Compute Raw fitness\n\t\tfor(i = 0; i < poplen; i++)\n\t\t{\n\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t}\n\t\t\t\n\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t}\n\t\t//tim individual co fitness be nhat\n\t\tmin = oldpop[0].fitness;\n\t\tpos = 0;\n\t\tsum = oldpop[0].fitness;\n\t\tsumSize = oldpop[0].size;\n\t\t\n\t\tfor(i = 1; i < poplen; i++) {\n\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\tmin = oldpop[i].fitness;\n\t\t\t\tpos = i;\n\t\t\t}\n\t\t\tsum += oldpop[i].fitness;\n\t\t\tsumSize += oldpop[i].size;\n//\t\t\tpopSize[gen][i]= oldpop[i].size;\n\t\t}\n\t\t// copy the best and average\n\t\tbestcurrent[gen] = new individual();\n\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n\t\taverage[gen] = sum /poplen;\n\t\taverageSize[gen] = sumSize /poplen;\n\t\t// Third Compute Adjusted fitness\n\t\tAdjustFitness();\n\t\t// Finally Compute nomarlized fitness\n \t\tNormalizeFitness();\n\t}", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "private static void getFitness() {\n\t\tint popSize = population.size();\n\t\tChromosome thisChromo = null;\n\t\tdouble bestScore = 0;\n\t\tdouble worstScore = 0;\n\n\t\t// The worst score would be the one with the highest energy, best would be\n\t\t// lowest.\n\t\tworstScore = population.get(maximum()).conflicts();\n\n\t\t// Convert to a weighted percentage.\n\t\tbestScore = worstScore - population.get(minimum()).conflicts();\n\n\t\tfor (int i = 0; i < popSize; i++) {\n\t\t\tthisChromo = population.get(i);\n\t\t\tthisChromo.fitness((worstScore - thisChromo.conflicts()) * 100.0 / bestScore);\n\t\t}\n\n\t\treturn;\n\t}", "public void assignFitness(final MOIndividual<?, ?>[] pop,\r\n final int start, final int count, final IIndividualComparator cmp,\r\n final Random r) {\r\n int i;\r\n\r\n for (i = (start + count); (--i) >= start;) {\r\n pop[i].v = Constants.WORST_FITNESS;\r\n }\r\n }", "public void incrementFitness()\n {\n this.fitness++;\n }", "public void setFitness(int fit)\n {\n this.fitness=fit;\n }", "protected void setFitness(float fit)\t{\tfitness = fit;\t\t}", "public void setFitness(int newFitness) {\n fitness = newFitness;\n }", "public void setFitness(double fit) {\n fitness = fit;\n }", "public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }", "public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.genotipo[x+1]];\r\n }else{\r\n fit+=distancias[this.genotipo[x]][this.genotipo[0]];\r\n }\r\n }\r\n this.fitness = fit;\r\n }", "public void updateFitness() {\n Particle p;\n for (int i = 0; i < SWARM_SIZE; i++) {\n p = swarm.get(i);\n p.setFitnessValue(getFitnessValue(p.getVector().getPos()));\n p.setpBestFitness(getFitnessValue(p.getpBest().getPos()));\n }\n }", "public void setScores(ArrayList<Integer> scores) { this.scores = scores; }", "public void evalPopulation(Population population, City cities[]) {\n\t\tdouble totalPopulationFitness = 0;\n\t\tfor (Individual individual : population.getIndividuals()) {\n\t\t\ttotalPopulationFitness += this.calcFitness(individual, cities);\n\t\t}\n\n\t\tdouble avgFitness = totalPopulationFitness / population.size();\n\n\t\tpopulation.setAverageFitness(avgFitness);\n\t}", "private int copyFitnessValuesToFitnessTable(IGANsgaPopulation pop,\r\n FitnessTable ft) {\r\n int size = pop.size();\r\n int numObj = pop.getNumObjectives();\r\n int numRankZero = 0;\r\n for (int j = 0; j < size; j++) {\r\n IGANsgaSolution sol = (IGANsgaSolution) pop.getMember(j);\r\n if (sol.getRank() == 0) {\r\n numRankZero++;\r\n }\r\n for (int k = 0; k < numObj; k++) {\r\n ft.setFitnessValue(sol.getObjective(k), j, k);\r\n }\r\n }\r\n return numRankZero;\r\n }", "public double calcFitness(int[] genes) {\n\t\treturn 0;\n\t}", "protected float getFitness()\t\t\t{\treturn fitness;\t\t}", "public double setFitnessScore(double fitnessScore) {\n\t\tdouble previousValue = this.fitnessScore;\n\t\tthis.fitnessScore = fitnessScore;\n\t\treturn previousValue;\n\t}", "double getFitnessScore(){\n return fitnessScore;\n }", "private void mutate(float probability) {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n float temp_genes[] = this.offspring_population.getPopulation()[i].getGenes();\r\n\r\n // mutation can now mutate wild cards\r\n for (int j = 0; j < temp_genes.length; j++) {\r\n float k = new Random().nextFloat();\r\n\r\n if (k <= probability) {\r\n float temp = new Random().nextFloat();\r\n temp_genes[j] = temp; // add a float between 0-1 // just mutate a new float\r\n }\r\n }\r\n individual child = new individual(temp_genes, solutions, output);\r\n temp_pop[i] = child;\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public static void evaluateFitnesses() {\n for (Polynomial p : Population) {\n p.setRawFitness(getRawFitness(p, data));\n if (debug) {\n printPopulation(true);\n }\n }\n }", "void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}", "public AIAssign2(){\n \n Scanner console = new Scanner(System.in);\n \n System.out.print(\"Input population size \");\n popsize = console.nextInt();\n \n System.out.print(\"Input tournament size \");\n tournysize = console.nextInt();\n \n System.out.print(\"Input crossover chance (%) \");\n crossprob = console.nextDouble();\n \n System.out.print(\"Input mutation chance (%) \");\n mutaprob = console.nextDouble();\n \n System.out.print(\"Input max generation size \");\n maxgen = console.nextInt();\n \n System.out.print(\"Input problem width \");\n width = console.nextInt();\n \n System.out.print(\"Input problem height \");\n height = console.nextInt();\n \n System.out.print(\"Input start location x-1 \");\n startx = console.nextInt();\n \n System.out.print(\"Input start location y-1 \");\n starty = console.nextInt();\n \n System.out.print(\"Input seed value \");\n seed = console.nextLong();\n \n Random rnd = new Random(seed);\n \n population = new int[popsize][height*width];\n population2 = new int[popsize][height*width];\n popfitness = new int[popsize];\n \n for (int i = 0 ; i<popsize ; i++){\n for (int j = 0 ; j<population[0].length ; j++){\n population[i][j] = (rnd.nextInt(4));\n }\n }\n Print(population);\n \n //the generation loop\n for (int gen = 0 ; gen < maxgen ; gen++){\n \n //fitness of individuals is stored\n int btemp = 0;\n for (int i = 0 ; i < popsize ; i++){\n \n problem = new char[width][height];\n problem[startx][starty] = 'S';\n \n popfitness[i] = Fitness(population[i], problem, startx, starty, 0);\n \n if (popfitness[i] > btemp){ btemp = popfitness[i];}\n }\n bestavg = bestavg + btemp;\n \n String line=\"\";\n int avg=0;\n for (int i = 0 ; i < popsize ; i++){\n line = line + \"[\" + popfitness[i] + \"] \"; \n avg = avg + popfitness[i];\n }\n avg = avg/popsize;\n avgavg = avgavg + avg;\n bestavg = bestavg / (gen+1);\n avgavg = avgavg / (gen+1);\n System.out.println(\"Gen: \"+gen + \" Fitness: \"+ line + \" Avg: \"+ avg + \" BestAvg: \" + bestavg + \" AvgAvg: \" + avgavg);\n bestavg = bestavg * (gen+1);\n avgavg = avgavg * (gen+1);\n \n //Tournament selection\n for (int i = 0 ; i < popsize ; i++){\n int best = 0; \n int rand = (int)(rnd.nextInt(popsize));\n best = rand;\n \n for (int k = 0 ; k < tournysize ; k++){\n if (popfitness[rand] > popfitness[best]){\n best = rand;\n }\n \n rand = (int)(rnd.nextInt(popsize));\n }\n population2[i] = Copy(population[best]); \n }\n \n //single-focus-flip and block exchange mutations\n for (int i = 0 ; i < popsize-1 ; i++){\n if (crossprob > rnd.nextInt(100)){\n int temp; \n for (int a = 0 ; a < 5 ; a++){\n temp = population2[i][a];\n population2[i][a] = population2[i+1][a];\n population2[i+1][a] = temp;\n }\n }\n }\n \n for (int i = 0 ; i < popsize ; i++){\n if (mutaprob > rnd.nextInt(200)){\n int temp = (int) (rnd.nextInt(population2[0].length)); \n population2[i][temp] = (int)(rnd.nextInt(4));\n }\n else if (mutaprob > rnd.nextInt(200)){\n for (int j = 0 ; j < population2[0].length/2 ; j++){\n int temp = population2[i][j];\n population2[i][j] = population2[i][population2[0].length-1-j];\n population2[i][population2[0].length-1-j] = temp;\n }\n }\n }\n \n population = population2;\n population2 = new int[popsize][population[0].length];\n \n }\n \n bestavg = bestavg / maxgen;\n avgavg = avgavg / maxgen;\n Print(population);\n System.out.println(\"Best Avg: \" + bestavg + \" Average of Avg: \" + avgavg);\n }", "public int getFitness(){\n return fitness;\n }", "@Override\r\n\t\t\tpublic void populationUpdate(PopulationData<? extends Solution> data) {\n//\t\t\t\tbuffer.append(data.getPopulationSize());\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tdouble fit = data.getBestCandidateFitness();\r\n//\t\t\t\tSystem.out.println(fit);\r\n\t\t\t\tbuffer.delete(0, buffer.length());\r\n\t\t\t\tbuffer.append(fit);\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tif (Run10FastExternalizer.initialFitness.getDbl() == -1.0) {\r\n\t\t\t\t\tRun10FastExternalizer.initialFitness.setDbl(fit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fit == 0.0){\r\n\t\t\t\t\tArrayList<Student> studentsCopy = new ArrayList<>();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: students){\r\n\t\t\t\t\t\tstudentsCopy.add(student.clone());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: studentsCopy){\r\n\t\t\t\t\t\tstudent.register(data.getBestCandidate().getBlocks());\r\n//\t\t\t\t\t\tSystem.out.println(student.getSchedule());\r\n//\t\t\t\t\t\tbuffer.append(student.getSchedule().toString());\r\n//\t\t\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\t\tsb.append(student.getSchedule().toString());\r\n\t\t\t\t\t\tsb.append(\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsuperValue = sb.toString();\r\n\t\t\t\t}\r\n\t\t\t}", "public float getFitness()\r\n\t{\r\n\t\treturn fitness;\r\n\t}", "public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }", "void calculateFitness() {\n if (reachedGoal) {\n fitness = 1d / 16d + 8192d / (genome.step * genome.step);\n } else {\n double d = position.distance(Game.Setup.goal);\n fitness = 1d / (d * d);\n }\n }", "public void runTournament() {\n\t\t//ArrayList<Gene> tournament = new ArrayList<Gene>();\n\t\tPriorityQueue<Gene> tournament = new PriorityQueue<Gene>(Collections.reverseOrder());\n\t\tint numContenders = (int)(FRAC_IN_TOURNAMENT * geneNumber);\n\t\tSet<Integer> chosenOnes = new HashSet<Integer>();\n\t\t\n\t\twhile(chosenOnes.size() < numContenders) {\n\t\t\tint randIndex = (int) (Math.random() * geneNumber);\n\t\t\tchosenOnes.add(randIndex);\n\t\t}\n\t\tfor(int i : chosenOnes){\n\t\t\ttournament.add(genepool.get(i));\n\t\t}\n\t\t//int firstIndex = getMax(tournament, -1);\n\t\t//int secondIndex = getMax(tournament, firstIndex);\n\t\t//Gene parent1 = tournament.get(firstIndex);\n\t\t//Gene parent2 = tournament.get(secondIndex);\n\t\tGene parent1 = tournament.poll();\n\t\tGene parent2 = tournament.poll();\n\t\t// Create a new gene from the 2 fittest genes\n\t\tGene newGene = parent1.waCrossover(parent2);\n\t\t\n\t\t// Calculate fitness for the new gene\n\t\tPlayerSkeleton.runGames(numGames, newGene);\n\t\toffspringPool.add(newGene);\n\t}", "public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "private void setnewFitnessValue(double fitnessValue) {\n this.newfitnessValue = fitnessValue;\r\n }", "public float AssignFitness() {\n\t\t\n\t\tfitness = 0;\n\t\tif(sample_map.size() == 0) {\n\t\t\treturn fitness;\n\t\t}\n\t\t\n\t\tLinkSample ptr = k_closest;\n\t\twhile(ptr != null) {\n\t\t\tfitness += ptr.s.weight;\n\t\t\tptr = ptr.next_ptr;\n\t\t}\n\t\t\n\t\tfitness /= sample_map.size();\n\t\treturn fitness;\n\t}", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}", "public void updateFitness ( ) {\n\n KozaFitness f = ((KozaFitness)program.fitness);\n\n f.setStandardizedFitness(param.Parameters.STATE, this.fit);\n\n }", "public int getFitness()\n {\n return this.fitness;\n }", "public void setScores(BigDecimal scores) {\n this.scores = scores;\n }", "void ComputeFitnessBefore(){\n\t\t\t\tint i, pos;\n\t\t\t\t// individual t;\n\t\t\t\tdouble min, sum = 0, tm;\n\t\t\t\t// First Compute Raw fitness\n\t\t\t\tfor(i = 0; i < poplen; i++)\n\t\t\t\t{\n\t\t\t\t\tif(oldpop[i].evaluated==FALSE)\n\t\t\t\t\t{ tm=ComputeRF(oldpop[i]);\n\t\t\t\t\t\toldpop[i].fitness = tm;\n\t\t\t\t\t\toldpop[i].oldfitness = tm;\n\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toldpop[i].fitness=oldpop[i].oldfitness;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//oldpop[i].DisplayIndividual();\n\t\t\t\t\t//System.out.println(oldpop[i].fitness);\n\t\t\t\t}\n\t\t\t\t//tim individual co fitness be nhat\n\t\t\t\tmin = oldpop[0].fitness;\t\t\t\n\t\t\t\tsum = oldpop[0].fitness;\t\t\t\n\t\t\t\t\n\t\t\t\tfor(i = 1; i < poplen; i++) {\n\t\t\t\t\tif(oldpop[i].fitness < min) {\n\t\t\t\t\t\tmin = oldpop[i].fitness;\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tsum += oldpop[i].fitness;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// copy the best and average\n//\t\t\t\tbestBeforeFitness[gen]=min;\n//\t\t\t\tavgBeforeFitness[gen]=sum/poplen;\n//\t\t\t\tbestcurrent[gen] = new individual();\n//\t\t\t\tbestcurrent[gen].CopyIndividual(oldpop[pos], TRUE);\n//\t\t\t\taverage[gen] = sum /poplen;\t\t\t\n\t\t\t\t\n\t\t\t}", "public void setpopulation(int population) {\n this.population = population;\n }", "public void updatePopulation() {\r\n this.usedPopulation = Integer.parseInt(data.driver.findElement(By.id(\"pop_current_label\")).getText());\r\n this.maxPopulation = Integer.parseInt(data.driver.findElement(By.id(\"pop_max_label\")).getText());\r\n }", "public void setPopulation(int population) {\n this.population = population;\n }", "public void iterate()\n\t{\n\t\tfor (int p = 0; p < parasites.length; p++)\n\t\t\tpFitnesses[p][1] = 0;\n\t\t\n\t\ttry\n\t\t{\t// calculate fitnesses against other population\n\t\t\texecutor.invokeAll(tasks);\n\t\t\t// calculate fitness against hall of fame individuals\n\t\t\texecutor.invokeAll(hofTasks);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Something bad happened...\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\n\t\tArrays.sort(hFitnesses,new ArrayComparator(1,false));\n\t\tArrays.sort(pFitnesses,new ArrayComparator(1,false));\n\t\t\n\t\tint bestIndex = (int)pFitnesses[0][0];\n\t\tint size = parHOF.length;\n\t\t\n\t\tparHOF[generations%size]=new NeuralPlayer(-1,\"HOF P\",(BasicNetwork)parasites[(int)bestIndex].net.clone());\n\t\tbestIndex = (int)hFitnesses[0][0];\n\t\thostHOF[generations%size]=new NeuralPlayer(1,\"HOF H\",(BasicNetwork)hosts[(int)bestIndex].net.clone());\n\t\t\n\t\tint matePopIndex = (int)(matingPer*popSize)+1;\n\t\tRandom indexG = new Random();\n\t\t// allow top percentage to breed and replace bottom 2*percentage\n\t\t// leave everyone else alone\n\t\tfor (int i = 0; i < popSize*2*matingPer; i++)\n\t\t{\n\t\t\tint pInd1 = indexG.nextInt(matePopIndex);\n\t\t\tint pInd2 = indexG.nextInt(matePopIndex);\n\t\t\tNeuralPlayer p1 = hosts[(int)hFitnesses[pInd1][0]];\n\t\t\tNeuralPlayer p2 = hosts[(int)hFitnesses[pInd2][0]];\n\t\t\tNeuralPlayer child = hosts[(int)hFitnesses[popSize - 1 - i][0]];\n\t\t\tmate(p1, p2,child);\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < popSize*2*matingPer; i++)\n\t\t{\n\t\t\tint pInd1 = indexG.nextInt(matePopIndex);\n\t\t\tint pInd2 = indexG.nextInt(matePopIndex);\n\t\t\tNeuralPlayer p1 = parasites[(int)pFitnesses[pInd1][0]];\n\t\t\tNeuralPlayer p2 = parasites[(int)pFitnesses[pInd2][0]];\n\t\t\tNeuralPlayer child = parasites[(int)pFitnesses[popSize - 1 - i][0]];\n\t\t\tmate(p1, p2,child);\n\t\t}\n\t\t// mutate everyone except top percentage (matingPer)\n\t\tfor (int i = 0; i < popSize*3*matingPer; i++)\n\t\t{\n\t\t\tmutate(parasites[(int)pFitnesses[popSize - 1 - i][0]]);\n\t\t\tmutate(hosts[(int)hFitnesses[popSize - 1 - i][0]]);\n\t\t}\n\t\t\n\t\tgenerations+=1;\n\t\t// every now and then reseed the population with a good individual\n\t\tif (generations%50 == 0)\n\t\t{\n\t\t\thosts[indexG.nextInt(hosts.length)].net = (BasicNetwork)allTimeBestHost.net.clone();\n\t\t\tparasites[indexG.nextInt(parasites.length)].net = (BasicNetwork)allTimeBestPara.net.clone();\n\t\t}\n\t\t\t\n\t}", "public abstract List<Double> updatePopulations();", "public GeneticEngine() {\n avgFitnesses = new ArrayList<Double>();\n highFitnesses = new ArrayList<Double>();\n population = null;\n crossoverProbability = 0.07;\n mutationProbability = 0.001;\n maxGenerations = Integer.MAX_VALUE;\n }", "void init() {\r\n \tfor (int i=0; i<SIZE; i++) {\r\n \t\tfor (int j=0; j<LEN; j++) {\r\n \t\t\tif (rnd.nextDouble() < 0.5)\r\n \t\t\t\toldpop[i][j] = 0;\r\n \t\t\telse\r\n \t\t\t\toldpop[i][j] = 1;\r\n \t\t}\r\n \t}\r\n \tfor (int j=0; j<LEN; j++) {\r\n \t\tcbest[j] = oldpop[0][j];\r\n \t}\r\n\t\tbest = fitness(0);\r\n }", "public void setScores(int[] s) {\n this.scores = s;\n }", "public void setRandomGenes(int i){\n if (i > populationSize){\n throw new IllegalArgumentException(\"The number of random genes per generation must not be greater than the population size\");\n }\n randGenes = i;\n }", "public void setPopulation(int population) {\n\n this.population = population;\n }", "private void initializePopulation() {\n // reset the population\n population = new ArrayList<Genotype>();\n\n // set the population to an array of random genotypes\n for (int i = 0; i < populationSize; i++) {\n population.add(new Genotype(chromosomeSize));\n }\n\n // evaluate the population\n // evaluatePopulation();\n }", "public GAIndividual()\n {\n m_fitness = 0;\n m_genome = new ArrayList<Integer>();\n }", "protected void evolve()\n\t\t{\tif(this_gen < NUMBER_GENERATIONS) {\n\t\t\t\t// Create a new generation.\n\t\t\t\tfloat avg_fit=Float.MIN_VALUE, max_fit=Float.MIN_VALUE, sum_fit=0;\n\t\t\t\tfloat tot_wait=0, avg_wait=0, tot_move=0, avg_move=0;\n\n\t\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++) {\n\t\t\t\t\tfloat fit = calcFitness(inds[i]);\n\t\t\t\t\tinds[i].setFitness(fit);\n\t\t\t\t\tsum_fit\t += fit;\n\t\t\t\t\tmax_fit = fit>max_fit ? fit : max_fit;\n\t\t\t\t\ttot_wait += inds[i].getWait();\n\t\t\t\t\ttot_move += inds[i].getMove();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tavg_wait = tot_wait/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_move = tot_move/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_fit = sum_fit/NUMBER_INDIVIDUALS;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Stats of prev. gen: (a-wait,a-move)=(\"+avg_wait+\",\"+avg_move+\")\"+\" (a-fit,mx-fit)=(\"+avg_fit+\",\"+max_fit+\")\");\n\t\t\t\tSystem.out.println(\"Evolving...\");\n\t\t\t\t\n\t\t\t\t// Sorts the current Individual-array on fitness, descending\n\t\t\t\tinds = sortIndsArr(inds);\n\t\t\t\t\n\t\t\t\tint num_mating = (int) Math.floor(NUMBER_INDIVIDUALS*(1-ELITISM_FACTOR));\n\t\t\t\tint num_elitism = (int) Math.ceil(NUMBER_INDIVIDUALS*ELITISM_FACTOR);\n\t\t\t\tif(num_mating%2!=0) {\n\t\t\t\t\tnum_mating--;\n\t\t\t\t\tnum_elitism++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIndividual[] newInds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\t\t\n\t\t\t\t// Tournament selection\n\t\t\t\tfor(int i=0;i<num_mating;i+=2) {\n\t\t\t\t\tIndividual mamma=null, pappa=null;\n\t\t\t\t\tfloat chn_mum = random.nextFloat();\n\t\t\t\t\tfloat chn_pap = random.nextFloat();\n\t\t\t\t\tfloat fit_mum, sum_fit2=0, sum_fit3=0;\n\t\t\t\t\tint index_mum = -1;\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tsum_fit2 += (inds[j].getFitness()/sum_fit);\n\t\t\t\t\t\tif(chn_mum <= sum_fit2) {\n\t\t\t\t\t\t\tmamma = inds[j];\n\t\t\t\t\t\t\tindex_mum = j;\n\t\t\t\t\t\t\tfit_mum = mamma.getFitness();\n\t\t\t\t\t\t\tsum_fit2 = sum_fit-fit_mum;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tif(j!=index_mum) {\n\t\t\t\t\t\t\tsum_fit3 += (inds[j].getFitness()/sum_fit2);\n\t\t\t\t\t\t\tif(chn_pap <= sum_fit3) {\n\t\t\t\t\t\t\t\tpappa = inds[j];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"Mating...: \"+mamma.getFitness()+\",\"+pappa.getFitness());\n\t\t\t\t\tIndividual[] kids = mate(mamma, pappa);\n\t\t\t\t\tnewInds[i]\t= kids[0];\n\t\t\t\t\tnewInds[i+1]= kids[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Elitism\n\t\t\t\tfor(int i=0;i<num_elitism;i++) {\n\t\t\t\t\tnewInds[i+num_mating] = inds[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinds = newInds;\t\t\t\t\t\t\t\t\n\t\t\t\tthis_gen++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Done with evolving\");\n\t\t\t\t// set the best individual as the ruling champ?\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "public void setScore(ArrayList<Race> raceResult) {\r\n\t\traceResult.get(0).setAthleteScore(5); // 1st winner get 5 points\r\n\t\traceResult.get(1).setAthleteScore(2); // 2nd winner get 2 points\r\n\t\traceResult.get(2).setAthleteScore(1); // 3rd winner get 1 points\r\n\t}", "public void setPoputlation (double population) { n.setPopulation(population); }", "public static void main(String[] args) throws IOException {\n\t\tint p = 8;\n\t\t// r is the fraction of the population to be replaced by Crossover at\n\t\t// each step\n//\t\tdouble r = Double.valueOf(8).doubleValue();\n\t\tdouble r = 8;\n\t\t// m is the rate of mutation\n//\t\tdouble m = Double.valueOf(8).doubleValue();\n\t\tdouble m = 8;\n\n\t\t// Write into files...\n\t\tFile outputFile = new File(\"testGA.txt\");\n\t\tFileWriter out = new FileWriter(outputFile);\n\n\t\t////////////////////////\n\t\tp = 33;\n\t\tr = 0.6;\n\t\tm = 0.1;\n\n\t\t// Report the population size, crossover rate and mutation rate\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Learning the 8-queens problem with a Genetic Algorithm\");\n\t\tSystem.out.println(\"Population Size: \" + p);\n\t\tSystem.out.println(\"Crossover Rate: \" + r);\n\t\tSystem.out.println(\"Mutation Rate: \" + m);\n\t\tSystem.out.println();\n\t\tout.write(\"Parameters are p=\" + p + \", \" + \"r=\" + r + \" and m=\" + m + \"\\r\");\n\n\t\t// The genetic algorithm\n\t\tint iterationNum = 0;\n\t\tHypothesis bestIndividual;\n\t\tint bestFitness;\n\t\tdouble aveFitness;\n\t\t// Randomly generate initial population\n\t\tGA algorithm = new GA(p, r, m);\n\t\t// For each individual compute fitness\n\t\talgorithm.computeFitness();\n\t\t// Get the best individual\n\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\tbestFitness = bestIndividual.getFitness();\n\t\taveFitness = algorithm.computeAveFitness();\n\t\t// Iterate till we get the very best individual\n\t\twhile (bestFitness != 0) {\n\t\t\t// Select the very best members of the population to survive\n\t\t\talgorithm.select();\n\t\t\t// Make the best members reproduce themselves\n\t\t\talgorithm.crossover();\n\t\t\t// Add some mutations to new population\n\t\t\talgorithm.mutate();\n\t\t\t// The successor population becomes the current population\n\t\t\talgorithm.setNextGeneration();\n\t\t\t// For each individual compute fitness\n\t\t\talgorithm.computeFitness();\n\t\t\t// Get the best individual\n\t\t\tbestIndividual = (algorithm.getPopulation())[0];\n\t\t\tbestFitness = bestIndividual.getFitness();\n\t\t\taveFitness = algorithm.computeAveFitness();\n\t\t\t// Report best results to the user at every five iterations\n\t\t\tif (iterationNum % 5 == 0) {\n\t\t\t\tSystem.out.println(\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness\n\t\t\t\t\t\t+ \" Average Fitness \" + aveFitness);\n\t\t\t\tSystem.out.println(\"Best solution: \" + bestIndividual.toString());\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\t\t}\n\t\t\titerationNum++;\n\t\t}\n\t\tSystem.out.println(\n\t\t\t\t\"Iteration: \" + iterationNum + \" Best Fitness: \" + bestFitness + \" Average Fitness \" + aveFitness);\n\t\tSystem.out.println(\"Solution is \" + bestIndividual.toString());\n\t\tout.write(\"\\n\" + iterationNum + \",\" + bestFitness + \",\" + aveFitness + \"\\r\");\n\t\tout.close();\n\t}", "protected abstract void calcScores();", "@Override\r\n\tpublic void setGazeScore(double gazeScore) {\n\t\tthis.gazeScore = gazeScore;\r\n\t}", "GuppySet(int numberOfGuppies, int minAge, int maxAge,\n double minHealthCoefficient, double maxHealthCoefficient) {\n this.numberOfGuppies = numberOfGuppies;\n this.minAge = minAge;\n this.maxAge = maxAge;\n this.minHealthCoefficient = minHealthCoefficient;\n this.maxHealthCoefficient = maxHealthCoefficient;\n }", "void setScoreValue(int scoreValue);", "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "public void setPopulation(Integer population) {\n this.population = population;\n }", "public void setScore(int score) {this.score = score;}", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "@Override\n public void initialize() {\n numPlayers = game().numPlayers();\n haveSeen = new ArrayList<>();\n goldProb = new double[3];\n Probability = new double[numPlayers];\n oldBoard = game().board().copy();\n //sets all of the players to miners at first\n //the lower the value the higher the player is predicted as Saboteur\n for (int i = 0; i < numPlayers; i++) {\n Probability[i] = 0.5;\n haveSeen.add(new int[3]);\n }\n for(int i=0; i<3; i++) {\n //top is 0, middle is 1, bottom is 2\n goldProb[i]=0.1;\n }\n if(role() == Role.SABOTEUR) Probability[index()]=0;\n else if(role() == Role.GOLD_MINER) Probability[index()]=1;\n }", "public void setVisitorScore(int visitorScore) {\n this.visitorScore = visitorScore;\n }", "public static void generatePopulation() {\n population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN);\n\n for (Individual individual : population) {\n for (int i = 0; i < individual.getGene().length; i++) {\n individual.gene[i] = bits.get(new Random().nextInt(2));\n }\n individual.generateRulebase();\n }\n }", "void setBestScore(double bestScore);", "public double getFitness(){\n return averageFitness;\n }", "public void setScore(int score) { this.score = score; }", "public void setMeilleursScores(MeilleursScores meilleursScores) {\r\n\t\tthis.meilleursScores = meilleursScores;\r\n\t}", "private void update()\r\n\t{\r\n\t\tfor (Agent agent : agents)\r\n\t\t{\r\n\t\t\tint i = agent.getIndex();\r\n\t\t\tp.setEntry(i, agent.getP());\r\n\t\t\tq.setEntry(i, agent.getQ());\r\n\t\t\tvabs.setEntry(i, agent.getVabs());\r\n\t\t\tvarg.setEntry(i, agent.getVarg());\r\n\t\t\tlambdaP.setEntry(i, agent.getLambdaP());\r\n\t\t\tlambdaQ.setEntry(i, agent.getLambdaQ());\r\n\t\t}\r\n\t}", "public int fitness(ArrayList<Integer> fitnessCases) {\n\t\tif (this.fitnessCases == fitnessCases) return fitness; // cache hit\n\n\t\tint fitness = 0;\n\t\tfor (int c : fitnessCases) {\n\t\t\tValuation v = new Valuation(c, circuit.order);\n\t\t\tboolean actualOutput = tree.evaluate(v);\n\t\t\tboolean correctOutput = v.correctOutput();\n\t\t\t\n\t\t\tif (actualOutput == correctOutput) fitness++;\n\t\t}\n\t\t// cache these values:\n\t\tthis.fitness = fitness;\n\t\tthis.fitnessCases = fitnessCases;\n\t\treturn fitness;\n\t}", "@Test\n public void applyFitness() {\n final List<TrainingListener> listeners = new ArrayList<>();\n final MockModel model = new MockModel() {\n @Override\n public void setListeners(Collection<TrainingListener> listenersToSet) {\n listeners.clear();\n listeners.addAll(listenersToSet);\n }\n\n @Override\n public void addListeners(TrainingListener... listener) {\n listeners.addAll(Stream.of(listener).collect(Collectors.toList()));\n }\n\n @Override\n public long numParams() {\n return (long)(5* 1e4);\n }\n\n @Override\n public double score() {\n return 1.23451234;\n }\n };\n final FitnessPolicy<ModelAdapter> policy = new FitnessPolicyTraining<>(3);\n final double[] measuredScore = {-1};\n\n policy.apply(new ModelAdapter() {\n @Override\n public void fit(DataSetIterator iter) {\n throw new UnsupportedOperationException(\"Not implemented!\");\n }\n\n @Override\n public <T extends IEvaluation> T[] eval(DataSetIterator iter, T... evals) {\n throw new UnsupportedOperationException(\"Not implemented!\");\n }\n\n @Override\n public Model asModel() {\n return model;\n }\n }, fitness -> measuredScore[0] = fitness);\n\n assertEquals(\"Incorrect number of training listeners\", 1, listeners.size());\n\n // Bleh! Hardcoded knowledge of TrainingListener implementation!\n listeners.forEach(listener -> listener.iterationDone(model, 0, 0));\n listeners.forEach(listener -> listener.onEpochEnd(model));\n assertEquals(\"No fitness shall have been reported!\", -1d, measuredScore[0], 1e-10);\n\n listeners.forEach(listener -> listener.iterationDone(model, 1, 0));\n listeners.forEach(listener -> listener.onEpochEnd(model));\n assertEquals(\"No fitness shall have been reported!\", -1d, measuredScore[0], 1e-10);\n\n listeners.forEach(listener -> listener.iterationDone(model, 2, 0));\n listeners.forEach(listener -> listener.onEpochEnd(model));\n assertEquals(\"Incorrect fitness!\", 1.235005, measuredScore[0], 1e-10);\n }", "@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}", "protected void mutateWeights() {\n\t\t// TODO: Change the way weight mutation works\n\t\tif (Braincraft.gatherStats) {\n\t\t\tArrayList<Integer> mutatedgenes = new ArrayList<Integer>();\n\t\t\tfor (Gene g : genes.values()) {\n\t\t\t\tif (Braincraft.randomChance(population.perWeightMutationRate)) {\n\t\t\t\t\tg.weight = Braincraft.randomWeight();\n\t\t\t\t\tmutatedgenes.add(g.innovation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString output = \"weight mutation \" + ID;\n\t\t\tfor (Integer i : mutatedgenes) {\n\t\t\t\toutput += \" \" + i;\n\t\t\t}\n\t\t\tBraincraft.genetics.add(output);\n\t\t} else {\n\t\t\tfor (Gene g : genes.values()) {\n\t\t\t\tif (Braincraft.randomChance(population.perWeightMutationRate))\n\t\t\t\t\tg.weight = Braincraft.randomWeight();\n\t\t\t}\n\t\t}\n\t\t// TODO: Report weight mutations to stats\n\t}", "public void findTotalFit() {\n\tfor (int i=0;i<popSize;i++) {\n\t totalFitness+=this.getFitness(i);\n\t}\n }", "private void updateStatistic(int index, int fitness) {\n if (fitness < worst)\n worst = fitness;\n if (fitness > best) {\n best = fitness;\n frontRunner = geneticProgram.getProgram(index);\n }\n }", "private static void mutate(IndividualList offspring) {\n for (Individual individual : offspring) {\n for (byte b : individual.getDNA()) {\n int i = Util.rand((int) Math.ceil(1 / mutaRate));\n if (i == 0) { //1 in x chance to randomly generate 0, therefore 1/x chance to mutate\n b = swap(b);\n }\n }\n individual.setFitness(individual.currentFitness());\n }\n }", "public void incrementFitnessBy2()\n {\n this.fitness=this.fitness+2;\n }", "public void calcObjective() {\n double obj;\n double objectives[];\n\n for (int i = 0; i < population.getPopulationSize(); i++) { //300\n objectives = population.getObjectiveValues(i);\n obj = evaluateAll(population.getSingleChromosome(i)); //evaluateAll(chromosome chromosome1)\n objectives[indexOfObjective] = obj;\n population.setObjectiveValue(i, objectives);\n }\n }", "public abstract void updateFitness();", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "public static void calculateFitness(Individual[] individuals) {\n for (Individual individual : individuals) {\n individual.fitness = 0;\n for (int i = 0; i < dataSet.size(); i++) {\n for (Rule rule : individual.rulebase) {\n boolean match = true;\n int[] data = dataSet.get(i).getVariables();\n\n for (int j = 0; j < data.length; j++) {\n\n String variable = String.valueOf(data[j]);\n //String variable = \"\" + data[j];\n String[] rulebase = rule.cond;\n\n if ((rulebase[j].equals(variable) != true) && (rulebase[j].equals(\"#\") != true)) {\n match = false;\n }\n }\n\n if (match) {\n String output = String.valueOf(dataSet.get(i).getOutput());\n if (rule.output.equals(output)) {\n individual.fitness++;\n }\n break;\n }\n }\n }\n }\n }", "private void assignIntoGrade() {\n }", "RoachPopulation(int initial)\n {\n roaches = initial;\n }", "public Population evalPopulation(Population population, List<FogDevice> fogDevices, List<? extends Cloudlet> cloudletList) {\n\n double populationFitness = 0;\n\n // Loop over population evaluating individuals and summing population fitness\n for (Individual individual : population.getPopulation()) {\n populationFitness += calcFitness(individual, fogDevices, cloudletList);\n }\n\n //sort population with increasing fitness value\n population.sortPopulation();\n\n population.setPopulationFitness(populationFitness);\n return population;\n }", "private void calculateFitness() {\n\t\tint day1=this.getNumberOfHours()*this.getNumberOfClasses();\n\t\tint day2=2*day1;\n\t\tint day3=3*day1;\n\t\tint day4=4*day1;\n\t\tint day5=5*day1;\n\t\tTeacher_lesson temp=null;\n\t\t//day 1//\n\t\tHashSet<Integer> closedSet=new HashSet<Integer>();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<day1;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day1;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\t\n\t\t//day2//\n\t\tclosedSet.clear();;\n\t\t\n\t\tfor(int i=day1;i<day2;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day2;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day3//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day2;i<day3;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day3;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//day4//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day3;i<day4;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day4;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\t\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day5//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day4;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t\t\t\n\t\t}\n\t\t\t/*if(temp.get_td_hour()<0){this.fitness=this.fitness-100;}//adunato na ginei giati o ka8igitis exei parapanw wres apo oti mporei na kanei//\n\t\t\t\telse if (temp.get_td_hour()==0){this.fitness=this.fitness-2;}//meiwnoume giati o ka8igitis 8a epivarin8ei oles tou tis wres thn idia mera//\n\t\t\t\telse{++this.fitness;}//kalh prosegisi*/\n\t\t}\n\t\t//*********************END OF DAILY EVALUATION*****************************//\n\t\t\n\t\t//**********************START OF WEEKLY EVALUATION************************//\n\t\t\n\t\tclosedSet.clear();\n\t\t\n\t int \t_weeklyhours = 1;\n\t \n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tif(!closedSet.contains(this.genes[i])){\n\t\t\t\t\n\t\t\t\n\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\t\t++_weeklyhours; }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t/*if(_weeklyhours>temp.get_tw_hour()){\n\t\t\t\tthis.fitness=this.fitness-100 ; //adunato na kanei parapanw wres ma8hma//\n\t\t\t}else\n\t\t\t\t{++this.fitness;}*/\n\t\t\tif(_weeklyhours<temp.get_tw_hour()){++this.fitness;}\n\t\t\tclosedSet.add(this.genes[i]);}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//*************END OF WEEKLY EVALUATION**********//\n\t\n\t\t//**START OF LESSON EVALUATION***//\n\t\tArraylistLesson set=new ArraylistLesson();\n\t\tclass_lid templ=null;\n\t\tTeacher_lesson tempj=null;\n\t\tint lid=0;\n\t\tString _class;\n\t\tint _classhours=1;\n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tlid=temp.get_lid();\n\t\t\t_class=temp.get_class();\n\t\t\ttempl=new class_lid(lid,_class);\n\t\t\tif(!set.contains(templ)){\n\t\t\t\t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\t\ttempj=getdata(this.genes[j]);{\n\t\t\t\t\t\tif(tempj!=null){\n\t\t\t\t\t\t\tif(temp.get_tid()==tempj.get_tid()){\n\t\t\t\t\t\t\t\tif(temp.get_lid()==tempj.get_lid()&&temp.get_class().equalsIgnoreCase(tempj.get_class())){\n\t\t\t\t\t\t\t\t\t++_classhours;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tint hours;\n\t\t\t\thours=temp.get_lhours();\n\t\t\t\n\t\tif(_classhours==hours){\n\t\t\t++this.fitness;\n\t\t}\n\t\tset.add(templ);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "private void modifyIndividuals(){\n for(AbstractBehaviour behaviour: entityBehaviours){\n JSONObject jsonPop = null;\n GeneticInterface gi = interfaceMap.get(behaviour);\n try {\n jsonPop = gi.receiveNewPopulation();\n } catch (IOException e) {\n e.printStackTrace();\n }\n for(String key: jsonPop.keySet()){\n JSONArray funArray = jsonPop.getJSONObject(key).getJSONArray(\"functions\");\n List<Function> functions = new LinkedList<>();\n for(int a = 0; a <funArray.length(); a++){\n String tree = funArray.getString(a);\n Function functionTree = Node.treeFromString(tree, behaviour.getNumberOfInputs());\n functions.add(functionTree);\n }\n behaviour.setEntityByName(key, functions);\n }\n behaviour.resetEntities();\n }\n }", "protected abstract List<Double> calcScores();", "protected void setGrades()\n\t{\n\t\tgradeNomes \t\t= new String[ this.getNumeroMaximoDeAluno() ];\n\t\tgradeNotas \t\t= new int[ this.getNumeroMaximoDeAluno() ];\n\t\tgradeConceitos \t= new int[ this.getNumeroMaximoDeAluno() ];\n\t}", "public BigDecimal getScores() {\n return scores;\n }", "public void setValues() {\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor (int count = 0; count < data.size(); count++) {\n\t\t\tSystem.out.println(\"Enter an integer for grade #\" + (count+1) );\n\t\t\tdata.set(scan.nextInt(), count);\n\t\t}\n\t}", "public void mergeTo(Population<Fitness, Element> destination) {\r\n Validate.nonNull(destination, \"destination\");\r\n\r\n for (Entry<Fitness, List<Element>> entry\r\n : elementsByFitness.entrySet()) {\r\n List<Element> list = entry.getValue();\r\n assert !list.isEmpty();\r\n Fitness score = entry.getKey();\r\n destination.add(list, score);\r\n }\r\n }" ]
[ "0.7092305", "0.666054", "0.64500993", "0.6299279", "0.6261554", "0.6248128", "0.62275803", "0.61609584", "0.6124505", "0.6107644", "0.61004734", "0.6077427", "0.5988335", "0.5954946", "0.5951134", "0.59190774", "0.5869766", "0.5820241", "0.58129084", "0.5808236", "0.57885313", "0.577433", "0.57633805", "0.574612", "0.5720093", "0.5712628", "0.56803894", "0.5657071", "0.56527436", "0.5650774", "0.56503975", "0.5622392", "0.5618099", "0.5574537", "0.5561332", "0.5514943", "0.55138177", "0.5468593", "0.5454985", "0.5454829", "0.5451535", "0.5411607", "0.541", "0.54011977", "0.53972024", "0.5393134", "0.5383913", "0.53791624", "0.53659564", "0.5363516", "0.53611654", "0.5342895", "0.53411424", "0.5335718", "0.53340054", "0.5329423", "0.5321078", "0.5308974", "0.5296027", "0.5290786", "0.5281211", "0.5281176", "0.52661306", "0.5262217", "0.52427167", "0.523626", "0.5235163", "0.52308315", "0.52262914", "0.5225783", "0.5219356", "0.52142704", "0.5212408", "0.51920754", "0.51908904", "0.5185497", "0.516499", "0.51620454", "0.5161572", "0.5152031", "0.5151215", "0.51444846", "0.51334244", "0.5132289", "0.513215", "0.51060945", "0.5103755", "0.51020664", "0.5100375", "0.5094704", "0.5092913", "0.50749576", "0.50731075", "0.5071967", "0.50619084", "0.5060956", "0.50583017", "0.5058014", "0.5055726", "0.5055453" ]
0.67514426
1
Creates the next generation.
public void setNextGeneration() { // create a temporary population ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>(); // select mates while (tempPopulation.size() < populationSize) { tempPopulation.add(Genotype.Mate(rouletteSelection(), rouletteSelection(), crossoverProbability)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generate() {\n\t}", "protected abstract void generate();", "public Order generateNext();", "public abstract void generate();", "public int getNextModuleGeneration() {\n return moduleGeneration.incrementAndGet();\n }", "public NextGeneration(){\n this.born[3] = true;\n this.survives[2] = true;\n this.survives[3] = true;\n }", "public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }", "public int generation()\r\n {\r\n\treturn generation;\r\n }", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "private void crearGen(int id){\n Random random = new Random();\n int longitud = random.nextInt(6) + 5;\n\n random = null;\n\n Gen gen = new Gen(id, longitud);\n agregarGen(gen);\n }", "public void generate(int i) {\n\t\n if(i == 1) next += generateCoins();\n else if(i == 2) next += generateQuestionBox();\n else if(i == 3) next += generateWall();\n\n next += 400;\n }", "public Generator(){}", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "void generate() {\n rouletteSelection();\n do {\n updateParents();\n crossover();\n mutation();\n } while (!isValidOffset());\n insertOffspring();\n }", "abstract T generate();", "public abstract void generateNextBlock();", "private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }", "private long generateID() {\n\t\treturn ++lastID;\n\t}", "public synchronized void generate () {\n\t\tgenerate( () -> {\n\t\t});\n\t}", "public void\t\t\tgenerateNextRequest() throws Exception\n\t{\n\t\t// generate a random number of instructions for the request.\n\t\tlong noi =\n\t\t\t(long) this.rng.nextExponential(this.meanNumberOfInstructions) ;\n\t\tRequest r = new Request(this.rgURI + \"-\" + this.counter++, noi) ;\n\t\t// generate a random delay until the next request generation.\n\t\tlong interArrivalDelay =\n\t\t\t\t(long) this.rng.nextExponential(this.meanInterArrivalTime) ;\n\n\t\tif (RequestGenerator.DEBUG_LEVEL == 2) {\n\t\t\tthis.logMessage(\n\t\t\t\t\t\"Request generator \" + this.rgURI + \n\t\t\t\t\t\" submitting request \" + r.getRequestURI() + \" at \" +\n\t\t\t\t\tTimeProcessing.toString(System.currentTimeMillis() +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinterArrivalDelay) +\n\t\t\t\" with number of instructions \" + noi) ;\n\t\t}\n\t\t\n\t\t// submit the current request.\n\t\tthis.rsop.sendRequestAndNotify(r) ;\n\t\t// schedule the next request generation.\n\t\tthis.nextRequestTaskFuture =\n\t\t\tthis.scheduleTask(\n\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t((RequestGenerator)this.getOwner()).\n\t\t\t\t\t\t\t\tgenerateNextRequest() ;\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tTimeManagement.acceleratedDelay(interArrivalDelay),\n\t\t\t\tTimeUnit.MILLISECONDS) ;\n\t\t\n\t}", "public Label create() {\n\t\t\tgeneratedValue += 1;\n\t\t\treturn new Label(Type.GENERATED, generatedValue);\n\t\t}", "public NextGeneration getNextGenerationClone(){\n \n NextGeneration clone = new NextGeneration();\n \n clone.born = new boolean[this.born.length];\n clone.survives = new boolean[this.survives.length];\n \n for(int i = 0; i < born.length; i++){\n clone.born[i] = this.born[i];\n clone.survives[i] = this.survives[i];\n }\n return clone;\n }", "public long getNextID() throws IDGenerationException;", "private void generate() {\n preGenerate();\n\n SpriteGrid grid = new SpriteGrid(specState);\n IOHelper.pixelsToBitmap(grid.draw(), sprite);\n\n }", "public Jewel generate()\r\n\t{\r\n\t\treturn new Jewel(rand.nextInt(maxType));\r\n\t}", "public int getGeneration ()\n {\n return generation;\n }", "@java.lang.Override\n public long getGeneration() {\n return generation_;\n }", "private static int generateCircleId(){\n return snextCircleId.incrementAndGet();\n\n }", "public boolean generate();", "public InnovationGenerator() {\n this.atomicInteger = new AtomicInteger();\n }", "public void nextGeneration() {\n // Copy the present into the future in case something spawned\n System.arraycopy(universe,0,futureUniverse,0,universe.length);\n\n for (int line = 0; line < getHeight(); line++) {\n for (int column = 0; column < getWidth(); column++) {\n int aliveNeighbours = getAliveNeighboursCount(line,column);\n // Cell becomes alive if exactly 3 alive neighbours\n if (aliveNeighbours == 3) {if (!getCell(line,column)) toogleLifeStatus(line,column);}\n // Cell dies with less than two or more than 3 neighbours\n else if (aliveNeighbours < 2 | aliveNeighbours > 3) {if (getCell(line,column)) toogleLifeStatus(line,column);}\n }\n }\n if (Arrays.deepEquals(universe, futureUniverse)) universStable = true;\n // Copy the future into the present\n System.arraycopy(futureUniverse,0,universe,0,futureUniverse.length);\n }", "@java.lang.Override\n public long getGeneration() {\n return generation_;\n }", "private long getNextSequenceNumber() {\n return System.nanoTime();\n }", "private void beginGen(String node) {\n nodeStack.push(node);\n errors.debugMessage(\"Generating \" + node);\n errors.incDebug();\n }", "@Override\n public long generateNewTimeToNextContract() {\n return new Random().nextInt(5);\n }", "public void generate() {\n\t\tMirror m = new Mirror();\n\t\tpoints.addAll(m.fish());\n\t\twhile (remainingPoints > 0) {\n\t\t\titerate();\n\t\t\tremainingPoints--;\n\t\t}\n\n\t}", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "public UUID generate() {\n return UUID.randomUUID();\n }", "@Override\n\tpublic void beginGeneration() {\n\t\tfor(int seqIndex = 0; seqIndex < NUM_SEQUENCES; ++seqIndex) {\n\t\t\tfor(int pieceIndex = 0; pieceIndex < SEQUENCE_LENGTH; ++pieceIndex) {\n\t\t\t\tsequences[seqIndex][pieceIndex] = random.nextInt(State.N_PIECES);\n\t\t\t}\n\t\t}\n\t}", "public Generateur() {\n }", "public abstract Animal[] createGeneration (int count, Animal[] lastGeneration);", "public GenerationData generateGenerations(int numOfGenerations, Persons userPerson)\n {\n userName = userPerson.getDescendantID();\n eventGenerator = new EventGenerator(userName);\n\n startFamilyTree(userPerson, numOfGenerations);\n\n return new GenerationData(familyTree, eventGenerator.getAllEvents());\n }", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "ValueGenerator createValueGenerator(String strategyName, String seqName, Properties props, ValueGenerationConnectionProvider connectionProvider);", "public void generateCode() {\n code = java.util.UUID.randomUUID().toString();\n }", "public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}", "protected LLVMGenerator doGenerate(IAstModule mod) throws Exception {\n \t\treturn doGenerate(mod, false);\n \t}", "protected void generar() {\n generar(1, 1);\n }", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "private void _generate() {\n System.out.println(\"Started...\");\n try {\n log_ = new PrintStream(new FileOutputStream(System.getProperty(\"user.dir\") +\n \"\\\\\" + LOG_FILE));\n //writer_.start(); \n\t for (int i = 0; i < instances_[CS_C_UNIV].num; i++) {\n\t _generateUniv(i + startIndex_);\n\t }\n \n //writer_.end();\n log_.close();\n }\n catch (IOException e) {\n System.out.println(\"Failed to create log file!\");\n }\n System.out.println(\"Completed!\");\n }", "private String generateOrderNumber() {\n return OBJ_PREFIX + ID_GENERATOR.getAndIncrement();\n }", "private void buildGenerations(BDD initialGeneration){\n\t\tBDD currentGeneration = initialGeneration;\n\t\tint i = 0;\n\t\t\n\t\tthis.generations.add(currentGeneration.copy());\n\t\n\t\twhile(i++ < endGenerations){\n\n\t\t\tBDD nextGeneration = getNextGeneration(currentGeneration);\n\t\t\tthis.generations.add(nextGeneration);\n\t\t\t\n\t\t\tcurrentGeneration.free();\n\t\t\tcurrentGeneration = nextGeneration.copy();\n\t\t}\t\t\n\t}", "public Generation(int i)\r\n {\r\n k = i;\r\n }", "@Override\n public T generate() {\n counter = calculate();\n return values[counter];\n }", "public static void generateCode()\n {\n \n }", "private void setNextGeneration() {\n\t\tRowIterator iterator = neighbors.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tInteger numNeighbors = (Integer) neighbors.elementAt(row, col);\n\t\t\t\tif (numNeighbors == 0 || numNeighbors == 1) { // dies if\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbors are\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 0 or 1\n\t\t\t\t\tnextGen.setValue(row, col, false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (numNeighbors >= 4) { // dies if neighbors are 4 or more\n\t\t\t\t\tnextGen.setValue(row, col, false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (numNeighbors == 3) { // lives if neighbors are 3\n\t\t\t\t\tnextGen.setValue(row, col, true);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (numNeighbors == 2) { // if neighbors are 2, lives or dies\n\t\t\t\t\tif (!currentGen.elementAt(row, col).equals(false)) { // currently\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alive\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// so\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// lives\n\t\t\t\t\t\tnextGen.setValue(row, col, true);\n\t\t\t\t\t} else { // currently dead so stays dead\n\t\t\t\t\t\tnextGen.setValue(row, col, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentGen = nextGen; // set current to next\n\t\tnextGen = new MySparseArray(false); // reset next\n\t\tneighbors = new MySparseArray(0); // reset neighbors\n\t}", "public NameGenerator() {\n this.rand = new Random();\n }", "private BDD build_T() {\n\t\tExecutorService executorService = Executors.newCachedThreadPool();\n\t\tList<Future<BDD>> tasks = new ArrayList<>(processors);\n\n\t\tint scheduler = processors;\n\t\tint work = endGenerations / processors;\n\t\tint half = work;\n\n\t\tif((endGenerations % processors) != 0)\n\t\t\tscheduler--;\n\n\t\tfor (int i = 0; i < scheduler; i++){\n\t\t\ttasks.add(executorService.submit(new AsyncTask(work - half, work)));\t\n\n\t\t\twork += half;\n\t\t}\n\n\t\tif((endGenerations % processors) != 0)\n\t\t\ttasks.add(executorService.submit(new AsyncTask(work - half, work+1)));\t\n\t\t\n\n\t\tBDD res = factory.makeZero();\n\t\tfor (int i = 0; i < processors; i++) {\n\t\t\ttry {\n\n\t\t\t\tres.orWith(tasks.get(i).get());\n\n\t\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\n\t\t}\n\n\t\texecutorService.shutdown();\n\n\t\treturn res;\n\t}", "public String generate() {\r\n String result = RandomStringUtils.random(8,true,true);\r\n return result;\r\n }", "public int generate(int k) {\n // PUT YOUR CODE HERE\n }", "void generateNewBoard() {\n createAvailableDice();\n\n // Add them to board\n generateBoardLayout();\n }", "public void generate() {\n currentlyGenerating = true;\n Bukkit.broadcastMessage(ChatColor.GREEN + \"The world generation process has been started!\");\n createUhcWorld();\n }", "private RandomLocationGen() {}", "public IChunkProvider createChunkGenerator() {\n\t\treturn new ChunkProviderEnd(this.worldObj, this.worldObj.getSeed());\n\t}", "@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}", "Object getNextRuntimeId() throws PersistenceException;", "public static void generateNext(Platform lastPlatform) {\r\n Random rand = new Random();\r\n // X value of the next platform\r\n int xNew = ((lastPlatform.getX() + lastPlatform.getWidth() / 2) + rand.nextInt(300) - 150 - w / 2);\r\n\r\n if (xNew < 0) { // If the new X is off the left side of the screen\r\n xNew += -xNew + rand.nextInt(80); // Add the distance it is off the screen, then add a random value\r\n } \r\n else if (xNew + w >= Java2DGame.SCREENWIDTH - 7) { // If the right side of the platform is off the right side of the screen\r\n xNew -= (xNew + w - Java2DGame.SCREENWIDTH +6) + rand.nextInt(80); // subtract the distance it is off the screen plus a random value\r\n \r\n }\r\n \r\n // Determine the new Y coordinate for the platform\r\n int yNew = lastPlatform.getY() - 120 - rand.nextInt(10);\r\n Board.platforms.add(new Platform(xNew, yNew, 100, 50));\r\n }", "public int getGeneration(){\n\t\treturn generation;\n\t}", "private void generateData(){\n generateP50boys();\n generateP50girls();\n generateP97boys();\n generateP97girls();\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }", "private SVGGraphics2D getGenerator() throws Exception {\n\t\tDOMImplementation dom = GenericDOMImplementation.getDOMImplementation();\n\t\tDocument doc = dom.createDocument(null, \"svg\", null);\n\t\tSVGGraphics2D generator = new SVGGraphics2D(doc);\n\t\treturn generator;\n\t}", "public Generator getGenerator(String theClass);", "public String generateTransferencia() {\n\n MSequence seq = new MSequence(getCtx(), 5000048, get_TrxName());\n\n return Integer.toString(seq.getCurrentNext());\n }", "long getNextSequenceNumber();", "Multiplication createRandomMultiplication();", "Multiplication createRandomMultiplication();", "public int generateId(){\n return repository.getCount()+1;\n }", "private void createNextPage(String nextPageId) {\n DatabaseReference nextPageRef = db.getReference(\"Global\").child(nextPageId);\n GlobalPageObject po = new GlobalPageObject();\n\n po.setText(DB_NULL);\n po.setImage(DB_NULL);\n po.setUser(DB_NULL);\n po.setFromUser(iUserId);\n po.setFrom(iPageId);\n po.setLeft(DB_NULL);\n po.setLeftUser(DB_NULL);\n po.setNextLeft(DB_NULL);\n po.setRight(DB_NULL);\n po.setRightUser(DB_NULL);\n po.setNextRight(DB_NULL);\n po.setBeingWorkedOn(\"no\");\n\n nextPageRef.setValue(po);\n }", "public String getNextID() {\n String id = \"am\" + Integer.toString(nextID);\n nextID++;\n return id;\n }", "interface Generator {\n int[] generate(int size);\n }", "public void generateID()\n {\n ID = this.hashCode();\n }", "public BigInteger getNextBigID() throws IDGenerationException;", "public void writeNextGeneration() {\n System.out.println(\"generation \" + generation);\n for (int i = 0; i < currentPopulation; i++) {\n System.out.println(((Genome) genomes.get(i)).toString());\n }\n\n System.out.println(\"generation #\" + generation + \", Hit the enter key to continue...\\n\");\n try {\n\t\t\tThread.sleep(60);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n /*\n try {\n System.in.read();\n } catch (Exception e) {\n e.printStackTrace();\n }\n */\n }", "private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}", "int nextId();", "public void createGrid() {\r\n generator.generate();\r\n }", "public BPELGeneratorImpl() {\r\n \t\tsuper(GENERATOR_NAME);\r\n \t}", "public static JobID generate() {\n return new JobID();\n }", "public String GenerateID()\n\t{\n\t\tRandom randomGenerator = new Random();\n\t\treturn Integer.toString(randomGenerator.nextInt(Integer.MAX_VALUE));\n\t}", "public int getGeneration() {\n\t\treturn _generation;\n\t}", "public static long next() {\n return System.currentTimeMillis();\n }", "Sequence createSequence();", "private synchronized static String getNextNumber() {\n String toReturn;\n String number = String.valueOf(Math.round(Math.random() * 89999) + 10000);\n if(meetings.containsKey(number)) {\n toReturn = getNextNumber();\n } else {\n toReturn = number;\n }\n return toReturn;\n }", "public JsonGenerator createGenerator(Writer w)\n/* */ throws IOException\n/* */ {\n/* 1129 */ IOContext ctxt = _createContext(w, false);\n/* 1130 */ return _createGenerator(_decorate(w, ctxt), ctxt);\n/* */ }", "public void generate(File file) throws IOException;", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "private static int generateId() {\n\t\treturn ++sId;\n\t}", "private String sequenceNumberGenerator() {\n\t\tint sequenceId = 0;\n\t\tRid entity = null;\n\t\ttry {\n\t\t\tentity = ridRepository.findLastRid();\n\t\t} catch (DataAccessException | DataAccessLayerException e) {\n\t\t\tthrow new RidException(RidGeneratorExceptionConstant.RID_FETCH_EXCEPTION.getErrorCode(),\n\t\t\t\t\tRidGeneratorExceptionConstant.RID_FETCH_EXCEPTION.errorMessage, e);\n\t\t}\n\t\ttry {\n\t\t\tif (entity == null) {\n\t\t\t\tentity = new Rid();\n\t\t\t\tsequenceId = sequenceInitialValue;\n\t\t\t\tentity.setCurrentSequenceNo(sequenceInitialValue);\n\t\t\t\tridRepository.save(entity);\n\t\t\t} else {\n\t\t\t\tif (entity.getCurrentSequenceNo() == sequenceEndvalue) {\n\t\t\t\t\tsequenceId = sequenceInitialValue;\n\t\t\t\t\tridRepository.updateRid(sequenceInitialValue, entity.getCurrentSequenceNo());\n\t\t\t\t} else {\n\t\t\t\t\tsequenceId = entity.getCurrentSequenceNo() + 1;\n\t\t\t\t\tridRepository.updateRid(sequenceId, entity.getCurrentSequenceNo());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (DataAccessException | DataAccessLayerException e) {\n\t\t\tthrow new RidException(RidGeneratorExceptionConstant.RID_UPDATE_EXCEPTION.getErrorCode(),\n\t\t\t\t\tRidGeneratorExceptionConstant.RID_UPDATE_EXCEPTION.errorMessage, e);\n\t\t}\n\t\treturn String.format(sequenceFormat, sequenceId);\n\t}", "@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}" ]
[ "0.69206154", "0.6782394", "0.66955495", "0.6597136", "0.6565528", "0.65440905", "0.6535309", "0.65127957", "0.63766426", "0.6239581", "0.6130879", "0.6084129", "0.6075995", "0.6032806", "0.6015553", "0.6011456", "0.5991895", "0.5989571", "0.59842587", "0.59420556", "0.58981645", "0.5868974", "0.58426446", "0.58192915", "0.5771921", "0.5770577", "0.57584274", "0.57582486", "0.57426906", "0.5742474", "0.5733361", "0.5726307", "0.5717211", "0.5715377", "0.56980383", "0.56962204", "0.56905764", "0.5682228", "0.5662606", "0.56530195", "0.5649537", "0.56306505", "0.5628101", "0.5621299", "0.5620099", "0.5617186", "0.5611478", "0.56061983", "0.5601304", "0.5593476", "0.55865896", "0.5584827", "0.5579776", "0.5570457", "0.556744", "0.55476034", "0.55460465", "0.55358386", "0.55344856", "0.5527305", "0.5526096", "0.5522701", "0.55155414", "0.55146366", "0.5513911", "0.5499099", "0.5498087", "0.5495341", "0.5482691", "0.54811954", "0.548095", "0.54778177", "0.54774123", "0.5475221", "0.54704607", "0.54697746", "0.54697746", "0.54678875", "0.54639655", "0.54597306", "0.5442849", "0.54396486", "0.54296035", "0.5416379", "0.5415208", "0.5402651", "0.5400902", "0.5395052", "0.53869593", "0.53869045", "0.5385659", "0.53759855", "0.53747916", "0.5372979", "0.53682995", "0.53677744", "0.5366621", "0.53647304", "0.5364469", "0.5363237" ]
0.603555
13
Selects a genotype to mate.
public Genotype rouletteSelection() { // get a number between 0 and 1 to compare against double slice = rnd.nextDouble(); // keep track of the cumulative fitness double cumulativeFitness = 0; // loop through the population to pick a mate for (Genotype g : population) { // increment the cumulative fitness with the member's normalized fitness cumulativeFitness += g.getNormalizedFitness(); // if the cumulative fitness is greater than the random number, if (cumulativeFitness > slice) { // select the member for mating return g; } } // if no members are chosen, pick the one with the highest fitness score return population.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectPhenotype(String option) {\r\n if (option.equals(\"null\") || option.equals(currentPhenotype)){\r\n return;\r\n } \r\n \r\n setDatasets((VerifiedSNP) getController().getActiveSNP(), option);\r\n currentPhenotype = option; \r\n }", "public AbstractPokemon.Type selectType()\n {\n JOptionPane typeSelector = new JOptionPane();\n Object message = \"Select which Pokemon this trainer is willing to capture:\";\n Object[] options = {AbstractPokemon.Type.FIRE_TYPE, AbstractPokemon.Type.WATER_TYPE, AbstractPokemon.Type.GRASS_TYPE, AbstractPokemon.Type.ANY_TYPE};\n int type = typeSelector.showOptionDialog(null, message, \"Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, \n options[3]);\n AbstractPokemon.Type faveType;\n switch(type)\n {\n case 0: faveType = AbstractPokemon.Type.FIRE_TYPE; break;\n case 1: faveType = AbstractPokemon.Type.WATER_TYPE; break;\n case 2: faveType = AbstractPokemon.Type.GRASS_TYPE; break;\n case 3: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n default: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n }\n return faveType;\n }", "@Override\n public void selectGolem(int id) {\n }", "public void setSelectMethod(Selection s){\n selectType = s;\n }", "private void select() {\n\t\tif (selected.equals(mealSelect) && !eating) {\n\t\t\tmakeMeal();\n\t\t} else if (selected.equals(snackSelect) && !eating) {\n\t\t\tmakeSnack();\n\t\t} else if (selected.equals(medicineSelect) && !eating){\n\t\t\tmakeMedicine();\n\t\t} else if (selected.equals(playSelect) && !eating){\n\t\t\tmakePlay();\n\t\t}\n\t\t\n\t}", "public void setNextGeneration() {\n // create a temporary population\n ArrayList<Genotype> tempPopulation = new ArrayList<Genotype>();\n\n // select mates\n while (tempPopulation.size() < populationSize) {\n tempPopulation.add(Genotype.Mate(rouletteSelection(),\n rouletteSelection(), crossoverProbability));\n }\n }", "private void setSelectedCreatingShape(KeyShapeGenerator gen) {\n GaudrophoneController.getController().getCanvasManager().setState(State.CreatingShape);\n GaudrophoneController.getController().getCanvasManager().setStoredKeyGenerator(gen);\n }", "public void selected(Guy g)\n {\n guy.pickingLocation = !guy.pickingLocation;\n }", "public void selectAgent(int selected) {\n this.selected = selected;\n }", "public void select(Object obj, boolean selectionFlag);", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "public abstract void select(boolean select);", "void update(String selectedGene);", "public void selected(String action);", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "public void setSelection(int molIndex) {}", "public void toSelectingWeapon() {\n }", "public void select() {}", "public void select(int action) {\n\t\tselected = true;\n\t\tthis.action = action;\n\t}", "public void select();", "@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}", "public void setSelector(Selector<GenomeType> selector)\n {\n this.selector = selector;\n }", "public void testSelect_0()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n Gene gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n selector.select(1, null, new Population(conf));\n }", "public void selectTarget(ICharacter character) {\n }", "public void select ();", "public void setSelection(Pair selection);", "private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}", "public abstract String getSelectedPhoneType1();", "public abstract String getSelectedPhoneType2();", "private void selectByType(boolean type) {\n if (type) {\n textBuffer.setDragStart();\n } else {\n textBuffer.setDragEnd();\n }\n }", "void pickUp();", "public void SelectType( Standard_Type atype, long keep) {\n OCCwrapJavaJNI.Interface_EntityIterator_SelectType(swigCPtr, this, Standard_Type.getCPtr(atype) , atype, keep);\n }", "public void selectorGenero(java.util.Scanner key) {\n\t\tint selector2;\n\t\tdo {\n\t\t\tSystem.out.println(\"1 para hombre 2 para mujer\");\n\t\t\tselector2 = key.nextInt();\n\t\t\t\n\t\t\tswitch(selector2) {\n\t\t\tcase 1:\n\t\t\t\tthis.setGenero(Genero.H);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tthis.setGenero(Genero.M);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(selector2 < 1 || selector2 > 2);\n\t\t\n\t}", "private void selectType(TypeInfo type) {\n if (type == null || !type.getWidget().getSelection()) {\n mInternalTypeUpdate = true;\n mCurrentTypeInfo = type;\n for (TypeInfo type2 : sTypes) {\n type2.getWidget().setSelection(type2 == type);\n }\n updateRootCombo(type);\n mInternalTypeUpdate = false;\n }\n }", "public void chooseForMe() {\n }", "@Override\r\n\tpublic void setSelectedType(int paramInt) {\n\r\n\t}", "Select(){\n }", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void pickModels(GLAutoDrawable drawable, Igra igra, IntBuffer selectBuffer, int xCursor, int yCursor, GLU glu) {\n GL2 gl = drawable.getGL().getGL2();\n\n igra.startPicking(drawable, selectBuffer);\n igra.palettePicking(drawable, glu, xCursor, yCursor);\n\n gl.glPushName(Promenljive.SPHERE_ID);\n p.paletteSphere(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CUBOID_ID);\n p.paletteCuboid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CYLINDER_ID);\n p.paletteCylinder(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TETRAHEDRON_ID);\n p.paletteTetrahedron(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CUBE_ID);\n p.paletteCube(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.CONE_ID);\n p.paletteCone(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.RECTANGULAR_PYRAMID_ID);\n p.paletteRectangularPyramid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.PENTAGON_PYRAMID_ID);\n p.palettePentagonPyramid(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.HEXAGON_PYRAMID_ID);\n p.paletteHexagonPyramid(drawable);\n gl.glPopName();\n\n gl.glPushMatrix();\n\n\n\n gl.glRotated(pr.currentAngleOfRotationX, 1, 0, 0);\n gl.glRotated(pr.currentAngleOfRotationY, 0, 1, 0);\n\n gl.glPushName(Promenljive.LEFT_ID);\n drawLeft(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.LEFT_TWO_ID);\n drawLeftTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.RIGHT_ID);\n drawRight(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TOP_ID);\n drawTop(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.TOP_TWO_ID);\n drawTopTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BOTTOM_ID);\n drawBottom(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BOTTOM_TWO_ID);\n drawBottomTwo(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.FRONT_ID);\n drawFront(drawable);\n gl.glPopName();\n\n gl.glPushName(Promenljive.BACK_ID);\n drawBack(drawable);\n gl.glPopName();\n\n\n gl.glPopMatrix();\n gl.glPopMatrix();\n igra.endPicking(drawable, selectBuffer);\n }", "public Selector<GenomeType> getSelector()\n {\n return this.selector;\n }", "Genome chooseParent();", "@Override\n\tpublic void optionSelected(AbstractPlayer arg0, AbstractMonster arg1, int arg2) {\n\t\t\n\t}", "@Override\n\tpublic void select() {\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgsv.startSelectState();\n\t\t\t}", "public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }", "public void selectAt(MouseEvent e) {\r\n \t\tactivateSelect();\r\n \t\tmouseListner.mousePressed(e);\r\n \t}", "public void selectModelItem(final String type, final String name){\n\t\tactivate();\n\t\tDisplay.syncExec(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n DefaultCTabItem tabItem = new DefaultCTabItem(1);\n\t\t\t\ttabItem.activate();\n\t\t\t\tGraphicalViewer viewer = ((IEditorPart) tabItem.getSWTWidget().getData()).getAdapter(GraphicalViewer.class);\n\t\t\t\tviewer.select(ViewerHandler.getInstance().getEditParts(viewer, new ModelEditorItemMatcher(type, name)).get(0));\n\t\t\t}\n\t\t});\n\t}", "Object getSelection();", "public void select ()\r\n \t\t{\r\n \t\t\tString sinput;\t\t\t\r\n \t\t\t\r\n \t\t\tdo {\r\n \t\t\t\tErrorLog.debug (\"Setting size: \" + getSize()); //Need to check if Short values\r\n \t\t\t\t//Can be passed in.\r\n \t\t\t\t\r\n \t\t\t\tprint (\"The current \" + name + \" is: \" + setting + type);\r\n \t\t\t\tprint (\"Would you like to change this? (\"+yes+\"/\"+no+\")\");\r\n \t\t\t\tsinput = read ();\r\n \t\t\t\t\r\n \t\t\t\tif (sinput.equalsIgnoreCase(yes)){\r\n \t\t\t\t\tprint (\"Please enter the \" + name + \" in \" + type);\r\n \t\t\t\t\tsinput = read ();\r\n \t\t\t\t\t\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tsetting = Short.parseShort(sinput);\r\n \t\t\t\t\t\tprint (name + \" changed.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t\tcatch (NumberFormatException e){\t\t\t\t\t\r\n \t\t\t\t\t\tprint (\"That's not a valid number!\");\r\n \t\t\t\t\t}\t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t\telse if (sinput.equalsIgnoreCase(no)){\r\n \t\t\t\t\tprint (\"Setting kept.\");\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tprint (\"That's not an option.\");\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t} while (true);\r\n \t\t}", "@Override\r\n\tpublic List<Type> selectType() {\n\t\treturn gd.selectType();\r\n\t}", "public void defaultMutate() {\n int mutationIndex = RNG.randomInt(0, this.m_GenotypeLength);\n //if (mutationIndex > 28) System.out.println(\"Mutate: \" + this.getSolutionRepresentationFor());\n if (this.m_Genotype.get(mutationIndex)) this.m_Genotype.clear(mutationIndex);\n else this.m_Genotype.set(mutationIndex);\n //if (mutationIndex > 28) System.out.println(this.getSolutionRepresentationFor());\n }", "private void selectRandom() {\n\n\t\tRandom randomise;\n\n\t\t// Select random char from Spinner only if it is enabled\n\t\tif (solo.getCurrentSpinners().get(0).isEnabled()) {\n\t\t\trandomise = new Random();\n\t\t\trandomCharPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t\t.getCount());\n\n\t\t\tsolo.pressSpinnerItem(0, randomCharPos);\n\t\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\t\trandomChar = solo.getCurrentSpinners().get(0).getSelectedItem()\n\t\t\t\t\t.toString();\n\t\t}\n\n\t\t// Select random act from Spinner\n\t\trandomise = new Random();\n\t\trandomActPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t.getCount());\n\n\t\tsolo.pressSpinnerItem(1, randomActPos);\n\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\trandomAct = solo.getCurrentSpinners().get(1).getSelectedItem()\n\t\t\t\t.toString();\n\n\t\t// Select random page from Spinner\n\t\trandomise = new Random();\n\t\trandomPagePos = randomise.nextInt(solo.getCurrentSpinners().get(2)\n\t\t\t\t.getCount());\n\n\t\tsolo.pressSpinnerItem(2, randomPagePos);\n\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\trandomPage = solo.getCurrentSpinners().get(2).getSelectedItem()\n\t\t\t\t.toString();\n\t}", "public int randomGene();", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "void setSelectedActorIdentity(ArtistCommunitySelectableIdentity identity);", "@And(\"^I go to \\\"([^\\\"]*)\\\" type and select \\\"([^\\\"]*)\\\"$\") //Selecting Type & sub-Type in Create form\r\n\tpublic void selectFormType(String type,String subtype) {\r\n\t\r\n\tenduser.selectFormType(type,subtype);\r\n\t}", "@Override\n public Individual selectIndividual(Population population, Individual individual, MersenneTwister rnd, ExperimentalData expData, Statistics stats) {\n List<Integer> indexIndividuals = new ArrayList<>();\n Integer bigger = -1;\n double[] outputs = expData.getDataset(Utils.DatasetType.TRAINING).getOutputs();\n int index = identifyCloserIndividual(population, individual, outputs, indexIndividuals, bigger, rnd);\n getStatisticsDim(individual, population.get(index), stats, outputs);\n return population.get(index);\n }", "@DISPID(-2147412032) //= 0x800117c0. The runtime will prefer the VTID if present\n @VTID(9)\n void onselectionchange(\n @MarshalAs(NativeType.VARIANT) java.lang.Object p);", "@Override\n\t// Select individuals for crossover\n\tprotected Individual tournamentSelection(Population pop) {\n\t\tSortingIndividual baseIndiv = (SortingIndividual) pop.individuals[0];\n\t\tPopulation tournament = new SortingPopulation(tournamentSize, baseIndiv.getBase(), false);\n\t\t// For each place in the tournament get a random individual\n\t\tfor (int i = 0; i < tournamentSize; i++) {\n\t\t\tint randomId = (int) (Math.random() * pop.size());\n\t\t\ttournament.saveIndividual(i, pop.getIndividual(randomId));\n\t\t}\n\t\t// Get the fittest\n\t\tIndividual fittest = tournament.getFittest();\n\t\treturn fittest;\n\t}", "public GAIndividual selectParent(Vector pop);", "public abstract String getSelectedPhoneType3();", "public SelectStereotypeDialog(Shell parentShell, Point point, NotifyElement pageParent, String model)\n {\n super(parentShell, point, \"Stereotype Selection\"); //$NON-NLS-1$\n if (pageParent instanceof ImportRequirementWizardPageSelectDocument)\n {\n wizard = (ImportRequirementWizardPageSelectDocument) pageParent;\n }\n requirementInheritance = getAllClasses(model);\n }", "public <S extends Component> Selection<S> selectFirst(final Class<S> type) {\n return new Selection<S>(type);\n }", "public void selectAProduct() {\n specificProduct.click();\n }", "void selectpos()\n {\n \n }", "public void enterOption(int choice) {\n Method[] methods = playingDevice.getClass().getDeclaredMethods();\r\n methods[choice].setAccessible(true);\r\n try {\r\n if(methods[choice].getGenericParameterTypes().length==0) {\r\n methods[choice].invoke(playingDevice);\r\n } else {\r\n System.out.println(\"Invoke konnte nicht ausgefuehrt werden, da Parameter erwartet werden.\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n // RANDOM METHODE WÄHLEN\r\n // INVOKE\r\n }", "public void selectVenue() {\n\t\t\r\n\t}", "protected void checkSelectGesture(GraphicsNodeEvent evt) {\n\n\t\tGraphicsNodeMouseEvent mevt = null;\n\t\tif (evt instanceof GraphicsNodeMouseEvent) {\n\t\t\tmevt = (GraphicsNodeMouseEvent) evt;\n\t\t}\n\n\t\tGraphicsNode source = evt.getGraphicsNode();\n\t\tif (isDeselectGesture(evt)) {\n\t\t\tif (selectionNode != null) {\n\t\t\t\tselectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);\n\t\t\t}\n\t\t\tclearSelection();\n\t\t} else if (mevt != null) {\n\n\t\t\tPoint2D p = mevt.getPoint2D();\n\n\t\t\tif ((source instanceof Selectable) && (isSelectStartGesture(evt))) {\n\t\t\t\tif (selectionNode != source) {\n\t\t\t\t\tif (selectionNode != null) {\n\t\t\t\t\t\tselectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t\tselectionNode = source;\n\t\t\t\t\tif (source != null) {\n\t\t\t\t\t\tselectionNodeRoot = source.getRoot();\n\t\t\t\t\t\tselectionNodeRoot.addTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t((Selectable) source).selectAt(p.getX(), p.getY());\n\t\t\t\tdispatchSelectionEvent(new SelectionEvent(null, SelectionEvent.SELECTION_STARTED, null));\n\n\t\t\t} else if (isSelectEndGesture(evt)) {\n\t\t\t\tif (selectionNode == source) {\n\t\t\t\t\t((Selectable) source).selectTo(p.getX(), p.getY());\n\t\t\t\t}\n\t\t\t\tObject oldSelection = getSelection();\n\t\t\t\tif (selectionNode != null) {\n\t\t\t\t\tShape newShape;\n\t\t\t\t\tnewShape = ((Selectable) selectionNode).getHighlightShape();\n\t\t\t\t\tdispatchSelectionEvent(new SelectionEvent(oldSelection, SelectionEvent.SELECTION_DONE, newShape));\n\t\t\t\t}\n\t\t\t} else if (isSelectContinueGesture(evt)) {\n\n\t\t\t\tif (selectionNode == source) {\n\t\t\t\t\tboolean result = ((Selectable) source).selectTo(p.getX(), p.getY());\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\tShape newShape = ((Selectable) selectionNode).getHighlightShape();\n\n\t\t\t\t\t\tdispatchSelectionEvent(new SelectionEvent(null, SelectionEvent.SELECTION_CHANGED, newShape));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((source instanceof Selectable) && (isSelectAllGesture(evt))) {\n\t\t\t\tif (selectionNode != source) {\n\t\t\t\t\tif (selectionNode != null) {\n\t\t\t\t\t\tselectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t\tselectionNode = source;\n\t\t\t\t\tif (source != null) {\n\t\t\t\t\t\tselectionNodeRoot = source.getRoot();\n\t\t\t\t\t\tselectionNodeRoot.addTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t((Selectable) source).selectAll(p.getX(), p.getY());\n\t\t\t\tObject oldSelection = getSelection();\n\t\t\t\tShape newShape = ((Selectable) source).getHighlightShape();\n\t\t\t\tdispatchSelectionEvent(new SelectionEvent(oldSelection, SelectionEvent.SELECTION_DONE, newShape));\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void visit(Choose choose)\r\n\t{\n\t\t\r\n\t}", "public void choicePersonage() {\n\t\tSystem.out.println(\"souhaitez-vous créer un guerrier ou un magicien ?\");\n\t\tchoice = sc.nextLine().toLowerCase();\t\t\t\n\t\tSystem.out.println(\"Vous avez saisi : \" + choice);\n\t\tif(!(choice.equals(MAGICIEN) || choice.equals(GUERRIER))) {\n\t\t\tchoicePersonage();\n\t\t}\n\t\tsaisieInfoPersonage(choice);\n\t}", "@Override\n public void deselectGolem() {\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n state = \"select\";\r\n instruction.setText(\"Drag the rectangle to cover the whole shape which you want to select\");\r\n\r\n }", "public void onIndividualSelected(Individual individual) {\n\t\t\n\t}", "public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }", "public Sim.Sex chooseSex() {\n if(RND.nextInt() > 0.5) {\n return Sim.Sex.M;\n } else {\n return Sim.Sex.F;\n }\n }", "@FXML\n public void massSelect(ActionEvent event) {\n \tmassSelection = massCombo.getSelectionModel().getSelectedItem().toString();\n \tmassCombo.setValue(massSelection);\n }", "public void setSelectedGene(String geneID)\n\t\t{\n\t\tselectedGene=geneID;\n\t\tSystem.out.println(selectedGene);\n\t\trepaint();\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void chooseAction(String actionSet, String action) {\n\t\topen();\n\n\t\tnew DefaultCombo().setSelection(actionSet);\n\t\tnew DefaultTreeItem(new TreeItemRegexMatcher(action + \".*\")).doubleClick();\n\t}", "protected abstract void doSelection() throws IOException;", "void select();", "@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }", "@Override\n public void onItemSelected (AdapterView<?> parent, View view, int position, long id)\n {\n genderSelected = parent.getItemAtPosition(position).toString();\n }", "public void selectA() { }", "public void select(boolean a)\n {\n selected = a;\n }", "public void toSelectingAction() {\n }", "public static void menu() {\n\t\tSystem.out.println(\"\\nPlease select which type of argument to generate by entering the associated number.\\n\");\n\t\tfor(int i = 0; i < type.length; i++) {\n\t\t\tSystem.out.println((i+1)+\". \"+type[i]);\n\t\t}\n\t\tSystem.out.println(\"8. Quit\");\n\t}", "@Override\n public void selectObject (GL2 gl, GLU glu, GLUT glut, int numSelected, int[] selectInfo) {\n // guaranteed at least one was selected\n int minZ = selectInfo[1];\n int r = selectInfo[3];\n int c = selectInfo[4];\n // for each hit, find closest object\n int idx = 5;\n for (int k = 1; k < numSelected; k++, idx += 5) {\n if (selectInfo[idx + 1] < minZ) {\n minZ = selectInfo[idx + 1];\n r = selectInfo[idx + 3];\n c = selectInfo[idx + 4];\n }\n }\n // update color of selected object\n myColors[r][c][2] -= 0.1;\n myColors[r][c][0] += 0.1;\n System.out.println(numSelected + \": chose [\" + r + \", \" + c + \"]\");\n }", "@Override\n\tpublic Powerup choosePowerup(List<Powerup> selectable) {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"powerup\");\n\t\tJSONArray jArray = new JSONArray();\n\t\tselectable.forEach(s->jArray.add(s.toJSON()));\n\t\tmessage.put(\"list\", jArray);\n\t\tthis.sendInstruction(message);\n\n\t\tString selected = this.getResponse();\n\n\t\tif (selected == null || selectable.isEmpty()) return null;\n\t\tList<Powerup> matching = selectable.stream().filter(p->p.toJSON().toString().equals(selected))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn matching.isEmpty() ? null : matching.get(0);\n\t}", "private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "public abstract void pickUp();", "@FXML\n private void getMedicoSelecionado() throws IOException {\n medicoSelecionado = tabelaMedicos.getSelectionModel().getSelectedItem();\n }", "public void testSelect_4()\n throws Exception {\n BestChromosomesSelector selector = new BestChromosomesSelector(conf);\n selector.setDoubletteChromosomesAllowed(true);\n // the following original rate controls that only 30% of the chromosomes\n // will be considered for selection as given with BestChromosomesSelector.\n // The last 70% will be added as doublettes in this case.\n selector.setOriginalRate(0.3d);\n // add first chromosome\n // --------------------\n Gene gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(true));\n Chromosome thirdBestChrom = new Chromosome(conf, gene, 7);\n thirdBestChrom.setFitnessValue(10);\n selector.add(thirdBestChrom);\n // add second chromosome\n // ---------------------\n gene = new BooleanGene(conf);\n gene.setAllele(Boolean.valueOf(false));\n Chromosome bestChrom = new Chromosome(conf, gene, 3);\n bestChrom.setFitnessValue(12);\n selector.add(bestChrom);\n // add third chromosome\n // ---------------------\n gene = new IntegerGene(conf);\n gene.setAllele(new Integer(444));\n Chromosome secondBestChrom = new Chromosome(conf, gene, 3);\n secondBestChrom.setFitnessValue(11);\n selector.add(secondBestChrom);\n // receive top 1 (= best) chromosome\n // ---------------------------------\n Population pop = new Population(conf);\n selector.select(1, null, pop);\n IChromosome[] bestChroms = pop.toChromosomes();\n assertEquals(1, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n // receive top 4 chromosomes with original rate = 0.3\n // --------------------------------------------------\n pop.getChromosomes().clear();\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(bestChrom, bestChroms[1]); //because of originalRate = 0.3\n assertEquals(secondBestChrom, bestChroms[2]);\n assertEquals(thirdBestChrom, bestChroms[3]);\n // Non-unique chromosomes should have been returned, although not the same\n // but a cloned instance!\n assertEquals(bestChroms[0], bestChroms[1]);\n // receive top 4 chromosomes with original rate = 1\n // ------------------------------------------------\n pop.getChromosomes().clear();\n selector.setOriginalRate(1.0d);\n selector.select(4, null, pop);\n bestChroms = pop.toChromosomes();\n assertEquals(4, bestChroms.length);\n assertEquals(bestChrom, bestChroms[0]);\n assertEquals(secondBestChrom, bestChroms[1]);\n assertEquals(thirdBestChrom, bestChroms[2]);\n assertEquals(bestChrom, bestChroms[3]);\n }", "public Individual selectIndividual(Population population) {\n // Get individuals\n List<Individual> individuals = population.getPopulation();\n\n // Spin roulette wheel\n double populationFitness = population.getPopulationFitness();\n double rouletteWheelPosition = Math.random() * populationFitness;\n\n // Find parent\n double spinWheel = 0;\n for (Individual individual : individuals) {\n spinWheel += individual.getFitness();\n if (spinWheel >= rouletteWheelPosition) {\n return individual;\n }\n }\n return individuals.get(population.size() - 1);\n }", "public void clickGender() {\n driver.findElement(gender).click();\n }", "SdkMobileVcode selectOne(SdkMobileVcodeExample example);", "private void selectGender(int id)\n {\n switch (id) {\n\n case R.id.radioMale:\n value = \"male\";\n break;\n case R.id.radioFemale:\n value = \"female\";\n break;\n case R.id.radioOthers:\n value = \"others\";\n break;\n }\n }", "public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}", "void shapeOperation() {\r\n String selStr; // variable to store the selected string\r\n\r\n repaint(); // repaint\r\n selStr = (String)cb1.getSelectedItem();\r\n // store the string of the selected item\r\n if (selStr == strShape[0]) { // if \"Line\" selected \r\n System.out.println(\"Line of menu Shape is selected.\");\r\n System.out.println(\"calling method line().\");\r\n ge.line(gra); // call method line() of class PaintTool\r\n System.out.println(\"method line of class PaintTool executed.\");\r\n } else if (selStr == strShape[1]) { // if \"Rectangle\" selected\r\n System.out.println(\"Rectangle of menu Shape is selected.\");\r\n System.out.println(\"calling method rectangle().\");\r\n ge.rectangle(gra); // call method rectangle() of class PaintTool\r\n System.out.println(\"method rectangle() executed.\");\r\n } else if (selStr == strShape[2]) { // if \"Oval\" selected\r\n System.out.println(\"Oval of menu Shape is selected.\");\r\n System.out.println(\"calling method oval().\");\r\n ge.oval(gra); // call method oval() of class PaintTool\r\n System.out.println(\"method oval() executed.\");\r\n }\r\n\r\n }", "public void onGitheriSelect() {\n Food githeri = FoodRatios.getGitheriRatios(mTotalAttendance);\n Intent intent = new Intent(this, GitheriProgramActivity.class);\n intent.putExtra(\"GitheriMeal\", Parcels.wrap(githeri));\n intent.putExtra(\"attendancenum\", mTotalAttendance);\n startActivity(intent);\n }", "public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}" ]
[ "0.68243843", "0.5895837", "0.5697615", "0.55700105", "0.5540435", "0.550514", "0.5503683", "0.54929125", "0.54801005", "0.54653317", "0.5415859", "0.5387952", "0.5383143", "0.537406", "0.5346014", "0.53310883", "0.53112626", "0.53087187", "0.53047043", "0.5269277", "0.5236009", "0.52341", "0.5215055", "0.52143216", "0.5212561", "0.5196021", "0.51599675", "0.5154055", "0.5149079", "0.51434994", "0.5142133", "0.51348984", "0.5119693", "0.5110328", "0.50809723", "0.5069187", "0.5060467", "0.50536454", "0.50531137", "0.5051698", "0.5049874", "0.50446635", "0.50365174", "0.50221354", "0.50214887", "0.5020038", "0.50154066", "0.50054276", "0.50021946", "0.49970955", "0.49897677", "0.4988677", "0.49813852", "0.49784276", "0.49775347", "0.4957246", "0.49540877", "0.4951344", "0.4932372", "0.49298918", "0.49231967", "0.4920376", "0.49201918", "0.49147844", "0.4912719", "0.49099898", "0.4907343", "0.49048638", "0.48959044", "0.48904163", "0.48886925", "0.48879433", "0.4881713", "0.4880812", "0.48736113", "0.48654053", "0.4864188", "0.4863533", "0.48633918", "0.48591202", "0.4855306", "0.48461983", "0.48385122", "0.48358515", "0.48351163", "0.48335266", "0.48308006", "0.4830139", "0.48246962", "0.48207983", "0.4812885", "0.4811244", "0.4810923", "0.4808029", "0.48071465", "0.48068395", "0.48047173", "0.48020965", "0.4799466", "0.47909698" ]
0.55594605
4
The interface Sql queries.
public interface SqlQueries { /** * The constant QUOTATION. */ String QUOTATION = "'"; /** * The constant SELECT_ALL_CARS. */ String SELECT_ALL_CARS = "SELECT * FROM Car"; /** * The constant SELECT_ALL_USERS. */ String SELECT_ALL_USERS = "SELECT * FROM Users"; /** * The constant FIND_CAR_BY_ID. */ String FIND_CAR_BY_ID = "Select * from Car Where id = "; /** * The constant CREATE_A_CAR. */ String CREATE_A_CAR = "insert into car values({0},{1}, {2}, {3}, {4})"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Query query();", "void runQueries();", "public List sqlQuery(String sql,Object... params);", "public abstract ResultList executeSQL(RawQuery rawQuery);", "private void executeQuery() {\n }", "public void Query() {\n }", "public abstract Statement queryToRetrieveData();", "Query queryOn(Connection connection);", "Object executeSelectQuery(String sql) { return null;}", "public abstract ResultList executeQuery(DatabaseQuery query);", "SelectQuery createSelectQuery();", "public List<IEntity> query(IQuery query) throws SQLException;", "public interface QuerySql extends ConditionAble, Stream {\n\n\t/**\n\t * Add parameters to your SQL to replace the question mark?This is a more\n\t * recommended way to replace string splices\n\t * \n\t * @param paramers\n\t * @return\n\t */\n\tQuerySql addParamer(Object... paramers);\n\n\tint update();\n\n\t/**\n\t * \n\t * <p>\n\t * If you need to return a result set instead of a single item; The return type\n\t * is automatically determined by the constructor. If you want to return an\n\t * entity type, add the entity type before the {@link #list(Class)} method\n\t * \n\t * <p>\n\t * The method is equivalent to the integrator of two methods\n\t * \n\t * @see #entities(Class)\n\t * @see #maps()\n\t * \n\t */\n\t<T> List<T> list();\n\n\t<T> List<T> list(Class<T> entityClass);\n\n\t/**\n\t * \n\t * @return Returns a collection of entity class mappings.\n\t */\n\t<T> List<T> entities(Class<T> entityClass);\n\n\t/**\n\t * The result set encapsulated in the form of\n\t * {@code List<Map<String,Object>>}<br>\n\t * This will be an acceptable way to get the mapping of SQL result sets\n\t * \n\t * @return {@link List}{@code <}{@link Map}{@code <}\n\t * {@link String},{@link Object}{@code >}{@code >}\n\t */\n\tList<Map<String, Object>> maps();\n\n\t/**\n\t * \n\t * @param alias - Aliased key-value pairs, returned as aliased key-value if\n\t * matched\n\t * @return\n\t * @since 2.24\n\t */\n\tList<Map<String, Object>> maps(HashMap<String, String> alias);\n\n\t/**\n\t * The result set encapsulated in the form of {@code Map<String,Object>}<br>\n\t * This will be an acceptable way to get the mapping of SQL result sets\n\t * \n\t * @return {@link Map}{@code <} {@link String},{@link Object}{@code >}\n\t */\n\tMap<String, Object> map();\n\n\t/**\n\t * Returns a single result;The return type is automatically determined based on\n\t * the constructor, and if you want to return an entity type, add before that\n\t * \n\t * @return\n\t */\n\t<T> T unique();\n\n\t\n\t/**\n\t * Specify entity class mappings\n\t * @param entityClass - Be sure to include an {@link Id} annotation to declare the primary key\n\t * @return\n\t */\n\t<T> T unique(Class<T> entityClass);\n\t\n\t<T> T entity(Class<T> entityClass);\n\n\t/**\n\t * Gets the columns contained in the query result.\n\t * \n\t * @return\n\t */\n\tList<Column> getQueryColumns();\n\n\t@Override\n\tQuerySql addCondition(Condition cond);\n\n\t@Override\n\tQuerySql addCondition(String fieldName, Cs cs);\n\n\t@Override\n\tQuerySql addCondition(String fieldName, Cs cs, Object value);\n\n\t@Override\n\tQuerySql addCondition(Consumer<List<Condition>> conds);\n\n\t/**\n\t * An extension to the {@link Stream} interface,Returns the specified number of\n\t * results from the SQL statement\n\t * \n\t * @param count\n\t */\n\tList<Map<String, Object>> stream(int count);\n\n}", "public void query(String sql) throws SQLException {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(sql);\r\n\r\n while (rs.next()){\r\n System.out.println(rs.getInt(\"id\")+\" \"+rs.getString(\"name\")+\" \"+rs.getString(\"surname\")+\" \"+rs.getFloat(\"grade\"));\r\n }\r\n\r\n }", "public ResultSet doQuery( String sql) throws SQLException {\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\t// prepare sql statement\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\tif (outstmt == null)\r\n\t\t\treturn null;\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet(); //old\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}", "@Override\n\t\tpublic void executeQuery(String query) {\n\t\t\t\n\t\t}", "private DbQuery() {}", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }", "@Override\n\tvoid executeQuery(String query) {\n\t\tSystem.out.println(\"Mssql ==> \" + query);\n\t}", "public QueryGeneral() {\n try {\n connection = ConnectionDB.getInstance().getConnection();\n } catch (SQLException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n } catch (ClassNotFoundException event) {\n log.error(\"Error in: \" + event.getMessage(), event);\n }\n }", "@Override\r\n public void query(String strSQL)\r\n {\r\n try\r\n {\r\n dbRecordset = dbCmdText.executeQuery(strSQL);\r\n status(\"epic wonder \"+ strSQL);\r\n }\r\n catch (Exception ex)\r\n {status(\"Query fail\");\r\n }\r\n }", "@Override\n\tpublic List<T> queryAll(T common, String firstSql) {\n\t\treturn commonDao.queryAll(common, firstSql);\n\t}", "public ResultSet query(String sQLQuery) throws SQLException {\n\t Statement stmt = c.createStatement();\n\t ResultSet ret = stmt.executeQuery(sQLQuery);\n\t stmt.close();\n\t return ret;\n\t}", "public ResultSet runQuery(String sql){\n\n try {\n\n Statement stmt = conn.createStatement();\n\n return stmt.executeQuery(sql);\n\n } catch (SQLException e) {\n e.printStackTrace(System.out);\n return null;\n }\n\n }", "public ResultSet doQuery(String sql, Object[] params) throws SQLException {\r\n\t\t\r\n\t/*\tSystem.out.println(\"doQuery_sql: \" + sql);\r\n\t\tfor (int i = 0 ;i< params.length; i++)\r\n\t\t\tSystem.out.println(\"param: \" + params[i]);\t\r\n\t\t\r\n\t\t*/\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\t// stuff parameters in\r\n\t\tfor (int i=0; i<params.length; i++){\r\n\t\t\toutstmt.setObject(i + 1,params[i]);\r\n\t\t}\r\n\t\t\r\n\t\tif (outstmt == null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// return a collection that can be iterated on\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet();\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}", "DataSet sql(SQLContext context, String sql);", "private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }", "public abstract DbQuery getQuery(String queryName);", "private void executeRequest(String sql) {\n\t}", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "public ORM executeQuery(String query) {\n ResultSet rs = null;\n this.query =query;\n System.out.println(\"run: \" + this.query);\n //this.curId = 0;\n Statement statement;\n try {\n statement = this.conn.createStatement();\n rs = statement.executeQuery(this.query);\n //this.saveLog(0,\"\",query);\n } catch (SQLException e) {\n System.out.println( ColorCodes.ANSI_RED +\"ERROR in SQL: \" + this.query);\n // e.printStackTrace();\n }\n lastResultSet=rs;\n this.fields_values = \"\";\n return this;\n\n }", "public abstract String toSQL();", "public interface MysqldataQueryDao {\n public List<Map<String, Object>> Querydata(String sql);\n public List<Map<String, Object>> Querymaindata(String sql);\n\n}", "public interface IDBQuery {\n String query();\n}", "public abstract String createQuery();", "public SingleQuery query(String sql, Object... params) {\r\n PreparedStatement stmt = prepare(sql);\r\n\r\n try {\r\n if (params != null && params.length > 0) {\r\n for (int i = 0; i < params.length; i++) {\r\n stmt.setObject(i + 1, params[i]);\r\n }\r\n }\r\n } catch (SQLException e1) {\r\n throw new DbException(e1);\r\n }\r\n\r\n return runQuery(stmt);\r\n }", "public Object[] queryDao(String sql, Object[] objectArray) {\n\t\t//TODO:添加查询代码\n\t\treturn objectArray;\n\t}", "public void customerQuery(){\n }", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}", "SQLQuery createSQLQuery(final String query);", "public IEntityBacked query(SqlStatement sql) throws DataStoreException {\r\n \t\tlogger.warn(\"Naive implementation - considerable performance problems!\");\r\n \r\n \t\tConnection connection;\r\n \t\ttry {\r\n \t\t\tconnection = getConnection();\r\n \t\t\tStatement createStatement = connection.createStatement();\r\n \t\t\tResultSet executeQuery = createStatement.executeQuery(sql.getCommandText());\r\n \t\t\treturn new IEntityBacked(executeQuery, connection);\r\n \t\t} catch (SQLException e) {\r\n \t\t\tthrow new DataStoreException(e);\r\n \t\t}\r\n \t}", "@Override\r\n\tpublic Sql sql(SqlManager sqlManager) {\n\t\treturn null;\r\n\r\n\t}", "public abstract List createNativeSQLQuery(String query);", "public ResultSet query(String cql, Object ... values) {\n\t\tLog.v(LOG_TAG, \" Query: \" + cql);\n\t\tList<Object> cqlSafeValues = this.getCqlSafeValues(values);\n\t\ttry {\t\t\t\n\t\t\tPreparedStatement prepared = this.getSession().prepare(cql);\n\t\t\tBoundStatement boundStatement = new BoundStatement(prepared);\n\t\t\tResultSet results;\n\t\t\tif (cqlSafeValues.size() > 0) {\n\t\t\t\tresults = this.getSession().execute(boundStatement.bind(cqlSafeValues.toArray()));\n\t\t\t} else {\n\t\t\t\tresults = this.getSession().execute(boundStatement);\n\t\t\t}\n\t\t\treturn results;\n\t\t} catch (Exception e) {\n\t\t\tLog.e(LOG_TAG, e);\n\t\t\tthrow new DatastoreServiceException(e);\t\t\t\n\t\t}\t\t\n\t}", "public ResultSet executeSQL() {\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = pstmt.executeQuery();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\n\t}", "public ResultSet executeQuery(String sql) throws Exception {\n\n\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t// stmt.close();\n\t\treturn rs;\n\t}", "public ResultSet executeQuery(String request) {\n try {\r\n return st.executeQuery(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }", "public static List<?> queryDatabase(String sql, Map<String, Object> params) {\r\n final Session session = sessionFactory.isClosed() ? sessionFactory.openSession() : sessionFactory.getCurrentSession();\r\n session.beginTransaction();\r\n try {\r\n final Query query = session.createQuery(sql);\r\n if (params != null) {\r\n params.forEach(query::setParameter);\r\n }\r\n return query.list();\r\n } finally {\r\n session.getTransaction().commit();\r\n }\r\n }", "@Override\n public boolean execute(String sql) throws SQLException {\n\n // a result set object\n //\n tsResultSet r;\n\n // execute the query \n //\n r = connection.executetinySQL(this);\n\n // check for a null result set. If it wasn't null,\n // use it to create a tinySQLResultSet, and return whether or\n // not it is null (not null returns true).\n //\n if( r == null ) {\n result = null;\n } else {\n result = new tinySQLResultSet(r, this);\n }\n return (result != null);\n\n }", "public void setSql(String sql) {\n this.sql = sql;\n }", "<T extends BaseDto> List<T> executeQuery(String resQuery, QueryResultTransformer<T> transformer, Connection conn);", "public ResultSet executeQuery() throws SQLException {\n return statement.executeQuery();\n }", "@Override\n public PlainSqlQuery<T, ID> createPlainSqlQuery() {\n return null;\n }", "public ResultSet executeQueryCmd(String sql) {\n\t\ttry {\n\t\t\treturn stmt.executeQuery(sql);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t}", "public ResultSet executeQuery(String sql) throws SQLException {\n return currentPreparedStatement.executeQuery(sql);\n }", "public ResultSet querySelect(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\n\t \t\t// Exécution d'une requête de lecture\n\t \t\tResultSet result = statement.executeQuery(query);\n\t \t\t\n\t \t\treturn result;\n\t \t}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "public interface ChecklistItemDAOQuery {\n public final static String UUID = \"select REPLACE(UUID(),'-','')\";\n public final static String CREATE_ITEM = \"insert into checklist_items (id, taskid, title) \"+\n \"values (unhex(?), unhex(?), ?)\";\n public final static String CHECK_ITEM = \"update checklist_items set checked=TRUE WHERE id=unhex(?)\";\n public final static String GET_ITEM_BY_ID = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.id=unhex(?)\";\n public final static String GET_ITEMS_FROM_TASK = \"select hex(i.id) as id, hex(i.taskid) as taskid, i.user_checked as user_checked, i.title, i.checked from checklist_items i where i.taskid=unhex(?)\";\n}", "@Override\n\tpublic List<Mfunction> query(String querySql, Map<Object, Object> params,\n\t\t\tint begin, int max) {\n\t\treturn mfunctionDao.query(querySql, params, begin, max);\n\t}", "public interface Query<T> extends SqlOperation {\n\n public T fill(ResultSet resultSet) throws SQLException;\n}", "public interface IQuery {\n String getTableName();\n void setParameter(String name, Object value);\n}", "protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }", "public void callQuery(int a) throws SQLException{\n data.get(a).OUPUTQUERY(data.get(a).getConversionArray(), data.get(a).getResultSet());\n }", "public QueryExecution createQueryExecution(Query qry);", "public String getSQL() {\n return query.getSQL();\n }", "@Override\n public synchronized ResultSet executeQuery(String sql)\n throws SQLException {\n\n // tinySQL only supports one result set at a time, so\n // don't let them get another one, just in case it's\n // hanging out.\n //\n tinySQLResultSet trs;\n result = null; \n statementString = sql;\n\n // create a new tinySQLResultSet with the tsResultSet\n // returned from connection.executetinySQL()\n //\n if ( debug ) {\n System.out.println(\"executeQuery conn is \" + connection.toString());\n }\n trs = new tinySQLResultSet(connection.executetinySQL(this), this);\n return trs; \n }", "<T extends BaseDto, V extends BaseDto> List<T> executeQuery(String reqResQuery, V req, QueryResultTransformer<T> transformer, Connection conn);", "@SuppressWarnings(\"unchecked\")\n\tpublic List sqlQuery(String sql,HashMap entities,HashMap joins,Object... params);", "public static void executeSqlQuery(String spOrQueryName) {\r\n\t\ttry {\r\n\t\t\topenCon();\r\n\t\t\ts = conn.createStatement();\r\n\t\t\ts.executeQuery(spOrQueryName);\r\n\t\t\tcloseCon();\r\n\t\r\n\t\t} catch (Exception e) {\r\n\t//\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public ResultSet query (String query) throws java.sql.SQLException {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query + \"\\\")\");\n \n try {\n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n ResultSet r = statement.executeQuery(query);\n return r;\n } catch (java.sql.SQLException e) {\n Logger.write(\"RED\", \"DB\", \"Failed to query database: \" + e);\n throw e;\n }\n }", "@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}", "protected String getSQLString() {\n \t\treturn queryTranslator.getSQLString();\n \t}", "public void callQuery(String query) throws SQLException {\n for(int i = 0; i < queryHistory.size(); i++) {\n if(queryHistory.get(i).equalsIgnoreCase(query))\n data.get(i).OUPUTQUERY(data.get(i).getConversionArray(), data.get(i).getResultSet());\n }\n }", "String queryInformation(String tableName,String queryname){\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n String tar;\n if(tableName.equals(\"authorinformation\"))\n tar = \"author\";\n else if(tableName.equals(\"classificationinformation\"))\n tar = \"classification\";\n else tar = \"press\";\n String sql = \"select \" + tar + \"Id\" + \" from \" + tableName + \" where \";\n if(tableName.equals(\"authorinformation\"))\n sql += \"authorName = ?;\";\n else if(tableName.equals(\"classificationinformation\"))\n sql += \"classifcationName = ?;\";\n else sql += \"pressName = ?;\";\n System.out.println(sql);\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,queryname);\n ResultSet rs = preSQL.executeQuery();\n rs.beforeFirst();\n if(rs.next()){\n String ans = rs.getString(1);\n GetDBConnection.closeCon(con);\n return ans;\n }\n else{\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }", "public Query createQuery(String hql, Object... params) ;", "public List<Object> sqlQuery(Class<Object> class1, String string) {\n return null;\n }", "public void executeQuery_Other(String query) {\n\n \n Connection con = DBconnect.connectdb();\n Statement st;\n\n try {\n st = con.createStatement();\n st.executeUpdate(query);\n\n \n } catch (Exception e) {\n //JOptionPane.showMessageDialog(null, e);\n\n }\n\n }", "IQuery getQuery();", "@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}", "public ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \ttry {\n rs = st.executeQuery(query);\n } catch(Exception e) {\n \te.printStackTrace();\n }\n return rs;\n }", "@Override\n\tpublic List queryForList(String sql) {\n\t\treturn this.baseDaoSupport.queryForList(sql);\n\t}", "public StatementQueryMechanism(DatabaseQuery query) {\n super(query);\n }", "protected final void executeQuery() {\n\ttry {\n\t executeQuery(queryBox.getText());\n\t} catch(SQLException e) {\n\t e.printStackTrace();\n\t clearTable();\n\t JOptionPane.showMessageDialog(\n\t\tnull, e.getMessage(),\n\t\t\"Database Error\",\n\t\tJOptionPane.ERROR_MESSAGE);\n\t}\n }", "public void setSql(String sql) {\n\t\tthis.sql = sql;\n\t}", "private ResultSet executeQuery(String query) {\r\n Statement stmt;\r\n ResultSet result = null;\r\n try {\r\n// System.out.print(\"Connect DB .... \");\r\n conn = openConnect();\r\n// System.out.println(\"successfully \");\r\n stmt = conn.createStatement();\r\n result = stmt.executeQuery(query);\r\n } catch (SQLException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return result;\r\n }", "public void runQuery(String query) throws SQLException {\n runQuery(query, \"default\");\n }", "public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public static ResultSet executeQuery(ISession session, \n String sql) \n throws SQLException \n {\n \tISQLConnection sqlcon = session.getSQLConnection(); \n if (sqlcon == null || sql == null) {\n return null;\n }\n Statement stmt = null;\n ResultSet rs = null;\n \n Connection con = sqlcon.getConnection();\n try {\n if (DialectFactory.isMySQL(session.getMetaData())) {\n stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY,\n ResultSet.CONCUR_READ_ONLY);\n \n stmt.setFetchSize(Integer.MIN_VALUE);\n } else if (DialectFactory.isTimesTen(session.getMetaData())) {\n \tstmt = con.createStatement();\n \tint fetchSize = _prefs.getSelectFetchSize();\n \t// TimesTen allows a maximum fetch size of 128. \n \tif (fetchSize > 128) {\n \t\tlog.info(\n \t\t\t\"executeQuery: TimesTen allows a maximum fetch size of \" +\n \t\t\t\"128. Altering preferred fetch size from \"+fetchSize+\n \t\t\t\" to 128.\");\n \t\tfetchSize = 128;\n \t}\n \tstmt.setFetchSize(fetchSize);\n } else { \n stmt = con.createStatement();\n // Allow the user to set \"0\" for the fetch size to indicate that\n // this should not be called. JDBC-ODBC bridge driver fails to\n // execute SQL once you have set the fetch size to *any* value.\n if (_prefs.getSelectFetchSize() > 0) {\n stmt.setFetchSize(_prefs.getSelectFetchSize());\n }\n }\n } catch(SQLException e) {\n // Only close the statement if SQLException - otherwise it has to \n // remain open until the ResultSet is read through by the caller.\n SQLUtilities.closeResultSet(rs);\n SQLUtilities.closeStatement(stmt);\n throw e;\n }\n if (log.isDebugEnabled()) {\n //i18n[DBUtil.info.executequery=executeQuery: Running SQL:\\n '{0}']\n String msg = \n s_stringMgr.getString(\"DBUtil.info.executequery\", sql);\n log.debug(msg);\n }\n try {\n lastStatement = sql;\n rs = stmt.executeQuery(sql);\n } catch (SQLException e) {\n // Only close the statement if SQLException - otherwise it has to \n // remain open until the ResultSet is read through by the caller.\n if (stmt != null) { \n try {stmt.close();} catch (SQLException ex) { /* Do Nothing */}\n }\n throw e; \n }\n \n return rs;\n }", "private void sendQuery(String sqlQuery) {\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n resultSet = statement.executeQuery(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public List<Map<String,Object>> ejecutarQuery(String sql){\n return this.jdbcTemplate.queryForList(sql);\n }", "public ResultSet queryRawSQL(String sql) throws SQLException{\n return mysql.query(sql);\n }", "private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "protected abstract void onQueryStart();", "public void execute() throws SQLException {\n\t\tif (this.ds == null) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\"Please pass a DataSource to the ListSqlHelper!\");\n\t\t}\n\t\t\n\t\texecuteCountSql();\n\t\texecuteItemRangeSql();\n\t}", "private void setQuerySQL(Settings set) {\n SEARCH_DATA_BASE = set.getValue(\"sql.searchDataBase\");\n CREATE_DATA_BASE = set.getValue(\"sql.createDataBase\");\n SEARCH_TABLE_VACANCY = set.getValue(\"sql.searchTableVacancy\");\n CREATE_TABLE_VACANCY = set.getValue(\"sql.createTableVacancy\");\n ADD_VACANCY = set.getValue(\"sql.addVacancy\");\n COUNT = set.getValue(\"sql.count\");\n MAX_DATE = set.getValue(\"sql.maxDate\");\n }", "public String getSql() {\n return sql;\n }" ]
[ "0.76181334", "0.71907836", "0.7180062", "0.7147358", "0.7109294", "0.7107983", "0.70573175", "0.6997007", "0.69606423", "0.68606055", "0.68287224", "0.6691504", "0.66481113", "0.66283643", "0.6589777", "0.65719414", "0.6494637", "0.6458231", "0.64520985", "0.64445895", "0.6428408", "0.64283115", "0.6425267", "0.6423323", "0.6386078", "0.638522", "0.63713735", "0.63685125", "0.6366826", "0.634901", "0.6336256", "0.63338745", "0.633259", "0.63216025", "0.63208145", "0.63196456", "0.630167", "0.629303", "0.62823564", "0.6249572", "0.6243707", "0.621327", "0.6211558", "0.6199468", "0.61970234", "0.6163657", "0.6153427", "0.61418575", "0.61400527", "0.6138535", "0.6135462", "0.61255777", "0.61167055", "0.6111149", "0.60963863", "0.60928637", "0.60922086", "0.60825366", "0.6078837", "0.6073715", "0.6060241", "0.6048713", "0.6043758", "0.6039787", "0.60341597", "0.6031949", "0.6004093", "0.59994835", "0.59735894", "0.59553474", "0.59529585", "0.5947704", "0.5943903", "0.59435105", "0.5933598", "0.5931863", "0.5923815", "0.5921261", "0.5913571", "0.590478", "0.58971894", "0.5887812", "0.5882302", "0.58812046", "0.58725035", "0.5870362", "0.5870353", "0.586973", "0.58638805", "0.58576196", "0.585631", "0.5855788", "0.5853881", "0.5846496", "0.5842403", "0.5841241", "0.5826791", "0.5824994", "0.5823999", "0.58229935" ]
0.7014334
7
Get button id (service number and price)
@Override public void onClick(View v) { int baseId = service1Btn.getId(); switch (v.getId() - baseId){ case 0: serviceName = service1.getServiceName(); servicePrice = service1.getServicePrice(); break; case 1: serviceName = service2.getServiceName(); servicePrice = service2.getServicePrice(); break; case 2: serviceName = service3.getServiceName(); servicePrice = service3.getServicePrice(); break; case 3: serviceName = service4.getServiceName(); servicePrice = service4.getServicePrice(); break; case 4: serviceName = service5.getServiceName(); servicePrice = service5.getServicePrice(); break; case 5: serviceName = service6.getServiceName(); servicePrice = service6.getServicePrice(); break; } // Send data (service number, professional name, price) to MainActivity TransferDataToMainActivity(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String findButtonId(ActionEvent event) {\n Button buttonObj = (Button) event.getSource();\n return buttonObj.getId();\n }", "public int getButtonID(){return i_ButtonID;}", "String getService_id();", "public String getServiceID();", "Button getBtn();", "String getServiceId();", "@DhtmlColumn(columnIndex = 1, headerName = \"标志\")\n\t@NotBlank\n\tpublic String getButtonId() {\n\t\treturn buttonId;\n\t}", "java.lang.String getServiceId();", "private int getNumeroCaras(View btn) {\n int caras = btn.getId();\n switch (caras) {\n case R.id.buttond2:\n caras=2;\n break;\n case R.id.buttond3:\n caras=3;\n break;\n case R.id.buttond4:\n caras=4;\n break;\n case R.id.buttond6:\n caras=6;\n break;\n case R.id.buttond8:\n caras=8;\n break;\n case R.id.buttond10:\n caras=10;\n break;\n case R.id.buttond12:\n caras=12;\n break;\n case R.id.buttond20:\n caras=20;\n break;\n case R.id.buttond24:\n caras=24;\n break;\n case R.id.buttond100:\n caras=100;\n break;\n }\n return caras;\n }", "private static GetButtonTemResponse Getbutton(GetButtonTem log) {\r\n com.wsclient.EJBWebServicev20_Service service = new com.wsclient.EJBWebServicev20_Service();\r\n com.wsclient.EJBWebServicev20 port = service.getEJBWebServicev20Port();\r\n return port.getButtonTempW(log);\r\n }", "public int getButtonViewId() {\n return R.id.tv_dismiss;\n }", "public Integer getServiceid() {\r\n return serviceid;\r\n }", "public int getServiceID() {\n return serviceID;\n }", "public Button getCustomButton(String id) {\n\t\treturn customButtons.get(id);\n\t}", "public int getBSCA_PriceChangePrev_ID();", "@Override\n\tpublic int GetSetBtnTxId() {\n\t\treturn 0;\n\t}", "public String getKey() {\r\n return this.buttonKey;\r\n }", "public Button getButton(String key) {\n return buttons.get(key);\n }", "public String getText_click_Digital_coupons_button(){\r\n\t\treturn click_Digital_coupons_button.getText();\r\n\t}", "public ID getServiceID() {\n\treturn serviceID;\n }", "int getServiceNum();", "public long getId() {\n return mServiceId;\n }", "public Button getButton(ButtonID buttonID) {\n\t\treturn buttons.get(buttonID);\n\t}", "public String getValue_click_Digital_coupons_button(){\r\n\t\treturn click_Digital_coupons_button.getAttribute(\"value\");\r\n\t}", "@AutoEscape\n\tpublic String getIdPtoServicio();", "public int getButton() {\n\t\t//Check what button it is then return the value\n\t\tif (this.isLeftButton)\n\t\t\treturn 0;\n\t\telse if (this.isRightButton)\n\t\t\treturn 1;\n\t\telse if (this.isMiddleButton)\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn -1;\n\t}", "int getSelectedButton() {\n for (int i = 0; i < buttons.length; i++) {\n if (buttons[i].isSelected()) {\n return (i);\n }\n }\n return (-1);\n }", "public int handleButtonClicked(NumberPuzzleGame game){\n\t\tint emptyCellId = game.getEmptyCellId();\n\t\tButton buttonClicked = game.getButtonClicked();\n\t\tButton[] buttons = game.getButtons();\n\t\t\n\t\t//Your logic here\n\t\t//System.out.println(emptyCellId);\n\t\t//System.out.println(buttonClicked);\n\t\tint clicked_btn_id = -1;\n\t\tfor(int i=0;i<buttons.length;i++) {\n\t\t\tif(buttons[i] == buttonClicked) {\n\t\t\t\tclicked_btn_id = i;\n\t\t\t}\n\t\t}\n\t\t//System.out.println(clicked_btn_id);\n\t\tif((clicked_btn_id<=15)&&(clicked_btn_id == emptyCellId-1 || clicked_btn_id == emptyCellId+1 || clicked_btn_id == emptyCellId-4 || clicked_btn_id == emptyCellId+4)){\n\t\t\tswapButton(buttons[emptyCellId], buttonClicked);\n\t\t\temptyCellId = clicked_btn_id;\n\t\t}\n\t\t\n\t\t//if(buttons[])\n\t\t/*for(int i=0;i<buttons.length;i++) {\n\t\t\tif(buttons[i] == buttonClicked) {\n\t\t\t\tSystem.out.println(buttons[i]);\n\t\t\t\tSystem.out.println(buttonClicked);\n\t\t\t\temptyCellId = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} */\n\t\t\n\t\treturn emptyCellId;\n\n\t}", "public int getId_serviceMethod() {\r\n\t\treturn id_serviceMethod;\r\n\t}", "public WebElement get123BankingCancelBtn() {\n\t\tWebDriverWait wait = new WebDriverWait(driver, 20);\n\t\treturn wait.until(ExpectedConditions.elementToBeClickable(findElement(\n\t\t\t\trepositoryParser, PAGE_NAME, \"123BankingCancelBtn\")));\n\t}", "public static synchronized int getKeyClickTone(int key) {\r\n\t\treturn Button.keys.getKeyClickTone(key);\r\n\t}", "private JButton getBtnKey(int i) {\r\n\t\tif (btnKey == null) {\r\n\t\t\tbtnKey = new JButton[12];\r\n\t\t}\r\n\t\t\r\n\t\tif (btnKey[i] == null) {\r\n\t\t\tbtnKey[i] = new JButton(String.valueOf(i + 1));\r\n\t\t\tswitch(i) {\r\n\t\t\t\tcase KEY_AST:\r\n\t\t\t\t\tbtnKey[i].setText(\"*\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KEY_0:\r\n\t\t\t\t\tbtnKey[i].setText(\"0\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase KEY_POUND:\r\n\t\t\t\t\tbtnKey[i].setText(\"#\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbtnKey[i].addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\ttxtInput.setText(txtInput.getText() + ((JButton)e.getSource()).getText());\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn btnKey[i];\r\n\t}", "int getMoneyID();", "int getMoneyID();", "int getMoneyID();", "public ID getMainService() { \r\n\t\tID retVal = this.getTypedField(46, 0);\r\n\t\treturn retVal;\r\n }", "String handleButtonPress(Button button);", "public JButton getMarketButton() {\n\t\treturn market;\n\t}", "protected JButton getButton(int i)\n {\n //System.out.println(\"Button \" + i + \" retrieved\");\n return ticTacToeButtons[i];\n }", "public int getNilaiBtn() {\n return nilaiBtn;\n }", "private int whichButtonClicked( ActionEvent event ) {\n\tfor ( int i = 0; i < NBUTTONS; i++ ) {\n\t if ( event.getSource( ) == button[i] )\n\t\treturn i;\n\t}\n\treturn -1;\n }", "private JButton getPrieskumButton() {\n\t\tif (prieskumButton == null) {\n\t\t\tprieskumButton = new JButton();\n\t\t\tprieskumButton.setText(\"Prieskum\");\n\t\t\tprieskumButton.setLocation(new Point(231, 295));\n\t\t\tprieskumButton.setEnabled(false);\n\t\t\tprieskumButton.setSize(new Dimension(99, 25));\n\t\t\tprieskumButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tmod = \"p\";\n\t\t\t\t\tucivoText.setText(\"Rôzne zvukové ukážky\");\n\t\t\t\t\tcvicenieText.setText(\"Prieskum\");\n\t\t\t\t\tsuzvukText.setText(\"súzvuk 1/10\");\n\t\t\t\t\tspravne = true;\n\t\t\t\t\tpotvrdil = false;\n\n\t\t\t\t\tanalyzaPanel.setVisible(true);\n\t\t\t\t\tmenuPanel.setVisible(false);\n\t\t\t\t\tspodnyPanel.setVisible(true);\n\n\t\t\t\t\tjava.util.Random rand = new Random();\n\t\t\t\t\tpriklad = new Dvojzvuk(rand.nextInt(49) + 36,5);\n\n\t\t\t\t}\n\t\t\t});\n\t\t\tprieskumButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn prieskumButton;\n\t}", "public Button getButton() {\n\t\treturn button;\n\t}", "public ButtonTag GetButtonTag(){\n if(buttonTag != null) {\n return ButtonTag.valueOf(buttonTag);\n }\n else{\n return null;\n }\n }", "public java.lang.String getServiceId(){\r\n return localServiceId;\r\n }", "String getIdNumber();", "public java.lang.String getServiceID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SERVICEID$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public abstract String getServiceId() throws RcsServiceException;", "com.microsoft.schemas._2003._10.serialization.Guid xgetServiceId();", "public JButton getButton(){\n\t\treturn item;\n\t}", "public String getElementId();", "public String getText_click_ActivateCoupon_Button(){\r\n\t\treturn click_ActivateCoupon_Button.getText();\r\n\t}", "String getMarketId();", "public boolean getButton(Button button) {\n return getButton(button.getNumber());\n }", "java.lang.String getSymbolId();", "public int getCurrentBuyID(){\n return currentBuyID;\n }", "public JButton getReservationButton() {\n return reservationButton;\n }", "int getBonusMoneyID();", "public boolean getPilotButton(int button) {\n return pilot.getRawButton(button);\n }", "public org.apache.xmlbeans.XmlString xgetServiceID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SERVICEID$6, 0);\n return target;\n }\n }", "public static boolean getButton(int index) {\n\t\treturn SmartDashboard.getBoolean(\"DB/Button \" + index, false);\n\t}", "@Override\r\n public Object getAttribute() {\r\n return this.buttonKey;\r\n }", "public java.lang.Long getServiceId() {\n return serviceId;\n }", "String getCommandId();", "public void makeGetRPButton() {\r\n JButton getRP = new JButton(\"Check if a champion can be purchased with Riot Points\");\r\n new Button(getRP, main);\r\n// getRP.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// getRP.setPreferredSize(new Dimension(2500, 100));\r\n// getRP.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n getRP.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n getRiotPointsBalanceDifference();\r\n }\r\n });\r\n// main.add(getRP);\r\n }", "void getId(){\n\n btnRelationship = (Button) findViewById(R.id.getRelationship);\n btnRelationship2 = (ImageButton) findViewById(R.id.getRelationship2);\n\n btnSexuality = (Button) findViewById(R.id.getSexuality);\n btnSexuality2 = (ImageButton) findViewById(R.id.getSexuality2);\n\n btnHeight = (Button) findViewById(R.id.getHeight);\n btnHeight2 = (ImageButton) findViewById(R.id.getHeight2);\n\n btnWeight = (Button) findViewById(R.id.getWeight);\n btnWeight2 = (ImageButton) findViewById(R.id.getWeight2);\n\n btnBodyType = (Button) findViewById(R.id.getBodyImage);\n btnBodyType2 = (ImageButton) findViewById(R.id.getBodyImage2);\n\n btnEyeColor = (Button) findViewById(R.id.getEyeColor);\n btnEyeColor2 = (ImageButton) findViewById(R.id.getEyeColor2);\n\n btnHairColor = (Button) findViewById(R.id.getHairColor);\n btnHairColor2 = (ImageButton) findViewById(R.id.getHairColor2);\n\n btnLiving = (Button) findViewById(R.id.getLiving);\n btnLiving2 = (ImageButton) findViewById(R.id.getLiving2);\n\n btnKid = (Button) findViewById(R.id.getKid);\n btnKid2 = (ImageButton) findViewById(R.id.getKid2);\n\n btnSmoking = (Button) findViewById(R.id.getSmoking);\n btnSmoking2 = (ImageButton) findViewById(R.id.getSmoking2);\n\n\n btnDrinking = (Button) findViewById(R.id.getDrinking);\n btnDrinking2 = (ImageButton) findViewById(R.id.getDrinking2);\n\n }", "private JButton getAddQuantityCardButton() {\n\t\tif (addQuantityCardButton == null) {\n\t\t\taddQuantityCardButton = new JButton();\n\t\t\taddQuantityCardButton.setText(\"Добавить\");\n\t\t\taddQuantityCardButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tDefaultListModel model = (DefaultListModel) functionList.getModel();\n\t\t\t\t\tParseElement el = new ParseElement((ListElement) cardType.getSelectedItem(), (String)condition.getSelectedItem(), (String)value.getSelectedItem());\n\n\t\t\t\t\t((DefaultListModel) functionList.getModel()).add(model.getSize(), el);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn addQuantityCardButton;\n\t}", "private RButton getShowDetailsButton() {\n if (showDetailsButton == null) {\n showDetailsButton = new RButton();\n showDetailsButton.setName(\"showDetailsButton\");\n showDetailsButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/showDetails\\\") %>\");\n }\n return showDetailsButton;\n }", "@Override\n public ServiceID getServiceID() {\n\treturn servID;\n }", "public void setButtonId(String buttonId) {\n\t\tthis.buttonId = buttonId;\n\t}", "public java.lang.Long getServiceId() {\n return serviceId;\n }", "public static JButton getIncrBet(){\n\t\treturn incrBet;\n\t}", "public abstract String getDialogId(boolean isServerTransaction);", "private Square resolveButton (ImageButton button)\n {\n String name = getResources().getResourceEntryName(button.getId());\n\n switch (name)\n {\n case \"box1\":\n return Square.ONE;\n case \"box2\":\n return Square.TWO;\n case \"box3\":\n return Square.THREE;\n case \"box4\":\n return Square.FOUR;\n case \"box5\":\n return Square.FIVE;\n case \"box6\":\n return Square.SIX;\n case \"box7\":\n return Square.SEVEN;\n case \"box8\":\n return Square.EIGHT;\n case \"box9\":\n return Square.NINE;\n default:\n return null;\n\n }\n\n }", "public JButton getBookingViewButton() {\n return bookingButton;\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent = new Intent(MainActivity.this, RgkSateLiteService.class);\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.start_button:\n\t\t\t// ¿ªÆôÎÀÐDz˵¥\n\t\t\tstartService(intent);\n\n\t\t\tbreak;\n\t\tcase R.id.close_button:\n\t\t\t// ¹Ø±ÕÎÀÐDz˵¥\n\t\t\tstopService(intent);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public static int getSelectButtonIndex(Button buttonArr[]) {\n int arrIdx;\n int retSelectedIdx = -1;\n \n arrIdx = 0;\n while(arrIdx < buttonArr.length && retSelectedIdx < 0) {\n if (buttonArr[arrIdx].getSelection()) {\n retSelectedIdx = arrIdx;\n }\n arrIdx ++;\n }\n \n return(retSelectedIdx);\n }", "java.lang.String getBidid();", "void onProductClick(Product product, int code);", "public int askId(){\n int id = askInt(\"Id of an element:\");\n return id;\n }", "public ServiceButton getBottoneCoppia() { return sb; }", "public int getC_Payment_ID();", "public Button getNo() {\n return no;\n }", "public long id() {\n\t\treturn message.getBaseMarketId();\n\t}", "public void buttonClicked(View v) {\n if (mBound) {\n // Call a method from the LocalService.\n // However, if this call were something that might hang, then this request should\n // occur in a separate thread to avoid slowing down the activity performance.\n int num = mService.getRandomNumber();\n mTextView.setText(getResources().getString(R.string.obtained_rannum) + \" \" + num);\n }\n }", "private javax.swing.JButton getJButton1() {\n\t\tif(jButton1 == null) {\n\t\t\tjButton1 = new javax.swing.JButton();\n\t\t\tjButton1.setText(\"F1 Agregar Producto\");\n\t\t\tjButton1.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton1.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t\tjButton1.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton1.setMargin(new Insets(1,2,1,1));\n\t\t}\n\t\treturn jButton1;\n\t}", "public JButton getPOSBtn() {\r\n\t\tthis.posBtn = new JButton(\"POS File\");\r\n\t\tthis.posBtn.addActionListener(this);\r\n\t\tthis.posBtn.setEnabled(ComponentData.getPosBtnIsEnabled());\r\n\t\treturn this.posBtn;\r\n\t}", "public Pair<Integer,Integer> getJButtonCoord(JButton button){\n int row=0,col=0;\n Boolean foundButton = false;\n for(row =0 ; row < ROWS; row ++){\n for(col = 0; col < COLS; col++){\n if (buttonGrid[row][col] == button){\n foundButton = true;\n break;\n }\n }\n if (foundButton) break;\n }\n Pair<Integer,Integer> coord = new Pair<Integer,Integer> (row,col);\n return coord;\n }", "OperationIdT getOperationId();", "public JoystickButton getButtonStart() {\n\t\treturn button[7];\n\t}", "private javax.swing.JButton getJButton12() {\n\t\tif(jButton12 == null) {\n\t\t\tjButton12 = new javax.swing.JButton();\n\t\t\tjButton12.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton12.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t\tjButton12.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton12.setText(\"F12 Salir\");\n\t\t\tjButton12.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton12.setHorizontalTextPosition(javax.swing.SwingConstants.TRAILING);\n\t\t\tjButton12.setMargin(new Insets(1,2,1,1));\n\t\t\tjButton12.setEnabled(false);\n\t\t}\n\t\treturn jButton12;\n\t}", "long getApikeyOpId();", "com.google.protobuf.ByteString getOperationIdBytes();", "String serviceId(RequestContext ctx) {\n\n String serviceId = (String) ctx.get(SERVICE_ID);\n if (serviceId == null) {\n log.info(\"No service id found in request context {}\", ctx);\n }\n return serviceId;\n }", "java.lang.String getOperationId();", "public JButton getBtn_Delete() {\n return btn_Delete;\n }", "@Transient\n\tpublic String getServiceId()\t{\n\t\treturn mServiceId;\n\t\t//else return \"N/A\";\n\t}", "private javax.swing.JButton getJButton10() {\n\t\tif(jButton10 == null) {\n\t\t\tjButton10 = new javax.swing.JButton();\n\t\t\tjButton10.setPreferredSize(new java.awt.Dimension(120,40));\n\t\t\tjButton10.setBackground(new java.awt.Color(226,226,222));\n\t\t\tjButton10.setText(\"F10 Gaveta\");\n\t\t\tjButton10.setFont(new java.awt.Font(\"Dialog\", java.awt.Font.BOLD, 10));\n\t\t\tjButton10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n\t\t\tjButton10.setMargin(new Insets(1,2,1,1));\n\t\t}\n\t\treturn jButton10;\n\t}", "public String getControlId() throws PixSourceException {\n\t\t\n\t\tSegment seg = getSegments().getByCodeAndIndex(MSA, 1);\n\t\tint fieldIndex = 1;\n\t\t\n\t\ttry {\n\t\t\treturn seg.forceField(fieldIndex).getAsString();\n\t\t} catch (HL7V2Exception e) {\n\t\t\tthrow new PixSourceException(e);\n\t\t}\n\t}" ]
[ "0.66194326", "0.6586924", "0.6322098", "0.60256505", "0.59863615", "0.59298056", "0.5904654", "0.5899057", "0.5816182", "0.5808063", "0.5780378", "0.57650185", "0.5682425", "0.56343967", "0.56262755", "0.5621849", "0.5614542", "0.560797", "0.55894274", "0.55873805", "0.5531398", "0.5523226", "0.5507247", "0.54520607", "0.54326004", "0.54237765", "0.5414056", "0.5399977", "0.5329448", "0.5324551", "0.5298454", "0.52930284", "0.5289343", "0.5289343", "0.5289343", "0.5287818", "0.5243043", "0.5242474", "0.522217", "0.5195684", "0.51876986", "0.51825935", "0.51812464", "0.5172863", "0.5165308", "0.5162801", "0.5153574", "0.51463246", "0.51461565", "0.51440275", "0.5141676", "0.5141294", "0.5139308", "0.51384056", "0.51371384", "0.51216054", "0.51210874", "0.5116982", "0.51156783", "0.511265", "0.50993437", "0.5097119", "0.5092988", "0.5089279", "0.50767976", "0.5075063", "0.5072234", "0.50681996", "0.5066408", "0.5065039", "0.50605446", "0.50543004", "0.50529176", "0.50521356", "0.50478923", "0.5039481", "0.5031843", "0.5030951", "0.5030585", "0.50262374", "0.5026189", "0.50216526", "0.5018843", "0.50171906", "0.5016187", "0.501334", "0.5006861", "0.50042444", "0.5000818", "0.49955076", "0.4991805", "0.49886578", "0.49759385", "0.4972118", "0.49717674", "0.49639297", "0.49523467", "0.49468106", "0.49460667", "0.49446675" ]
0.5992501
4
Get all service quantity from services list and store into arrayList to transfer data to new activity with intent.putIntegerArrayListExtra()
private ArrayList<Integer> GetAllServiceQuantity(List<Services> services){ // Create new empty arrayList of service quantity ArrayList<Integer> tmp = new ArrayList<Integer>(); // Loop though services list and add service quantity to tmp arraylist for(Services service : services){ tmp.add(service.getServiceQuantity()); } return tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fetchServices() {\n serviciosTotales.clear();\n for (String serviceId : serviceList) {\n databaseServiceReference.child(serviceId).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Servicio servicioTemp = dataSnapshot.getValue(Servicio.class);\n serviciosTotales.add(servicioTemp);\n servicesAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n\n\n }", "@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n myDatabase1 = new MyDatabase1(ServiceClass.this);\r\n // fetches data from database\r\n\r\n\r\n db = myDatabase1.getReadableDatabase();\r\n String[] columns = {MyDatabase1.UID, MyDatabase1.LOCATION, MyDatabase1.LATITUDE, MyDatabase1.LONGITUDE, MyDatabase1.MODE};\r\n Cursor cursor = db.query(MyDatabase1.TABLE_NAME, columns, null, null, null, null, null);\r\n //StringBuffer buffer = new StringBuffer();\r\n singleRowArrayList = new ArrayList<SingleRow>();\r\n while (cursor.moveToNext()) {\r\n int index1 = cursor.getColumnIndex(MyDatabase1.UID);\r\n int index2 = cursor.getColumnIndex(MyDatabase1.LOCATION);\r\n int index3 = cursor.getColumnIndex(MyDatabase1.LATITUDE);\r\n int index4 = cursor.getColumnIndex(MyDatabase1.LONGITUDE);\r\n int index5 = cursor.getColumnIndex(MyDatabase1.MODE);\r\n // int index5 = cursor.getColumnIndex(MyDatabase.EMAIL);\r\n\r\n uid = cursor.getInt(index1);\r\n locationName = cursor.getString(index2);\r\n latitude = cursor.getDouble(index3);\r\n longitude = cursor.getDouble(index4);\r\n mode = cursor.getString(index5);\r\n\r\n\r\n }\r\n return Service.START_NOT_STICKY;\r\n }", "public ArrayList<ServiceModel> getServiceModel(int idService) {\n ArrayList<ServiceModel> listService = new ArrayList<>();\n Cursor cursor;\n if (idService > 0)\n cursor = db.rawQuery(\"select *\"\n + \" from \" + DBSQLite.TABLE_SERVICE\n + \" where \" + DBSQLite.KEY_SERVICE_ID + \"=\" + idService, null);\n else\n cursor = db.rawQuery(\"select * from \" + DBSQLite.TABLE_SERVICE, null);\n\n if (cursor.moveToFirst()) {\n while (!cursor.isAfterLast()) {\n ServiceModel serviceModel = obtainServiceModelCursor(cursor);\n serviceModel.setServicePrice(serviceServicePrice.getServicePriceModel(serviceModel.getId()));\n\n listService.add(serviceModel);\n cursor.moveToNext();\n }\n }\n return listService;\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n questions.addAll(DataUtil.loadQuestions(\"data.csv\", this));\n return Service.START_NOT_STICKY;\n }", "private void retrieveCurrencyData() {\n Log.d(TAG, \" startService\");\n service = new Intent(this, CurrencyLoaderService.class);\n startService(service); //Starting the service\n bindService(service, mConnection, Context.BIND_AUTO_CREATE);\n\n }", "private static void storeData()\n {\n listItems = new String[ITEMS.size()];\n int i = 0;\n\n for (SalesOrder element : ITEMS)\n {\n //Store SalesOrder objects in a HashMap\n ITEM_MAP.put(element.getSalesOrderId(), element);\n\n //Store SalesOrderID in a String array\n listItems[i] = element.getSalesOrderId();\n i++;\n }\n //logItems();\n Log.i(TAG, String.format(\"Stored %d items in HashMap\", i));\n\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n fetchListOfAppNames();\n// this.appNames = getListOfAllAppNames();\n this.appNames = getListOfInstalledAppNames();\n registerBroadcastReceiver();\n return START_STICKY;\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String deliveryOrder=order+\"\\t\"+noOfPlates;\n arrayList.add(deliveryOrder);\n Intent intent=new Intent(Confirm.this,DeliveryAddress.class);\n intent.putExtra(\"mylist\",arrayList);\n startActivity(intent);\n }", "public int[] getAllPids(Activity context) throws Exception {\n ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> pids = activityManager.getRunningServices(Integer.MAX_VALUE);\n int processid = 0;\n int[] retVal = new int[pids.size()];\n Log.d(\"feature\", \"pid size: \" + pids.size());\n for (int i = 0; i < pids.size(); i++) {\n ActivityManager.RunningServiceInfo info = pids.get(i);\n retVal[i] = info.pid;\n Log.d(\"feature\", \"pid: \" + info.service);\n\n return (retVal);\n }\n return(null);\n }", "@Override\n public void onClick(View v) {\n int baseId = service1Btn.getId();\n switch (v.getId() - baseId){\n case 0:\n serviceName = service1.getServiceName();\n servicePrice = service1.getServicePrice();\n break;\n case 1:\n serviceName = service2.getServiceName();\n servicePrice = service2.getServicePrice();\n break;\n case 2:\n serviceName = service3.getServiceName();\n servicePrice = service3.getServicePrice();\n break;\n case 3:\n serviceName = service4.getServiceName();\n servicePrice = service4.getServicePrice();\n break;\n case 4:\n serviceName = service5.getServiceName();\n servicePrice = service5.getServicePrice();\n break;\n case 5:\n serviceName = service6.getServiceName();\n servicePrice = service6.getServicePrice();\n break;\n }\n\n // Send data (service number, professional name, price) to MainActivity\n TransferDataToMainActivity();\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main_2);\n\n /* 取得EX10_10所放的ArrayList */\n Bundle bunde = this.getIntent().getExtras();\n arylistService = bunde.getStringArrayList(\"arylistService\");\n arylistServicePackageName = bunde\n .getStringArrayList(\"arylistServicePackageName\");\n\n ListView02 = (ListView) findViewById(R.id.ListView02);\n /* 将ArrayList放到Adapter */\n aryAdapter1 = new ArrayAdapter<String>(EX10_10_2.this,\n R.layout.simple_list_item_1, arylistService);\n ListView02.setAdapter(aryAdapter1);\n\n ListView02.setOnItemClickListener(new ListView.OnItemClickListener()\n {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int id, long arg3)\n {\n // TODO Auto-generated method stub\n /* 取得ActivityManager */\n mActivityManager = (ActivityManager) EX10_10_2.this\n .getSystemService(ACTIVITY_SERVICE);\n /* 所点击的index */\n click_id = id;\n\n AlertDialog.Builder builder = new AlertDialog.Builder(EX10_10_2.this);\n builder.setCancelable(false);\n builder.setTitle(\"Message\");\n builder.setMessage(\"确定要删除吗??\");\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n // TODO Auto-generated method stub\n /* 停止所点击的服务 */\n mActivityManager.restartPackage(arylistServicePackageName.get(\n click_id).toString());\n /* 移除ArrayList里的值并更新ListView */\n arylistService.remove(click_id);\n ListView02.invalidateViews();\n\n }\n });\n builder.setNegativeButton(\"NO\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n // TODO Auto-generated method stub\n\n }\n });\n builder.show();\n\n }\n });\n }", "public void testServiceList()\n {\n ServiceList services = serviceSetup();\n\n ServiceIterator it = services.createServiceIterator();\n int i = 0;\n try\n {\n while (it.hasNext())\n {\n // Increment the service counter\n i++;\n // Get our next service\n ServiceExt service = (ServiceExt) it.nextService();\n log(\"******************************************************************\");\n log(\"* Services - Counter: (\" + i + \")\");\n dumpService(service);\n\n ServiceDetailsHandle[] handles = sidb.getServiceDetailsByService(service.getServiceHandle());\n\n ServiceDetailsExt[] details = new ServiceDetailsExt[handles.length];\n for (int j = 0; j < handles.length; j++)\n {\n details[j] = sidb.createServiceDetails(handles[j]);\n dumpServiceDetails(details[j]);\n assertEquals(\"ServiceDetails' Service does not match expected value\", service,\n details[j].getService());\n assertEquals(\"ServiceType does not match\", service.getServiceType(), details[j].getServiceType());\n }\n log(\"******************************************************************\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@Override\n public void onRestoreInstanceState(Bundle savedInstance) {\n for (int i = 0; i < numInList; i++) {\n int val = savedInstance.getInt(\"quantity\"+i, 0);\n e.putInt(\"ItemQuantity\"+i, val);\n }\n }", "public static ArrayList<DeviceService> getServices (JSONArray jsonArray){\n ArrayList<DeviceService> services = new ArrayList<DeviceService>();\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n JSONObject o = jsonArray.getJSONObject(i);\n DeviceService serv = new DeviceService(o.getString(Utility.ServiceName), o.getString(Utility.ServiceType));\n\n try {\n JSONArray coms = o.getJSONArray(Utility.Commands);\n Log.w(\"Commands\", coms.toString());\n for (int j = 0; j < coms.length(); j++) {\n try {\n serv.addCommand(new Command(coms.getJSONObject(j).getString(Utility.CommandName),\n coms.getJSONObject(j).getString(Utility.CommandType)));\n }\n catch (JSONException e) {\n Log.w(\"Command\", \"Error adding command\");\n }\n }\n }\n catch (JSONException e) {\n Log.w(\"Service\", \"No Custom Commands Here\");\n }\n\n services.add(serv);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n return services;\n }", "private ServiceList serviceSetup()\n {\n SIManager simgr = sm.createSIManager();\n ServiceList services = simgr.filterServices(new ServiceFilter()\n {\n public boolean accept(Service service)\n {\n return !(service instanceof AbstractService);\n }\n });\n try\n {\n services = services.sortByNumber();\n }\n catch (SortNotAvailableException ex)\n {\n // don't sort then\n }\n\n // Check to see if there are arguments\n // If length of one, then sourceID was specified\n // If length of three, then freq/prognum/modformat was specified\n if (args.length == 1)\n {\n String sid = args[0];\n if (args[0].startsWith(\"0x\")) sid = sid.substring(2, sid.length());\n try\n {\n int sourceID = Integer.parseInt(sid, 16);\n OcapLocator[] locs = { new OcapLocator(sourceID) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"SourceID is not in the correct format\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n if (args.length == 3)\n {\n try\n {\n int freq = Integer.parseInt(args[0]);\n int prog = Integer.parseInt(args[1]);\n int mod = Integer.parseInt(args[2]);\n OcapLocator[] locs = { new OcapLocator(freq, prog, mod) };\n LocatorFilter filter = new LocatorFilter(locs);\n services = simgr.filterServices(filter);\n }\n catch (NumberFormatException ex)\n {\n log(\"Freq/prognum/modformat values are not valid\");\n log(\"Proceeding with normal SIDump process\");\n }\n catch (Exception ex)\n {\n log(\"Exception while getting specified service: \" + ex.getMessage());\n log(\"Proceeding with normal SIDump process\");\n }\n }\n\n return services;\n }", "private ArrayList<ServiceModel> getServiceModelJSON(JSONObject obj) {\n ArrayList<ServiceModel> servicesModel = new ArrayList<>();\n\n try {\n JSONArray servicesArray = obj.getJSONArray(\"services\");\n int limit = servicesArray.length();\n\n for (int i = 0; i < limit; i++) {\n JSONObject service = servicesArray.getJSONObject(i);\n\n ServiceModel serviceModel = new ServiceModel();\n\n serviceModel.setId(service.getInt(\"ID_SERVICE\"));\n serviceModel.setName(Conexion.decode(service.getString(\"NAME_SERVICE\")));\n serviceModel.setReserved(service.getInt(\"RESERVED_SERVICE\"));\n serviceModel.setDescription(Conexion.decode(service.getString(\"DESCRIPTION_SERVICE\")));\n serviceModel.setImage(service.getString(\"IMAGE_SERVICE\"));\n serviceModel.setIdType(service.getInt(\"ID_TYPE_SERVICE\"));\n serviceModel.setNameType(Conexion.decode(service.getString(\"NAME_TYPE_SERVICE\")));\n serviceModel.setValueType(service.getInt(\"VALUE_TYPE_SERVICE\"));\n\n serviceModel.setServicePrice(serviceServicePrice.getServicePriceModelJSON(service, serviceModel.getId(), false));\n servicesModel.add(serviceModel);\n }\n\n } catch (JSONException e) {\n System.out.println(\"Error: Objeto no convertible, \" + e.toString());\n e.printStackTrace();\n }\n return servicesModel;\n }", "public ArrayList<ItemModel> getAllProducts() {\n ArrayList<ItemModel> products = new ArrayList<ItemModel>();\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_SHOPPINGLIST, null);\n\n c.moveToFirst();\n Log.d(DatabaseHelper.class.getName(), \"getAllProducts:\");\n\n while (!c.isAfterLast()) {\n String product = String.valueOf(c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_PID)));\n String quantity=String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.SHOPPINGLIST_QUANTITY)));\n String unit = String.valueOf(c.getString(c.getColumnIndex(DBHelper.SHOPPINGLIST_UNIT)));\n int che = c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_CHECKMARK));\n boolean check;\n if (che==0) {check=Boolean.FALSE;} else {check = Boolean.TRUE;}\n\n ItemModel model = new ItemModel(product, quantity, unit, check);\n products.add(model);\n\n\n c.moveToNext();\n }\n\n db.close();\n\n for (ItemModel ph: products) {\n ph.setProduct(getNameByPID(Integer.parseInt(ph.getProductName())));\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllProducts:\" + ph.toString());\n }\n\n return products;\n }", "private void getIntentValues() {\n\n// itemname= getIntent().getExtras().getString(IntentsConstants.item_name);\n// itemPrice = getIntent().getExtras().getDouble(IntentsConstants.item_price);\n Bundle bundle = getArguments();\n menusItem= (MenusItem) bundle.getSerializable(\"Item\");\n itemname=menusItem.getName();\n itemPrice=menusItem.getPrice();\n\n}", "public List<CatalogService> getService(String service);", "private void receiveOrder() {\n Intent intent = getIntent();\n MyOrder order = (MyOrder) intent.getSerializableExtra(getResources().getString(R.string.intentMesOrder));\n String help;\n final ArrayList<String> listing = new ArrayList<String>();\n ArrayAdapter<String> adap = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1, listing);\n tableSauceString = order.findTableSauce();\n\n switch (intent.getExtras().getInt(getResources().getString(R.string.intentMesOrderType))) { // depending on the order type the received information are displayed\n case 1:\n txtOrderType.setText(getResources().getString(R.string.stringPartOption) +\" \" +\n getResources().getString(R.string.rdbtPizzeria).toString());\n firstInfo.setText(getResources().getString(R.string.stringPartTable) + \" \" +\n String.valueOf(intent.getExtras().getInt(getResources()\n .getString(R.string.intentMesTable))));\n break;\n case 2:\n txtOrderType.setText(getResources().getString(R.string.stringPartOption)+ \" \" +\n getResources().getString(R.string.rdbtTakeaway).toString());\n firstInfo.setText(intent.getExtras().getString(getResources().getString(R.string.intentMesPacking)));\n secondInfo.setText(intent.getExtras().getString(getResources().getString(R.string.intentMesTime)));\n break;\n case 3:\n txtOrderType.setText(getResources().getString(R.string.stringPartOption)+ \" \" +\n getResources().getString(R.string.rdbtDelivery).toString());\n firstInfo.setText(intent.getExtras().getString(getResources().getString(R.string.intentMesAddress)));\n secondInfo.setText(intent.getExtras().getString(getResources().getString(R.string.intentMesPhone)));\n break;\n }\n help = String.format(\"%.2f\", order.getTotal());\n txtMoney.setText(help + getResources()\n .getString(R.string.currency));\n\n if(!(tableSauceString.equals(getResources().getString(R.string.stringNone)))){\n help = String.format(\"%.2f\", order.getTableSaucePrice());\n txtTableSauce.setText(getResources().getString(R.string.stringPartSauce)+\" \"\n + tableSauceString + \"(\" + help+ getResources().getString(R.string.currency) +\" )\");\n }\n\n helpTitle = order.writeOrder();\n helpInfo = order.getMoreOrder();\n for (int i = 0; i < helpTitle.length; i++) {\n if (helpTitle[i] != null) {\n listing.add(helpTitle[i]);\n }\n }\n list.setAdapter(adap);\n list.setOnItemLongClickListener(this);\n }", "private void GetSubServices(String id) {\n\n HashMap<String,String> param = new HashMap();\n param.put(Constants.SERVICE_ID,id);\n\n //url with params\n String url= SupportFunctions.appendParam(MyApplication.URL_GET_SUBSERVICES,param);\n\n //url without params\n //String url= MyApplication.URL_GET_SERVICES;\n\n Log.e(\"SubService url\",url);\n JsonObjectRequest obreq = new JsonObjectRequest(Request.Method.GET,url,null,\n // The third parameter Listener overrides the method onResponse() and passes\n //JSONObject as a parameter\n new Response.Listener<JSONObject>() {\n\n // Takes the response from the JSON request\n @Override\n public void onResponse(JSONObject response) {\n\n try\n {\n //getting test master array\n // testMasterDetails = testMasterArray.toString();\n\n Log.e(\"SubService Json_string\",response.toString());\n Gson gson = new Gson();\n\n SubServiceResponse subServiceResponse= gson.fromJson(response.toString(), SubServiceResponse.class);\n\n if(subServiceResponse.getResponse().equals(\"100\")) {\n SubServices[] service = subServiceResponse.getData();\n for (SubServices item : service) {\n\n SubServices sub=new SubServices(item.getSer_img_url(),item.getSer_name(),item.getSub_service_id(),service_id,item.getSub_service_desc());\n services.add(sub);\n Log.e(\"SubService img title\", item.getSer_name());\n\n }\n\n mAdapter.notifyDataSetChanged();\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n //Toast.makeText(NavigationActivity.this, \"Invalid album id\", Toast.LENGTH_SHORT).show();\n //dialog.dismiss();\n }\n //dialog.dismiss();\n }\n },\n // The final parameter overrides the method onErrorResponse() and passes VolleyError\n //as a parameter\n new Response.ErrorListener() {\n @Override\n // Handles errors that occur due to Volley\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Volley\", \"Test Error\");\n // showNoConnectionDialog();\n //dialog.dismiss();\n\n }\n }\n );\n mVolleyRequest.add(obreq);\n }", "private ArrayList<TodoData> getTodos() {\n Intent intent = (Intent) getIntent();\n return (ArrayList<TodoData>) intent.getSerializableExtra(\"todos\");\n }", "public ArrayList<Servicio> cargarServicios() throws CaException {\n try {\n String strSQL = \"SELECT k_idservicio, f_fycentrada, f_fycsalida, q_valorapagar, k_idvehiculo FROM servicio\";\n Connection conexion = ServiceLocator.getInstance().tomarConexion();\n PreparedStatement prepStmt = conexion.prepareStatement(strSQL);\n ResultSet rs = prepStmt.executeQuery();\n while (rs.next()) {\n Servicio servicio1 = new Servicio();\n servicio1.setK_idservicio(rs.getInt(1));\n servicio1.setF_fycentrada(rs.getString(2));\n servicio1.setF_fycsalida(rs.getString(3));\n servicio1.setQ_valorapagar(rs.getInt(4));\n servicio1.setK_idvehiculo(rs.getInt(5));\n\n servicios.add(servicio1);\n }\n } catch (SQLException e) {\n throw new CaException(\"ServicioDAO\", \"No pudo recuperar el servicio\" + e.getMessage());\n }finally {\n ServiceLocator.getInstance().liberarConexion();\n }\n return servicios;\n }", "private static ArrayList<Integer> getUserQuantityList(ArrayList<OrderItemDetailsBean> orderItemDetailList){\n\t\tArrayList<Integer> userQuantityList = new ArrayList<Integer>();\n\t\tfor(OrderItemDetailsBean userQuantity : orderItemDetailList){\n\t\t\tuserQuantityList.add(userQuantity.quantity);\n\t\t}\n\t\treturn userQuantityList;\n\t}", "private void getInventoryNumber(ArrayList list){}", "java.util.List<java.lang.Integer> getItemsList();", "@Override\n public void onClick(View view) {\n if(product_ids.size() == 0)\n {\n Toast.makeText(getApplicationContext(),\"Cart is Empty, Add items to cart before proceeding to checkout\",Toast.LENGTH_LONG).show();\n return;\n }\n\n Intent intent = new Intent(Cart.this,MapsActivity.class);\n intent.putExtra(\"customer\",customer);\n\n // Converting Lists to array to pass in intent\n int[] product_ids_arr = new int[product_ids.size()];\n int[] product_quantities_arr = new int[product_quantities.size()];\n String[] product_names_arr = new String[product_names.size()];\n float[] product_prices_arr = new float[product_prices.size()];\n\n for(int i=0; i<product_ids.size(); i++)\n {\n product_ids_arr[i] = product_ids.get(i);\n product_quantities_arr[i] = product_quantities.get(i);\n product_names_arr[i] = product_names.get(i);\n product_prices_arr[i] = product_prices.get(i);\n }\n\n intent.putExtra(\"product_ids\",product_ids_arr);\n intent.putExtra(\"product_quantities\",product_quantities_arr);\n intent.putExtra(\"product_names\",product_names_arr);\n intent.putExtra(\"product_prices\",product_prices_arr);\n startActivity(intent);\n }", "private List getActiveServiceList(List servicesList) {\r\n\r\n\t\tList activeServiceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\t\t\r\n\t\t\r\n\t\tif (servicesList != null) {\r\n\t\t\tfor (Iterator iterator = servicesList.iterator(); iterator.hasNext();) {\r\n\t\t\t\tactiveService = (ServiceVO) iterator.next();\r\n\t\t\t\tif (activeService.getStatus() != null) {\r\n\t\t\t\t\tif (activeService.getStatus().trim().equalsIgnoreCase(\"Ativado\")) {\r\n\t\t\t\t\t\tactiveServiceList.add(activeService);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn activeServiceList;\r\n\t\t\r\n\t}", "@Override // com.oppo.enterprise.mdmcoreservice.utils.defaultapp.DefaultApp\n public List<ResolveInfo> getResolveInfoList(Intent intent, PackageManager pm) {\n try {\n return pm.queryIntentActivities(intent, 131072);\n } catch (Exception e) {\n List<ResolveInfo> resolveInfoList = new ArrayList<>();\n e.printStackTrace();\n return resolveInfoList;\n }\n }", "@Override\n public void onClick(View view) {\n readFile();\n// bindService(new Intent(MainActivity.this, BookManagerService.class), mCon2, BIND_AUTO_CREATE);\n// bindService(new Intent(MainActivity.this, MessgengerService.class), mCon, BIND_AUTO_CREATE);\n /*远程方法中执行耗时会发生ANR,正确执行耗时操作姿势,避免ANR的方式:?*/\n// try {\n// bookManager.getList();\n// } catch (RemoteException e) {\n// e.printStackTrace();\n// }\n// new Thread(new Runnable() {\n// @Override\n// public void run() {\n// try {\n// List<Book> bookList = bookManager.getList();\n// Log.i(\"zzz\", \"BookList.size=\" + bookList.size());\n// } catch (RemoteException e) {\n// e.printStackTrace();\n// }\n// }\n// }).start();\n }", "private void TransferDataToMainActivity(){\n Intent intent = new Intent(ChooseService.this, MainActivity.class);\n intent.putExtra(\"Professional\", professionalName);\n intent.putExtra(\"Service\", serviceName);\n intent.putExtra(\"Price\", servicePrice);\n startActivity(intent);\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n db = new DatabaseHelper(this);\n names = new ArrayList<>();\n\n\n\n\n\n\n if (intent.getStringExtra(\"Number\") != null) {\n\n\n phNumber = intent.getStringExtra(\"Number\");\n\n saveNameToServer();\n Toast.makeText(this, \"registration \" + phNumber,\n Toast.LENGTH_LONG).show();\n\n\n } else {\n }\nreturn START_STICKY;\n\n }", "public HashMap<String, ArrayList[]> determineSale() {\n HashMap<String, ArrayList[]> ordersMap = new HashMap<>();\n ordersMap.put(\"ms\", new ArrayList<Integer>[2]);\n ordersMap.put(\"gs\", new ArrayList<Integer>[2]);\n ordersMap.put(\"xlf\", new ArrayList<Integer>[2]);\n ordersMap.put(\"wfc\", new ArrayList<Integer>[2]);\n ordersMap.put(\"bond\", new ArrayList<Integer>[2]);\n\n Integer temp;\n int ind = 0;\n ArrayList<Integer> prices = ordersMap.get(\"bond\")[0];\n ArrayList<Integer> quantities = ordersMap.get(\"bond\")[1];\n for (int i = 0; i < 3; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"gs\")[0];\n quantities = ordersMap.get(\"gs\")[1];\n for (int i = 0; i < 2; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n } \n ind = 0;\n prices = ordersMap.get(\"ms\")[0];\n quantities = ordersMap.get(\"ms\")[1]; \n for (int i = 0; i < 3; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"wfc\")[0];\n quantities = ordersMap.get(\"wfc\")[1]; \n for (int i = 0; i < 2; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);;\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n ind = 0;\n prices = ordersMap.get(\"xlf\")[0];\n quantities = ordersMap.get(\"xlf\")[1]; \n for (int i = 0; i < 10; i++) {\n temp = bondsBuy.poll();\n if (prices.get(ind).equals(temp)) {\n quantities.set(ind, quantities.get(ind) + 1);\n } else {\n prices.add(temp);\n quantities.add(1);\n ind++;\n }\n }\n return ordersMap;\n }", "private PotCollection loadPotList(){\n SharedPreferences preferences = getSharedPreferences(SHAREDPREF_SET, MODE_PRIVATE);\n int sizeOfPotList = preferences.getInt(SHAREDPREF_ITEM_POTLIST_SIZE, 0);\n for(int i = 0; i<sizeOfPotList; i++){\n Log.i(\"serving calculator\", \"once\");\n String potName = preferences.getString(SHAREDPREF_ITEM_POTLIST_NAME+i, \"N\");\n int potWeight = preferences.getInt(SHAREDPREF_ITEM_POTLIST_WEIGHT+i, 0);\n Pot tempPot = new Pot(potName, potWeight);\n potList.addPot(tempPot);\n }\n return potList;\n }", "public void mo7380a(C1320b bVar, List<String> list) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.plus.internal.IPlusService\");\n obtain.writeStrongBinder(bVar != null ? bVar.asBinder() : null);\n obtain.writeStringList(list);\n this.f3425ky.transact(34, obtain, obtain2, 0);\n obtain2.readException();\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public void getSMSIds() {\r\n\r\n mSMSids = new ArrayList<Long>();\r\n\r\n ContentResolver cr = mContext.getContentResolver();\r\n Cursor cur = cr.query(Uri.parse(MySMS.SMS_URI), null,\r\n null, null, null);\r\n if (cur != null) {\r\n if (cur.getCount() > 0) {\r\n while (cur.moveToNext()) {\r\n Long id = cur.getLong(cur.getColumnIndex(\"_id\"));\r\n mSMSids.add(id);\r\n }\r\n }\r\n cur.close();\r\n }\r\n }", "public void serviceAdded(String serviceID, Remote service, List<?> itemList);", "@Override\n\tpublic int onStartCommand(Intent intent, int flags, int startId) {\n\t\t\n\t\tthis.myDbhelper=new Dbhandler(this);\n\t\tFetchingData();\n\t\t\n \tmydb=myDbhelper.getWritableDatabase();\n\t\tString num = null,date=null,time=null;\n\t\tCursor c=mydb.rawQuery(\"select * from email\", null);\n \tc.moveToFirst();\n \tif(c!=null)\n \t{\n \t\tdo\n \t\t{\n \t\t\tint c1=c.getColumnIndex(\"emailid\");\n \t\t\tif(c.getCount()>0)\n \t\t\temailid=c.getString(c1);\n \t\t\tSystem.out.println(\" $$$$$$$$$$$$$$$$$$$ \"+emailid);\n \t\t}while(c.moveToNext());\n \t}\n\t\tBundle bundle = intent.getExtras();\n\t\tSystem.out.println(\"!@#$%!@#$%^&*()_!@#$%^&*()_ vijay @#$%^&*(\"+bundle.size());\n\t\tSystem.out.println(\"!@#$%!@#$%^&*()_!@#$%^&*()_ vijay @#$%^&*(\"+bundle);\n\t\n\t\tif(bundle.equals(null))\n\t\t{\n\t\t\tSystem.out.println(\"no strings 12345678\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t num=bundle.getString(\"num\");\n\t\t\t\n\t\t\t time=bundle.getString(\"time\");\n\t\t\t System.out.println(\"%^&* in service $%^& \"+num);\n\t\t\t\n\t\t}\n\t\t\tif(num.equals(\"\")||num.equals(null))\n\t\t\t{\n\t\t\t\tnum=\"no calls\";\n\t\t\t\t System.out.println(\"%^&* in service $%^& \"+num);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnum=num;\n\t\t\t}\n\t\t\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n \tDate d = new Date();\n today = sdf.format(d);\n Toast.makeText(getApplicationContext(), today, 100).show();\n getthedayactive();\n \n if(active==1)\n {\n gettimes();\n \n \n String[] crti=todaytime.split(\":\");\n String cht=crti[0];\n String cmt=crti[1];\n ct=cht.concat(cmt);\n crt=Integer.parseInt(ct);\n \n System.out.println(\"&&&&&&&&&&&&&&&&& crt time &&&&&&&&&&&&&\"+crt);\n \n String[] frti=dfromtime.split(\":\");\n String fht=frti[0];\n String fmt=frti[1];\n ft=fht.concat(fmt);\n frt=Integer.parseInt(ft);\n System.out.println(\"&&&&&&&&&&&&&&&&& frt time &&&&&&&&&&&&&\"+frt);\n String[] toti=dtotime.split(\":\");\n String tht=toti[0];\n String tmt=toti[1];\n tt=tht.concat(tmt);\n tot=Integer.parseInt(tt);\n System.out.println(\"&&&&&&&&&&&&&&& totime&&&&&&&&&&&&&&&\"+tot);\n if((frt<=crt)&&(crt<=tot))\n {\n \t GMailSender sender = new GMailSender(\"[email protected]\", \"bmaczlove1143\");\n\t try {\n\t \t\n\t \t\n\t \tSystem.out.println(\"$$#$%^ in try %^&**\");\n\t\t\t\tsender.sendMail(\" Ping Me - Notification. \", \n\t\t\t\t \"Hi Greeting from EMS(Emergency Mail Sender)Team,\"+\"\\n\"+\n\t\t\t\t\"You got a call from: \" +\"\\n\"+num \n\t\t\t\t +\"\\n\" \n\t\t\t\t \t\t+\"\\n\" +\"Thanks,\"+ \"\\n\"+\n\t\t\t\t \t\t\"--EMS Team.\"+ \"\\n\"+\n\t\t\t\t \t\t\"support at: [email protected] \"+ \"\\n\"+\n\t\t\t\t \t\t\"developed by:bmacz-bindhu-kiran-lavanya\"+ \"\\n\"+\n\t\t\t\t \t\t\"Contact: +917097631143 (INDIA)\", \n\t\t\t\t \"[email protected]\", \n\t\t\t\t emailid);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} \n }\n\t\t\n }\n return super.onStartCommand(intent, flags, startId);\n\t}", "@Override\n protected ServiceWrapper doInBackground(ServiceWrapper... params) {\n ServiceWrapper serviceWrapper = null;\n\n for (ServiceWrapper tag : params) {\n saveService(tag, commonPersonObjectClient.entityId(), providerId, null);\n //list.add(tag);\n //serviceId=tag.getServiceType().getId()+\"\";\n //tag.getDbKey();\n ServiceSchedule.updateOfflineAlerts(tag.getType(), commonPersonObjectClient.entityId(), Utils.dobToDateTime(commonPersonObjectClient));\n serviceWrapper = tag;\n }\n return serviceWrapper;\n\n// RecurringServiceRecordRepository recurringServiceRecordRepository = ImmunizationLibrary.getInstance().recurringServiceRecordRepository();\n// List<ServiceRecord> serviceRecordList = recurringServiceRecordRepository.findByEntityId(commonPersonObjectClient.entityId());\n//\n// RecurringServiceTypeRepository recurringServiceTypeRepository = ImmunizationLibrary.getInstance().recurringServiceTypeRepository();\n// List<ServiceType> serviceTypes = recurringServiceTypeRepository.fetchAll();\n// String[] alertArray = VaccinateActionUtils.allAlertNames(serviceTypes);\n//\n// AlertService alertService = ImmunizationLibrary.getInstance().context().alertService();\n// List<Alert> alertList = alertService.findByEntityIdAndAlertNames(commonPersonObjectClient.entityId(), alertArray);\n//\n// return Triple.of(list, serviceRecordList, alertList);\n\n }", "public ShopListService(@NonNull final Activity activity) {\n requestQueue = Volley.newRequestQueue(activity.getApplicationContext());\n }", "public int getSyncPhoneList(final String userId) {\n\n // Check if a match to this request is already launched\n final int requestSparseArrayLength = mRequestSparseArray.size();\n for (int i = 0; i < requestSparseArrayLength; i++) {\n final Intent savedIntent = mRequestSparseArray.valueAt(i);\n\n if (savedIntent.getIntExtra(PoCService.INTENT_EXTRA_WORKER_TYPE, -1) != PoCService.WORKER_TYPE_CRUD_SYNC_PHONE_LIST) {\n continue;\n }\n if (!savedIntent.getStringExtra(PoCService.INTENT_EXTRA_CRUD_SYNC_PHONE_LIST_USER_ID).equals(userId)) {\n continue;\n }\n return mRequestSparseArray.keyAt(i);\n }\n\n final int requestId = sRandom.nextInt(MAX_RANDOM_REQUEST_ID);\n\n final Intent intent = new Intent(mContext, PoCService.class);\n intent.putExtra(PoCService.INTENT_EXTRA_WORKER_TYPE, PoCService.WORKER_TYPE_CRUD_SYNC_PHONE_LIST);\n intent.putExtra(PoCService.INTENT_EXTRA_RECEIVER, mEvalReceiver);\n intent.putExtra(PoCService.INTENT_EXTRA_REQUEST_ID, requestId);\n intent.putExtra(PoCService.INTENT_EXTRA_CRUD_SYNC_PHONE_LIST_USER_ID, userId);\n mContext.startService(intent);\n\n mRequestSparseArray.append(requestId, intent);\n\n mMemoryProvider.syncPhoneList = null;\n\n return requestId;\n }", "public void add_to_my_list_process(View v) {\n\n addToCart_flag = false;\n // get current login value saved in sharedpreferences object\n SharedPreferences loginSharedPref = getSharedPreferences(\"LoginData\", MODE_PRIVATE);\n // get current agent id\n final String AgentID = loginSharedPref.getString(\"ID\", \"\");\n // create string\n create_final_string_product();\n /* get all list names into arraylist object */\n ArrayList<String> listNames = get_list_data_from_local_DB(AgentID);\n // display alert box to choose list name by user\n display_list_names(listNames, AgentID);\n // clear all data after adding product into cart\n clear_data();\n }", "public ArrayList<Service> selectAll(){\n return Database.servico;\n }", "private List getServicesHistory(String xmlResponse) {\r\n\r\n\t\tList serviceList = new ArrayList();\r\n\t\t\r\n\t\tServiceVO activeService;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tElement root;\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement element = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\telement = DOMUtils.getElement(element, \"contract\", true);\r\n\t\t\t\r\n\t\t\tNodeList serviceNodeList = DOMUtils.getElements(element, \"service\");\r\n\t\t\tElement subElement;\r\n\t\t\tfor (int i = 0; i < serviceNodeList.getLength(); i++) {\r\n\t\t\t\telement = (Element) serviceNodeList.item(i);\r\n\t\t\t\tactiveService = new ServiceVO();\r\n\t\t\t\t//sets the sncode\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"code\", true);\r\n\t\t\t\tactiveService.setSnCode(DOMUtils.getText(subElement).toString());\r\n\t\t\t\t//sets the description\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"desc\", true);\r\n\t\t\t\tactiveService.setDescription(DOMUtils.getText(subElement).toString());\r\n\t\t\t\t//sets the service history\r\n\t\t\t\tsubElement = DOMUtils.getElement(element, \"contract-svc\", true);\r\n\t\t\t\tsubElement = DOMUtils.getElement(subElement, \"status-hist\", true);\r\n\t\t\t\tactiveService.setServiceHistory(getServiceHistory(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t//sets the service activation\r\n\t\t\t\tactiveService.setServiceActivation(getActivationDate(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t//sets the service status\r\n\t\t\t\tactiveService.setStatus(getServiceCurrentStatus(DOMUtils.getText(subElement).toString()));\r\n\t\t\t\t\r\n\t\t\t\tserviceList.add(activeService);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\tthrow new ErrorMessageException(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t}\r\n\t\t\r\n\t\treturn serviceList;\t\t\t\t\t\t\r\n\t\t\r\n\t}", "public void apiSpotifyGetTracks(Messenger handler){\n for(int i = 0; i < playlists.size(); i++){\n Request request = new Request.Builder()\n .url(getString(R.string.api_spotify_gettracks, playlists.get(i).getId()))\n .header(\"Authorization\", \"Bearer \"+ dh.getSpotifyUserToken())\n .build();\n\n\n // ensure the response (and underlying response body) is closed\n try (Response response = client.newCall(request).execute()) {\n if(response.isSuccessful()){\n JSONObject jsonObject = new JSONObject(response.body().string());\n songsToTransfer += jsonObject.getInt(\"total\");\n updateMessage(handler,1);\n\n apiSpotifyGetTracksHelper(i,jsonObject,handler);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }", "public ArrayList<ComProduct> get_all_comproduct() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<ComProduct> ComProduct_list;\n\n\t\t\tComProduct_list = ComProduct_Default_Activity_dao.get_all_comproduct();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn ComProduct_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "protected void onSaveInstanceState(Bundle savedInstance) {\n\n for (int i = 0; i < numInList; i++) {\n String name = shared.getString(\"ItemName\" + Integer.toString(i), \"\");\n float price = shared.getFloat(\"ItemPrice\" + Integer.toString(i), 0);\n int quantity = shared.getInt(\"ItemQuantity\"+i, 0);\n\n savedInstance.putInt(\"quantity\"+i, quantity);\n }\n }", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "public ArrayList getNumberCaroserii() {\n c = db.rawQuery(\"select caroserie_id from statistici\" , new String[]{});\n ArrayList lista = new ArrayList();\n while (c.moveToNext()) {\n int id=c.getInt(0);\n lista.add(id);\n }\n return lista;\n }", "private void getDBInstallationList() {\n DataHolder mDataHolder;\n mArrayListInstallations = new ArrayList<>();\n try {\n String url = \"select * from \" + mActivity.mDbHelper.mTableInstall + \" where \" + mActivity.mDbHelper.mFieldInstallIsSync + \"= 0\" + \" AND \" + mActivity.mDbHelper.mFieldInstallUserId + \"= '\" + PreferenceHelper.getPreferenceInstance(MyApplication.getAppContext()).getUserId() + \"'\" + \" order by \" + mActivity.mDbHelper.mFieldInstallLocalId + \" DESC\";\n System.out.println(\"Local url \" + url);\n mDataHolder = mActivity.mDbHelper.read(url);\n if (mDataHolder != null) {\n System.out.println(\"Local Device List \" + url + \" : \" + mDataHolder.get_Listholder().size());\n for (int i = 0; i < mDataHolder.get_Listholder().size(); i++) {\n VoInstallation mVoInstallation = new VoInstallation();\n mVoInstallation.setInst_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalId));\n mVoInstallation.setInst_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerId));\n mVoInstallation.setInst_user_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUserId));\n mVoInstallation.setInst_device_imei_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceIMEINo));\n mVoInstallation.setInst_device_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceServerId));\n mVoInstallation.setInst_device_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceLocalId));\n mVoInstallation.setInst_device_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDevicName));\n mVoInstallation.setInst_device_warranty_status(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceWarranty_status));\n mVoInstallation.setInst_device_type_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceTypeName));\n mVoInstallation.setInst_help_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallHelpNo));\n mVoInstallation.setInst_date_time(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTime));\n mVoInstallation.setInst_latitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLatitude));\n mVoInstallation.setInst_longitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLongitude));\n mVoInstallation.setInst_country_code(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryCode));\n mVoInstallation.setInst_country_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryName));\n mVoInstallation.setInst_vessel_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselLocalId));\n mVoInstallation.setInst_vessel_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselServerId));\n mVoInstallation.setInst_vessel_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselName));\n mVoInstallation.setInst_vessel_regi_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselRegNo));\n mVoInstallation.setInst_power(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPower));\n mVoInstallation.setInst_location(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocation));\n mVoInstallation.setInst_owner_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerName));\n mVoInstallation.setInst_owner_address(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerAddress));\n mVoInstallation.setInst_owner_city(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerCity));\n mVoInstallation.setInst_owner_state(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerState));\n mVoInstallation.setInst_owner_zipcode(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerZipcode));\n mVoInstallation.setInst_owner_email(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerEmail));\n mVoInstallation.setInst_owner_mobile_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerMobileNo));\n mVoInstallation.setInst_local_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalSignUrl));\n mVoInstallation.setInst_server_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerSignUrl));\n mVoInstallation.setInst_local_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalInstallerSignUrl));\n mVoInstallation.setInst_server_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerInstallerSignUrl));\n mVoInstallation.setInst_pdf_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPdfUrl));\n mVoInstallation.setInst_created_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCreatedDate));\n mVoInstallation.setInst_updated_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUpdatedDate));\n mVoInstallation.setInst_is_sync(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallIsSync));\n mVoInstallation.setIs_install(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallStatus));\n mVoInstallation.setInst_date_timestamp(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTimeStamp));\n mArrayListInstallations.add(mVoInstallation);\n }\n }\n// Collections.sort(mArrayListTreatmentLists, new Comparator<TreatmentList>() {\n// @Override\n// public int compare(TreatmentList s1, TreatmentList s2) {\n// return s1.getTreatment_title().compareToIgnoreCase(s1.getTreatment_title());\n// }\n// });\n } catch (Exception e) {\n e.printStackTrace();\n }\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false);\n mInstallationAdapter = new InstallationAdapter();\n mRecyclerViewInstallation.setLayoutManager(mLayoutManager);\n mRecyclerViewInstallation.setAdapter(mInstallationAdapter);\n mInstallationAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n checkAdapterIsEmpty();\n }\n });\n checkAdapterIsEmpty();\n }", "@Override\n public void onClick(View view) {\n\n Intent Main_Save_Intent = new Intent(getApplicationContext(),PingTestSetup.class);\n Bundle Main_Save_Bundle = new Bundle();\n Main_Save_Bundle.putSerializable(\"Play_TC_List\",Play_TC_List);\n Main_Save_Intent.putExtras(Main_Save_Bundle);\n startActivity(Main_Save_Intent);\n\n\n }", "int getServicesCount();", "int getServicesCount();", "private void addToQueue (Parcel[] packagesAssigned){\n\n }", "public static void getCartCheckOutItemsTotalAmount(TextView total, TextView mealCost1, TextView totalTaxFromAPI, TextView deliveryChargeFromAPI, TextView packagingChargeFromAPI, int from, boolean applyreferral) {\n String url = APIBaseURL.getCartsList + SaveSharedPreference.getLoggedInUserEmail(consumerCheckOutActivity) + \"?Referal=\" + applyreferral;\n\n CustomVolleyRequest stringRequest = new CustomVolleyRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n Log.v(\"referalResponse\", response);\n JSONObject jsonObject = new JSONObject(response);\n JSONObject dataArray = jsonObject.getJSONObject(\"data\");\n JSONArray cartDetailsArray = dataArray.getJSONArray(\"cartDetails\");\n JSONArray totalMenuItemsArray = new JSONArray();\n double sum = 0;\n double mealPriceSum = 0;\n objectsList.clear();\n cartDetailsListssArray = new ArrayList<>();\n for (int i = 0; i < cartDetailsArray.length(); i++) {\n JSONObject menuObject = cartDetailsArray.getJSONObject(i);\n Chef chef = new Chef();\n chef.setId(menuObject.optString(\"chefId\"));\n chef.setName(menuObject.optString(\"chefName\"));\n\n JSONArray menuDetailsArray = new JSONArray();\n\n if (menuObject.has(\"menuDetails\")) {\n menuDetailsArray = menuObject.getJSONArray(\"menuDetails\");\n totalMenuItemsArray = menuObject.getJSONArray(\"menuDetails\");\n }\n\n JSONObject footerObject = new JSONObject();\n\n if (menuObject.has(\"footer\")) {\n footerObject = menuObject.getJSONObject(\"footer\");\n }\n chef.setSumOfSaleAmount(footerObject.optString(\"sumOfSaleAmount\"));\n chef.setSumTaxAmount(footerObject.optString(\"sumTaxAmount\"));\n chef.setDeliveryCharges(footerObject.optString(\"deliveryCharges\"));\n chef.setPackagingCharges(footerObject.optString(\"packagingCharges\"));\n chef.setTotal(footerObject.optString(\"total\"));\n total.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"total\"))));\n mealCost1.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"sumOfSaleAmount\"))));\n totalTaxFromAPI.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"sumTaxAmount\"))));\n deliveryChargeFromAPI.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"deliveryCharges\"))));\n packagingChargeFromAPI.setText(String.format(\"%.2f\", Double.valueOf(footerObject.optString(\"packagingCharges\"))));\n Log.v(\"SingleMealPrice\", footerObject.optString(\"sumOfSaleAmount\"));\n List<FoodItem> foodItemList = new ArrayList<>();\n cartsItemsListss = new ArrayList<>();\n for (int j = 0; j < menuDetailsArray.length(); j++) {\n JSONObject menuItemsObject = menuDetailsArray.getJSONObject(j);\n\n FoodItem foodItem = new FoodItem();\n if (menuItemsObject.getJSONArray(\"dishImage\").length() != 0) {\n foodItem.setFoodImage(menuItemsObject.getJSONArray(\"dishImage\").get(0).toString());\n }\n\n foodItem.setFoodName(menuItemsObject.optString(\"dishName\"));\n foodItem.setShortDescription(menuItemsObject.optString(\"shortDescription\"));\n foodItem.setAvailableQuantity(\"Available(\" + menuItemsObject.optString(\"availableCount\") + \")\");\n foodItem.setAvailQty(menuItemsObject.optInt(\"availableCount\"));\n foodItem.setTime(menuItemsObject.optString(\"preparationTime\"));\n foodItem.setCartId(menuItemsObject.optString(\"id\"));\n foodItem.setFoodId(menuItemsObject.optString(\"dishId\"));\n foodItem.setCartQuantity(menuItemsObject.optInt(\"quantity\"));\n foodItem.setMealPrice(menuItemsObject.optString(\"mealPrice\"));\n foodItem.setPrice(menuItemsObject.optString(\"mealPrice\"));\n foodItem.setSubTotal(menuItemsObject.optInt(\"total\"));\n foodItem.setAvailable(menuItemsObject.optBoolean(\"isAvailable\"));\n\n JSONObject quickInfoObject = new JSONObject();\n\n if (menuObject.has(\"quickInfo\")) {\n quickInfoObject = menuItemsObject.getJSONObject(\"quickInfo\");\n\n\n JSONObject nutritionObject = new JSONObject();\n\n if (quickInfoObject.has(\"nutrition\")) {\n nutritionObject = quickInfoObject.getJSONObject(\"nutrition\");\n }\n\n foodItem.setProteintCount(nutritionObject.optInt(\"protein\"));\n foodItem.setFatCount(nutritionObject.optInt(\"fat\"));\n foodItem.setFibreCount(nutritionObject.optInt(\"fibre\"));\n foodItem.setCarbsCount(nutritionObject.optInt(\"carbohydrates\"));\n }\n JSONObject chefQuickInfoObject = new JSONObject();\n\n if (menuObject.has(\"chefQuickInfo\")) {\n chefQuickInfoObject = menuObject.getJSONObject(\"chefQuickInfo\");\n }\n\n foodItem.setChefId(chefQuickInfoObject.optString(\"chefId\"));\n foodItem.setChefImage(chefQuickInfoObject.optString(\"chefImagePath\"));\n foodItem.setChefName(chefQuickInfoObject.optString(\"chefName\"));\n foodItem.setChefprofession(chefQuickInfoObject.optString(\"profession\"));\n foodItem.setChefratingAverage(chefQuickInfoObject.optInt(\"ratingAverage\"));\n foodItem.setChefratingCount(chefQuickInfoObject.optInt(\"ratingsCount\"));\n foodItem.setChefsubscribersCount(chefQuickInfoObject.optInt(\"subscribersCount\"));\n\n List<ItemAddOns> itemAddOns = new ArrayList<>();\n ItemAddOns addOns = new ItemAddOns();\n addOns.setName(\"coconut\");\n // foodItem.setAddOns(itemAddOns);\n Double subTotal = menuObject.optDouble(\"total\");\n sum = sum + subTotal;\n\n Double mealPriceTotal = menuObject.optDouble(\"mealPrice\");\n mealPriceSum = mealPriceSum + mealPriceTotal;\n foodItemList.add(foodItem);\n cartsItemsListss.add(foodItem);\n chef.setFoodItemList(foodItemList);\n\n }\n objectsList.add(chef);\n cartDetailsListssArray.add(chef);\n if (from == 2) {\n recyclerViewFoodItem.getAdapter().notifyDataSetChanged();\n } else {\n recyclerViewFoodItem.getAdapter().notifyDataSetChanged();\n }\n if (objectsList.size() == 0) {\n consumerCheckOutActivity.finish();\n\n }\n }\n try {\n JSONObject orderReportSummaryObject = new JSONObject();\n\n if (dataArray.has(\"orderReportSummary\")) {\n orderReportSummaryObject = dataArray.getJSONObject(\"orderReportSummary\");\n }\n\n subTotal.setText(\"Sub Total (\" + jsonObject.optString(\"count\") + \" Items)\");\n price.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"grandTotal\"))));\n totalCostinPop.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"grandTotal\"))));\n taxCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"totalTax\"))));\n packagingCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"totalPackingCharges\"))));\n\n\n if (!dataArray.optBoolean(\"isRefferalApplied\") || orderReportSummaryObject.optInt(\"referalAmount\") == 0) {\n // Toast.makeText(consumerCheckOutActivity, \"Referral Cannot be applied\", Toast.LENGTH_SHORT).show();\n checkReferral.setChecked(false);\n stateReferralAppliedorNot = false;\n Log.v(\"checkBoxReferal\", \"false\");\n }\n\n// if(dataArray.optInt(\"totalPointused\") == 0)\n// {\n// //referralCost.setText(\" - \"+String.format(\"%.2f\",Double.valueOf(\"0\")));\n// }\n// else\n// {\n try {\n referralCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"referalAmount\"))));\n } catch (Exception e) {\n e.printStackTrace();\n }\n// }\n mealCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"orderSubTotal\"))));\n deliveryCost.setText(String.format(\"%.2f\", Double.valueOf(orderReportSummaryObject.optString(\"totalDeliveryCharges\"))));\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n boolean checkAvailability = isAllItemsAreNotSoldOut(cartDetailsListssArray);\n if (checkAvailability) {\n soldOutTextinCart.setVisibility(View.VISIBLE);\n } else {\n soldOutTextinCart.setVisibility(View.GONE);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n NetworkResponse response = error.networkResponse;\n if (response != null && response.statusCode == 404) {\n try {\n String res = new String(response.data,\n HttpHeaderParser.parseCharset(response.headers, \"utf-8\"));\n // Now you can use any deserializer to make sense of data\n JSONObject obj = new JSONObject(res);\n //use this json as you want\n consumerCheckOutActivity.finish();\n // Toast.makeText(Address.this, \"Address Field should not contain #,Invalid address\", Toast.LENGTH_SHORT).show();\n } catch (UnsupportedEncodingException e1) {\n // Couldn't properly decode data to string\n e1.printStackTrace();\n } catch (JSONException e2) {\n // returned data is not JSONObject?\n e2.printStackTrace();\n }\n }\n if (error instanceof AuthFailureError) {\n //TODO\n ViewGroup viewGroup = consumerCheckOutActivity.findViewById(android.R.id.content);\n\n //then we will inflate the custom alert dialog xml that we created\n View dialogView = LayoutInflater.from(consumerCheckOutActivity).inflate(R.layout.access_token_expired_dialog, viewGroup, false);\n\n Button buttonreset = dialogView.findViewById(R.id.buttonreset);\n Button buttonOk = dialogView.findViewById(R.id.buttonOk);\n ImageView closeBtn = dialogView.findViewById(R.id.closeBtn);\n\n //Now we need an AlertDialog.Builder object\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(consumerCheckOutActivity);\n\n //setting the view of the builder to our custom view that we already inflated\n builder.setView(dialogView);\n\n //finally creating the alert dialog and displaying it\n android.app.AlertDialog alertDialog = builder.create();\n\n\n buttonOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n ConsumerMainActivity.logout();\n\n }\n });\n\n closeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n\n }\n });\n\n buttonreset.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alertDialog.dismiss();\n }\n });\n alertDialog.setCanceledOnTouchOutside(false);\n alertDialog.show();\n } else if (error instanceof NetworkError) {\n Toast.makeText(consumerCheckOutActivity, \"Cannot connect to Internet...Please check your connection!\", Toast.LENGTH_SHORT).show();\n }\n }\n }, consumerCheckOutActivity);\n ApplicationController.getInstance().addToRequestQueue(stringRequest, \"cart_list_taq\");\n }", "public ArrayList<PieEntry> getValues(){\n\n SQLiteDatabase db = this.getWritableDatabase();\n ArrayList<PieEntry> dataV = new ArrayList<>();\n String[] columns = {\"cost\", \"name\"};\n Cursor cursor = db.query(\"subscriptions\", columns, null, null, null, null, null);\n\n for(int i=0; i<cursor.getCount(); i++){\n\n cursor.moveToNext();\n dataV.add(new PieEntry(cursor.getFloat(0), cursor.getString(1)));\n }\n\n return dataV;\n\n }", "public ArrayList<String[]> loadStocks() {\n Log.d(TAG, \"loadStocks: Start Loading\");\n ArrayList<String[]> stocks = new ArrayList<>();\n Cursor cursor = database.query(\n TABLE_NAME,\n new String[]{STOCK_SYMBOL, STOCK_NAME},\n null,\n null,\n null,\n null,\n STOCK_SYMBOL);\n if (cursor != null) {\n cursor.moveToFirst();\n for (int i = 0; i < cursor.getCount(); i++) {\n String symbol = cursor.getString(0);\n //Double price = cursor.getDouble(1);\n // Double change = cursor.getDouble(2);\n //Double changePer = cursor.getDouble(3);\n String name = cursor.getString(1);\n stocks.add(new String[]{symbol, name});\n cursor.moveToNext();\n }\n cursor.close();\n }\n return stocks;\n}", "public interface SkuService {\n\n List<SkuQtyVO> getSkuQtyBySkuCode(List<String> skuCodeList);\n\n\n}", "public ArrayList<String> getAllTotalItems() {\n\n ArrayList<String> items = new ArrayList<>();\n Cursor cursor = db.query(DATABASE_TABLE_TOTAL, new String[] {\n KEY_ID, KEY_EXERCISE}, null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n String exercise = cursor.getString(COLUMN_EXERCISE_INDEX);\n\n items.add(exercise);\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n return items;\n }", "public interface UmsatzService extends Service\n{\n\n public static final String KEY_ID = \"id\";\n public static final String KEY_KONTO_ID = \"konto_id\";\n public static final String KEY_GEGENKONTO_NAME = \"empfaenger_name\";\n public static final String KEY_GEGENKONTO_NUMMER = \"empfaenger_konto\";\n public static final String KEY_GEGENKONTO_BLZ = \"empfaenger_blz\";\n public static final String KEY_ART = \"art\";\n public static final String KEY_BETRAG = \"betrag\";\n public static final String KEY_VALUTA = \"valuta\";\n public static final String KEY_DATUM = \"datum\";\n public static final String KEY_ZWECK = \"zweck\";\n public static final String KEY_ZWECK_RAW = \"zweck_raw\";\n public static final String KEY_SALDO = \"saldo\";\n public static final String KEY_PRIMANOTA = \"primanota\";\n public static final String KEY_CUSTOMER_REF = \"customer_ref\";\n public static final String KEY_UMSATZ_TYP = \"umsatz_typ\";\n public static final String KEY_KOMMENTAR = \"kommentar\";\n public static final String KEY_GVCODE = \"gvcode\";\n\n\n /**\n * Liefert eine Liste der Umsaetze.\n * Jede Zeile entspricht einem Umsatz. Die einzelnen Werte sind durch Doppelpunkt getrennt.\n * @param text Suchbegriff.\n * @param von Datum im Format dd.mm.yyyy.\n * @param bis Datum im Format dd.mm.yyyy.\n * @return Liste der Konten.\n * @throws RemoteException\n */\n public String[] list(String text, String von, String bis) throws RemoteException;\n\n /**\n * Liefert eine Liste der Umsaetze.\n * ueber dem Hash koennen die folgenden Filter gesetzt werden:\n *\n * konto_id\n * art\n * empfaenger_name\n * empfaenger_konto\n * empfaenger_blz\n * id\n * id:min\n * id:max\n * saldo\n * saldo:min\n * saldo:max\n * valuta\n * valuta:min\n * valuta:max\n * datum\n * datum:min\n * datum:max\n * betrag\n * betrag:min\n * betrag:max\n * primanota\n * customer_ref\n * umsatz_typ (Name oder ID der Umsatz-Kategorie)\n * zweck\n *\n * Die Funktion liefer eine Liste mit den Umsaetzen zurueck\n * jeder Umsatz liegt als Map vor und enthält die folgenden\n * Elemente:\n *\n * id\n * konto_id\n * empfaenger_name\n * empfaenger_konto\n * empfaenger_blz\n * saldo\n * valuta\n * datum\n * betrag\n * primanota\n * customer_ref\n * umsatz_typ\n * zweck\n * kommentar\n * \n * @param options Map mit den Filter-Parametern.\n * @return Liste der Umsaetze.\n * @throws RemoteException\n */\n public List<Map<String,Object>> list(HashMap<String,Object> options) throws RemoteException;\n}", "private void prepareArrayLits(){\t\n\t\tprogressDialog_1 = ProgressDialog.show(SlyThemesActivity.this, \"\",Constants.PROCESSING_REQUEST);\n\n\t\tadapter = new ListViewNewRestaurantAdapter(this, itemList);\n\t\tlistview.setAdapter(adapter);\n\t\tprogressDialog_1.dismiss();\n\t}", "@Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n for (DataSnapshot dataSnapshot:snapshot.getChildren()){\n\n ServiceModel serviceModel=dataSnapshot.getValue(ServiceModel.class);\n\n String Key=dataSnapshot.getKey();\n\n serviceModel.setKey(Key);\n\n list.add(serviceModel);\n\n }\n\n adapter.notifyDataSetChanged();\n\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(getApplicationContext(), \"Database Sync Initialized.\", Toast.LENGTH_LONG).show();\n\n //instantiate the db.\n db = new Database(getApplicationContext());\n\n //instantiate the array list.\n dbases = new ArrayList<>();\n\n //get the file in here.\n if(db.countBlackSpot() > 0)\n {\n //Toast.makeText(UpdateService.this, \"There are Records to be Synced.\", Toast.LENGTH_SHORT).show();\n\n stats();\n }\n else{\n\n Toast.makeText(UpdateService.this, \"Database Record(s) are Synced.\", Toast.LENGTH_SHORT).show();\n }\n\n return super.onStartCommand(intent, flags, startId);\n }", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "@Override\n public List<Integer> loadAllIds() {\n List<Integer> allCommerceItemIds = new LinkedList<>();\n try {\n allCommerceItemIds = mCommerceAccess.getAllCommerceItemsWithWifi();\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load all item IDs.\",\n ex);\n }\n return allCommerceItemIds;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_selectperson);\n Bundle bundle = getIntent().getExtras();\n tripId = Helper.GetInt(bundle.get(\"tripId\"));\n Type type = new TypeToken<List<Integer>>() {}.getType();\n selectedIds = new GsonBuilder().create().fromJson(bundle.getString(\"selectedIDs\"), type);\n if (selectedIds == null)\n selectedIds = new ArrayList<Integer>();\n findViewsById();\n\n createPersonList(this);\n\n btn_tripdefine_return.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n btn_selectperson_select.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n List<Integer> selectedIDs = adapter.getSelectedItems();\n //String json = new Gson\n String gson = new Gson().toJson(selectedIDs);\n\n Intent intent = new Intent();\n intent.putExtra(\"selectedIDs\",gson);\n setResult(RESULT_OK,intent);\n finish();\n }\n });\n }", "private Iterable<Service> loadServiceData() {\n return services;\n }", "public Services() {\n this.indexes = new ArrayList<Integer>();\n// this.indexes.add(ServiceTypes.NOSERVICES.getValue());\n this.services = new ArrayList<String>();\n// this.services.add(ServiceTypes.NOSERVICES.getKey());\n }", "@Override\n public void onClick(View v) {\n\n checkAccessibility();\n Intent intent = new Intent(MainActivity.this, FloatBallService.class);\n Bundle data = new Bundle();\n data.putInt(\"type\", FloatBallService.TYPE_ADD);\n intent.putExtras(data);\n startService(intent);\n }", "public void updateServiceNameList(){\n for(String key: serviceList.keySet()){\n serviceNameList.put(key, serviceList.get(key).getServiceName());\n }\n }", "public int getNumberOfIncludedServices(){\n \n return listOfIncludedServices.size();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Cursor cursor = ResolverHelper.getData((int) id, MainListaActivity.this.getContentResolver());\n Bundle bundle = new Bundle();\n while(cursor.moveToNext()){\n bundle.putString(Constants._ID,cursor.getString(0));\n bundle.putString(Constants.PRODUCENT,cursor.getString(1));\n bundle.putString(Constants.MODEL_NAME,cursor.getString(2));\n bundle.putString(Constants.ANDR_VER,cursor.getString(3));\n bundle.putString(Constants.WWW,cursor.getString(4));\n }\n cursor.close();\n Intent intent = new Intent(MainListaActivity.this,PhoneActivity.class);\n intent.putExtras(bundle);\n startActivity(intent);\n }", "private void extractDataPackage() {\n ArrayList<Parcelable> arrayListBundle = new ArrayList<Parcelable>();\n arrayListBundle = getIntent().getParcelableArrayListExtra(\"usersList\");\n\n UserEntity userEntity;\n StringBuilder builder = new StringBuilder();\n\n for (Parcelable bundle : arrayListBundle) {\n\n //Tracking Data by UserEntity Object ;\n userEntity = (UserEntity) bundle;\n //Set StringBuilder Object ;\n builder.append(userEntity.getId() + \" : \" + userEntity.getUsername() + \" / \" + userEntity.getEmailAddress() + \" / \" + userEntity.getPhoneNumber() + \" / \" + userEntity.getJobTitle() + \"\\n\\n\");\n }\n extractedData = builder.toString();\n }", "private void loadInitialProducts(){\n final Intent intent = new Intent(this, MainActivity.class);\n\n ProductServiceProvider.getInstance().setServiceListener(new ProductServiceProvider.ServiceListener() {\n @Override\n public void onResultsSuccess(Response<SearchResult> response) {\n if(response.body().getResults() != null){\n AppDataModel.getAppDataModel().setInitialData(response.body().getResults());\n intent.putExtra(EXTRA_INITIAL_PRODUCTS, true);\n }\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n startActivity(intent);\n finish();\n }\n }, 1000);\n }\n\n @Override\n public void onProductsSuccess(Response<Products> response) {\n\n }\n\n @Override\n public void onFailure(String message) {\n intent.putExtra(EXTRA_INITIAL_PRODUCTS, false);\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n startActivity(intent);\n finish();\n }\n }, 1000);\n }\n });\n\n ProductServiceProvider.getInstance().searchProducts(\"\");\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_service_list);\n\n\n mDatabaseServices = FirebaseDatabase.getInstance().getReference(\"services\");\n mDatabaseUsers = FirebaseDatabase.getInstance().getReference(\"users\");\n mDatabaseReservations = FirebaseDatabase.getInstance().getReference(\"reservations\");\n\n mAuth = FirebaseAuth.getInstance();\n\n Toolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n filterText = (EditText) findViewById(R.id.filterText);\n filterText.setVisibility(View.GONE);\n mServicesListView = (ListView) findViewById(R.id.service_list_view);\n mReservationsListView = (ListView) findViewById(R.id.reservation_list_view);\n\n //mServiceAdapter = new ServiceAdapter(ServiceListActivity.this, mServices);\n //mServiceAdapter.notifyDataSetChanged();\n\n filterText.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (!s.toString().isEmpty()) {\n ArrayList<Service> tmp = new ArrayList<>();\n for (Service sv : mServices) {\n //We have done both in one search bar. So we can find service by provider name or name of the service(title)\n if(sv.getAssignedUsers()!=null) {\n for (String id : sv.getAssignedUsers()) {\n for (User u : mUsers) {\n if(u.getFirstName().toLowerCase().contains(s.toString()) && id.equals(u.getId()) && !tmp.contains(sv)){\n tmp.add(sv);\n\n //System.out.println(\"size userservice \"+mUserServices.size());\n }\n }\n }\n }\n\n\n if (sv.getTitle().toLowerCase().contains(s.toString())) {\n tmp.add(sv);\n }\n }\n //System.out.println(tmp.size()+ \"Size userServices \"+mUserServices.size()+ \"Size user \"+mUsers.size());\n\n mServiceAdapter = new ServiceAdapter(ServiceListActivity.this, tmp);\n mServicesListView.setAdapter(mServiceAdapter);\n } else {\n mServiceAdapter = new ServiceAdapter(ServiceListActivity.this, mServices);\n mServicesListView.setAdapter(mServiceAdapter);\n }\n mServiceAdapter.notifyDataSetChanged();\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n //mAddServiceLayout = findViewById(R.id.layout_add_service);\n mReservationSwitch = findViewById(R.id.reservation_switch);\n mReservationSwitch.setVisibility(View.GONE);\n\n\n mServices = new ArrayList<>();\n mUsers = new ArrayList<>();\n //mReservations = new ArrayList<>();\n mUserReservations = new ArrayList<>();\n //mUserServices = new ArrayList<>();\n //Assigning Disponibility\n mAssignedDisponibility = new ArrayList<>();\n\n\n mReservationSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n filterText.setVisibility(View.GONE);\n mServicesListView.setVisibility(View.GONE);\n mReservationAdapter = new ReservationAdapter(ServiceListActivity.this, mUserReservations);\n mReservationsListView.setAdapter(mReservationAdapter);\n mReservationAdapter.notifyDataSetChanged();\n } else {\n filterText.setVisibility(View.VISIBLE);\n mReservationsListView.setVisibility(View.GONE);\n mServicesListView.setVisibility(View.VISIBLE);\n mServiceAdapter = new ServiceAdapter(ServiceListActivity.this, mServices);\n mServicesListView.setAdapter(mServiceAdapter);\n mServiceAdapter.notifyDataSetChanged();\n }\n }\n });\n\n\n mFAB = findViewById(R.id.fab_add_service);\n mFAB.setVisibility(View.GONE);\n mFAB.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(ServiceListActivity.this, NewServiceActivity.class);\n startActivity(intent);\n }\n });\n\n mFAB2 = findViewById(R.id.fab_add_disponibility);\n mFAB2.setVisibility(View.GONE);\n\n getCurrentUser();\n if(loggedInUser != null) {\n System.out.println(loggedInUser.getTypeOfUser());\n }\n\n\n mFAB2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final String[] days = {\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"};\n mDialogAssignDisponibilityView = LayoutInflater.from(ServiceListActivity.this).inflate(R.layout.dialog_assign_resources, null);\n mDisponibilityListView = mDialogAssignDisponibilityView.findViewById(R.id.resourcesListView);\n mDisponibilityListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);\n mDisponibilityListAdapter = new ArrayAdapter<String>(ServiceListActivity.this, android.R.layout.simple_list_item_multiple_choice, days);\n mDisponibilityListView.setAdapter(mDisponibilityListAdapter);\n if (mCheckedDisponibility != null) {\n for (int i = 0; i < mCheckedDisponibility.size() + 1; i++) {\n mDisponibilityListView.setItemChecked(i, mCheckedDisponibility.get(i));\n\n }\n\n }\n AlertDialog.Builder builder = new AlertDialog.Builder(ServiceListActivity.this);\n builder.setTitle(\"Assign/update your days\").setView(mDialogAssignDisponibilityView).setCancelable(false).setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n mCheckedDisponibility = mDisponibilityListView.getCheckedItemPositions();\n for (int i = 0; i < mDisponibilityListView.getAdapter().getCount(); i++) {\n if (mCheckedDisponibility.get(i)) {\n if (mCheckedDisponibility.get(i)) mAssignedDisponibility.add(days[i]);\n }\n }\n updateUser();\n\n\n }\n }).setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n mAssignedDisponibility.clear();\n if (mCheckedDisponibility != null) {\n mCheckedDisponibility.clear();\n }\n }\n }).show();\n\n\n }\n });\n\n\n\n mServicesListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Service selected = mServices.get(position);\n /* if (userServicesOnly) {\n selected = mUserServices.get(position);\n }\n */\n String serviceId = selected.getId();\n Intent intent = ViewServiceActivity.newIntent(ServiceListActivity.this, serviceId);\n startActivity(intent);\n }\n });\n\n //HomeOwner can't do the long Click because he doesn't have right to edit anything\n\n mServicesListView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {\n @Override\n public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int pos, long id) {\n\n final int position = pos;\n\n AlertDialog.Builder builder;\n builder = new AlertDialog.Builder(ServiceListActivity.this);\n builder.setTitle(\"Edit Service\").setMessage(\"Are you sure you want to edit this service?\").setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //deletes entry from database\n Service selected = mServices.get(position);\n String serviceId = selected.getId();\n Intent intent = EditServiceActivity.newIntent(ServiceListActivity.this, serviceId);\n startActivity(intent);\n\n\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n }).show();\n\n return true;\n }\n\n });\n }", "@SuppressLint(\"DefaultLocale\")\n @Override\n protected void onPostExecute(SoapObject result) {\n\n if (pd != null && pd.isShowing() && !OutletActivity.this.isFinishing()) {\n pd.dismiss();\n }\n\n if (Flag.equalsIgnoreCase(\"0\")) {\n\n Toast.makeText(\n getApplicationContext(),\n \"Connectivity Error, Please check Internet connection!!\",\n Toast.LENGTH_SHORT).show();\n\n } else if (Flag.equalsIgnoreCase(\"1\")) {\n\n try {\n outletDetailsArraylist = new ArrayList<OutletModel>();\n Cursor cursor;\n db.open();\n cursor = db.getdata_outlet(flotername);\n\n if (cursor != null && cursor.getCount() > 0) {\n cursor.moveToFirst();\n do {\n\n outletModel = new OutletModel();\n outletModel.setBACodeOutlet(cursor.getString(cursor.getColumnIndex(\"baCodeOutlet\")));\n outletModel.setBAnameOutlet(cursor.getString(cursor.getColumnIndex(\"banameOutlet\")));\n outletModel.setOutletname(cursor.getString(cursor.getColumnIndex(\"outletname\")));\n outletModel.setFlotername(cursor.getString(cursor.getColumnIndex(\"flotername\")));\n\n outletDetailsArraylist.add(outletModel);\n } while (cursor.moveToNext());\n cursor.close();\n }\n db.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (role.equalsIgnoreCase(\"FLR\")||\n role.equalsIgnoreCase(\"ADR\")||\n role.equalsIgnoreCase(\"BP\")) {\n if (outletDetailsArraylist.size() > 0) {\n strOutletArray = new String[outletDetailsArraylist.size() + 1];\n strOutletArray[0] = \"Office\";\n for (int i = 0; i < outletDetailsArraylist.size(); i++) {\n\n strOutletArray[i + 1] = outletDetailsArraylist.get(i).getOutletname() + \"(\" +\n outletDetailsArraylist.get(i).getBAnameOutlet() + \"-\" +\n outletDetailsArraylist.get(i).getBACodeOutlet() + \")\";\n }\n }\n } else {\n if (outletDetailsArraylist.size() > 0) {\n strOutletArray = new String[outletDetailsArraylist.size()];\n\n for (int i = 0; i < outletDetailsArraylist.size(); i++) {\n\n strOutletArray[i] = outletDetailsArraylist.get(i).getOutletname();\n\n }\n }\n }\n if (outletDetailsArraylist != null && outletDetailsArraylist.size() > 0) {\n ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(OutletActivity.this, android.R.layout.simple_list_item_1, strOutletArray) {\n @Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n View v = null;\n // If this is the initial dummy entry, make it hidden\n if (position == 0) {\n TextView tv = new TextView(getContext());\n tv.setHeight(0);\n tv.setVisibility(View.GONE);\n v = tv;\n } else {\n // Pass convertView as null to prevent reuse of special case views\n v = super.getDropDownView(position, null, parent);\n }\n // Hide scroll bar because it appears sometimes unnecessarily, this does not prevent scrolling\n parent.setVerticalScrollBarEnabled(false);\n return v;\n }\n };\n\n adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n outlet.setAdapter(adapter1);\n }\n }\n\n\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n //Toast.makeText(getApplicationContext(),\"hai\",Toast.LENGTH_LONG).show();\n int pos = MainActivity.spinner.getSelectedItemPosition()+1;\n DBHelper db = new DBHelper(getApplicationContext());\n Cursor cursor = db.getAllItems();\n int loc = cursor.getColumnIndex(\"notes\");\n cursor.move(pos);\n String res = cursor.getString(loc);\n\n String output = intent.getStringExtra(\"input\") + \"\\nNote:\\n\" + res;\n MainActivity.weatherReport.setText(output);\n\n return START_NOT_STICKY;\n }", "public ArrayList<FormularioServ> listaFServActivos(){\n\t\tArrayList<FormularioServ> listFServ = new ArrayList<FormularioServ>();\n\t\ttry{\n\t\t\tc = PoolConexion.getConnection();\n\t\t\tps = c.prepareStatement(\"select * from public.\\\"formularioServ\\\" where estado<>3\", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tFormularioServ Fserv = new FormularioServ();\n\t\t\t\tFserv.setIdFormulario(rs.getInt(\"idFormulario\"));\n\t\t\t\tFserv.setIdServ(rs.getInt(\"idServ\"));\n\t\t\t\tFserv.setNombreUsuario(rs.getString(\"nombreUsuario\"));\n\t\t\t\tFserv.setEmail(rs.getString(\"email\"));\n\t\t\t\tFserv.setCuerpoEmail(rs.getString(\"cuerpoEmail\"));\n\t\t\t\tFserv.setNumerotelefono(rs.getString(\"numerotelefono\"));\n\t\t\t\tFserv.setfCreacion(rs.getTimestamp(\"fcreacion\"));\n\t\t\t\tFserv.setEstado(rs.getInt(\"estado\"));\n\t\t\t\t\n\t\t\t\tlistFServ.add(Fserv);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"DATOS: ERROR EN LISTAR Formularios \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tif(rs != null){\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null){\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(c != null){\n\t\t\t\t\tPoolConexion.closeConnection(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn listFServ;\n\t}", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "@Override\r\n\tpublic List<DemoProduct> getProducts(String color, Integer howMany) throws Exception {\n\t\tHttpCall.HttpRequest request = new HttpCall.HttpRequest();\r\n\t\trequest.path = QUERY_PRODUCTS_URL;\r\n\t\tMap<String, String> params = new HashMap<>();\r\n\t\tparams.put(\"color\",color);\r\n\t\tparams.put(\"howMany\",howMany.toString());\r\n\t\trequest.params = params;\r\n\t\t\r\n\t\tException error = null;\r\n\t\tString json = null;\r\n\t\tList<DemoProduct> prods = new ArrayList<>();\r\n\t\t\r\n\t\ttry{\r\n\t\t json = get (request);\r\n\t\t prods = gson.fromJson(json, new TypeToken<List<DemoProductImpl>>(){}.getType());\r\n\t\t}catch(Exception e){\r\n\t\t\tif(e instanceof com.google.gson.JsonSyntaxException) {\r\n\t\t\t\terror = (new Gson()).fromJson(json, Exception.class);\r\n\t\t\t} else {\r\n\t\t\t\terror =e;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(prods == null){\r\n\t\t\tif(error == null) error = (new Gson()).fromJson(json, Exception.class);\r\n\t\t\t if(error!=null) throw new Exception(error.getLocalizedMessage());\r\n\t\t}\r\n\r\n\t\treturn prods;\r\n\t}", "@Test\n public void testGetAccessibilityServiceList() throws Exception {\n List<AccessibilityServiceInfo> expectedServices = new ArrayList<>();\n AccessibilityServiceInfo accessibilityServiceInfo = new AccessibilityServiceInfo();\n accessibilityServiceInfo.packageNames = new String[] { \"foo.bar\" };\n expectedServices.add(accessibilityServiceInfo);\n\n // configure the mock service behavior\n when(mMockService.getInstalledAccessibilityServiceList(anyInt()))\n .thenReturn(expectedServices);\n\n // invoke the method under test\n AccessibilityManager manager = createManager(true);\n List<AccessibilityServiceInfo> receivedServices =\n manager.getInstalledAccessibilityServiceList();\n\n verify(mMockService).getInstalledAccessibilityServiceList(UserHandle.USER_CURRENT);\n // check expected result (list equals() compares it contents as well)\n assertEquals(\"All expected services must be returned\", expectedServices, receivedServices);\n }", "public void getQty(final ReviseSalesOrderList reviseSalesOrderList){\n\n\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(SOR__ListItemActivity_Selected.this);\n View mView = getLayoutInflater().inflate(R.layout.layout_for_popup,null);\n\n final EditText etQuantity,etFreeQuantity;\n TextView tvButton;\n\n etQuantity = (EditText) mView.findViewById(R.id.etQuantity);\n etFreeQuantity = (EditText) mView.findViewById(R.id.etFreeQuantity);\n tvButton = (TextView)mView.findViewById(R.id.tvButton);\n\n //Set quantities\n etQuantity.setText(\"\"+reviseSalesOrderList.getQuantity());\n etFreeQuantity.setText(\"\"+reviseSalesOrderList.getFreeQuantity());\n\n\n tvButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n double amount = 0,freeAmount=0;\n String qty = etQuantity.getText().toString();\n String freeQty = etFreeQuantity.getText().toString();\n\n if (qty.isEmpty()){\n qty=0+\"\";\n }\n\n if (freeQty.isEmpty()){\n freeQty = 0+\"\";\n }\n int quantity = Integer.parseInt(qty);\n int freeQuantity = Integer.parseInt(freeQty);\n\n //set current product quantity , free quantity and amount\n reviseSalesOrderList.setQuantity(quantity);\n reviseSalesOrderList.setFreeQuantity(freeQuantity);\n reviseSalesOrderList.setISCheckedItem(true);\n reviseSalesOrderList.setAmount(reviseSalesOrderList.getUnitSellingPrice()*quantity);\n\n\n boolean add = false;\n for (int i = 0 ; i < selectedArrayList.size();i++){\n if (selectedArrayList.get(i).getProductId()==reviseSalesOrderList.getProductId()){\n selectedArrayList.set(i,reviseSalesOrderList);\n add = true;\n }\n }\n\n if (add==false){\n selectedArrayList.add(reviseSalesOrderList);\n }\n\n setTotalAmounts(selectedArrayList);\n\n\n dialog.dismiss();\n loadRecyclerView(selectedArrayList);\n\n }\n });\n\n mBuilder.setView(mView);\n dialog = mBuilder.create();\n dialog.show();\n }", "@Nullable\r\n public static List<JSONArray> retrieveProducts(final Context context, int offset, List<String> shopList)\r\n {\r\n List<JSONArray> content = new ArrayList<>();\r\n\r\n try\r\n {\r\n final SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n final boolean man = sharedPreferencesManager.retrieveUser().getMan();\r\n\r\n final List<RequestFuture<JSONArray>> futures = new ArrayList<>();\r\n\r\n // Metemos en content el resultado de cada uno\r\n for (int i = 0; i < shopList.size(); i++)\r\n {\r\n final String fixedURL = Utils.fixUrl(Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT\r\n + \"/products/\" + shopList.get(i) + \"/\" + man + \"/\" + offset);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL\r\n + \" para traer los productos de hace \" + Integer.toString(offset) + \" dias\");\r\n\r\n futures.add(RequestFuture.<JSONArray>newFuture());\r\n\r\n // Creamos una peticion\r\n final JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , futures.get(i)\r\n , futures.get(i));\r\n\r\n // La mandamos a la cola de peticiones\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Petición (\" + shopList.get(i) + \") creada y enviada\");\r\n }\r\n\r\n for (int i = 0; i < shopList.size(); i++)\r\n {\r\n try\r\n {\r\n JSONArray response = futures.get(i).get(20, TimeUnit.SECONDS);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Respuesta (\" + shopList.get(i) + \") recibida\");\r\n\r\n content.add(response);\r\n\r\n } catch (InterruptedException e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n }\r\n\r\n // Si content es vacio, es que han fallado todas las conexiones.\r\n if (content.isEmpty())\r\n {\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Todas las peticiones han fallado\");\r\n\r\n return null;\r\n }\r\n\r\n } catch(Exception ex) {\r\n ExceptionPrinter.printException(\"REST_CIENT_SINGLETON\", ex);\r\n\r\n return null;\r\n }\r\n\r\n return content;\r\n }", "public ArrayList<ProductDetail> readAllCart() {\n db = helper.getReadableDatabase();\n ArrayList<ProductDetail> list = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"select * from \" + DatabaseConstant.TABLE_NAME_CART, null);\n while (cursor.moveToNext()) {\n String id = cursor.getString(0);\n String title = cursor.getString(1);\n String price = cursor.getString(2);\n String order_quantity = cursor.getString(3);\n String quantity_type = cursor.getString(4);\n String min_quantity = cursor.getString(5);\n String availability = cursor.getString(6);\n String discount = cursor.getString(7);\n String image = cursor.getString(8);\n String rating = cursor.getString(9);\n String description = cursor.getString(10);\n String type = cursor.getString(11);\n int qty = cursor.getInt(12);\n\n list.add(new ProductDetail(id, title, description, price, order_quantity, quantity_type, min_quantity, availability, discount,\n image, rating,type, qty));\n }\n return list;\n }", "java.util.List<frame.socket.common.proto.Login.ActAmount> \n getActAmountList();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(requestCode==77){\n if(resultCode==RESULT_OK){\n if (data!=null){\n String nombre = data.getStringExtra(\"nombre\");\n String cantidad = data.getStringExtra(\"cantidad\");\n\n // int cantnum = Integer.parseInt(cantidad);\n\n Listado list = new Listado(nombre, Integer.parseInt(cantidad));\n\n listado.add(list);\n adapter.notifyItemInserted(listado.size());\n } else if (resultCode==MainActivity.RESULT_CANCELED){\n Toast.makeText(this, \"INTRODUCE DATOS\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n }", "List<Service> services();", "public void accessWebService() {\n\r\n dataList.clear();\r\n\r\n GetCampaignSuppliersInventories getCampaignSuppliersInventories = new GetCampaignSuppliersInventories(getContext(), this);\r\n Log.d(TAG, \"Making api call\");\r\n getCampaignSuppliersInventories.execute(Constants.LIST_CAMPAIGN_SUPPLIERS_URL);\r\n\r\n }", "@Nonnull\n public ICommonsList <ISMPServiceInformation> getAllSMPServiceInformation ()\n {\n return new CommonsArrayList <> ();\n }", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "@JsonIgnore\n public ArrayList<Ingredient> getShoppingList() {\n ArrayList<Ingredient> results = new ArrayList<>();\n for (Location location : route) {\n for (PreOrder preOrder : location.getPreOrders()) {\n for (DishWrapper dishWrapper : preOrder.getItems()) {\n for (Ingredient ingredient : dishWrapper.getDish().getIngredients()) {\n if (results.contains(ingredient)) {\n results.get(results.indexOf(ingredient)).addAmount(ingredient.getAmount() * dishWrapper.getAmount());\n } else {\n ingredient.setAmount(ingredient.getAmount() * dishWrapper.getAmount());\n }\n results.add(ingredient);\n }\n }\n }\n }\n return results;\n }", "@Synchronized\r\n public ArrayList<TransferModel> getTransferModelsList(boolean isIncoming) {\r\n boolean showFinished = AppStorage.getInstance(BaseApplication.getInstance()).getValue(AppStorage.SP_SHOW_FINISHED, false);\r\n ArrayList<TransferModel> arrayList = new ArrayList<>();\r\n String selectQuery = \"\";\r\n if (showFinished) {\r\n// if (isIncoming) {\r\n selectQuery = \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.isIncoming + \"='\" + (isIncoming ? 0 : 1) + \"'\" + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// } else {\r\n// selectQuery = \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.isIncoming + \"='\" + 1 + \"'\" + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// }\r\n } else {\r\n selectQuery = \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.status + \"='\" + 0 + (isIncoming ? (\"' AND \" + TableTransferModel.isIncoming + \"='\" + 0 + \"'\") : \"'\") + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// if (isIncoming) {\r\n// selectQuery =\r\n// \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.status + \"='\" + 0 + (isIncoming ? (\"' AND\" + TableTransferModel.isIncoming + \"='\" + 0 + \"'\") : \"'\") + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// } else {\r\n// selectQuery =\r\n// \"select * FROM \" + TableTransferModel.TABLE_NAME + \" WHERE \" + TableTransferModel.status + \"='\" + 0 + \"' AND\" + TableTransferModel.isIncoming + \"='\" + 1 + \"'\" + \" ORDER BY \" + TableTransferModel.id + \" DESC LIMIT 20\";\r\n// }\r\n }\r\n databaseHandler.getReadableDatabase();\r\n Cursor cursor = databaseHandler.selectData(selectQuery, true);\r\n if (cursor != null && cursor.moveToFirst()) {\r\n do {\r\n TransferModel salesReportsModel = new TransferModel();\r\n salesReportsModel.name = cursor.getString(cursor.getColumnIndex(TableTransferModel.name));\r\n salesReportsModel.timeStamp = cursor.getString(cursor.getColumnIndex(TableTransferModel.timeStamp));\r\n salesReportsModel.folderLocation = cursor.getString(cursor.getColumnIndex(TableTransferModel.folderPath));\r\n salesReportsModel.status = cursor.getInt(cursor.getColumnIndex(TableTransferModel.status));\r\n salesReportsModel.progress = cursor.getInt(cursor.getColumnIndex(TableTransferModel.progress));\r\n salesReportsModel.rawData = cursor.getString(cursor.getColumnIndex(TableTransferModel.rawData));\r\n salesReportsModel.id = cursor.getLong(cursor.getColumnIndex(TableTransferModel.id));\r\n salesReportsModel.size = Long.parseLong(cursor.getString(cursor.getColumnIndex(TableTransferModel.size)));\r\n salesReportsModel.isIncoming = cursor.getInt(cursor.getColumnIndex(TableTransferModel.isIncoming)) == 0;\r\n arrayList.add(salesReportsModel);\r\n } while (cursor.moveToNext());\r\n }\r\n if (!cursor.isClosed()) {\r\n cursor.close();\r\n }\r\n return arrayList;\r\n }", "@Override\n public void onClick(View v)\n {\n\n try\n {\n String item_id = list.get(position).getItem_id();\n String item_name = list.get(position).getItem_name();\n String totalPrice = list.get(position).getTotalPrice();\n String stockQty=list.get(position).getItem_qty();\n String dicount=list.get(position).getDiscount();\n String gst=list.get(position).getGst_per();\n String unit_price=list.get(position).getUnit_price();\n String purchase_price=list.get(position).getItem_purchase();\n String status=list.get(position).getStatus();\n String changedUnit=list.get(position).getUnit();\n\n\n String qty = view.sumValue.getText().toString().trim();\n Log.d(TAG, \"onClick:Qty\"+qty);\n Log.d(\"qty\", stockQty);\n Log.d(\"item\",item_name);\n Log.d(\"item_id\", item_id);\n Log.d(\"totalPrice\", totalPrice);\n Log.d(\"purchase_price\",purchase_price);\n Log.d(\"GST\",gst);\n\n Log.d(\"discount\",dicount);\n Log.d(\"UnitPrice:\",unit_price);\n Log.d(\"Status\",status);\n int quantity = Integer.parseInt(qty);\n quantity++;\n if(quantity<=Integer.parseInt(stockQty) || status.equalsIgnoreCase(\"infinite\"))\n {\n double totalAmont = Double.parseDouble(totalPrice) * quantity;\n Log.d(\"totalAount\", String.valueOf(totalAmont));\n view.sumValue.setText(String.valueOf(quantity));\n Log.d(TAG, \"onClick:Qty\"+quantity);\n // addItem(item_id,String.valueOf(quantity),totalPrice,dicount,gst,totalAmont,unit_price);\n addItem(item_id,String.valueOf(quantity),totalPrice,dicount,gst,totalAmont,unit_price,changedUnit);\n\n\n getTotalQunatity();\n notifyDataSetChanged();\n }else\n {\n Toast.makeText(context,\"Stock not Available\",Toast.LENGTH_LONG).show();\n }\n\n }catch (Exception e)\n {\n Log.d(TAG, \"onClick:Add Item\",e);\n\n\n }\n\n\n\n }", "private void subscribeVariantData() {\n mProductDetailsViewModel.getVariants().observe(this, integerObjectHashMap -> {\n mUnitId = (String) integerObjectHashMap.get(ONE);\n mStoreId = (String) integerObjectHashMap.get(TWO);\n ArrayList<VariantsData> variantsData = (ArrayList<VariantsData>) integerObjectHashMap.get(\n THREE);\n mOffersListData = (PdpOfferData) integerObjectHashMap.get(FOUR);\n mAvailableCount = (Integer) integerObjectHashMap.get(FIVE);\n // mCartCount=(Integer)integerObjectHashMap.get(SIX);\n mAvailableCount = (Integer) integerObjectHashMap.get(FIVE);\n if (variantsData != null) {\n mVariantsData.clear();\n mVariantsData.addAll(variantsData);\n mPdpVariantsAdapter.notifyDataSetChanged();\n }\n });\n }", "public void getCurrentInvoices() {\n Cursor res = db.getAllCurrentDayInvoices();\n if(res.getCount() < 0){\n Log.e(\"Error\",\"Not able to retrieve product data\");\n }\n else {\n list.clear();\n while (res.moveToNext()) {\n String invoiceNum = res.getString(3);\n String customerName = res.getString(9);\n String statusPost = res.getString(21);\n list.add(new SearchInvoiceClass(customerName+System.lineSeparator()+invoiceNum+System.lineSeparator()+statusPost, R.drawable.ic_baseline_print, R.drawable.ic_baseline_preview, R.drawable.ic_baseline_cancel));\n }\n }\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> adapterView, View view, int i, long l)\n\t\t\t{\n\t\t\t\tcodigo = iAdapter.getItem(i).getItem();\n\t\t\t\tnombre = iAdapter.getItem(i).getNombre();\n\t\t\t\tfactor = iAdapter.getItem(i).getFactor();\n\t\t\t\tstock = iAdapter.getItem(i).getStock();\n\t\t\t\tprecio = iAdapter.getItem(i).getPrecioPed();\n\t\t\t\taplicaIva = iAdapter.getItem(i).getIva();\n\t\t\t\ttipoItem = iAdapter.getItem(i).getBien();\n\t\t\t\tporuti = iAdapter.getItem(i).getPoruti();\n\t\t\t\tcostop = iAdapter.getItem(i).getCostoP();\n\t\t\t\t\n\t\t\t\tToast.makeText(getApplicationContext(), \"El precio del item es \"+precio, Toast.LENGTH_SHORT).show();\n\t\t\t\t\n\t\t\t\tif(precio > 0)\n\t\t\t\t{\n\t\t\t\t\t//Los almaceno en un ArrayList para luego convertirlo en Json\n\t\t\t\t\tgson = new Gson();\n\t\t\t\t\tString detallesJson = gson.toJson(alDetPedidos);\n\t\t\t\t\t\n\t\t\t\t\t//Esto sirve para cerrar la actividad y en caso de que vuelva atras no se muestre de nuevo esta actividad\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t\t//Llamo a la actividade de pedidos y les paso los valores\n\t\t\t\t\tintent = new Intent(getApplicationContext(),MainEdicionPedidos.class);\n\t\t\t\t\tintent.putExtra(\"codigoItem\", codigo);\n\t\t\t\t\tintent.putExtra(\"nombreItem\", nombre);\n\t\t\t\t\tintent.putExtra(\"factorItem\", String.valueOf(factor));\n\t\t\t\t\tintent.putExtra(\"stockItem\", String.valueOf(stock));\n\t\t\t\t\tintent.putExtra(\"precioItem\", String.valueOf(precio));\n\t\t\t\t\tintent.putExtra(\"aplicaIvaItem\", aplicaIva);\n\t\t\t\t\tintent.putExtra(\"tipoItem\", tipoItem);\n\t\t\t\t\tintent.putExtra(\"porutiItem\", String.valueOf(poruti));\n\t\t\t\t\tintent.putExtra(\"costopItem\", String.valueOf(costop));\n\t\t\t\t\tintent.putExtra(\"observacionPed\", observacion);\n\t\t\t\t\tintent.putExtra(\"user\", usuario);\n\t\t\t\t\tintent.putExtra(\"nombreUser\", nombreUsuario);\n\t\t\t\t\tintent.putExtra(\"tipoUser\", tipoUsuario);\n\t\t\t\t\t//Env�o los datos del cliente para que no se pierda el valor al quere regresar a la actividad de pedidos\t\t\t\t\n\t\t\t\t\tintent.putExtra(\"clientePedido\", codigoCliente);\n\t\t\t\t\tintent.putExtra(\"nombreClientePedido\", nombreCliente);\n\t\t\t\t\tintent.putExtra(\"negocioCli\", negocioCliente);\n\t\t\t\t\tintent.putExtra(\"tipoCli\", tipoCliente);\n\t\t\t\t\tintent.putExtra(\"secPedido\", String.valueOf(secped));\n\t\t\t\t\tintent.putExtra(\"numPedido\", String.valueOf(numped));\n\t\t\t\t\t//Les paso los detalles almacenados en un Json\n\t\t\t\t\tintent.putExtra(\"datosDetalles\", detallesJson);\n\t\t\t\t\t//Inicio la actividad\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmensaje = \"El item \" + codigo + \" - \" + nombre + \" no puede ser seleccionado por no tener precio\";\n\t\t\t\t\tdialogo.miDialogoToastLargo(getApplicationContext(),mensaje);\n\t\t\t\t}\n\t\t\t}", "public void loadServiceDetails(String mainService) {\n mProgress.setVisibility(View.VISIBLE);\n String centerId = mCentreId;\n CentralApis.getInstance().getBookingAPIS().loadMyService(centerId, mainService, PrefsWrapper.with(getActivity()).getString(JullayConstants.KEY_USER_TOKEN, \"\")).enqueue(new retrofit2.Callback<MyServiceResponse>() {\n @Override\n public void onResponse(Call<MyServiceResponse> call, Response<MyServiceResponse> response) {\n if (response.isSuccessful()) {\n mProgress.setVisibility(View.GONE);\n serviceResponses.clear();\n servicesData.clear();\n if (response.body().getData().size() == 0 || response.body().getData().isEmpty()) {\n Toast.makeText(getContext(), \"There is no data..\", Toast.LENGTH_LONG).show();\n } else {\n serviceResponses.addAll(response.body().getData());\n servicesData.addAll(response.body().getData());\n servicesAdapter.notifyDataSetChanged();\n BookingSingleton.getInstance().setServiceResponses(serviceResponses);\n\n if (servIDs.size() != 0) {\n for (int i = 0; i < serviceResponses.size(); i++) {\n if (servIDs.contains(serviceResponses.get(i).getId())) {\n //if this exists -- then mar it as selected\n serviceResponses.get(i).setSelected(true);\n\n }\n }\n\n }\n }\n } else {\n mProgress.setVisibility(View.GONE);\n try {\n JSONObject jObjError = new JSONObject(response.errorBody().string());\n if (jObjError.getString(\"message\").contains(\"Unauthorized\")) {\n CommonUtility.autoLogin(getActivity());\n } else {\n CommonUtility.showErrorAlert(getActivity(), jObjError.getString(\"message\"));\n }\n } catch (Exception e) {\n CommonUtility.showErrorAlert(getContext(), e.getMessage());\n\n }\n }\n }\n\n @Override\n public void onFailure(Call<MyServiceResponse> call, Throwable t) {\n mProgress.setVisibility(View.GONE);\n CommonUtility.showErrorAlert(getContext(), getString(R.string.network_error_text));\n }\n });\n }", "ServiceOrder(String carVIN, String serviceDesc, String serviceDate, String partsUsed, int techID, int dealershipID, double partsCost, double totalCost, double laborHours){\n serviceNumber++;\n this.serviceDate = serviceDate;\n this.carVIN = carVIN;\n this.serviceDesc = serviceDesc;\n this.partsUsed = partsUsed;\n this.techID = techID;\n this.dealershipID = dealershipID;\n this.partsCost = partsCost;\n this.totalCost = totalCost;\n this.laborHours = laborHours;\n }" ]
[ "0.6723477", "0.57516706", "0.5735899", "0.56968135", "0.56694865", "0.5653477", "0.5628693", "0.561062", "0.55898273", "0.55354804", "0.5533767", "0.5533234", "0.55190754", "0.54920053", "0.54844683", "0.54710597", "0.5446598", "0.5444467", "0.54030883", "0.535256", "0.535159", "0.5331754", "0.53160036", "0.5315437", "0.5289851", "0.5279941", "0.5272603", "0.52658075", "0.5260379", "0.52557886", "0.5252029", "0.5246097", "0.5233358", "0.52298373", "0.5227073", "0.5217758", "0.5213025", "0.51974964", "0.5191177", "0.51873994", "0.51815146", "0.51737714", "0.5168241", "0.51517284", "0.51494724", "0.5146532", "0.51462173", "0.51354253", "0.51354253", "0.5133959", "0.51285565", "0.511305", "0.51069343", "0.51069343", "0.5104246", "0.5103454", "0.5096776", "0.50891936", "0.50886345", "0.5081306", "0.5075128", "0.5063378", "0.50606877", "0.5056301", "0.50487244", "0.50433046", "0.50424993", "0.5037674", "0.5034018", "0.50229824", "0.50188136", "0.5015934", "0.50151086", "0.5001198", "0.49991307", "0.4997792", "0.4997063", "0.49865335", "0.4986024", "0.4985135", "0.4984956", "0.49849212", "0.4983055", "0.49821365", "0.49735978", "0.49717948", "0.49703795", "0.49675825", "0.49669167", "0.49602973", "0.49598998", "0.49598998", "0.49566284", "0.49495462", "0.49425", "0.49417078", "0.49377286", "0.49301147", "0.49264795", "0.49252623" ]
0.7352492
0
Transfer data to Choose Professional activity
private void TransferDataToMainActivity(){ Intent intent = new Intent(ChooseService.this, MainActivity.class); intent.putExtra("Professional", professionalName); intent.putExtra("Service", serviceName); intent.putExtra("Price", servicePrice); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n if (!TextUtils.isEmpty(typecode.getSelectId())) {\n Intent intent = null;\n if (toothType != null)\n intent = new Intent(getActivity(), VisitDrugDentalActivity.class);\n else\n intent = new Intent(getActivity(), ToothSelectorActivity.class);\n\n intent.setData(Uri.withAppendedPath(VisitDrugDental.CONTENT_URI, VisitDrug.NO));\n intent.putExtra(PersonColumns._PID, \"00000\");\n intent.putExtra(PersonColumns._PCUCODEPERSON, \"00000\");\n intent.putExtra(VisitDrugDental.DENTCODE, typecode.getSelectId());\n intent.putExtra(Drug.TOOTHTYPE, toothType);\n//\t\t\t\t\t\tToast.makeText(getActivity(), \"SELECT \"+typecode.getSelectId(), Toast.LENGTH_LONG).show();\n VisitDrugForDentalActivity go = (VisitDrugForDentalActivity) getActivity();\n go.StartDrugDental(intent);\n } else {\n Toast.makeText(getActivity(), R.string.err_no_dentcode, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(AddMemberActivity.this, CommunityBoardMain.class);\n if (initial_intent.getParcelableExtra(\"sub_parcel\") != null) {\n SubscriptionParcel sub_parcel = initial_intent.getParcelableExtra(\"sub_parcel\");\n intent.putExtra(\"sub_parcel\", sub_parcel);\n }\n startActivity(intent);\n }", "public void selectAction(){\r\n\t\t\r\n\t\t//Switch on the action to be taken i.e referral made by health care professional\r\n\t\tswitch(this.referredTo){\r\n\t\tcase DECEASED:\r\n\t\t\tisDeceased();\r\n\t\t\tbreak;\r\n\t\tcase GP:\r\n\t\t\treferToGP();\r\n\t\t\tbreak;\r\n\t\tcase OUTPATIENT:\r\n\t\t\tsendToOutpatients();\r\n\t\t\tbreak;\r\n\t\tcase SOCIALSERVICES:\r\n\t\t\treferToSocialServices();\r\n\t\t\tbreak;\r\n\t\tcase SPECIALIST:\r\n\t\t\treferToSpecialist();\r\n\t\t\tbreak;\r\n\t\tcase WARD:\r\n\t\t\tsendToWard();\r\n\t\t\tbreak;\r\n\t\tcase DISCHARGED:\r\n\t\t\tdischarge();\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t}//end switch\r\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(AddMemberActivity.this, IndividualSubscription.class);\n if (initial_intent.getParcelableExtra(\"sub_parcel\") != null) {\n SubscriptionParcel sub_parcel = initial_intent.getParcelableExtra(\"sub_parcel\");\n intent.putExtra(\"sub_parcel\", sub_parcel);\n }\n startActivity(intent);\n }", "public void onGitheriSelect() {\n Food githeri = FoodRatios.getGitheriRatios(mTotalAttendance);\n Intent intent = new Intent(this, GitheriProgramActivity.class);\n intent.putExtra(\"GitheriMeal\", Parcels.wrap(githeri));\n intent.putExtra(\"attendancenum\", mTotalAttendance);\n startActivity(intent);\n }", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "private void teacherRoleAction(){\n savePreferenceData(\"teacher\");\n retrieveData();\n\n Intent intent = new Intent(this, TeacherMainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(AddMemberActivity.this, Subscriptions.class);\n if (initial_intent.getParcelableExtra(\"sub_parcel\") != null) {\n SubscriptionParcel sub_parcel = initial_intent.getParcelableExtra(\"sub_parcel\");\n intent.putExtra(\"sub_parcel\", sub_parcel);\n }\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(AddMemberActivity.this, Subscriptions.class);\n if (initial_intent.getParcelableExtra(\"sub_parcel\") != null) {\n SubscriptionParcel sub_parcel = initial_intent.getParcelableExtra(\"sub_parcel\");\n intent.putExtra(\"sub_parcel\", sub_parcel);\n }\n startActivity(intent);\n }", "private void studentRoleAction(){\n savePreferenceData(\"student\");\n Intent intent = new Intent(this, StudentMainActivity.class);\n startActivity(intent);\n }", "public void onClickDelivery(View view) {\n savePreferences();\n Intent intent = new Intent(this, ActDelivery.class);\n\n // Passing order information using Intent.putString();\n intent.putExtra(\"items\", new String[]{(String) spEntree.getSelectedItem(),\n (String) spDrink.getSelectedItem(), (String) spDessert.getSelectedItem()});\n intent.putExtra(\"subtotal\", subtotal);\n\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\tIntent intent = new Intent(); \n\t\t\tintent.setClass(DataStoredActivity.this, ContenProActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\t}", "private void setupChosenActivity() {\n String activity = Utils.capitalise(Sport.values()[0].toString());\n Intent intent = getIntent();\n\n if (intent.hasExtra(ACTIVITY_TO_RECORD)) {\n activity = Utils.capitalise(intent.getStringExtra(ACTIVITY_TO_RECORD));\n }\n\n activityView.setText(activity);\n }", "public void whatTypeOfPastaClicked(View view) {\n\n Intent child = new Intent(this, SelectPastaType.class);\n child.putExtra(\"selectedType\", selectedType);\n\n startActivityForResult(child, REQ_CODE_PASTA_TYPE);\n\n }", "public void transferActivity() {\n Intent intent = new Intent(this, AddInfoActivity.class);\n this.startActivity(intent);\n }", "private void getAndSetIncomingIntent(){\n if (getIntent().hasExtra(\"asso\")) {\n Log.d(TAG, getIntent().getStringExtra(\"asso\"));\n edt_asso_name.setText(getIntent().getStringExtra(\"asso\"));\n }\n if (getIntent().hasExtra(\"school\")) {\n edt_school.setText(getIntent().getStringExtra(\"school\"));\n }\n if (getIntent().hasExtra(\"purpose\")) {\n edt_purpose.setText(getIntent().getStringExtra(\"purpose\"));\n }\n if (getIntent().hasExtra(\"link\")) {\n edt_link.setText(getIntent().getStringExtra(\"link\"));\n }\n if (getIntent().hasExtra(\"type\")) {\n selectedSpinnerType = getIntent().getStringExtra(\"type\");\n }\n\n }", "@OnClick(R.id.setUserProfileEdits)\n public void onConfirmEditsClick() {\n if (UserDataProvider.getInstance().getCurrentUserType().equals(\"Volunteer\")){\n addSkills();\n addCauses();\n }\n updateUserData();\n // get intent information from previous activity\n\n// Intent intent = new Intent(getApplicationContext(), LandingActivity.class);\n\n\n// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n finish();\n// startActivity(intent);\n }", "public void launchSubPart3(View view) {\n Intent inscrPart3 = new Intent(getApplicationContext(), subscription_part3_Activity.class);\n inscrPart3.putExtra(\"User\", user);\n startActivity(inscrPart3);\n finish();\n\n }", "@Override\n public void onClick(View v) {\n Intent myIntent = new Intent(ChooseParty.this, UserProfile.class);\n //\n myIntent.putExtra(\"username\", mUsername);\n startActivity(myIntent);\n }", "private void handleOptionOne() {\n\n ClientData clientData = view.askForClientPersonalDataAndCreateClientData(); // zwracamy stworzonego w widoku clienta z wrpowadoznych scanerem danych\n clientModel.save(clientData); // zapisujemy clienta do bazy danych\n view.showClientInformation(clientData); // wyswietlamy info o jego pinie itp.\n\n }", "protected void changeActivity() {\n\t\tIntent intent = new Intent();\r\n\t\tintent.setClass(this,MainActivity.class);\r\n\t\t//intent.putExtra(\"padapter\", MainActivity.selectedLevel);\r\n\t\t\r\n\t\tstartActivity(intent);\r\n\t}", "@Override\n public void onClick(View arg0) {\n Intent email = new Intent(Intent.ACTION_SEND);\n // Put essentials like email address, subject & body text\n email.putExtra(Intent.EXTRA_EMAIL,\n new String[]{\"[email protected]\"});\n email.putExtra(Intent.EXTRA_SUBJECT,\n \"Daily Grades\");\n //email.putExtra(Intent.EXTRA_TEXT, mydb.getDailyGrade().toString());\n // This MIME type indicates email\n email.setType(\"message/rfc822\");\n // createChooser shows user a list of app that can handle\n // this MIME type, which is, email\n startActivity(Intent.createChooser(email,\n \"Choose an Email client :\"));\n\n }", "public void toStoreData(View view) {\n final Controller aController = (Controller) getApplicationContext();\n TextView sportName = (TextView) findViewById(R.id.SportName);\n String name = sportName.getText().toString();\n Log.i(\"EllieNull\", name);\n int sport = aController.getSport(name).getStyle();\n Log.i(\"EllieSport\", Integer.toString(sport));\n if (sport == 1) {\n Intent intent = new Intent(SportHome.this, Storedata.class);\n intent.putExtra(\"sportName\", sportName.getText());\n startActivity(intent);\n } else if (sport == 2) {\n Intent intent = new Intent(SportHome.this, TimeBased.class);\n intent.putExtra(\"sportName\", sportName.getText());\n startActivity(intent);\n } else if (sport == 3) {\n Intent intent = new Intent(SportHome.this, DistanceBased.class);\n intent.putExtra(\"sportName\", sportName.getText());\n startActivity(intent);\n } else if (sport == 4) {\n Intent intent = new Intent(SportHome.this, AccuracyBased.class);\n intent.putExtra(\"sportName\", sportName.getText());\n startActivity(intent);\n } else if (sport == 5) {\n Intent intent = new Intent(SportHome.this, PointBased.class);\n intent.putExtra(\"sportName\", sportName.getText());\n startActivity(intent);\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent i=new Intent(context,ApproveTraveldata.class);\n\t\t\t\t\t//Create the bundle\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\t//Add your data from getFactualResults method to bundle\n\t\t\t\t\tbundle.putString(\"EmpEmail\", arraylistdata.get(position).getEmail());\n\t\t\t\t\tbundle.putString(\"EmpName\", arraylistdata.get(position).getEmpName());\n\t\t\t\t\tbundle.putString(\"EmpId\", arraylistdata.get(position).getEmpId());\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t//Add the bundle to the intent\n\t\t\t\t\ti.putExtras(bundle);\n\t\t\t\t\tcontext.startActivity(i);\n\t\t\t\t\tcontext.finish();\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcoop_relation = 1;\n\t\t\t\tTextView tv_need = (TextView) view.findViewById(R.id.coop_resource_i_need_text);\n\t\t\t\tTextView tv_offer = (TextView) view.findViewById(R.id.coop_resource_i_offer_text);\n\t\t\t\ttv_offer.setTextColor(getResources().getColor(R.color.white));\n\t\t\t\ttv_need.setTextColor(getResources().getColor(R.color.light_blue));\n\t\t\t\trequestData();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n long idPoss = parent.getItemIdAtPosition(position);\n\n CourseDTO resultCourse = (CourseDTO)getIntent().getExtras().getSerializable(RESULT);\n UserDTO CURRENT_USER_result = (UserDTO)getIntent().getExtras().getSerializable(CURRENT_USER);\n\n StudentDTO selectedStudent = listStudentAdapter.getItem(position);\n Intent intent = new Intent(getBaseContext(), FaultFormActivity.class);\n //Bundle bundle = new Bundle();\n //bundle.putSerializable(DetailsElementActivity.RESULT, jobPost);\n intent.putExtra(FaultFormActivity.RESULT, resultCourse);\n intent.putExtra(FaultFormActivity.CURRENT_USER, CURRENT_USER_result);\n intent.putExtra(FaultFormActivity.CURRENT_STUDENT_result, selectedStudent);\n startActivity(intent);\n }", "public void chooseOptionAssignToOnBulkActionsDropDown() {\n getLogger().info(\"Choose option: Assign to.\");\n clickElement(optionAssignTo, \"Assign To Option\");\n }", "public void UniversitySelected(View view) {\n\n SharedPreferences storeduniversity = getSharedPreferences(\"universityfile\",Activity.MODE_PRIVATE);\n SharedPreferences.Editor editor=storeduniversity.edit();\n\n EditText editText = (EditText) findViewById(R.id.enterDescription);\n String uni=editText.getText().toString();\n\n editor.putString(\"university\",uni);\n editor.apply();\n\n\n \n\n\n Intent intent = new Intent(this, ClassAdder.class);\n //String message = String.valueOf(id.UniversitySelect);\n //intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "private void goToSelectionScreen(User user){\n Intent i = new Intent(getApplicationContext(), PlaySelectionActivity.class);\n i.putExtra(\"user\", user);\n startActivity(i);\n }", "@Override\n public void onClick(View view) {\n Intent screenChange = new Intent(getApplicationContext(), settings.class);\n //creating a bundle to store the variables that will be passed into the next\n //activity\n //starting our activity for a result\n startActivity(screenChange);\n }", "@Override\r\n public void onClick(View v) {\n String robodata=\"robot data\";\r\n String stringdata = \"throwing\";\r\n Intent mysqlintent = new Intent(collect_Data.this,mysql.class); //defining the intent.\r\n mysqlintent.putExtra(robodata, stringdata); //putting the data into the intent\r\n startActivity(mysqlintent); //launching the mysql activity\r\n }", "public void openPromotion() {\n myActivity.setContentView(R.layout.promotion);\n Button promotionButtonToGame = myActivity.findViewById(R.id.button6);\n\n promotionButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n }\n\n\n );\n\n\n }", "private void open_assignment(int position){\n ViewGradeListItem item = grades.get(position);\n\n if (item.is_category){\n if (item.category_id != -1){ // Total case\n // open add assignment activity\n Intent intent = new Intent(ViewGradeListActivity.this, AddAssignmentActivity.class);\n intent.putExtra(\"category_id\", item.category_id);\n startActivity(intent);\n }\n } else {\n // open add grade activity\n Intent intent = new Intent(ViewGradeListActivity.this, AddGradeActivity.class);\n intent.putExtra(\"user_id\", user_id);\n intent.putExtra(\"course_id\", selected_course.getCourseID());\n intent.putExtra(\"assignment_id\", item.assignment_id);\n intent.putExtra(\"course_name\", selected_course.getTitle());\n intent.putExtra(\"assignment_name\", item.name);\n startActivity(intent);\n }\n\n }", "@Override\n public void onClick(View v) {\n Intent myIntent = new Intent(ChooseParty.this, HelpActivity.class);\n // myIntent.putExtra(\"key\", value); //Optional parameters\n myIntent.putExtra(\"username\", mUsername);\n startActivity(myIntent);\n }", "@Override\n\tpublic void onClick(View v) {\n\n\t\tswitch (v.getId()) {\n\n\t\tcase R.id.btn_lhm:\n\n\t\t\tsaveuser = sharedpre.edit();\n\n\t\t\tsaveuser.putString(\"producttype\", \"LM\");\n\n\t\t\tsaveuser.commit();\n\t\t\tLog.e(\"\", \"LM\");\n\n\t\t\tstartActivity(new Intent(getApplicationContext(),\n\t\t\t\t\tVisibilityImageFragment.class));\n\t\t\tbreak;\n\n\t\tcase R.id.btn_lh:\n\n\t\t\tsaveuser = sharedpre.edit();\n\n\t\t\tsaveuser.putString(\"producttype\", \"LH\");\n\n\t\t\tsaveuser.commit();\n\t\t\tLog.e(\"\", \"LH\");\n\t\t\tstartActivity(new Intent(getApplicationContext(),\n\t\t\t\t\tVisibilityImageFragment.class));\n\t\t\tbreak;\n\n\t\t}\n\t}", "@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t\t\r\n\t\t// get the plant that was selected.\r\n\t\tBundle bundle = data.getExtras();\r\n\t\t\r\n\t\tPlant selectedPlant = (Plant) bundle.getSerializable(PlantResultsActivity.PLANT_RESULT);\r\n\t\t\r\n\t\tToast.makeText(this, \"Plant: \" + selectedPlant, Toast.LENGTH_LONG).show();\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void mainBuyPro() {\n\t\t\t\tif (iap_is_ok && mHelper != null) {\n\t\t\t\t\t\n\t\t\t\t\t String payload = \"\";\n\t\t\t\t\t mHelper.launchPurchaseFlow(MainActivity.this, Paid_Id_VF, RC_REQUEST, mPurchaseFinishedListener);\n\t\t\t\t}else{\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(mCtx, ClaimPage.class);\n intent.putExtra(\"ClaimID\", String.valueOf(claim.getClaimID()));\n intent.putExtra(\"ClaimNum\", String.valueOf(claim.getClaimNum()));\n intent.putExtra(\"InvoiceNum\", String.valueOf(claim.getInvoiceNum()));\n intent.putExtra(\"offercode\", String.valueOf(claim.getoffercode()));\n intent.putExtra(\"Cus_Name\", String.valueOf(claim.getCus_Name()));\n intent.putExtra(\"Creator\", String.valueOf(claim.getCreator()));\n intent.putExtra(\"creation_date\", String.valueOf(claim.getcreation_date()));\n intent.putExtra(\"Currency\", String.valueOf(claim.getCurrency()));\n intent.putExtra(\"amount\", String.valueOf(claim.getamount()));\n intent.putExtra(\"invoice_date\", String.valueOf(claim.getinvoice_date()));\n intent.putExtra(\"settlement\", String.valueOf(claim.getsettlement()));\n intent.putExtra(\"Overage\", String.valueOf(claim.getOverage()));\n intent.putExtra(\"claim_type\", String.valueOf(claim.getclaim_type()));\n intent.putExtra(\"BillTo\", String.valueOf(claim.getBillTo()));\n intent.putExtra(\"BillToAcc\", String.valueOf(claim.getBillToAcc()));\n intent.putExtra(\"ShipTo\", String.valueOf(claim.getShipTo()));\n intent.putExtra(\"ShipToAcc\", String.valueOf(claim.getShipToAcc()));\n intent.putExtra(\"Processor\", String.valueOf(claim.getProcessor()));\n intent.putExtra(\"request_id\", String.valueOf(claim.getrequestid()));\n intent.putExtra(\"notes\", String.valueOf(claim.getnotes()));\n intent.putExtra(\"approval_level\", String.valueOf(claim.getapproval_level()));\n\n\n mCtx.startActivity(intent);\n\n Log.d(TAG, \"Claim \" + String.valueOf(claim.getClaimNum())+ \" Clicked\");\n }", "public static void sendScientistToActivity(Context c, ModelProduct modelProduct,\n Class clazz){\n Intent i=new Intent(c,clazz);\n i.putExtra(\"SCIENTIST_KEY\",modelProduct);\n c.startActivity(i);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(SupplierHomePageActivity.this,SupplierItemDisplayActivity.class);\n\t\t\t\tintent.putExtra(\"supplierId\",Id);\n\t\t\t\tintent.putExtra(\"status\", \"available\");\n\t\t\t\tstartActivity(intent);\n\n\n\t\t\t}", "@Override\n public void onClick(View view) {\n try {\n if (ol_Data.getEnglish().equals(\"Courses\")) {\n\n Intent cour = new Intent(ctx, AllCourses.class);\n cour.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(cour);\n } else if (ol_Data.getEnglish().equals(\"Hijri Calender\")) {\n Intent nq = new Intent(ctx, CaldroidSampleActivity.class);\n nq.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(nq);\n }else if (ol_Data.getEnglish().equals(\"Namaz Alarm\")) {\n Intent nq = new Intent(ctx, Muazzin.class);\n nq.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(nq);\n }else if (ol_Data.getEnglish().equals(\"General Knowledge\")) {\n Intent nq = new Intent(ctx, GK.class);\n nq.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(nq);\n }\n } catch (Exception e) {\n Toast.makeText(ctx, \"Error \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n }", "@Override\n public void onClick(View view) {\n\n Intent Main_Save_Intent = new Intent(getApplicationContext(),PingTestSetup.class);\n Bundle Main_Save_Bundle = new Bundle();\n Main_Save_Bundle.putSerializable(\"Play_TC_List\",Play_TC_List);\n Main_Save_Intent.putExtras(Main_Save_Bundle);\n startActivity(Main_Save_Intent);\n\n\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n DeveloperProfileActivity.setDeveloper(adapter.getItem(position));\r\n Intent intent = new Intent(MainActivity.this, DeveloperProfileActivity.class);\r\n startActivity(intent);\r\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tSendInfo selItem = (SendInfo) parent.getAdapter().getItem(position); //\n\t\t\t\tIntent i = new Intent(ReceivedActivity.this, PickingActivity.class);\n\t\t\t\ti.putExtra(\"MODE\", 0);\n\t\t\t\ti.putExtra(\"CODE\", \"\" + selItem.getPedido());\n\t\t\t\ti.putExtra(\"REF\", selItem.getReferencia());\n\t\t\t\ti.putExtra(\"PERSON\", selItem.getCliente_proveedor());\n\t\t\t\ti.putExtra(\"ALBARAN\", MODE != 0);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void onPROChange() {\n if (selectPROC != null) {\n CommunicationBridge communicationBridge = findCommunicationById(selectPROC.toString());\n parameterPROC = communicationBridge.getNumParameter();\n } else {\n parameterPROC = 0;\n }\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tif (v.getTag().toString().equals(\"-1\")) {\n\t\t\tDashboardModel dashboardModel = LLDCApplication.DBHelper\n\t\t\t\t\t.onGetDashBoardData();\n\n\t\t\tsendEmail(dashboardModel.getReportEmailTo(),\n\t\t\t\t\tdashboardModel.getReportEmailSubject(), \"\");\n\n\t\t} else {\n\t\t\tif (theParkList.size() > 0) {\n\t\t\t\tint index = Integer.parseInt(v.getTag().toString());\n\t\t\t\tLLDCApplication.selectedParkModel = theParkList.get(index);\n\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\tStaticTrailsActivity.class);\n\t\t\t\tintent.putExtra(\"tvFullText\", true);\n\t\t\t\tintent.putExtra(\"PAGETITLE\", theParkList.get(index).getTitle());\n\t\t\t\tgetActivity().startActivity(intent);\n\t\t\t} else {\n\t\t\t\tLLDCApplication.onShowToastMesssage(getActivity(),\n\t\t\t\t\t\t\"Unable to retrive the data...\");\n\t\t\t}\n\t\t}\n\t}", "public void getintent() {\n Intent intent = this.getIntent();\n acceptDetailsModel = (AcceptDetailsModel) intent.getSerializableExtra(\"menu_item\");\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(TeamActivity.this, TeamActivity.class); //If the team number is pressed start a new TeamActivity with information about the selected team\n intent.putExtra(\"Team#\", TeamNumber); //Send the team number into the new activity in order to know which team the new activity should be about\n TeamActivity.this.startActivity(intent); //Start the new activity\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(checkInfo())\r\n\t\t\t\t{\r\n\t\t\t\t\tBundle extra = getIntent().getExtras();\r\n\t\t\t\t\tif(extra!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString json = extra.getString(\"json\");\r\n\t\t\t\t\t\tType typeObject = new TypeToken<CustomerEntity>(){}.getType();\r\n\t\t\t\t\t\tString customer = JSonHelper.serializerJson(getCustomer(), typeObject);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tIntent it = new Intent(Booking.this, BookingConfirm.class);\r\n\t\t\t\t\t\tit.putExtra(\"json\", json);\r\n\t\t\t\t\t\tit.putExtra(\"customer\", customer);\r\n\t\t\t\t\t\tit.putExtra(\"bonus\",chkBonus.isChecked()?\"150000\":\"0\");\r\n\t\t\t\t\t\tstartActivity(it);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tHelper.showToast(Booking.this, \"Please input all customer infomation!\", true);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n saveRoundSetting();\n saveMembers();\n SharedPreferences sharedpreferencesRS= getSharedPreferences(\"SCREENNAME\" , MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferencesRS.edit();\n editor.putString(\"screenname\" , \"roundsetting\");\n editor.commit();\n Bundle bundle = new Bundle();\n // bundle.putString(\"FROMACTIVITY_WHERE\",\"ROUNDSEETING\");\n bundle.putString(\"MemberNumber\",\"third\");\n bundle.putString(\"Membername\",\"\"+ youtextt[2].getText());\n Intent NextScreen = new Intent(RoundSetting.this, TeeSelection.class);\n NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }\n if (id == R.id.action_myinfo){\n return true;\n }\n if (id == R.id.action_myschedule){\n// Intent it = new Intent(SwipePlot.this,Choice.class);\n// Bundle bundle = new Bundle();\n// if(myid!=null) {\n// bundle.putString(\"memberid\", myid);\n// bundle.putString(\"my_google_id\",my_google_id);\n// bundle.putString(\"my_supervise_id\",my_supervise_id);\n// }else{\n// bundle.putString(\"memberid\", current_id);\n// bundle.putString(\"my_google_id\",my_google_id);\n// bundle.putString(\"my_supervise_id\",my_supervise_id);\n// }\n// it.putExtras(bundle);\n// startActivity(it);\n return true;\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View v) {\n\n userN =firstname.getText().toString();\n userL =lastName.getText().toString();\n gender = spin.getSelectedItem().toString();\n problem = reason.getText().toString();\n\n Intent intentsend = new Intent(getApplication(),profile.class);\n intentsend.putExtra(\"userN\",firstname.getText().toString());\n intentsend.putExtra(\"userL\", lastName.getText().toString());\n intentsend.putExtra(\"gender\",spin.getSelectedItem().toString());\n intentsend.putExtra(\"problem\",reason.getText().toString());\n startActivity(intentsend);\n }", "@Override\n public void onClick(View v) {\n\n saveRoundSetting();\n saveMembers();\n SharedPreferences sharedpreferencesRS= getSharedPreferences(\"SCREENNAME\" , MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferencesRS.edit();\n editor.putString(\"screenname\" , \"roundsetting\");\n editor.commit();\n Bundle bundle = new Bundle();\n // bundle.putString(\"FROMACTIVITY_WHERE\",\"ROUNDSEETING\");\n bundle.putString(\"MemberNumber\",\"second\");\n bundle.putString(\"Membername\",\"\"+ youtextt[1].getText());\n Intent NextScreen = new Intent(RoundSetting.this, TeeSelection.class);\n NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n\n }", "@Override\n\t\t\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\t\tLog.d(TAG, \"onActivityResult(\" + requestCode + \",\" + resultCode + \",\" + data);\n\t\t\t\tif (mHelper == null) return;\n\t\t\t\tif (!mHelper.handleActivityResult(requestCode, resultCode, data)) {\n\t\t\t\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\t\t\t if (requestCode == RC_REQUEST) { \n\t\t\t\t\t String purchaseData = data.getStringExtra(\"INAPP_PURCHASE_DATA\");\n\t\t\t\t\t \n\t\t\t\t\t if (resultCode == RESULT_OK) {\n\t\t\t\t\t try {\n\t\t\t\t\t JSONObject jo = new JSONObject(purchaseData);\n\t\t\t\t\t String sku = jo.getString(\"productId\");\n\t\t\t\t\t alert(\"Thank you for upgrading to pro! \");\n\t\t\t\t\t \n\t\t\t\t\t SharedPreferences sharedPreferences = MainActivity.this.getSharedPreferences(PREFS_NAME,0); //已经设置密码 \n\t\t\t\t\t\t\t SharedPreferences.Editor meditor = sharedPreferences.edit(); \n\t\t\t\t\t\t\t\t meditor.putBoolean(\"isPaid\",true ); \n\t\t\t\t\t\t\t\t meditor.commit();\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t if (overviewFragment != null) {\n\t\t\t\t\t \t\t\t\t refreshADS = (OnRefreshADS) overviewFragment;\n\t\t\t\t\t \t\t\t\t refreshADS.refreshADS();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t\t catch (JSONException e) {\n\t\t\t\t\t alert(\"Failed to parse purchase data.\");\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t }\n\t\t \n\t\t else {\n\t\t Log.d(TAG, \"onActivityResult handled by IABUtil.\");\n\t\t }\n\t\t\t}", "@Override\n public void onClick(View v) {\n if(v==btnStartCloud) {\n activityIntent.putExtra(\"isOnline\", true);\n activityIntent.putExtra(\"isVadLoad\", true);\n activityIntent.setClass(this, SelectActivity.class);}\n startActivity(activityIntent);\n }", "@Override\n public void onClick(View v) {\n\n saveRoundSetting();\n saveMembers();\n SharedPreferences sharedpreferencesRS= getSharedPreferences(\"SCREENNAME\" , MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferencesRS.edit();\n editor.putString(\"screenname\" , \"roundsetting\");\n editor.commit();\n Bundle bundle = new Bundle();\n // bundle.putString(\"FROMACTIVITY_WHERE\",\"ROUNDSEETING\");\n bundle.putString(\"MemberNumber\",\"forth\");\n bundle.putString(\"Membername\",\"\"+ youtextt[3].getText());\n Intent NextScreen = new Intent(RoundSetting.this, TeeSelection.class);\n NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n finish();\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent ManageApp= new Intent(getBaseContext(),Manage_Appliance.class);\n\t\t\t\tManageApp.putExtras(bundle);\n\t\t\t\tstartActivity(ManageApp);\n\t\t\t}", "public void onClick(View v) {\n switch (v.getId()) {\n case R.id.pss:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // je récupère le PID de la donnée cliquée\n in.putExtra(TAG_PID, id_pss);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in, 100);\n\n break;\n case R.id.pab:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in2 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in2.putExtra(TAG_PID, id_pab);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in2, 100);\n\n break;\n case R.id.tpr:\n\n // getting values from selected ListItem\n\n // Starting new intent\n Intent in3 = new Intent(getActivity().getApplicationContext(),\n EditData.class);\n // sending pid to next activity\n in3.putExtra(TAG_PID, id_tpr);\n\n\n // starting new activity and expecting some response back\n startActivityForResult(in3, 100);\n\n break;\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcoop_relation = 0;\n\t\t\t\tTextView tv_need = (TextView) view.findViewById(R.id.coop_resource_i_need_text);\n\t\t\t\tTextView tv_offer = (TextView) view.findViewById(R.id.coop_resource_i_offer_text);\n\t\t\t\ttv_need.setTextColor(getResources().getColor(R.color.white));\n\t\t\t\ttv_offer.setTextColor(getResources().getColor(R.color.light_blue));\n\t\t\t\trequestData();\n\t\t\t}", "@Override\n public void onClick(View v) {\n {\n SharedPreferences sharedpreferencesRS= getSharedPreferences(\"SCREENNAME\" , MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedpreferencesRS.edit();\n editor.putString(\"screenname\" , \"roundsetting\");\n editor.commit();\n Intent NextScreen = new Intent(RoundSetting.this, SelectCourse.class);\n // NextScreen.putExtras(bundle);\n startActivity(NextScreen);\n }\n\n\n }", "@Override\n public void onClick(View view) {\n // Create a new intent\n Intent new_release_intent = new Intent(VietPopActivity.this, MainActivity.class);\n new_release_intent.putExtra(\"uniqueid\",\"from_viet\");\n // Start the new activity\n startActivity(new_release_intent);\n }", "public void sendDataToActivity(Song chosenSong) {\r\n Intent intent = new Intent(this, PlaySongActivity.class);\r\n //.class is the machine-readable form of a java class.\r\n\r\n //2. Store the song information into the Intent object to be sent over to the\r\n //destination screen\r\n intent.putExtra(\"id\", chosenSong.getSong_ID());\r\n intent.putExtra(\"title\", chosenSong.getSong_Title());\r\n intent.putExtra(\"artist\", chosenSong.getSong_Artist());\r\n intent.putExtra(\"fileLink\", chosenSong.getFileLink());\r\n intent.putExtra(\"length\", chosenSong.getSong_Length());\r\n intent.putExtra(\"coverArt\", chosenSong.getCoverArt());\r\n intent.putExtra(\"languageTitle\", genre);\r\n\r\n //3. Launch the destination screen/activity\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(DriverPrefrActivity.this, SearchParkActivity.class);\n //Creating a bundle\n Bundle bundle = new Bundle();\n //Adding values to bundle\n bundle.putString(\"driverlargecar\", String.valueOf(largecar));\n bundle.putString(\"drivertype\", String.valueOf(type));\n bundle.putString(\"driverprice\", String.valueOf(price));\n bundle.putString(\"driverdistancepklot\", String.valueOf(distpklot));\n\n myIntent.putExtra(\"mybundle\", bundle);\n startActivity(myIntent);\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent datosSustento = new Intent(context,DatosSustentoActivity.class);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.TIPO_ACCION, DatosSustentoActivity.ACCION_ACTUALIZAR);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_CLIENTE, codigo_cliente);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_PLAN, codigo_plan);\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_ACTIVIDAD, codigo_actividad);\t\t\t\t\t\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.CODIGO_SUSTENTO, sustentoTemporal.getCodigoSustento());\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.DESCRIPCION_SUSTENTO, sustentoTemporal.getDescripcionActividad());\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.TIPO_SUSTENTO, sustentoTemporal.getTipoActividad());\r\n\t\t\t\t\tdatosSustento.putExtra(DatosSustentoActivity.FECHA_VISITA, sustentoTemporal.getFechaVisita());\t\t\t\t\t\r\n\t\t\t\t\tcontext.startActivity(datosSustento);\r\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n\n if (!isInternetPresent) {\n // Internet connection is not present\n // Ask user to connect to Internet\n showAlertDialog(MainActivity.this, \"You don't have internet connection.\",\n \"Data Not Loaded\", false);\n\n }\n\nelse if(sp1.getSelectedItem().toString().equals(\"Select Type\") || sp2.getSelectedItem().toString().equals(\"Select Size\")) {\n Toast.makeText(getApplicationContext(), \"Select value\", Toast.LENGTH_SHORT).show();\n\n }\n\nelse if (TextViewKGFEET.getText().toString().equals(\"Select Meter\")){\n Toast.makeText(getApplicationContext(), \"Select value\", Toast.LENGTH_SHORT).show();\n }\n//sp1.getSelectedItem().toString();\n else {\n Intent intent = new Intent(MainActivity.this, FinalAmount.class);\n String tp = intent.putExtra(\"type\", t).toString();\n\n\n intent.putExtra(\"size\", s);\n intent.putExtra(\"kg_mtr\", arrayListmtr.get(sp2.getSelectedItemPosition()).toString());\n intent.putExtra(\"kg_feet\", arrayListfeet.get(sp2.getSelectedItemPosition()).toString());\n intent.putExtra(\"guage\", arrayListguage.get(sp2.getSelectedItemPosition()).toString());\n\n intent.putExtra(\"type\", t);\n Log.e(\"weightpermtr ::::::\", \"\" + arrayListmtr.get(sp2.getSelectedItemPosition()).toString());\n Log.e(\"weightperfeet ::::::\", \"\" + arrayListfeet.get(sp2.getSelectedItemPosition()).toString());\n Log.e(\"guage ::::::\", \"\" + arrayListguage.get(sp2.getSelectedItemPosition()).toString());\n startActivity(intent);\n }\n if (iad.isLoaded()) {\n iad.show();\n }\n\n }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Select.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent i = new Intent(SettingOptionActivity.this, SettingCriteriaActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), EditAssessment.class);\n intent.putExtra(\"termID\", termID);\n intent.putExtra(\"courseID\", courseID);\n intent.putExtra(\"assessmentID\", assessmentID);\n startActivity(intent);\n }", "public void toCampusEvent(View view) {\n Intent startNewActivity = new Intent(this, EventProfile.class);\n startNewActivity.putExtra(\"eventInteger\", 2);\n startActivity(startNewActivity);\n }", "public void CameToSelectActivity (View view) {\n Intent CameToSelectIntent = new Intent(getApplicationContext(), SelectActivity.class);\n startActivity(CameToSelectIntent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(ReadingDataActivity.this,\n\t\t\t\t\t\tBookInfoNewUIActivity.class);\n\t\t\t\tintent.putExtra(BookInfoNewUIActivity.BookIdKey,\n\t\t\t\t\t\treadingDataM.getBookId());\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"SELECTSTUDIO\")) {\n Studiotype startingstudio = Studiotype.valueOf(intent.getStringExtra(\"launchstudio\"));\n switch (startingstudio) {\n case RiskFactor:\n Intent i = new Intent(context, RiskFactor.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(i);\n return;\n case Product:\n case Simulation:\n case Scenario:\n case Dashboard:\n Log.w(\"kek\", \"lololol unimplemented hohohoho\");\n return;\n default:\n Log.w(\"kek\", \"not even a choice bro\");\n return;\n }\n }\n }", "private void onCreateSuccessStudent(){\n\n // check for if student or teacher\n Intent intent = new Intent(this, ClubHubStudentActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(mContext, DemandDetailActivity.class);\n //intent.putExtra(\"id\",String.valueOf(item.getPid()));\n intent.putExtra(\"pid\", String.valueOf(item.getPid()));\n intent.putExtra(\"uid\", String.valueOf(item.getUid()));\n mContext.startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, ProdDescActivity.class);\n context.startActivity(intent);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tswitch(requestCode){\n\t\tcase 0:\t\t\t\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tLog.d(TAG, Integer.toString(RESULT_OK));\n\t\t\t\tString u_signup, p_signup;\n\t\t\t\tu_signup = data.getStringExtra(\"username\");\n\t\t\t\tp_signup = data.getStringExtra(\"password\");\n\t\t\t\tLog.d(TAG, u_signup);\n\t\t\t\tintent = new Intent(getApplicationContext(), Timeline.class);\n\t\t\t\tintent.putExtra(\"first_time\", true); //Setting Boolean first_time to true\n\t\t\t\tintent.putExtra(\"username\", u_signup);\n\t\t\t\tintent.putExtra(\"password\", p_signup);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}\n\t}", "public void marksEdit(View view) {\n Intent intent = new Intent(getApplicationContext(), InsertingAtten.class);\n intent.putExtra(\"STATUS\", \"edit\");\n intent.putExtra(\"SEMESTER\", semester);\n intent.putExtra(\"SECTION\", section);\n intent.putExtra(\"COURSEID\", courseId);\n intent.putExtra(\"DEPARTMENT\", department);\n intent.putExtra(\"SERIES\", series);\n startActivity(intent);\n }", "@Override\n\tpublic void onClick(View v) {\n\n\t\tfinal Bundle bundle = new Bundle();\n\n\t\tswitch (v.getId()) {\n\n\t\tcase R.id.newUser:\n\t\t\tIntent intentReg = new Intent(\"game.MarathiUT.REGISTER\");\n\t\t\tstartActivity(intentReg);\n\t\t\tbreak;\n\t\tcase R.id.user_list:\n\t\t\tif(userSchool.compareToIgnoreCase(getResources().getString(R.string.no_users_in_db))==0)\n\t\t\t\treturn;\n\t\t\tIntent intentShow = new Intent(\"game.MarathiUT.FIRSTSCREEN\");\n\t\t\tbundle.putString(\"schoolname\",userSchool);\n\t\t\tintentShow.putExtras(bundle);\n\t\t\tstartActivity(intentShow);\n\n\t\t\tbreak;\n\n\t\tcase R.id.upsync:\n\n\t\t\t/*register.setEnabled(false);\n\t\t\t\tuserlist.setEnabled(false);\n\t\t\t\tupsync.setEnabled(false);\n\t\t\t\tdownsync.setEnabled(false);\n\t\t\t\tdump.setEnabled(false);\n\t\t\t\tSchool.setEnabled(false);*/\n\n\t\t\tSyncDatabase syncDB = new SyncDatabase(getApplicationContext());\n\t\t\tsyncDB.onUpSync(1,prgUserData);\n\t\t\t//Toast.makeText(getApplicationContext(), status, Toast.LENGTH_LONG).show();\n\n\t\t\t/*if (status.compareToIgnoreCase(\"No records to sync\")==0){\n\t\t\t\t\tregister.setEnabled(true);\n\t\t\t\t\tuserlist.setEnabled(true);\n\t\t\t\t\tupsync.setEnabled(true);\n\t\t\t\t\tdownsync.setEnabled(true);\n\t\t\t\t\tdump.setEnabled(true);\n\t\t\t\t\tSchool.setEnabled(true);\n\t\t\t\t}*/\n\t\t\t/*final ScheduledExecutorService work = \n\t\t\t\t\t\t Executors.newSingleThreadScheduledExecutor();\n\n\n\t\t\t\t\t\t Runnable run = new Runnable() {\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t Do something… \n\t\t\t\t\t \t \t//Intent intentShow = new Intent(\"game.MarathiUT.FIRSTSCREEN\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//startActivity(intentShow);\n\n\t\t\t\t\t\t \tregister.setEnabled(true);\n\t\t\t\t\t\t\t\tuserlist.setEnabled(true);\n\t\t\t\t\t\t\t\tupsync.setEnabled(true);\n\t\t\t\t\t\t\t\tdownsync.setEnabled(true);\n\t\t\t\t\t\t\t\tdump.setEnabled(true);\n\t\t\t\t\t\t\t\tSchool.setEnabled(true);\n\t\t\t\t\t\t \tToast.makeText(getApplicationContext(), \"Upload complete\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t };\n\t\t\t\t\t\t work.schedule(run, 5, TimeUnit.SECONDS);*/\n\t\t\tbreak;\n\n\t\tcase R.id.downsync:\n\n\t\t\tAlternativesParser alt = new AlternativesParser(this);\n\t\t\tDamerauLevenshteinAlgorithm editDistance = new DamerauLevenshteinAlgorithm(1,1,1,1);\n\n\t\t\t//Log.d(\"alt\",\"\\u0905\\u0930\\u094d\\u200d\\u0925\");\n\t\t\t//alt.replaceAlternatives(\"\\u0905\\u0930\\u094d\\u200d\\u0925\");\n\n\t\t\t/*Log.d(\"alt\",\"two spaces:\" + editDistance.execute(getString(R.string.test_2spaces),alt.replaceAlternatives(getString(R.string.test_2spaces_mod))));\n\t\t\t\tLog.d(\"alt\",\"spaces:\" + editDistance.execute( getString(R.string.test_spaces),alt.replaceAlternatives( getString(R.string.test_spaces_mod) ) ) );*/\n\n\t\t\t/*Log.d(\"alt\",\"two spaces:\" + editDistance.execute(\"\\u0905 \\u0915 \\u0930 \\u0931\", alt.replaceAlternatives(alt.replaceAlternatives(\"\\u0905 \\u0915 \\u0930 \\u0931\")) ));\n\t\t\t\tLog.d(\"alt\",\"three spaces:\" + editDistance.execute(\"\\u0905 \\u0915 \\u0930 \\u0931\", alt.replaceAlternatives(alt.replaceAlternatives(\" \\u0905 \\u0915 \\u0930 \\u0931\")) ));\n\t\t\t\tLog.d(\"alt\",\"four spaces:\" + editDistance.execute(\"\\u0905 \\u0915 \\u0930 \\u0931\", alt.replaceAlternatives(alt.replaceAlternatives(\" \\u0905 \\u0915 \\u0930 \\u0931\")) ));\n\t\t\t\tLog.d(\"alt\",\"five spaces:\" + editDistance.execute(\"\\u0905 \\u0915 \\u0930 \\u0931\", alt.replaceAlternatives(alt.replaceAlternatives(\" \\u0905 \\u0915 \\u0930 \\u0931\")) ));\n\t\t\t\tLog.d(\"alt\",\"six spaces:\" + editDistance.execute(\"\\u0905 \\u0915 \\u0930 \\u0931\", alt.replaceAlternatives(alt.replaceAlternatives(\" \\u0905 \\u0915 \\u0930 \\u0931\")) ));\n\t\t\t\tLog.d(\"alt\",\"mix spaces:\" + editDistance.execute(\"\\u0905 \\u0915 \\u0930 \\u0931\", alt.replaceAlternatives(alt.replaceAlternatives(\" \\u0905 \\u0915 \\u0930 \\u0931\")) ));*/\n\t\t\t//Log.d(\"alt\",\"spaces:\" + editDistance.execute( \"\",\"\" ) );\n\t\t\t/*Log.d(\"alt\",\"eyelash1:\" + editDistance.execute(getString(R.string.test_spaces),alt.replaceAlternatives(getString(R.string.test_spaces_mod))));\n\t\t\t\tLog.d(\"alt\",\"eyelash2:\" + editDistance.execute(getString(R.string.test_spaces),alt.replaceAlternatives(getString(R.string.test_spaces_mod))));\n\t\t\t\tLog.d(\"alt\",\"spaces:\" + editDistance.execute(getString(R.string.test_spaces),alt.replaceAlternatives(getString(R.string.test_spaces_mod))));\n\t\t\t\tLog.d(\"alt\",\"spaces:\" + editDistance.execute(getString(R.string.test_spaces),alt.replaceAlternatives(getString(R.string.test_spaces_mod))));*/\n\n\t\t\t//Log.d(\"alt\",alt.replaceAlternatives(\"\\u0905\\u0930\\u094d\\u200d\\u0925\")); \n\n\t\t\t/*register.setEnabled(false);\n\t\t\t\tuserlist.setEnabled(false);\n\t\t\t\tupsync.setEnabled(false);\n\t\t\t\tdownsync.setEnabled(false);\n\t\t\t\tdump.setEnabled(false);\n\t\t\t\tSchool.setEnabled(false);*/\n\n\t\t\t/*SyncDatabase syncDB1 = new SyncDatabase(getApplicationContext());\n\t\t\t\tString status1 = syncDB1.downSync();\n\t\t\t\tToast.makeText(getApplicationContext(), status1, Toast.LENGTH_LONG).show();\n\t\t\t\tfinal ScheduledExecutorService worker1 = \n\t\t\t\t\t\t Executors.newSingleThreadScheduledExecutor();\n\n\n\t\t\t\t\t\t Runnable task1 = new Runnable() {\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t Do something… \n\t\t\t\t\t \t \tIntent intentShow = new Intent(\"game.MarathiUT.FIRSTSCREEN\");\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tstartActivity(intentShow);\n\t\t\t\t\t\t \tregister.setEnabled(true);\n\t\t\t\t\t\t\t\tuserlist.setEnabled(true);\n\t\t\t\t\t\t\t\tupsync.setEnabled(true);\n\t\t\t\t\t\t\t\tdownsync.setEnabled(true);\n\t\t\t\t\t\t\t\tdump.setEnabled(true);\n\t\t\t\t\t\t\t\tSchool.setEnabled(true);\n\t\t\t\t\t\t \tToast.makeText(getApplicationContext(), \"Download complete\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t }\n\t\t\t\t\t\t };\n\t\t\t\t\t\t worker1.schedule(task1, 5, TimeUnit.SECONDS);*/\n\t\t\t//if(userSchool!=null || userSchool.length() >0)\n\t\t\tdownloadAll(\"\");\n\t\t\tbreak;\n\t\tcase R.id.dump:\n\t\t\t//Toast.makeText(this, \"DB Exported!\", Toast.LENGTH_SHORT).show();\n\t\t\texportDB();\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(ScannerActivity.this,\"Redirecting...\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerResult.class);\n assignObjValue(laptopCheckOutInfoList, key);\n intent.putExtra(\"laptop_record_info\", laptopCheckOutInfo); //return the object li as a serialized object\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n try{\n data.setDepartCity(SdepLoc.getSelectedItem().toString());\n data.setArrivalCity(SarrLoc.getSelectedItem().toString());\n data.setAdultsCount(Integer.parseInt(ETadults.getText().toString()));\n data.setChildCount(Integer.parseInt(ETchilds.getText().toString()));\n data.setTransfersCount(Integer.parseInt(ETmaxTrans.getText().toString()));\n data.setMaxPrice(Double.parseDouble(ETmaxCost.getText().toString()));\n data.setJustWeekends(CBweekends.isChecked());\n data.setStartDate(dateFormat.parse(ETdateFrom.getText().toString()));\n data.setEndDate(dateFormat.parse(ETdateTo.getText().toString()));\n\n dataRepo.addProfile(UsersServiceMock.getSampleUser(), data);\n context.finish();\n\n\n } catch (ParseException ex){\n Toast.makeText(getApplicationContext(), \"Nieprawidłowy format daty!\",\n Toast.LENGTH_LONG)\n .show();\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (data == null || resultCode != RESULT_OK)\n\t\t\treturn;\n\t\tString type = \"Weapon\";\n\t\tString id = \"\";\n\t\tBundle bundle = data.getExtras();\n\t\tif (bundle != null) {\n\t\t\ttype = bundle.getString(\"type\");\n\t\t\tid = bundle.getString(\"id\");\n\t\t}\n\t\tif (id.isEmpty())\n\t\t\treturn;\n\t\tItem newitem = null;\n\t\tswitch (requestCode) {\n\t\tcase ACT_RESULT_CHOOSE_EQUIPMENT:\n\t\t\tif (mEditingView == null)\n\t\t\t\treturn;\n\t\t\tString oldid = mEditingView.getEquipmentId();\n\n\t\t\t// Find first item with same id and replace it.\n\t\t\tList<Item> list = mDweller.mEquipment.getList();\n\t\t\tif (list != null) {\n\t\t\t\tfor (Item i : list) {\n\t\t\t\t\tif (!i.mId.equals(oldid))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\ti.mId = id;\n\t\t\t\t\ti.mType = type;\n\t\t\t\t\tnewitem = i;\n\t\t\t\t\tconfigView(mEditingView, i, -1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmEditingView = null;\n\t\t\tbreak;\n\t\tcase ACT_RESULT_CHOOSE_WEAPON:\n\t\t\tEquipmentButtonView weaponView = (EquipmentButtonView) findViewById(R.id.equiped_weapon);\n\t\t\tif (type.equals(\"Weapon\")) {\n\t\t\t\tmDweller.mEquipedWeapon.mId = id;\n\t\t\t\tconfigView(weaponView, mDweller.mEquipedWeapon, 1);\n\t\t\t\tnewitem = mDweller.mEquipedWeapon;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ACT_RESULT_CHOOSE_OUTFIT:\n\t\t\tEquipmentButtonView outfitView = (EquipmentButtonView) findViewById(R.id.equiped_outfit);\n\t\t\tif (type.equals(\"Outfit\")) {\n\t\t\t\tmDweller.mEquipedOutfit.mId = id;\n\t\t\t\tconfigView(outfitView, mDweller.mEquipedOutfit, 0);\n\t\t\t\tnewitem = mDweller.mEquipedOutfit;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tif (newitem == null)\n\t\t\treturn;\n\t\ttry {\n\t\t\tnewitem.update();\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void setToOtherActivity(){\n\n util.setArrayListToOtherActivity(intent, solicitudEnviadaDAO.getSolEnviadaDTO(), Constantes.PARCEL_LISTA_SOL_ENVIADA);\n util.setArrayListToOtherActivity(intent, solicitudRecibidaDAO.getSolRecibidaDTO(), Constantes.PARCEL_LISTA_SOL_RECIBIDA);\n util.setArrayListToOtherActivity(intent, solicitudContestadaDAO.getSolContestadaDTO(), Constantes.PARCEL_LISTA_SOL_CONTESTADA);\n util.setArrayListToOtherActivity(intent, preguntaEnviadaDAO.getListaPreguntaEnviadaDTO(), Constantes.PARCEL_LISTA_PREG_ENVIADA);\n util.setArrayListToOtherActivity(intent, preguntaRecibidaDAO.getListaPreguntaRecibidaDTO(), Constantes.PARCEL_LISTA_PREG_RECIBIDA);\n util.setArrayListToOtherActivity(intent, preguntaContestadaDAO.getListaPreguntasContestadasDTO(), Constantes.PARCEL_LISTA_PREG_CONTESTADA);\n util.setArrayListToOtherActivity(intent, puntuacionRecibidaDAO.getListaPuntuacionRecibidasDTO(), Constantes.PARCEL_LISTA_PUNT_RECIBIDA);\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setClass(AddPlan.this,Favorite_Site.class);\n// Bundle bundle = new Bundle();\n// bundle.putString(\"myChoice\",\"hello\");\n// intent.putExtras(bundle);\n// startActivityForResult(intent,0);\n startActivity(intent);\n// //AddPlan.this.finish();\n finish();\n\n }", "public void onClick(View arg0) {\n\n\t\t\t\tIntent i=new Intent(getApplicationContext(),Community_Vitality.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"player1name\", player1Name.getText().toString());\n editor.putString(\"player2name\", player2Name.getText().toString());\n editor.commit();\n\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n i.putExtra(\"isPlayerDetsSet\", true);\n getApplicationContext().startActivity(i);\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, PartNoList.class);\n\t\t\t\tintent.putExtra(\"motortype\", \"ddrmpartno\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setClass(getApplicationContext(), Atividade2.class);\n //envio do parametro chamado parametro1\n intent.putExtra(\"parametro1\", \"este é um parametro\");\n startActivity(intent);\n }", "private Intent setIntentDataForActivities(int activity)\n {\n\t\tIntent i=new Intent();\n\t\tfor(int j=0;j<Name.length;j++)\n\t\t{\n\t\t Log.d(\"Data sent from DashBoard\", \"depName= \"+Designation[j]+ \" \"+\"realNumber= \"+extension[j]+\" \"+\"username= \"+Name[j]+\" \");\n\t\t}\n\t\tif(activity==0)\n\t\t{\n\t\t i = new Intent(this, EXT_Board.class);\n\t\t i.putExtra(\"Name\", Name);\n\t i.putExtra(\"Designation\", Designation);\n\t i.putExtra(\"Extension\",extension);\n\t \n\t\t}\n\t\telse if(activity==1)\n\t\t{\n\t\t\t i = new Intent(this, Dialer_main.class);\n\t\t\t i.putExtra(\"Name\", Name);\n\t\t i.putExtra(\"Designation\", Designation);\n\t\t i.putExtra(\"Extension\",extension);\n\t\t \n\t\t}\n\t\telse if(activity==2)\n\t\t{\n\t\t\t i = new Intent(this, Settings_Password.class);\n\t\t\t i.putExtra(\"Name\", Name);\n\t\t i.putExtra(\"Designation\", Designation);\n\t\t i.putExtra(\"Extension\",extension);\n\t\t \n\t\t}\n\t\telse if(activity==3)\n\t\t{\n\t\t\t i = new Intent(this, Settings_Call_Routingg.class);\n\t\t\t i.putExtra(\"Name\", Name);\n\t\t i.putExtra(\"Designation\", Designation);\n\t\t i.putExtra(\"Extension\",extension);\n\t\t\n\t\t}\n\t\treturn i;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data){\n\n\n if (requestCode == SUB_ACTIVITY_CREATE_USER && resultCode == Activity.RESULT_OK){\n Bundle extras = data.getExtras();\n if (extras != null){\n String name = extras.getString(User.USER_NAME);\n boolean gender = extras.getBoolean(User.USER_GENDER);\n\n user = new User(name,gender);\n updateUserInterface();\n }\n }\n\n if(requestCode == SUB_ACTIVITY_LEARN && resultCode == RESULT_OK){\n if(data.hasExtra(\"skillLevel\")){\n //TODO implement what to do with returned data\n skillPointInteger = data.getExtras().getInt(\"skillLevel\");\n user.skillPoints = skillPointInteger;\n Toast.makeText(this,\"New Skill Level: \"+String.valueOf(skillPointInteger),Toast.LENGTH_SHORT).show();\n\n skillPoint.setText(String.valueOf(skillPointInteger));\n }\n }\n }", "public void finalizeSignupAfterCCAvenueSubscription(Intent data) {\n\n if (entitlementPendingVideoData != null) {\n isVideoPlayerStarted = false;\n sendRefreshPageAction();\n sendCloseOthersAction(null, true, false);\n launchButtonSelectedAction(entitlementPendingVideoData.pagePath,\n entitlementPendingVideoData.action,\n entitlementPendingVideoData.filmTitle,\n entitlementPendingVideoData.extraData,\n entitlementPendingVideoData.contentDatum,\n entitlementPendingVideoData.closeLauncher,\n entitlementPendingVideoData.currentlyPlayingIndex,\n entitlementPendingVideoData.relateVideoIds);\n if (entitlementPendingVideoData != null) {\n entitlementPendingVideoData.pagePath = null;\n entitlementPendingVideoData.action = null;\n entitlementPendingVideoData.filmTitle = null;\n entitlementPendingVideoData.extraData = null;\n entitlementPendingVideoData.contentDatum = null;\n entitlementPendingVideoData.closeLauncher = false;\n entitlementPendingVideoData.currentlyPlayingIndex = -1;\n entitlementPendingVideoData.relateVideoIds = null;\n }\n } else {\n sendCloseOthersAction(null, true, false);\n cancelInternalEvents();\n restartInternalEvents();\n\n if (TextUtils.isEmpty(getUserDownloadQualityPref())) {\n setUserDownloadQualityPref(currentActivity.getString(R.string.app_cms_default_download_quality));\n }\n\n NavigationPrimary homePageNavItem = findHomePageNavItem();\n if (homePageNavItem != null) {\n cancelInternalEvents();\n navigateToPage(homePageNavItem.getPageId(),\n homePageNavItem.getTitle(),\n homePageNavItem.getUrl(),\n false,\n true,\n false,\n true,\n true,\n deeplinkSearchQuery);\n }\n }\n\n setIsUserSubscribed(true);\n setActiveSubscriptionId(planToPurchase);\n setActiveSubscriptionCurrency(currencyOfPlanToPurchase);\n setActiveSubscriptionPlanName(planToPurchaseName);\n setActiveSubscriptionPrice(String.valueOf(planToPurchasePrice));\n setActiveSubscriptionProcessor(currentActivity.getString(R.string.subscription_ccavenue_payment_processor_friendly));\n refreshSubscriptionData(null, true);\n }", "public void goToDownloadAssStudent() throws IOException {\r\n\t\tif (listview.getSelectionModel().getSelectedItem() != null) {\r\n\t\t\tassToChoose = listview.getSelectionModel().getSelectedItem();\r\n\t\t\tfor (int i = 0; i < b.size(); i++) {\r\n\t\t\t\tif (b.get(i).getAssname().equals(assToChoose)) {\r\n\t\t\t\t\tassId = b.get(i).getAssId();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconnectionmain.showTeacherDownloadAssStudent();\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIntent intent = new Intent();\n\t\t\tif(v==ok){\n\t\t\t\tintent.setClass(GoodJobActivity.this, NewVoyage.class);\n\t\t\t\tGoodJobActivity.this.startActivity(intent);\n\t\t\t}\n\t\t\tintent.setClass(GoodJobActivity.this, MainActivity.class);\n\t\t\tintent.putExtra(\"name_voyage\", current_voyage);\n\t\t\tintent.putExtra(\"p_user\", user_pos);\n\t\t\tGoodJobActivity.this.startActivity(intent);\n\t\t\tGoodJobActivity.this.finish();\n\t\t}", "@Override\n public void onClick(View v) {\n int baseId = service1Btn.getId();\n switch (v.getId() - baseId){\n case 0:\n serviceName = service1.getServiceName();\n servicePrice = service1.getServicePrice();\n break;\n case 1:\n serviceName = service2.getServiceName();\n servicePrice = service2.getServicePrice();\n break;\n case 2:\n serviceName = service3.getServiceName();\n servicePrice = service3.getServicePrice();\n break;\n case 3:\n serviceName = service4.getServiceName();\n servicePrice = service4.getServicePrice();\n break;\n case 4:\n serviceName = service5.getServiceName();\n servicePrice = service5.getServicePrice();\n break;\n case 5:\n serviceName = service6.getServiceName();\n servicePrice = service6.getServicePrice();\n break;\n }\n\n // Send data (service number, professional name, price) to MainActivity\n TransferDataToMainActivity();\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n\tpublic void handleSpecificActivity() {\n\t\tdouble expIncrease = (double) params.getParamValue(\"traineeDefaultExpIncrease\");\n\t\tint grade = this.getGrade();\n\t\t\n\t\tdouble modifier = getGradeModifier(70, grade);\n\t\texpIncrease *= modifier;\n\t\t\n\t\tthis.experience += expIncrease;\t\t\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(Main2Activity.this, EditPeliculesActivity.class);\n intent.putExtra(\"requestCode\", Constants.INTENT_CODE_PELICULA_NOVA);\n startActivityForResult(intent,Constants.INTENT_CODE_PELICULA_NOVA);\n }", "@Override\n public void onClick(View v) {\n gender = String.valueOf(spinnerGender.getSelectedItem().toString());\n birth = buttonBirth.getText().toString();\n System.out.println(birth);\n if(birth.isEmpty() || !isValidDate(birth)) {\n Toast.makeText(getApplicationContext(), \"Invalid Date\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // next - authentication 2\n Intent intent = new Intent(getApplicationContext(), AuthenticationActivity_third.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n // pass data from Stage1\n intent.putExtra(\"username\", getIntent().getStringExtra(\"username\"));\n intent.putExtra(\"fullname\", getIntent().getStringExtra(\"fullname\"));\n intent.putExtra(\"email\", getIntent().getStringExtra(\"email\"));\n intent.putExtra(\"password\", getIntent().getStringExtra(\"password\"));\n\n // pass data from Stage2\n intent.putExtra(\"gender\", gender);\n intent.putExtra(\"birth\", birth);\n\n getApplicationContext().startActivity(intent);\n finish();\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tIntent intent = new Intent(DeviceActivity.this, sdw.com.CountyActivity.class);// ����������Activity\n\t\t\t\t Bundle bundle = new Bundle(0); \n\t bundle.putString(\"fun1\",transferValue);\n\t Log.e(\"TAG\",transferValue);\n\t bundle.putString(\"search1\",\"btnRunRecord\"); \n\t intent.putExtras(bundle);//can't \n\t\t\t\tstartActivity(intent);\n//\t\t\t\tfinish();\n\t\t\t}", "@Override\r\n\tpublic void onClick(View v) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry {\r\n\t\t\t//===== Get Selected user values======//\r\n\t\t\tString userName = (String) sp.getSelectedItem();\r\n\t\t\titerator = db.rawQuery(\"SELECT * FROM UserStage WHERE User='\"\r\n\t\t\t\t\t+ userName + \"';\", null);\r\n\t\t\titerator.moveToFirst();\r\n\t\t\tint stage = iterator.getInt(iterator.getColumnIndex(\"Stage\"));\r\n\t\t\tint level = iterator.getInt(iterator.getColumnIndex(\"Level\"));\r\n\t\t\titerator.close();\r\n\t\t\tdb.close();\r\n\t\t\t//===== Get Selected user values======//\r\n\t\t\t\r\n\t\t\t//===== Start The Game ======//\r\n\t\t\tController.stage=stage;\r\n\t\t\tController.setUserName(userName);\r\n\t\t\tnew MyProgressBarMenu(getApplicationContext(),this, level).execute();\r\n\t\t\t//===== Start The Game ======//\r\n\t\t} catch (Exception e) {\r\n\t\t\tMyAlertBox mab=new MyAlertBox(this,\"2: \" + e.getMessage());\r\n\t\t}\r\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\ttry {\n\t\t\t\n\t\t\tswitch(requestCode){\n\t\t\tcase(222):{\n\t\t\t\tif(resultCode==Activity.RESULT_OK){\n\t\t\t\t\tString selectedContact=data.getDataString();\n\t\t\t\t\ttvSecondActivity.setText(selectedContact.toString());\n\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW,Uri.parse(selectedContact));\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\ttvSecondActivity.setText(\"Selection CANCELLED\"+requestCode+\"\"+resultCode);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tToast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t}\n\t}" ]
[ "0.6145682", "0.6131977", "0.609299", "0.6057293", "0.59831864", "0.59470767", "0.5940597", "0.59235036", "0.59235036", "0.59056413", "0.58479506", "0.58390725", "0.581895", "0.57597584", "0.5732908", "0.57241064", "0.57238287", "0.5651309", "0.56431395", "0.56399584", "0.5607193", "0.5594228", "0.556939", "0.556389", "0.5550673", "0.5542346", "0.5534695", "0.55338347", "0.5529672", "0.55234396", "0.55227953", "0.55154485", "0.5514687", "0.5506812", "0.5490654", "0.54853505", "0.5479111", "0.5478359", "0.54781926", "0.54772955", "0.54658824", "0.5460456", "0.5458977", "0.5457986", "0.5444989", "0.544083", "0.5431073", "0.5425721", "0.54248506", "0.54090804", "0.54056984", "0.5404987", "0.5402813", "0.5399837", "0.5394275", "0.5393237", "0.5385277", "0.53765625", "0.5371418", "0.53702515", "0.536921", "0.5365261", "0.53600234", "0.5358765", "0.5354437", "0.5350611", "0.53464174", "0.5345329", "0.5341425", "0.5337251", "0.5332711", "0.53295046", "0.5326508", "0.5321658", "0.5320828", "0.53204954", "0.5309941", "0.53099173", "0.5309901", "0.5309748", "0.5303842", "0.5302187", "0.5300983", "0.5299337", "0.529794", "0.52970517", "0.5297", "0.52961105", "0.52949107", "0.5294577", "0.52944493", "0.5292384", "0.5291428", "0.5291222", "0.528992", "0.5284606", "0.5284122", "0.5282476", "0.52756923", "0.5271688" ]
0.6297704
0
Check empty services, return true if no service has been selected
private boolean CheckEmptyServices(List<Services> services){ for(Services service : services){ if(service.getServiceQuantity() > 0){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasService();", "boolean hasServiceList();", "boolean isSetListOfServiceElements();", "public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }", "public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }", "public boolean hasService() {\n return serviceBuilder_ != null || service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "public boolean hasService() {\n return service_ != null;\n }", "boolean hasServiceName();", "boolean hasServiceName();", "boolean hasServiceCmd();", "public boolean hasService() {\n return fieldSetFlags()[1];\n }", "public boolean serviceDirectoryIsEmpty(String serviceID){\n if(servicesDirectories.containsKey(serviceID)){\n \n //Get directory associated to serviceID\n File dir = servicesDirectories.get(serviceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n return listOfFiles.length == 0;\n }\n \n return true;\n \n }", "boolean isSetServiceId();", "public boolean isEmpty(){\n\t\tif(this.mVehicles.size() == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private boolean servicesAvailable() {\n int resultCode = GooglePlayServicesUtil.\n isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == resultCode) {\n log(\"Google Play services is available\");\n return true;\n } else {\n log(\"Google Play services is not available\");\n showErrorDialog(resultCode);\n return false;\n }\n }", "public boolean isEmpty() {\r\n return tasks.isEmpty();\r\n }", "private boolean isEmpty(){\n return (numInstances() == 0);\n }", "public boolean isServiceDone(){\n if(boundNewsService != null) {\n return boundNewsService.isServiceDone();\n }\n\n //if there is no bound service then an orientation change has occurred and the service should\n //already be executed and over\n return true;\n }", "public boolean setServices(ServiceCombo aNewServices)\n {\n boolean wasSet = false;\n if (aNewServices != null)\n {\n services = aNewServices;\n wasSet = true;\n }\n return wasSet;\n }", "public boolean isSetSoap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SOAP$2) != 0;\n }\n }", "public void _getAvailableServiceNames() {\n services = oObj.getAvailableServiceNames();\n\n for (int i = 0; i < services.length; i++) {\n log.println(\"Service\" + i + \": \" + services[i]);\n }\n\n tRes.tested(\"getAvailableServiceNames()\", services != null);\n }", "public boolean noDaySelected() {\n return selectedDays.size() == 0;\n }", "public boolean noDaySelected() {\n return selectedDays.size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return this.count() == 0;\n }", "boolean isSetServiceConfigurationList();", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasServiceName() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@Override\n public boolean hasServiceCmd() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "@Override\n public boolean hasServiceCmd() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean isEmpty() {\n return attestationsByValidatorCount.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn allItems.size() == 0;\n\t}", "public boolean isEmpty(){\n\t\treturn setCommands.isEmpty();\n\t}", "boolean isItEmpty(){\n\t\t\tif (this.items.isEmpty() && (this.receptacle.isEmpty() || findSpecialtyContainers())){//if there's nothing in there.\n\t\t\t\tSystem.out.println(\"\\nThere's nothing here to do anything with.\");\n\t\t\t\treturn true;}\n\t\t\treturn false;\n\t\t}", "public synchronized boolean isEmpty(){\n boolean isEmpty = true;\n for(ShoppingCartItem item : getItems()){\n if(item!=null)\n isEmpty=false;\n }\n return isEmpty;\n }", "boolean isEmpty() {\n return mapped_vms.isEmpty();\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn(size() == 0);\n\t}", "public boolean isEmpty() {\n lock.lock();\n try {\n return active == null && tasks.isEmpty();\n } finally {\n lock.unlock();\n }\n }", "private Boolean checkForEmptyList() {\n Boolean emptyListAvailable = tin_perLitrePrice.getText().toString().trim().isEmpty() ||\n tin_fuelQuantityLitres.getText().toString().trim().isEmpty() ||\n tin_totalFuelPrice.getText().toString().trim().isEmpty() ||\n tin_currentKm.getText().toString().trim().isEmpty() ||\n tin_startingKm.getText().toString().trim().isEmpty() ||\n tin_distanceCovered.getText().toString().trim().isEmpty() ||\n tv_calculatedAverage_addEdit.getText().toString().trim().isEmpty() ||\n tv_coverableDistance_addEdit.getText().toString().trim().isEmpty() ||\n tv_nextFuelFill_addEdit.getText().toString().trim().isEmpty();\n\n if (emptyListAvailable) {\n validationList(); // set error messages\n }\n Log.d(TAG, \"checkForEmptyList: emptyListAvailable = \" + emptyListAvailable);\n\n\n return emptyListAvailable; //\n }", "public boolean isServicesDiSplayed() {\r\n\t\treturn isDisplayed(servicesTextLocator);\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "public boolean checkIsEmpty() {\n return isEmpty(minimumInstances) && isEmpty(maximumInstances) && isEmpty(dependentProfiles);\n }", "public boolean isEmpty() {\n boolean response = false;\n if (size == 0) {\n response = true;\n }\n return response;\n }", "public boolean isEmpty() {\r\n return items.isEmpty();\r\n }", "public boolean isEmpty(){\n return(numItems == 0);\n }", "boolean checkIfEmpty();", "public boolean isEmpty() {\n return items.isEmpty();\n }", "public boolean isEmpty() {\n return items.isEmpty();\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn frontier.isEmpty();\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\tif(this.vector.isEmpty()) return true;\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n\t\treturn memberNo == 0 && (name == null || name.isEmpty()) && minTotalPrice == 0 && maxTotalPrice == 0\n\t\t && getBeginOrderDate() == null && getEndOrderDate() == null;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\tif(size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isEmpty() {\n\t\treturn callbacks.isEmpty();\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn count == 0;\r\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn numItems == 0 ;\r\n\t}", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "@Override\n public boolean isEmpty() {\n return this.size == 0;\n }", "@java.lang.Override\n public boolean hasServiceList() {\n return endpointConfigCase_ == 3;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn first == null;\n\t}", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty(){\n return itemCount == 0;\n }", "@Override\n public boolean isEmpty() {\n return filtered.isEmpty();\n }", "public boolean isEmpty() {\r\n return NumItems == 0;\r\n }", "public boolean isSelectionEmpty()\n/* */ {\n/* 215 */ return this.selectedDates.isEmpty();\n/* */ }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "public boolean isEmpty() {\n\t\treturn vector.isEmpty();\n\t}", "@Override\n public boolean isEmpty() {\n return this.size==0;\n }", "@java.lang.Override\n public boolean hasServiceList() {\n return endpointConfigCase_ == 3;\n }", "public boolean exists() {\n return exists(Datastore.fetchDefaultService());\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tboolean respuesta = true;\n\t\tif(N > 0)\n\t\t{\n\t\t\trespuesta = false;\n\t\t}\n\t\treturn respuesta;\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\tboolean bandera=true;\r\n\t\tif(vector.size()>0){\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tbandera=false;\r\n\t\t}\r\n\t\treturn bandera;\r\n\t}", "@Override\n public boolean isEmpty() {\n if(first == null){ //if first element does not exist, the whole is empty\n return true;\n }\n else{\n return false; //if first element exist, list is not empty\n }\n }", "@Override\n public boolean isEmpty(){\n return (count == 0);\n }", "public boolean isEmpty(){\n return (numItems==0);\n }", "public boolean isEmpty() {\n // YOUR CODE HERE\n return true;\n }", "public boolean isEmpty(){\n return itemCount == 0;\n }", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n public boolean isEmpty() {\n if (count == 0) {\n return true;\n }\n return false;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn set.isEmpty();\r\n\t}", "@Override\n\tpublic boolean isEmpty() throws RemoteException {\n\t\treturn bnetMap.size() == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn list.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn (_items.size() == 0);\n\t}", "public boolean ignoreService() {\n if (\"undef\".equalsIgnoreCase(type) || \"undef,1.0\".equalsIgnoreCase(type))\n return true;\n return false;\n }", "public boolean isEmpty() {\n return userListCtrl.isEmpty();\n }", "public boolean isSetEndpoints()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(ENDPOINTS$0) != 0;\r\n }\r\n }", "public boolean isEmpty(){\r\n\t\treturn size() == 0;\r\n\t}" ]
[ "0.7031156", "0.7031156", "0.7031156", "0.7031156", "0.7031156", "0.7016881", "0.69657934", "0.68230337", "0.68230337", "0.68230337", "0.67917717", "0.67917717", "0.67917717", "0.6766815", "0.6766815", "0.6660843", "0.6331738", "0.6311997", "0.6277263", "0.62264895", "0.6082568", "0.60694027", "0.6062273", "0.60595405", "0.6058226", "0.6028876", "0.60117084", "0.60102624", "0.60102624", "0.60064703", "0.6002133", "0.5999702", "0.5999702", "0.59931755", "0.59931755", "0.5991332", "0.59878296", "0.5986913", "0.59818053", "0.59808135", "0.59744954", "0.59715974", "0.59564483", "0.5953881", "0.59497064", "0.5923338", "0.5920736", "0.59195065", "0.59043264", "0.590169", "0.5899734", "0.58988225", "0.5898704", "0.5885021", "0.5885021", "0.5879537", "0.58792", "0.587901", "0.5873845", "0.58712316", "0.58681065", "0.586771", "0.58646876", "0.5863004", "0.58587325", "0.5857292", "0.5856056", "0.5850255", "0.5850255", "0.5850255", "0.5850255", "0.5850255", "0.5847613", "0.5845104", "0.58445793", "0.58381563", "0.5834177", "0.5834177", "0.5829965", "0.58272964", "0.5826688", "0.58266807", "0.58263546", "0.5825435", "0.5823345", "0.5820609", "0.5818959", "0.5810671", "0.5807408", "0.5806787", "0.5803277", "0.5797323", "0.5794073", "0.57881165", "0.57881165", "0.57873714", "0.57857007", "0.5780047", "0.57775813", "0.57759506" ]
0.81688744
0
Update selection choice for Spinners
private void UpdateDataForSpinner(Spinner spinner){ // Create an ArrayAdapter using the string array and a default spinner layout ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.serviceQuantity, android.R.layout.simple_spinner_item); // Specify the layout to use when the list of choices appears adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // Apply the adapter to the spinner spinner.setAdapter(adapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateSelection() {\n\t\t\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n choice=pos;\n }", "private void updateSubModeSpinnerTexts() {\n\n }", "public void setSelection(T t) {\n\t\tspinner.setSelection(adapter.getPosition(t));\n\t}", "private void updateSpinner() {\n ArrayAdapter<CharSequence> adaptador = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item,nombresEnComboBox);\n spinner.setAdapter(adaptador);\n //guardo el item seleccionado del combo\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n nombreDeLocSeleccionada[0] = (String) spinner.getAdapter().getItem(i);\n for (int j=0 ; j < listaLocalidades.size() ; j++){\n if (listaLocalidades.get(j).getNombreLocalidad().equals(nombreDeLocSeleccionada[0])) {\n idLoc = listaLocalidades.get(j).getIdLocalidad() ;\n break;\n }\n }\n //Toast.makeText(getActivity(), nombreDeLocSeleccionada[0], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n }", "private void setupSpinners() {\n\n ArrayAdapter<String> statesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, states);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n statesAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // Apply the adapter to the spinner\n statesAdapter.notifyDataSetChanged();\n mStateSpinner.setAdapter(statesAdapter);\n\n // Set the integer mSelected to the constant values\n mStateSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n mState = (String) parent.getItemAtPosition(position);\n setUpStatesSpinner(position);\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n // Unknown\n }\n });\n }", "@FXML\n private void updateSelectedPairing(String pairing)\n {pairingSelected.setText(pairing);}", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "private void setSpinner(){\n for (String id : activity.getCollectedIDs()){\n if (activity.getCoinsCollection().containsKey(id)) {\n Coin tempCoin = activity.getCoinsCollection().get(id);\n assert tempCoin != null;\n if(!tempCoin.isBanked() && !tempCoin.isTransferred()) {\n spinnerItems.add(tempCoin);\n }\n }\n }\n\n //sort coins on gold value descending\n spinnerItems.sort((a, b) ->\n a.getValue() * activity.getExchangeRates().get(a.getCurrency())\n < b.getValue() * activity.getExchangeRates().get(b.getCurrency()) ? 1 : -1);\n\n ArrayAdapter<Coin> spinnerArrayAdapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), R.layout.spinner_item, spinnerItems);\n spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n spinner.setAdapter(spinnerArrayAdapter);\n }", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_supplier_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n supplierSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mSupplierSpinner.setAdapter(supplierSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mSupplierSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.supplier_one))) {\n mSupplier = BookEntry.SUPPLIER_ONE;\n } else if (selection.equals(getString(R.string.supplier_two))) {\n mSupplier = BookEntry.SUPPLIER_TWO;\n } else {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n });\n }", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter fruitSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_fruit_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n fruitSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mTypeSpinner.setAdapter(fruitSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.apple))) {\n mFruit = FruitEntry.TYPE_APPLE;\n } else if (selection.equals(getString(R.string.banana))) {\n mFruit = FruitEntry.TYPE_BANANA;\n } else if (selection.equals(getString(R.string.peach))) {\n mFruit = FruitEntry.TYPE_PEACH;\n } else if (selection.equals(getString(R.string.pineapple))) {\n mFruit = FruitEntry.TYPE_PINEAPPLE;\n } else if (selection.equals(getString(R.string.strawberry))) {\n mFruit = FruitEntry.TYPE_STRAWBERRY;\n } else if (selection.equals(getString(R.string.watermelon))) {\n mFruit = FruitEntry.TYPE_WATERMELON;\n } else {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n });\n }", "private void povoarSpinners() {\n List<String> lista = new ArrayList<>();\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[1]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[2]);\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnNivel.setAdapter(arrayAdapter);\n lista = new ArrayList<>();\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[1]);\n arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnEstado.setAdapter(arrayAdapter);\n }", "@Override // com.oneplus.settings.ringtone.OPRingtoneBaseActivity\n public void updateSelected() {\n if (this.mSystemRings == null) {\n }\n }", "@Override\r\n public void onItemChosen(View labelledSpinner, AdapterView<?> adapterView, View itemView, int position, long id) {\r\n String selectedText = adapterView.getItemAtPosition(position).toString();\r\n switch (labelledSpinner.getId()) {\r\n case R.id.spinner_planets:\r\n //Toast.makeText(getActivity(), \"Selected: \" + selectedText, Toast.LENGTH_SHORT).show();\r\n selectTextSpinner = selectedText;\r\n break;\r\n // If you have multiple LabelledSpinners, you can add more cases here\r\n }\r\n }", "public void onItemSelected(AdapterView<?> spinner, View arg1, int position, long row_id) {\n switch (spinner.getId()) {\n case R.id.spin1: {\n if(position == 0) numbersOfTotalSets = 5;\n else numbersOfTotalSets = 3;\n break;\n }\n case R.id.spin2: {\n if(position == 0) setFinishingScore = 25;\n else setFinishingScore = 15;\n break;\n }\n case R.id.spin3: {\n if(position == 0) tieBreakerScore = 15;\n else tieBreakerScore = 25;\n break;\n }\n }\n }", "@Override\n public void onIndicatorSelected(int index) {\n setSelect(index);\n }", "public void setupPrioritySpinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(),\n R.array.prirority_level_list, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mPriority.setAdapter(adapter);\n mPriority.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n removeFocusFromEditText();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }", "public void setSelection (int index) {\r\n\tcheckWidget();\r\n\tsetSelection (index, false);\r\n}", "public void onItemSelected(AdapterView<?> adapterView, \n\t\t View view, int i, long l) {\n\t\t \tString selected2 = colorGraySpin.getSelectedItem().toString();\n\t\t\t Toast.makeText(PainActivity.this,\"You Selected : \"\n\t\t\t + selected2,Toast.LENGTH_SHORT).show(); \n\t\t if (selected2.equals(\"Colorscale\")) {\n\t\t \t setColorBrush(false);\n\t\t } else{\n\t\t \t setColorBrush(true);\n\t\t }\n\t\t \t\n\t\t }", "@Override\n protected void updateModelFromUi(@Nullable Selection<DataType> selection) {\n try {\n selection.setSelected(theCheckBox.isChecked());\n Logger.debug(\"Updated selection: \" + selection.toString());\n\n } catch (Exception e) {\n Logger.error(\"Failed to update selection\", e);\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n choice=0;\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tif (spinner3.getSelectedItem().equals(\"Sedentary\")) {\n\t\t\t\t\tactive = 1.2;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Lightly Active\")) {\n\t\t\t\t\tactive = 1.375;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\n\t\t\t\t\t\t\"Moderately Active\")) {\n\t\t\t\t\tactive = 1.55;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Highly Active\")) {\n\t\t\t\t\tactive = 1.725;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Extra Active\")) {\n\t\t\t\t\tactive = 1.9;\n\t\t\t\t}\n\t\t\t}", "private void setUpSpinner(){\n ArrayAdapter paymentSpinnerAdapter =ArrayAdapter.createFromResource(this,R.array.array_gender_option,android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line, then apply adapter to the spinner\n paymentSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n mPaymentSpinner.setAdapter(paymentSpinnerAdapter);\n\n // To set the spinner to the selected payment method by the user when clicked from cursor adapter.\n if (payMode != null) {\n if (payMode.equalsIgnoreCase(\"COD\")) {\n mPaymentSpinner.setSelection(0);\n } else {\n mPaymentSpinner.setSelection(1);\n }\n mPaymentSpinner.setOnTouchListener(mTouchListener);\n }\n\n mPaymentSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedPayment = (String)parent.getItemAtPosition(position);\n if(!selectedPayment.isEmpty()){\n if(selectedPayment.equals(getString(R.string.payment_cod))){\n mPaymentMode = clientContract.ClientInfo.PAYMENT_COD; // COD = 1\n }else{\n\n mPaymentMode = clientContract.ClientInfo.PAYMENT_ONLINE; // ONLINE = 0\n }\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n }", "public void setSelection(Pair selection);", "private void workTypeSpinnerRefreshHack() {\n\t\tthis.workTypeAdapter.notifyDataSetChanged();\n\t\tworkTypeNameSpinner = (Spinner)findViewById(R.id.workTypeNameSpinner);\n workTypeAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item,workTypeList);\n workTypeAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n workTypeNameSpinner.setOnItemSelectedListener(this);\n workTypeNameSpinner.setAdapter(workTypeAdapter);\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n if(position==0)\n p=1;\n if(position==1)\n p=2;\n if(position==2)\n p=3;\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view,\n int position, long id) {\n //So this code is called when ever the spinner is clicked\n //Brug position til at populate editQty med indhold fra QtySpinner\n editQty.setText(\"\");\n editQty.clearFocus();\n }", "@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n switch (position) {\r\n case 0:\r\n mode = 1;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 1:\r\n mode = 2;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 2:\r\n mode = 3;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n }\r\n }", "private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\tlong id) {\n\t\tInteger currentSpinner = arg0.getId();\n\t\tString stat\n\t\t\t\t, processedStat;\n\t\t//We check what spinner it is.\n\t\tswitch(currentSpinner){\n\t\tcase R.id.raceSpinner:\n\t\t\tpointPool = numberOfDistributionalPoints;\n\t\t\tpointPoolTV.setText(Integer.toString(pointPool));\n\t\t\t//We set value from table with data.\n\t\t\tprocessedStat = processStat(0);\t\t//It only processes hp (0) and mana (1)\n\t\t\tbaseHPTV.setText(processedStat);\n\t\t\tstatsArray.set(0, Integer.parseInt(processedStat));\n\t\t\t\n\t\t\tprocessedStat = processStat(1);\t\t//It only processes hp (0) and mana (1)\n\t\t\tbaseManaTV.setText(processedStat);\n\t\t\tstatsArray.set(1, Integer.parseInt(processedStat));\n\t\t\t\n\t\t\tstat = racesList.get(3).get((int) id);\n\t\t\tstrTV.setText(stat);\n\t\t\tstatsArray.set(2, Integer.parseInt(stat));\n\t\t\t\n\t\t\tstat = racesList.get(4).get((int) id);\n\t\t\tagiTV.setText(stat);\n\t\t\tstatsArray.set(3, Integer.parseInt(stat));\n\t\t\t\n\t\t\tstat = racesList.get(5).get((int) id);\n\t\t\tintTV.setText(stat);\n\t\t\tstatsArray.set(4, Integer.parseInt(stat));\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.classSpinner:\n\t\t\tpointPool = numberOfDistributionalPoints;\n\t\t\tpointPoolTV.setText(Integer.toString(pointPool));\n\t\t\t//We set value from table with data.\n\t\t\tprocessedStat = processStat(0);\t\t//It only processes hp (0) and mana (1)\n\t\t\tbaseHPTV.setText(processedStat);\n\t\t\tstatsArray.set(0, Integer.parseInt(processedStat));\n\t\t\t\n\t\t\tprocessedStat = processStat(1);\t\t//It only processes hp (0) and mana (1)\n\t\t\tbaseManaTV.setText(processedStat);\n\t\t\tstatsArray.set(1, Integer.parseInt(processedStat));\n\t\t\t\n\t\t\tstat = racesList.get(3).get((int) racesSpinner.getSelectedItemId());\n\t\t\tstrTV.setText(stat);\n\t\t\tstatsArray.set(2, Integer.parseInt(stat));\n\t\t\t\n\t\t\tstat = racesList.get(4).get((int) racesSpinner.getSelectedItemId());\n\t\t\tagiTV.setText(stat);\n\t\t\tstatsArray.set(3, Integer.parseInt(stat));\n\t\t\t\n\t\t\tstat = racesList.get(5).get((int) racesSpinner.getSelectedItemId());\n\t\t\tintTV.setText(stat);\n\t\t\tstatsArray.set(4, Integer.parseInt(stat));\n\t\t\tbreak;\n\t\t}\n\t}", "protected void setChoice(int index) {\n\t\tchoiceOption = getOption(index);\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n spinnerItemSelected = parent.getItemAtPosition(pos).toString();\n }", "@Override\n\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\t\tPrefs.getInstance(getApplication()).setPrioritySelection(position);\n\t}", "public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n Spinner spinner = (Spinner) parent;\n Integer tag = (Integer) spinner.getTag();\n int tagValue = tag.intValue();\n switch (tagValue)\n {\n case VIEWED_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByViewed))\n {\n bChange = true;\n }\n if (pos == 0)\n {\n orderByViewed = \"album_name ASC\";\n }\n else\n {\n orderByViewed = \"album_name DESC\";\n }\n if (bChange) {\n orderBy = orderByViewed;\n }\n }\n break;\n\n case PRICE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByPrice))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByPrice = \"price DESC\";\n }\n else\n {\n orderByPrice = \"price ASC\";\n }\n if (bChange) {\n orderBy = orderByPrice;\n }\n }\n break;\n\n case RATINGS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByRatings))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByRatings = \"ratings DESC\";\n }\n else\n {\n orderByRatings = \"ratings ASC\";\n }\n if (bChange) {\n orderBy = orderByRatings;\n }\n }\n break;\n\n case YEAR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByYear))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByYear = \"year DESC\";\n }\n else\n {\n orderByYear = \"year ASC\";\n }\n if (bChange) {\n orderBy = orderByYear;\n }\n }\n break;\n\n case BEDS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBeds))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBeds = \"beds DESC\";\n }\n else\n {\n orderByBeds = \"beds ASC\";\n }\n if (bChange) {\n orderBy = orderByBeds;\n }\n }\n break;\n\n case BATHS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBaths))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBaths = \"baths DESC\";\n }\n else\n {\n orderByBaths = \"baths ASC\";\n }\n if (bChange) {\n orderBy = orderByBaths;\n }\n }\n break;\n\n case AREA_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByArea))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByArea = \"area DESC\";\n }\n else\n {\n orderByArea = \"area ASC\";\n }\n if (bChange) {\n orderBy = orderByArea;\n }\n }\n break;\n\n case MAKE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByMake))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByMake = \"make ASC\";\n }\n else\n {\n orderByMake = \"make DESC\";\n }\n if (bChange) {\n orderBy = orderByMake;\n }\n }\n break;\n\n case MODEL_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByModel))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByModel = \"model ASC\";\n }\n else\n {\n orderByModel = \"model DESC\";\n }\n if (bChange) {\n orderBy = orderByModel;\n }\n }\n break;\n\n case COLOR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByColor))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByColor = \"color ASC\";\n }\n else\n {\n orderByColor = \"color DESC\";\n }\n if (bChange) {\n orderBy = orderByColor;\n }\n }\n break;\n\n\n\n default:\n break;\n }\n\n }", "@Override\r\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tsize = (int) spinnerModel.getValue();\r\n\t\t\t\t\tcanvas.repaint();\r\n\t\t\t\t}", "public void setSelection( final int value ) {\n checkWidget();\n if( value < minimum ) {\n selection = minimum;\n } else if ( value > maximum - thumb ) {\n selection = maximum - thumb;\n } else {\n selection = value;\n }\n }", "@Override\n public void onClick(View v)\n {\n mySpinner.performClick();\n int getPosition = (Integer) v.getTag();\n\n toggleSelection(getPosition);\n\n\n notifyDataSetChanged();\n\n /**\n * if clicked position is one\n * that means you want clear all select item in list\n */\n /* if (getPosition == 1)\n {\n clearList();\n }\n */\n /**\n * if clicked position is two\n * that means you want select all item in list\n */\n /* else if (getPosition == 2)\n {\n fillList();\n }*/\n }", "public void updateSelectionMode() {\n final int numSelected = getSelectedCount();\n if ((numSelected == 0) || mDisableCab || !isViewCreated()) {\n finishSelectionMode();\n return;\n }\n if (isInSelectionMode()) {\n updateSelectionModeView();\n } else {\n mLastSelectionModeCallback = new SelectionModeCallback();\n getActivity().startActionMode(mLastSelectionModeCallback);\n }\n }", "public void updateComboLang() {\n this.pawnSwitcher.updatePrompt();\n }", "@Then(\"^I choose the park on combobox$\")\n public void i_choose_the_park_on_combobox() {\n onViewWithId(R.id.spinnerParks).click();\n onViewWithText(\"Parque D\").isDisplayed();\n onViewWithText(\"Parque D\").click();\n }", "private void selectRandom() {\n\n\t\tRandom randomise;\n\n\t\t// Select random char from Spinner only if it is enabled\n\t\tif (solo.getCurrentSpinners().get(0).isEnabled()) {\n\t\t\trandomise = new Random();\n\t\t\trandomCharPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t\t.getCount());\n\n\t\t\tsolo.pressSpinnerItem(0, randomCharPos);\n\t\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\t\trandomChar = solo.getCurrentSpinners().get(0).getSelectedItem()\n\t\t\t\t\t.toString();\n\t\t}\n\n\t\t// Select random act from Spinner\n\t\trandomise = new Random();\n\t\trandomActPos = randomise.nextInt(solo.getCurrentSpinners().get(1)\n\t\t\t\t.getCount());\n\n\t\tsolo.pressSpinnerItem(1, randomActPos);\n\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\trandomAct = solo.getCurrentSpinners().get(1).getSelectedItem()\n\t\t\t\t.toString();\n\n\t\t// Select random page from Spinner\n\t\trandomise = new Random();\n\t\trandomPagePos = randomise.nextInt(solo.getCurrentSpinners().get(2)\n\t\t\t\t.getCount());\n\n\t\tsolo.pressSpinnerItem(2, randomPagePos);\n\t\tsolo.goBackToActivity(\"OptionsActivity\");\n\n\t\trandomPage = solo.getCurrentSpinners().get(2).getSelectedItem()\n\t\t\t\t.toString();\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }", "private void updateSelectionModeView() {\n mSelectionMode.invalidate();\n }", "private void assignSpinner(int i, String s) {\n switch (s) {\n case \"Bitters\":\n ArrayAdapter<String> bittersAdapter;\n bittersAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, bitters);\n bittersAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(bittersAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Gin\":\n ArrayAdapter<String> ginAdapter;\n ginAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, gin);\n ginAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(ginAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Rum\":\n ArrayAdapter<String> rumAdapter;\n rumAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, rum);\n rumAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(rumAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Tequila\":\n ArrayAdapter<String> tequilaAdapter;\n tequilaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, tequila);\n tequilaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(tequilaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vodka\":\n ArrayAdapter<String> vodkaAdapter;\n vodkaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vodkaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vodkaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vermouth\":\n ArrayAdapter<String> vermouthAdapter;\n vermouthAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vermouthAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vermouthAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Whiskey\":\n ArrayAdapter<String> whiskeyAdapter;\n whiskeyAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, whiskey);\n whiskeyAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(whiskeyAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n }\n }", "public void changeComboOption(int numAnswers) {\n\t\tif(numAnswers == 2)\n\t\t\tanswerChoiceList.setSelectedIndex(0);\n\t\telse if(numAnswers == 3)\n\t\t\tanswerChoiceList.setSelectedIndex(1);\n\t\telse if(numAnswers == 4)\n\t\t\tanswerChoiceList.setSelectedIndex(2);\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n tuning = position;\n setUpDisplay();\n\n // Showing selected spinner item\n if (tuner1 == 3) {\n Toast.makeText(TunerActivity.this, \"\" + item, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int pos,\n long arg3) {\n financialYr = String.valueOf(chooseyrSpiner.getSelectedItem());\n\n }", "private void select(JSpinner spinner) {\n/* 194 */ JComponent editor = spinner.getEditor();\n/* */ \n/* 196 */ if (editor instanceof JSpinner.DateEditor) {\n/* */ \n/* 198 */ JSpinner.DateEditor dateEditor = (JSpinner.DateEditor)editor;\n/* 199 */ JFormattedTextField ftf = dateEditor.getTextField();\n/* 200 */ Format format = dateEditor.getFormat();\n/* */ \n/* */ Object value;\n/* 203 */ if (format != null && (value = spinner.getValue()) != null) {\n/* */ \n/* 205 */ SpinnerDateModel model = dateEditor.getModel();\n/* 206 */ DateFormat.Field field = DateFormat.Field.ofCalendarField(model.getCalendarField());\n/* */ \n/* 208 */ if (field != null) {\n/* */ \n/* */ try {\n/* */ \n/* 212 */ AttributedCharacterIterator iterator = format.formatToCharacterIterator(value);\n/* 213 */ if (!select(ftf, iterator, field) && field == DateFormat.Field.HOUR0)\n/* */ {\n/* 215 */ select(ftf, iterator, DateFormat.Field.HOUR1);\n/* */ }\n/* 217 */ } catch (IllegalArgumentException iae) {}\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "@Test\n public final void testModifySpinners() {\n int rows = 7;\n int columns = 8;\n spysizedialog.getRowSpinner().setValue(rows);\n spysizedialog.getColumnsSpinner().setValue(columns);\n assertEquals(rows, spysizedialog.getRows());\n assertEquals(columns, spysizedialog.getColumns());\n }", "public void spinner() {\n /**\n * calls if the tasks was weekly, if not, it will be automatically set to \"once\"\n */\n if(weekly) {\n String[] items = new String[]{activity.getResources().getString(R.string.sunday), activity.getResources().getString(R.string.monday), activity.getResources().getString(R.string.tuesday), activity.getResources().getString(R.string.wednesday), activity.getResources().getString(R.string.thursday), activity.getResources().getString(R.string.friday), activity.getResources().getString(R.string.saturday)};\n ArrayAdapter<String> frequencyAdapter = new ArrayAdapter<String>(activity.getBaseContext(), android.R.layout.simple_spinner_dropdown_item, items);\n weekday.setAdapter(frequencyAdapter);\n weekday.getBackground().setColorFilter(activity.getResources().getColor(R.color.colorAccent), PorterDuff.Mode.SRC_ATOP);\n weekday.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n day = String.valueOf(position + 1); //chosen day is stored\n\n }\n\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n } else {\n day = \"8\";\n weekday.setVisibility(View.GONE);\n }\n }", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "void updateSelected(Coord c) {\n this.selected = c;\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n if (syrupM1.getSelectedItemPosition() < 1 && syrupA2.getSelectedItemPosition() < 1 && syrupE3.getSelectedItemPosition() < 1) {\n syrupM1.setSelection(syrupN4.getSelectedItemPosition());\n syrupA2.setSelection(syrupN4.getSelectedItemPosition());\n syrupE3.setSelection(syrupN4.getSelectedItemPosition());\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n mPlayer.changeClass(i);\n updateInfo();\n Toast.makeText(getApplicationContext(), mPlayer.getStatistic(), Toast.LENGTH_SHORT).show();\n }", "void onItemSelected();", "void onItemSelected();", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n if (syrupM1.getSelectedItemPosition() < 1 || syrupE3.getSelectedItemPosition() < 1 || syrupN4.getSelectedItemPosition() < 1) {\n syrupM1.setSelection(syrupA2.getSelectedItemPosition());\n syrupE3.setSelection(syrupA2.getSelectedItemPosition());\n syrupN4.setSelection(syrupA2.getSelectedItemPosition());\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int pos, long arg3) {\n societyName = String.valueOf(societyNameSpinner\n .getSelectedItem());\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n if (syrupM1.getSelectedItemPosition() < 1 || syrupA2.getSelectedItemPosition() < 1 || syrupN4.getSelectedItemPosition() < 1) {\n syrupM1.setSelection(syrupE3.getSelectedItemPosition());\n syrupA2.setSelection(syrupE3.getSelectedItemPosition());\n syrupN4.setSelection(syrupE3.getSelectedItemPosition());\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n }", "private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }", "protected abstract void setupSpinners();", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tint position = gameSpinner.getSelectedItemPosition();\n\t\t\t\t\t\tif (macGames[+position] != \"-- Choose sport --\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\"You have selected \" + macGames[+position],\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();*/\n\t\t\t\t\t\t\tchosenGame = macGames[+position];\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n if (syrupA2.getSelectedItemPosition() < 1 || syrupE3.getSelectedItemPosition() < 1 || syrupN4.getSelectedItemPosition() < 1) {\n syrupA2.setSelection(syrupM1.getSelectedItemPosition());\n syrupE3.setSelection(syrupM1.getSelectedItemPosition());\n syrupN4.setSelection(syrupM1.getSelectedItemPosition());\n }\n\n }", "public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }", "public void onItemSelected(AdapterView<?> adapterView, \n\t\t View view, int i, long l) {\n\t\t \tString selected = spinner.getSelectedItem().toString();\n\t\t\t Toast.makeText(PainActivity.this,\"You Selected : \"\n\t\t\t + selected +\" brush \",Toast.LENGTH_SHORT).show(); \n\t\t \n\t\t \tif (selected.equals(\"Small\")) {\n\t\t \t\tdrawPaint.setStrokeWidth(20);\n\t\t \t} else if (selected.equals(\"Medium\")){\n\t\t \t\tdrawPaint.setStrokeWidth(40);\n\t\t \t} else {\n\t\t \t\tdrawPaint.setStrokeWidth(60);\n\t\t \t}\n\t\t }", "public void updateChooser()\r\n\t{\r\n\t\t/*\twhat shall we do here ? */\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n //NOTE: Position 0 is reserved for the manually added Prompt\n if (position > 0) {\n //Retrieving the Category Name of the selection\n mCategoryLastSelected = parent.getItemAtPosition(position).toString();\n //Calling the Presenter method to take appropriate action\n //(For showing/hiding the EditText field of Category OTHER)\n mPresenter.onCategorySelected(mCategoryLastSelected);\n } else {\n //On other cases, reset the Category Name saved\n mCategoryLastSelected = \"\";\n }\n }", "private void updateEnabledState() {\n updateEnabledState(spinner, spinner.isEnabled()); }", "private void setData() {\n ArrayAdapter<State> adapter = new ArrayAdapter<State>(this, android.R.layout.simple_spinner_dropdown_item, StaticData.getStates());\n stateSpinner.setAdapter(adapter);\n stateSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n selectedState = (State) parent.getSelectedItem();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n if(s1.getSelectedItem().toString().equals(\"3rd Sem\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, MainActivity.sem3);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n if(s1.getSelectedItem().toString().equals(\"4th Sem\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item,MainActivity.sem4);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n if(s1.getSelectedItem().toString().equals(\"5th Sem\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item,MainActivity.sem5);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n if(s1.getSelectedItem().toString().equals(\"6th Sem\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item,MainActivity.sem6);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n if(s1.getSelectedItem().toString().equals(\"7th Sem\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, MainActivity.sem7);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n if(s1.getSelectedItem().toString().equals(\"8th Sem\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item,MainActivity.sem8);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n if(s1.getSelectedItem().toString().equals(\"Select The Semester...\")) {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n dataAdapter.notifyDataSetChanged();\n s2.setAdapter(dataAdapter);\n }\n }", "public void initSpinner() {\n }", "public void onItemSelected(int position);", "@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\t\tif(position!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMyspinner sp = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tencryptedgeoid = new Webservicerequest().Encrypt(sp.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcategory3.addAll(get.getretailersList(encryptedgeoid));\t\n\t\t\t\t\t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3);\n\t\t\t\t\t\t\t\tArrayAdapter<String> adaptervillages = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, get.getVillageNames(encryptedgeoid));\n\t\t\t\t\t\t\t\tvillages.setAdapter(adaptervillages);\n\t\t\t\t\t\t\t\tvillages.setThreshold(3);\n\t\t\t\t\t\t\t\tvillages.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t\t\t InputMethodManager in = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\t\t\t\t in.hideSoftInputFromWindow(villages.getWindowToken(), 0);\n\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tvillages.setAdapter(null);\n\t\t\t\t\t\t\t\tArrayList<HashMap<String, String>> category3=new ArrayList<HashMap<String,String>>();\n\t\t\t\t\t\t\t\tHashMap<String, String> map3=new HashMap<String, String>();\n\t\t\t\t \t\t\t\tmap3.put(\"1\",\"\");\n\t\t\t\t \t\t\t\tmap3.put(\"2\",\"Select Retailer\");\n\t\t\t\t \t\t\t\tcategory3.add(map3);\n\t\t\t\t \t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3); \t\t\t\t \t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter colourSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.phone_colour_array, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n colourSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mColourSpinner.setAdapter(colourSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mColourSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.phone_colour_black))) {\n mColour = PhoneEntry.COLOUR_BLACK;\n } else if (selection.equals(getString(R.string.phone_colour_white))) {\n mColour = PhoneEntry.COLOUR_WHITE;\n } else if (selection.equals(getString(R.string.phone_colour_grey))){\n mColour = PhoneEntry.COLOUR_GREY;\n }\n else {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n });\n\n }", "@Override\n public void onItemSelected(AdapterView<?> adapterView,\n View view, int i, long l) {\n mSpinnerLabel = adapterView.getItemAtPosition(i).toString();\n showText(view);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n calculateCourseStats(pos, 0);\r\n \t\t\t\r\n \t\t\tcourseSpinnerPosition = pos;\r\n \t\t}", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n String taskType = adapterView.getItemAtPosition(i).toString();\n Log.d(TAG, \"SPINNER: \" + taskType);\n\n\n String[] tasks = getResources().getStringArray(R.array.tasktypelist);\n\n if (tasks.length > 0 && taskType.equals(tasks[0])) {\n taskParamsLayout.removeAllViews();\n\n piPointsNo = new EditText(MainActivity.this);\n piPointsNo.setInputType(InputType.TYPE_CLASS_NUMBER);\n piPointsNo.setHint(R.string.taskpi_help_points);\n\n taskParamsLayout.addView(piPointsNo);\n\n }\n\n else if (tasks.length > 1 && taskType.equals(tasks[1])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n else if (tasks.length > 2 && taskType.equals(tasks[2])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n switch (parent.getId())\n {\n case R.id.spiEspecie:\n /**Vericamos si la posicion seleccionada es mayor que cero, ya que el numero 0 es un valor por default\n y no tiene ningun valor en la base de datos*/\n if(position>0)\n {\n\n //Desbloqueamos la base el sepinner de razas\n enableSpinnerAndButton(spiRaza,agregarRaza);\n /**Establecemos un observador para obtener las razas por especie seleccianada, en esta caso este se encarga de actualizar\n * cada vez que agreguemos una nueva raza\n * */\n instanciaDB.getRazaDAO().getAllBreedsFromSpecie(parent.getSelectedItem().toString()).observe(CreacionPerfiles.this,\n new Observer<List<RazaDAO.NombreRaza>>() {\n @Override\n public void onChanged(List<RazaDAO.NombreRaza> nombreRazas) {\n arrayNombreRazas.clear();\n /**Este metodo esta asociado a un Observer que decta cuando se han cambiado los datos para actualizar\n * de forma asincrona, por tal razan validdamos cuando es guardar y cuando es actualizar en caso de ser\n * \"guardar\" entonces solo actualiza el spinner raza cuando se selecciona una especie */\n if (accion == Constantes.GUARDAR) {\n for (RazaDAO.NombreRaza raza : nombreRazas) {\n arrayNombreRazas.add(raza.getNombreRaza());\n }\n }\n else if (accion == Constantes.ACTUALIZAR) {\n for(int i=0;i<nombreRazas.size();i++)\n {\n if(nombreRazas.get(i).getNombreRaza().equals(raza))\n {\n /**Se obtiene la posición y se le suma 1 porque el 0 es el valor por defecto*/\n postionItemRaza =i+1;\n }\n arrayNombreRazas.add(i,nombreRazas.get(i).getNombreRaza());\n }\n }\n\n /** Independientemente si es actualizacion o se esta guardando la opcion por default siempre va e\n * existir por eso se coloca al final de las evaluaciones*/\n arrayNombreRazas.add(0,\"Seleccione Raza\");\n spiRaza.setSelection(postionItemRaza);\n /** Se resetea esta posición con el objetivo que la proxima vez que seleccione una nueva especie y\n * no tenga razas relacionadas en la base de datos, el valor por defecto se seleccione*/\n postionItemRaza=0;\n }\n });\n /**\n * Cada vez que se selecciona una especie se recarga las razas pertenecientes a esa especie, por tanto el primer item seleccionado sea el cero\n * ya que es el valor por defecto \"Seleccione raza\", que le indica al usuario que hacer\n * */\n\n }\n else\n {\n /**Se selecciona el valor po defecto*/\n spiRaza.setSelection(postionItemRaza);\n disableSpinnerAndButton(spiRaza,agregarRaza);\n\n }\n\n\n\n break;\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n }", "public void updateSelection() {\n\t\tint index = shell.getConnectionsCombo().getSelectionIndex();\n\t\tif (profiles.length == 0 || index < 0 || index >= profiles.length) {\n\t\t\tshell.getLblServerNameValue().setText(\"\");\n\t\t\tshell.getLblServerHostValue().setText(\"\");\n\t\t\tshell.getBtnConnect().setEnabled(false);\n\t\t\treturn;\n\t\t}\n\t\tIConnectionProfile profile = profiles[index];\n\t\tshell.getLblServerNameValue().setText(profile.getName() + \" (\" + profile.getUsername() + \")\");\n\t\tshell.getLblServerHostValue().setText(profile.getIP() + \":\" + profile.getPort());\n\t\tshell.getBtnConnect().setEnabled(true);\n\t}", "@Override\r\n\tpublic void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\tlong arg3) {\n\t\tvariety = editvariety.getItemAtPosition(arg2).toString();\r\n\t\tif (variety.equals(\"Select Variety\")) {\r\n\t\t\tVariety = null;\r\n\t\t} else {\r\n\t\t\tVariety = variety;\r\n\t\t}\r\n\t}", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n expertise_selected = adapterView.getItemAtPosition(i).toString();\n }", "public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n userType = (int) arg3;\n /* 将mySpinner 显示*/\n arg0.setVisibility(View.VISIBLE);\n }", "@Override\n public void onItemSelected(View view, int position) {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent,\n View view, int position, long id) {\n mEqualizer.usePreset((short) position);\n// get the number of frequency bands for this equalizer engine\n short numberFrequencyBands = mEqualizer.getNumberOfBands();\n// get the lower gain setting for this equalizer band\n final short lowerEqualizerBandLevel = mEqualizer.getBandLevelRange()[0];\n\n// set seekBar indicators according to selected preset\n for (short i = 0; i < numberFrequencyBands; i++) {\n short equalizerBandIndex = i;\n SeekBar seekBar = (SeekBar) findViewById(equalizerBandIndex);\n// get current gain setting for this equalizer band\n// set the progress indicator of this seekBar to indicate the current gain value\n seekBar.setProgress(mEqualizer\n .getBandLevel(equalizerBandIndex) - lowerEqualizerBandLevel);\n }\n }", "public void populateChoiceBoxes() {\n subjects.setItems(FXCollections.observableArrayList(\"Select\", \"computers\", \"not-computers\", \"subjects\"));\n className.setItems(FXCollections.observableArrayList(\"Select\", \"101\", \"202\", \"303\", \"505\"));\n subjects.getSelectionModel().select(0);\n className.getSelectionModel().select(0);\n this.points.setPromptText(Integer.toString(100));\n\n }", "void setValueFromSpinner(@IdRes int spinnerId, T newItem);", "public void addItemsOnSpinner2() {\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n //Changes capital/language/currency/visa textView based on country spinner selection by corresponding array position\n //The array is searched (deliverable 7)\n asiaCapital.setText(capital[position]);\n asiaLanguage.setText(language[position]);\n asiaCurrency.setText(currency[position]);\n asiaVisa.setText(visa[position]);\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position,\n long id) {\n\n }", "private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }" ]
[ "0.6842235", "0.6743116", "0.66415656", "0.6548555", "0.6470084", "0.64010483", "0.64008725", "0.6331629", "0.6308279", "0.6289834", "0.6282853", "0.6270557", "0.6249893", "0.62477845", "0.62340343", "0.62334204", "0.62017", "0.6191909", "0.61845577", "0.6179369", "0.6114589", "0.611312", "0.6110203", "0.61089844", "0.6079021", "0.60755074", "0.6070942", "0.6069765", "0.60695004", "0.60643077", "0.6061414", "0.60072106", "0.60046643", "0.6003022", "0.5994451", "0.5981036", "0.5979495", "0.5976208", "0.59746784", "0.5963466", "0.59632057", "0.59624994", "0.59546256", "0.59546256", "0.5950177", "0.5944722", "0.59391963", "0.5936762", "0.59332055", "0.59258777", "0.5920771", "0.5906873", "0.5904838", "0.59001434", "0.589943", "0.5898869", "0.5898017", "0.5895491", "0.5895491", "0.5890683", "0.5883575", "0.58784544", "0.5878234", "0.5878234", "0.5878234", "0.58721036", "0.5869947", "0.58608806", "0.58571684", "0.5854528", "0.5853005", "0.5849584", "0.58493227", "0.58430755", "0.5835011", "0.5834732", "0.5828903", "0.58285373", "0.5825192", "0.58136374", "0.5812793", "0.5805673", "0.5805673", "0.5804214", "0.5797517", "0.5796003", "0.5795023", "0.57886493", "0.5787746", "0.5787309", "0.57829916", "0.5782513", "0.57720405", "0.57678914", "0.57598954", "0.5755781", "0.57452786", "0.574487", "0.5743701", "0.5740713" ]
0.5927834
49
Hide Action bar for this particular activity
private void HideActionBar(){ if(getSupportActionBar() != null){ getSupportActionBar().hide(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void hideActionBar() {\n View decorView = getWindow().getDecorView();\n // Hide the status bar.\n int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;\n decorView.setSystemUiVisibility(uiOptions);\n // Hide the action bar\n getSupportActionBar().hide();\n }", "public void hideActionBar(){\n getSupportActionBar().hide();\n yell(\"Hiding action bar\");\n }", "private void hideActionBar(){\n try {getSupportActionBar().hide();}\n catch (NullPointerException e){ Log.e(\"Exception\",\"null\");}\n }", "private void hideOrUnhideSupportActionBar(boolean hide) {\n if ( hide ) {\n actionBar.hide();\n } else {\n actionBar.show();\n }\n }", "protected DisplayRequest actionBarDisplay() {\n return DisplayRequest.NO_ACTION_BAR;\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_FULLSCREEN |\n View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n }", "private void hideStatusBar(){\n try {\n View decorView = getWindow().getDecorView();\n// Hide the status bar.\n int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;\n decorView.setSystemUiVisibility(uiOptions);\n }catch (NullPointerException e){}\n }", "public void hideSystemUI() {\r\n if (PhotoViewActivity.this != null)\r\n PhotoViewActivity.this.runOnUiThread(new Runnable() {\r\n public void run() {\r\n toolbar.animate().translationY(-toolbar.getHeight()).setInterpolator(new AccelerateInterpolator())\r\n .setDuration(240).start();\r\n photoViewActivity.setSystemUiVisibility(\r\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\r\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar\r\n | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar\r\n | View.SYSTEM_UI_FLAG_IMMERSIVE);\r\n fullScreenMode = true;\r\n }\r\n });\r\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "boolean setActionBarVisible(boolean visible);", "private void hideSystemUI() {\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar\n | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); // enter immersive mode\n }", "@Override\r\n\tpublic void HideToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e( \"HideToolBar\");\r\n\t}", "public void toggleHideyBar() {\n // BEGIN_INCLUDE (get_current_ui_flags)\n // The UI options currently enabled are represented by a bitfield.\n // getSystemUiVisibility() gives us that bitfield.\n int uiOptions = getWindow().getDecorView().getSystemUiVisibility();\n int newUiOptions = uiOptions;\n // END_INCLUDE (get_current_ui_flags)\n // BEGIN_INCLUDE (toggle_ui_flags\n\n // Immersive mode: Backward compatible to KitKat (API 19).\n // Note that this flag doesn't do anything by itself, it only augments the behavior\n // of HIDE_NAVIGATION and FLAG_FULLSCREEN. For the purposes of this sample\n // all three flags are being toggled together.\n // This sample uses the \"sticky\" form of immersive mode, which will let the user swipe\n // the bars back in again, but will automatically make them disappear a few seconds later.\n newUiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;//通过异或来使屏幕全屏缩放.\n newUiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;\n newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n getWindow().getDecorView().setSystemUiVisibility(newUiOptions);\n //END_INCLUDE (set_ui_flags)\n }", "public void stopRefreshActionBar() {\n // Stop the action refresh in the action action bar\n if (menu_item_action_refresh_ != null) {\n menu_item_action_refresh_.collapseActionView();\n menu_item_action_refresh_.setActionView(null);\n menu_item_action_refresh_ = null;\n }\n }", "@Override\r\n\tpublic void HideToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e(\"HideToolBar\");\r\n\t}", "public void hideToolbarButtons() {\n Log.i(tag, \"hideToolbarButtons\");\n this.actionBarDrawerToggle.setHomeAsUpIndicator((Drawable) null);\n this.settingsButton.setVisibility(4);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //Show and hide navigation bar (Immersive mode)\n View showAndHideBars = findViewById(R.id.mylayout);\n showAndHideBars.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //Show and hide navigation bar (Immersive mode)\n View showAndHideBars = findViewById(R.id.mylayout);\n showAndHideBars.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "public void setFullscreen(boolean actionBarDisabled) {\n\n if (Build.VERSION.SDK_INT < 16) {\n\n activity.getWindow().setFlags(\n WindowManager.LayoutParams.FLAG_FULLSCREEN,\n WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n } else {\n\n View decorView = activity.getWindow().getDecorView();\n\n // Hide the status bar.\n decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);\n\n // Remember that you should never show the action bar if the\n // status bar is hidden, so hide that too if necessary.\n ActionBar actionBar = activity.getSupportActionBar();\n\n if (actionBar != null && actionBarDisabled) {\n actionBar.hide();\n }\n }\n }", "public void toggleHideyBar() {\n // BEGIN_INCLUDE (get_current_ui_flags)\n // The UI options currently enabled are represented by a bitfield.\n // getSystemUiVisibility() gives us that bitfield.\n int uiOptions = getWindow().getDecorView().getSystemUiVisibility();\n int newUiOptions = uiOptions;\n // END_INCLUDE (get_current_ui_flags)\n // BEGIN_INCLUDE (toggle_ui_flags)\n boolean isImmersiveModeEnabled =\n ((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) == uiOptions);\n if (isImmersiveModeEnabled) {\n Log.i(TAG, \"Turning immersive mode mode off. \");\n } else {\n Log.i(TAG, \"Turning immersive mode mode on.\");\n }\n\n // Immersive mode: Backward compatible to KitKat (API 19).\n // Note that this flag doesn't do anything by itself, it only augments the behavior\n // of HIDE_NAVIGATION and FLAG_FULLSCREEN. For the purposes of this sample\n // all three flags are being toggled together.\n // This sample uses the \"sticky\" form of immersive mode, which will let the user swipe\n // the bars back in again, but will automatically make them disappear a few seconds later.\n newUiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;\n newUiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;\n newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n getWindow().getDecorView().setSystemUiVisibility(newUiOptions);\n //END_INCLUDE (set_ui_flags)\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView. setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize *'hen the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n int flags = View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;\n\n Activity activity = getActivity();\n if (activity != null\n && activity.getWindow() != null) {\n activity.getWindow().getDecorView().setSystemUiVisibility(flags);\n }\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.hide();\n }\n\n }", "public final void invalidateActionBar() {\n if (mActionMode != null) {\n mActionMode.updateActionBar(getSupportActionBar());\n } else {\n updateActionBar(getSupportActionBar());\n }\n }", "void requestActionBar();", "private void initActionBarAutoHide(boolean autoHide) {\n mActionBarAutoHideEnabled = autoHide;\n mActionBarAutoHideMinY = context.getResources().getDimensionPixelSize(\n R.dimen.action_bar_auto_hide_min_y);\n mActionBarAutoHideSensivity = context.getResources().getDimensionPixelSize(\n R.dimen.action_bar_auto_hide_sensivity);\n }", "public void hideToolbarAndSideMenu() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // This locks the drawer so it cant be opened\n drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n\n // Hides the toolbar\n ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams();\n layoutParams.height = 0;\n toolbar.setLayoutParams(layoutParams);\n }\n });\n\n }", "public void hideSystemUI(View view) {\n view.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "public void FullScreencall() {\n View decorView = getWindow().getDecorView();\n int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n decorView.setSystemUiVisibility(uiOptions);\n }", "void hideToolbars();", "public void showActionBar(){\n getSupportActionBar().show();\n yell(\"Showing action bar\");\n }", "public static void hideSystemUI(Window window) {\n \n window.addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE\n | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);\n \n //View.Invisible\n window.getDecorView().setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LOW_PROFILE\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n }", "public void resetToolbar() {\n ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(\"\");\n myMenu.findItem(R.id.share).setVisible(false);\n myMenu.findItem(R.id.delete).setVisible(false);\n }", "@Override\r\n \t public void onSystemUiVisibilityChange(int visibility) {\n \t if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {\r\n \t // TODO: The system bars are visible.\r\n \t \thideSystemUI();\r\n \t } else {\r\n \t // TODO: The system bars are NOT visible. \r\n \t }\r\n \t }", "@TargetApi(14)\r\n private void initActionBar()\r\n {\r\n try\r\n {\r\n ActionBar bar = getActionBar();\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME);\r\n\r\n if (DisplayUtils.hasCentralPane(this))\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n else\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n\r\n if (AndroidVersion.isICSOrAbove())\r\n {\r\n bar.setHomeButtonEnabled(true);\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n Log.e(TAG, Log.getStackTraceString(e));\r\n }\r\n }", "public static void hideSystemUI(Window window) {\n\n // Set the IMMERSIVE flag.\n // Set the content to appear under the system bars so that the content\n // doesn't resize when the system bars hide and show.\n int visibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar\n | View.SYSTEM_UI_FLAG_FULLSCREEN; // hide status bar\n\n if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {\n visibility |= View.SYSTEM_UI_FLAG_IMMERSIVE;\n }\n\n window.getDecorView().setSystemUiVisibility(visibility);\n }", "private void hideSystemUI() {\n // Set the IMMERSIVE flag.\n // Set the content to appear under the system bars so that the content\n // doesn't resize when the system bars hide and show.\n photoView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar\n | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar\n | View.SYSTEM_UI_FLAG_IMMERSIVE);\n isShowingSystemUI = false;\n }", "private void hideMenuScreen()\n {\n logoutButton.setVisibility(textViewLabel.INVISIBLE);\n battleButton.setVisibility(View.INVISIBLE);\n char1.setVisibility(View.INVISIBLE);\n char2.setVisibility(View.INVISIBLE);\n char3.setVisibility(View.INVISIBLE);\n }", "public int onCustomizeActionBar(ActionBar actionBar) {\n return 0;\n }", "public void refreshPlaybackInfoVisibility() {\n LinearLayout fakeSplitActionBar = (LinearLayout) findViewById(R.id.fake_split_action_bar);\n final ActionBar actionBar = getSupportActionBar();\n if (fakeSplitActionBar != null) {\n if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n fakeSplitActionBar.setVisibility(LinearLayout.GONE);\n actionBar.setDisplayShowCustomEnabled(true);\n } else {\n fakeSplitActionBar.setVisibility(LinearLayout.VISIBLE);\n actionBar.setDisplayShowCustomEnabled(false);\n }\n }\n }", "public static void hideKeyboard(Activity activity) {\n activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n }", "@SuppressLint(\"NewApi\")\r\n @TargetApi(Build.VERSION_CODES.HONEYCOMB)\r\n public void setupActionBar() {\r\n\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\r\n // Show the Up button in the action bar.\r\n ActionBar actionBar = getActionBar();\r\n actionBar.setDisplayHomeAsUpEnabled(true);\r\n\r\n }\r\n }", "private static void hideSoftKeyboard(Activity activity) {\n InputMethodManager inputMethodManager =\n (InputMethodManager) activity.getSystemService(\n Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(\n activity.getCurrentFocus().getWindowToken(), 0);\n }", "public static void hideShareAppButton() {\n shareAppButton.hide();\n }", "private void checkShouldChangeNavBarHidden(){\n\n boolean shouldHide = mActionBar.isShowing();\n handleActionBarHidden(shouldHide);\n }", "private void ocultarBarras(){\n View decorView = getWindow().getDecorView();\n int uiOptions = View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_FULLSCREEN;\n decorView.setSystemUiVisibility(uiOptions);\n }", "@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }", "boolean hasActionBar();", "public void hide() {\n \t\tmContext.unregisterReceiver(mHUDController.mConfigChangeReceiver);\n \t\tmHighlighter.hide();\n \t\tmHUDController.hide();\n \t}", "public void hideSoftKeyboard(){\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n // imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "public static void hideSoftKeypad(Context context) {\n Activity activity = (Activity) context;\n if(activity != null) {\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (activity.getCurrentFocus() != null) {\n imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);\n }\n }\n }", "private void configureActionBar() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.setDisplayHomeAsUpEnabled(true);\n }\n }", "private void setupActionBar() {\n\t\tgetActionBar().setDisplayHomeAsUpEnabled(true);\n\t}", "public static void hideKeyboard(Activity instance) \n\t{\n\t\tInputMethodManager imm = (InputMethodManager) instance.getSystemService(Activity.INPUT_METHOD_SERVICE);\n\t imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0); // hide\n\t}", "public static void hideKeyboard(Activity activity) {\n View view = activity.findViewById(android.R.id.content);\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "void hideSoftKeyBoard();", "public void hideKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);\n\t}", "public void onBackPressed()\n {\n hideSystemUI(activity);\n }", "public static void hideSoftKeyboard(Activity activity) {\n if (activity.getCurrentFocus() != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);\n }\n }", "private void layoutActionBar() {\n ActionBar ab = getSupportActionBar();\n if(ab != null) {\n if (mode == 2) {\n ab.setTitle(\"Route Record\");\n } else {\n ab.setTitle(\"Recommend Route\");\n }\n ab.setDisplayHomeAsUpEnabled(true);\n }\n }", "private void actionBarManager() {\n MaterialToolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n }", "@Override\n\tpublic void onHiddenChanged(boolean hidden) {\n\t\tsuper.onHiddenChanged(hidden);\n\t\tif (!hidden) {\n\t\t\tmActionBar.setTitle(\"设置\");\n\t\t\tmActionBar.hideRightView();\n\t\t}\n\t}", "@Override\n public void onSystemUiVisibilityChange(int visibility) {\n if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {\n // TODO: The system bars are visible. Make any desired\n// int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;\n//\n// int a=SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n// decorView.setSystemUiVisibility(a);\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar\n | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n\n\n } else {\n // TODO: The system bars are NOT visible. Make any desired\n\n }\n }", "public static void hideSoftKeyboard(Activity activity) {\n\n InputMethodManager inputManager = (InputMethodManager)\n activity.getSystemService(\n Context.INPUT_METHOD_SERVICE);\n View focusedView = activity.getCurrentFocus();\n\n if (focusedView != null) {\n\n try{\n assert inputManager != null;\n inputManager.hideSoftInputFromWindow(focusedView.getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n }catch(AssertionError e){\n e.printStackTrace();\n }\n }\n }", "public static void hideKeyboard(Activity activity){\n\t\tif (activity.getCurrentFocus() != null){\n\t \tInputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\n\t \tinputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "private void hideTheWindowTitle() {\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t}", "public static void hideSoftInputMethod(Activity activity) {\n InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(\n activity.getWindow().getDecorView().getWindowToken(),\n 0\n );\n try {\n View currentFocus = activity.getWindow().getCurrentFocus();\n if (currentFocus != null)\n currentFocus.clearFocus();\n } catch (Exception e) {\n // current focus could be out of visibility\n }\n }", "public static void hide(@Nullable Activity activity) {\n if (activity == null) {\n LogHelper.writeWithTrace(Level.WARNING, TAG, \"Activity is null!\");\n return;\n }\n\n InputMethodManager mgr = (InputMethodManager)activity\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n if (mgr != null) {\n mgr.hideSoftInputFromWindow(activity\n .getWindow().getDecorView().getWindowToken(), 0);\n }\n }", "private void initializeAppBar() {\n Toolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n ActionBar actionbar = getSupportActionBar();\n actionbar.setDisplayHomeAsUpEnabled(true);\n actionbar.setHomeAsUpIndicator(R.drawable.ic_menu_black_24dp);\n }", "private void showSignOutBar() {\n Log.d(TAG, \"Showing sign out bar\");\n findViewById(R.id.sign_in_bar).setVisibility(View.GONE);\n findViewById(R.id.sign_out_bar).setVisibility(View.VISIBLE);\n }", "@Override\n protected boolean isActionBarBlurred() {\n return true;\n }", "private void setAppBaeState(int state) {\n mAppBarState = state;\n if (mAppBarState == STANDARD_APPBAR) {\n searchBar.setVisibility(View.GONE);\n viewMoviesBar.setVisibility(View.VISIBLE);\n\n View view = getView();\n InputMethodManager im = (InputMethodManager) Objects.requireNonNull(getActivity()).getSystemService(Context.INPUT_METHOD_SERVICE);\n try {\n im.hideSoftInputFromWindow(view.getWindowToken(), 0); // make keyboard hide\n } catch (NullPointerException e) {\n Log.d(TAG, \"setAppBaeState: NullPointerException: \" + e);\n }\n } else if (mAppBarState == SEARCH_APPBAR) {\n viewMoviesBar.setVisibility(View.GONE);\n searchBar.setVisibility(View.VISIBLE);\n mSearchMovies.requestFocus();\n InputMethodManager im = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n im.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); // make keyboard popup\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "private static void invasionStatusBar(Activity activity) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Window window = activity.getWindow();\n View decorView = window.getDecorView();\n decorView.setSystemUiVisibility(decorView.getSystemUiVisibility()\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);\n window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\n window.setStatusBarColor(Color.TRANSPARENT);\n }\n }", "public void setHide()\n\t{\n\t\tMainController.getInstance().setVisible(name, false);\n\t}", "public void hideScreen() {\n\t}", "public void makeFullScreen() {\n currentApiVersion = android.os.Build.VERSION.SDK_INT;\n final int flags = View.SYSTEM_UI_FLAG_LAYOUT_STABLE |\n View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n if (currentApiVersion >= Build.VERSION_CODES.KITKAT) {\n getWindow().getDecorView().setSystemUiVisibility(flags);\n final View decorView = getWindow().getDecorView();\n decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {\n @Override\n public void onSystemUiVisibilityChange(int visibility) {\n if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {\n decorView.setSystemUiVisibility(flags);\n }\n }\n });\n }\n }", "private void hideLeaderboardBar() {\n if (leaderBoardBar != null) {\n leaderBoardBar.animate().translationY(-leaderBoardBar.getMeasuredHeight());\n }\n }", "private void hideLoginScreen()\n {\n logIngEditText.setVisibility(View.INVISIBLE);\n passwordEditText.setVisibility(View.INVISIBLE);\n loginButton.setVisibility(View.INVISIBLE);\n textViewLabel.setVisibility(View.INVISIBLE);\n }", "public void hideSoftKeyboard() {\n\t if(getCurrentFocus()!=null) {\n\t InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n\t }\n\t}", "public void hideCustomView() {\n if (mCustomView == null) {\n //Nothing to hide - return.\n return;\n } else {\n // Hide the custom view.\n mCustomView.setVisibility(View.GONE);\n\n // Remove the custom view from its container.\n mCustomViewContainer.removeView(mCustomView);\n mCustomViewContainer.setVisibility(View.GONE);\n mCustomViewCallback.onCustomViewHidden();\n mCustomView = null;\n\n // Show the ActionBar\n getSupportActionBar().show();\n\n // Show the content view.\n mContentView.setVisibility(View.VISIBLE);\n setContentView(mContentView);\n }\n }", "public void hideSoftKeyboard() {\n if(getCurrentFocus()!=null) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n }\n }", "public static void hideKeyboard(Activity activity)\n {\n View view = activity.getCurrentFocus();\n //If no view currently has focus, create a new one, just so we can grab a window token from it\n if(view != null)\n {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_online);\n View decorView = getWindow().getDecorView();\n // Hide the status bar.\n int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;\n decorView.setSystemUiVisibility(uiOptions);\n // Remember that you should never show the action bar if the\n // status bar is hidden, so hide that too if necessary.\n ActionBar actionBar = getSupportActionBar();\n actionBar.hide();\n }", "@Override\n public void onSystemUiVisibilityChange(int visibility) {\n if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {\n // TODO: The system bars are visible. Make any desired\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n decorView.setSystemUiVisibility(uiOptions);\n }\n }, 2000);\n } else {\n // TODO: The system bars are NOT visible. Make any desired\n // adjustments to your UI, such as hiding the action bar or\n // other navigational controls.\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_profile, container, false);\n\n// getActivity().getActionBar().hide();\n\n\n return view;\n }", "private void hideKeyboard() {\n //check to make sure no view has focus\n View view = this.getCurrentFocus();\n\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public static void hideKeyboard(Activity activity) {\n if(activity == null){\n throw new IllegalArgumentException(\"Activity cannot be null\");\n }\n\n InputMethodManager imm = (InputMethodManager) activity\n .getSystemService(Activity.INPUT_METHOD_SERVICE);\n //Find the currently focused view, so we can grab the correct window token from it.\n View view = activity.getCurrentFocus();\n //If no view currently has focus, create a new one, just so we can grab a window token from it\n if (view == null) {\n view = new View(activity);\n }\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }", "public void setFullScreen() {\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\r\n Window window = getWindow();\r\n window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS\r\n | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);\r\n window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);\r\n window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\r\n window.setStatusBarColor(Color.TRANSPARENT);\r\n window.setNavigationBarColor(Color.TRANSPARENT);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n return true;\n }\n if (id == R.id.logout_action_bar){\n logout();\n }\n return super.onOptionsItemSelected(item);\n }", "public void hideKeyboard() {\n try {\n InputMethodManager inputmanager = (InputMethodManager)this.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (inputmanager != null) {\n inputmanager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);\n }\n } catch (Exception var2) {\n }\n }", "protected void setupActionBar()\r\n\t{\r\n\t\tfinal ActionBar actionBar = getActionBar();\r\n\t\tif (actionBar == null)\r\n\t\t\treturn;\r\n\t\tactionBar.setDisplayShowTitleEnabled(true);\r\n\t\tactionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);\r\n\t\tactionBar.setDisplayUseLogoEnabled(true);\r\n\t\tactionBar.setLogo(R.drawable.itiffin);\r\n\t\tactionBar.setBackgroundDrawable(getResources().getDrawable(\r\n\t\t\t\tR.drawable.black_semi_trans_strip));\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(true);\r\n\t\tactionBar.setHomeButtonEnabled(true);\r\n\t\tactionBar.setTitle(R.string.app_name);\r\n\r\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // MyApp myApp = MyApp.getInstance();\n\n MenuItem item = menu.findItem(R.id.action_matches);\n item.setVisible(false);\n\n return true;\n }", "@Override\n public void onDestroyActionMode(ActionMode mode) {\n ((MainActivity) getActivity()).getSupportActionBar().show();\n mActionMode = null;\n getPresenter().deselectItems();\n }", "public void hideWindowSoftKeyboard() {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n }" ]
[ "0.8559517", "0.8557274", "0.8081309", "0.73196864", "0.7141178", "0.68589115", "0.6786436", "0.6743239", "0.67242104", "0.662644", "0.6607407", "0.65983176", "0.65734226", "0.6564925", "0.6560437", "0.6465811", "0.6408134", "0.6408134", "0.6401923", "0.6382474", "0.6376077", "0.63706535", "0.63706535", "0.63706535", "0.63706535", "0.63706535", "0.63706535", "0.6299851", "0.62938106", "0.6236695", "0.62325734", "0.62134933", "0.62064964", "0.6127377", "0.6105908", "0.6073427", "0.6065757", "0.6051483", "0.60429835", "0.60368145", "0.59998345", "0.59964025", "0.59638745", "0.59537923", "0.59470904", "0.59363353", "0.5933781", "0.59180844", "0.59087694", "0.58845824", "0.5874641", "0.5861134", "0.58475703", "0.5830286", "0.5822131", "0.58037084", "0.5794742", "0.5786391", "0.57680374", "0.57592607", "0.5744819", "0.573405", "0.5718532", "0.57134324", "0.5708986", "0.56934243", "0.56896406", "0.5686633", "0.56768435", "0.567539", "0.56720036", "0.5671058", "0.5667149", "0.5648621", "0.563659", "0.56274325", "0.5627296", "0.56236315", "0.5589162", "0.5584382", "0.5582846", "0.55775374", "0.5575354", "0.555485", "0.55540097", "0.5546204", "0.55426437", "0.5542271", "0.5541899", "0.55400646", "0.553853", "0.55310464", "0.55306774", "0.5525224", "0.5518968", "0.5512895", "0.5511901", "0.55020845", "0.5494204", "0.5491067" ]
0.83560413
2
Retrieve Google Sign In profile
private String RetrieveGoogleSignInProfile(){ String personName; acct = GoogleSignIn.getLastSignedInAccount(ChooseService.this); if (acct != null) { personName = acct.getDisplayName(); /*String personGivenName = acct.getGivenName(); String personFamilyName = acct.getFamilyName(); String personEmail = acct.getEmail(); String personId = acct.getId(); Uri personPhoto = acct.getPhotoUrl();*/ }else{ personName = null; } return personName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String id = currentPerson.getId();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Id: \"+id+\", Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(id, email, personName);\n// SharedPreferences preferences = mBaseActivity.getSharedPreferences(\"com.yathams.loginsystem\", MODE_PRIVATE);\n// preferences.edit().putString(\"email\", email).putString(\"userName\", personName).commit();\n\n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "Map<String, Object> getUserProfile();", "java.lang.String getProfileURL();", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n\n Toast.makeText(context, personName + \"\\n\" + email, Toast.LENGTH_SHORT).show();\n\n /*txtName.setText(personName);\n txtEmail.setText(email);*/\n\n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n /*personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n\n new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);*/\n\n } else {\n Toast.makeText(context,\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "String getProfile();", "public void getProfile() {\n\n String mKey = getString(R.string.preference_name);\n SharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n // Load the user email\n\n /*userEmail = getString(R.string.preference_key_profile_email);\n userPassword = getString(R.string.preference_key_profile_password);*/\n\n // Load the user email\n\n mKey = getString(R.string.preference_key_profile_email);\n userEmail = mPrefs.getString(mKey, \"\");\n\n // Load the user password\n\n mKey = getString(R.string.preference_key_profile_password);\n userPassword = mPrefs.getString(mKey, \"\");\n\n\n //userEmail = getString(R.string.register_email);\n //userPassword = getString(R.string.register_password);\n\n }", "public String getProfile();", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi.getCurrentPerson(mGoogleApiClient);\n String personId = currentPerson.getId();\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = currentPerson.getImage().getUrl();\n String personGooglePlusProfile = currentPerson.getUrl();\n\n String personBirthday = currentPerson.getBirthday();\n int personGender = currentPerson.getGender();\n String personNickname = currentPerson.getNickname();\n\n String email = Plus.AccountApi.getAccountName(mGoogleApiClient);\n\n Log.i(TAG, \"Id: \" + personId + \", Name: \" + personName + \", plusProfile: \" + personGooglePlusProfile + \", email: \" + email + \", Image: \" + personPhotoUrl + \", Birthday: \" + personBirthday + \", Gender: \" + personGender + \", Nickname: \" + personNickname);\n\n // by default the profile url gives\n // 50x50 px\n // image only\n // we can replace the value with\n // whatever\n // dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0, personPhotoUrl.length() - 2) + PROFILE_PIC_SIZE;\n\n Log.e(TAG, \"PhotoUrl : \" + personPhotoUrl);\n\n Log.i(TAG, \"Finally Set UserData\");\n Log.i(TAG, \"account : \" + email + \", Social_Id : \" + personId);\n\n StringBuffer sb = new StringBuffer();\n sb.append(\"Id : \").append(personId).append(\"\\n\");\n sb.append(\"Name : \").append(personName).append(\"\\n\");\n sb.append(\"plusProfile : \").append(personGooglePlusProfile).append(\"\\n\");\n sb.append(\"Email : \").append(email).append(\"\\n\");\n sb.append(\"PhotoUrl : \").append(personPhotoUrl).append(\"\\n\");\n sb.append(\"Birthday : \").append(personBirthday).append(\"\\n\");\n sb.append(\"Gender : \").append(personGender).append(\"\\n\");\n sb.append(\"Nickname : \").append(personNickname).append(\"\\n\");\n\n tv_info.setText(sb.toString());\n\n signOutFromGplus();\n\n /** set Google User Data **/\n RegisterData.name = personName;\n RegisterData.email = email;\n RegisterData.password = \"\";\n RegisterData.source = \"google\";\n RegisterData.image = personPhotoUrl;\n\n new UserLoginAsyncTask().execute();\n } else {\n Toast.makeText(mContext, \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }", "Profile getProfile( String profileId );", "private void getProfileInformation() {\n try {\n if (Plus.PeopleApi.getCurrentPerson(mGoogleApiClient) != null) {\n Person currentPerson = Plus.PeopleApi\n .getCurrentPerson(mGoogleApiClient);\n String personName = currentPerson.getDisplayName();\n String personPhotoUrl = null;\n if(currentPerson.getImage().getUrl() != null){\n \tpersonPhotoUrl = currentPerson.getImage().getUrl();\n }else{\n \tpersonPhotoUrl = \"\";\n }\n String personGooglePlusProfile = currentPerson.getUrl();\n String gplusemail = Plus.AccountApi.getAccountName(mGoogleApiClient);\n \n Log.e(TAG, \"Name: \" + personName + \", plusProfile: \"\n + personGooglePlusProfile + \", email: \" + email\n + \", Image: \" + personPhotoUrl);\n \n user_id = currentPerson.getId();\n profile_image = personPhotoUrl;\n profile_url = personGooglePlusProfile;\n name = personName;\n this.email = gplusemail;\n \n /* txtName.setText(personName);\n txtEmail.setText(email);*/\n \n // by default the profile url gives 50x50 px image only\n // we can replace the value with whatever dimension we want by\n // replacing sz=X\n personPhotoUrl = personPhotoUrl.substring(0,\n personPhotoUrl.length() - 2)\n + PROFILE_PIC_SIZE;\n \n // new LoadProfileImage(imgProfilePic).execute(personPhotoUrl);\n \n Thread t = new Thread()\n\t\t\t\t{\n\t\t\t\t\tpublic void run()\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONObject obj = new JSONObject();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tobj.put(\"uid\", user_id);\n\t\t\t\t\t\t\tobj.put(\"email\", email);\n\t\t\t\t\t\t\tobj.put(\"profile_url\", profile_url);\n\t\t\t\t\t\t\tobj.put(\"name\", name);\n\t\t\t\t\t\t\tobj.put(\"profile_image\", profile_image);\n\t\t\t\t\t\t\tobj.put(\"type\", \"google\");\n\t\t\t\t\t\t\tobj.put(\"device_id\", app.getDeviceInfo().device_id);\n\t\t\t\t\t\t\tobj.put(\"device_type\", \"android\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString response = HttpClient.getInstance(getApplicationContext()).SendHttpPost(Constant.SOCIAL_LOGIN, obj.toString());\n\t\t\t\t\t\t\tif(response != null){\n\t\t\t\t\t\t\t\tJSONObject ob = new JSONObject(response);\n\t\t\t\t\t\t\t\tif(ob.getBoolean(\"status\")){\n\t\t\t\t\t\t\t\t\tString first_name = ob.getString(\"first_name\");\n\t\t\t\t\t\t\t\t\tString last_name = ob.getString(\"last_name\");\n\t\t\t\t\t\t\t\t\tString user_id = ob.getString(\"user_id\");\n\t\t\t\t\t\t\t\t\tString reservation_type = ob.getString(\"reservation_type\");\n\t\t\t\t\t\t\t\t\tboolean checkin_status = ob.getBoolean(\"checkin_status\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString rev_id = null,reservation_code = null;\n\t\t\t\t\t\t\t\t\tJSONArray object = ob.getJSONArray(\"reservation_detail\");\n\t\t\t\t\t\t\t\t\tfor(int i = 0;i<object.length();i++){\n\t\t\t\t\t\t\t\t\t\trev_id = object.getJSONObject(i).getString(\"reservation_id\");\n\t\t\t\t\t\t\t\t\t\treservation_code = object.getJSONObject(i).getString(\"reservation_code\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getUserInfo().SetUserInfo(first_name,\n\t\t\t\t\t\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\t\t\t\t\t\tuser_id,\n\t\t\t\t\t\t\t\t\t\t\trev_id,\n\t\t\t\t\t\t\t\t\t\t\treservation_code,\n\t\t\t\t\t\t\t\t\t\t\treservation_type,\n\t\t\t\t\t\t\t\t\t\t\tcheckin_status);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tapp.getLogininfo().setLoginInfo(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUpdateUiResult(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tt.start();\n \n } else {\n Toast.makeText(getApplicationContext(),\n \"Person information is null\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void signInWithGoogle() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, ConstantValue.GOOGLE_SIGN_IN);\n }", "@Test\n public void getGoogleAuthUrlTest() throws ApiException {\n InlineResponse2002 response = api.getGoogleAuthUrl();\n\n // TODO: test validations\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticadoGoogle), Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n finish();\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticacionFallida), Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n hideProgressDialog();\n\n\n }\n });\n }", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "static public User getUser(HttpServletRequest request) {\n String accessToken = request.getParameter(\"access_token\");\n if (accessToken == null) {\n return null;\n } else {\n try {\n URL url = new URL(\n \"https://www.googleapis.com/oauth2/v1/tokeninfo\"\n + \"?access_token=\" + accessToken);\n\n Map<String, String> userData = mapper.readValue(\n new InputStreamReader(url.openStream(), \"UTF-8\"),\n new TypeReference<Map<String, String>>() {\n });\n if (userData.get(\"audience\") == null\n || userData.containsKey(\"error\")\n || !userData.get(\"audience\")\n .equals(Constants.CLIENT_ID)) {\n return null;\n } else {\n String email = userData.get(\"email\"),\n userId = userData.get(\"user_id\");\n User user = null;\n PersistenceManager pm = PMF.get().getPersistenceManager();\n try {\n user = pm.getObjectById(User.class, userId);\n } catch (JDOObjectNotFoundException ex) {\n user = new User(userId, email);\n pm.makePersistent(user);\n } finally {\n pm.close();\n }\n return user;\n }\n } catch (Exception ex) {\n System.err.println(ex.getMessage());\n return null;\n }\n }\n }", "H getProfile();", "private void attemptCreateAccountWithGoogle() {\n // Configure sign-in to request the user's ID, email address, and basic profile. ID and\n // basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n if (mGoogleApiClient == null) {\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "ApplicationProfile getApplicationProfile();", "private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }", "private User retrievePersonalProfileData() {\n if (checkIfProfileExists()) {\n return SharedPrefsUtils.convertSharedPrefsToUserModel(context);\n } else {\n return null;\n }\n }", "com.google.protobuf.ByteString\n getProfileURLBytes();", "public Optional<CredentialProfile> get(StructuredTableContext context, CredentialProfileId id)\n throws IOException {\n StructuredTable table = context.getTable(CredentialProviderStore.CREDENTIAL_PROFILES);\n Collection<Field<?>> key = Arrays.asList(\n Fields.stringField(CredentialProviderStore.NAMESPACE_FIELD,\n id.getNamespace()),\n Fields.stringField(CredentialProviderStore.PROFILE_NAME_FIELD,\n id.getName()));\n return table.read(key).map(row -> GSON.fromJson(row\n .getString(CredentialProviderStore.PROFILE_DATA_FIELD), CredentialProfile.class));\n }", "private void signInWithGoogle() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public User getUserInfoJson(final String accessToken) throws IOException {\n\t\tfinal GoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setJsonFactory(JSON_FACTORY).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t\t\n\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(credential);\n//\t\tfinal HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(request -> {\n//\t\t\trequest.setParser(new JsonObjectParser(JSON_FACTORY));\n//\t\t});\n\n\t\t// Make an authenticated request - to google+ API user profile\n\t\tfinal GenericUrl url = new GenericUrl(USER_INFO_URL);\n\t\tfinal HttpRequest request = requestFactory.buildGetRequest(url);\n\t\t\n\t\trequest.getHeaders().setContentType(\"application/json\");\n\t\tfinal String rawResponse = request.execute().parseAsString();\n//\t\tSystem.out.println(rawResponse);\n\t\t\n\t //final User user = (User) request.execute().parseAs(User.class);\n\t\t\n\t\treturn JSON_FACTORY.fromString(rawResponse, User.class);\n\t}", "private void googleSignIn() {\n\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "AspirantProfile getAspirantProfile(String email)\n throws IllegalArgumentException, ServiceException;", "public String getProfile() {\n return profile;\n }", "private void signIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);\n\n // Starting the intent prompts the user to select a Google account to sign in with\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mFirebaseAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n //Toast.makeText(SignInActivity.this, R.string.sign_in_successful, Toast.LENGTH_SHORT).show();\n hideSignInWithGoogleLoadingIndicator();\n returnToCallingActivity();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(DEBUG_TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(SignInActivity.this, R.string.failed_to_sign_in_with_credentials, Toast.LENGTH_SHORT).show();\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n }\n }\n });\n }", "HumanProfile getUserProfile();", "public void getProfileInformation() {\n\t\tmAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t@Override\n\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\tLog.d(\"Profile\", response);\n\t\t\t\tString json = response;\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject profile = new JSONObject(json);\n\t\t\t\t\tLog.d(\"Arvind Profile Data\", \"\"+profile.toString());\n\t\t\t\t\tfinal String name = profile.getString(\"name\");\n\t\t\t\t\tfinal String email = profile.getString(\"email\");\n\t\t\t\t\tHashMap<String, String> hashMap = new HashMap<String, String>();\n\n\t\t\t\t\thashMap.put(\"first_name\", profile.getString(\"first_name\"));\n\n\t\t\t\t\thashMap.put(\"last_name\", profile.getString(\"last_name\"));\n\n\t\t\t\t\thashMap.put(\"id\", profile.getString(\"id\"));\n\n\t\t\t\t\thashMap.put(\"gender\", profile.getString(\"gender\"));\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"email\", profile.getString(\"email\"));\n\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\n\t\t\t\t\thashMap.put(\"birthday\", profile.getString(\"birthday\"));\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//\tGetAlbumdata();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\treturnIntent.putExtra(\"map\", hashMap);\n\t\t\t\t\tsetResult(RESULT_OK,returnIntent);\n\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\tObject state) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "private void googleSignIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, SIGN_IN);\n }", "public void loadUserProfile(AccessToken accessToken) {\n GraphRequest request = GraphRequest.newMeRequest(accessToken, new GraphRequest.GraphJSONObjectCallback() {\n public void onCompleted(JSONObject object, GraphResponse response) {\n try {\n String first_name = object.getString(\"first_name\");\n String last_name = object.getString(\"last_name\");\n String email = object.getString(\"email\");\n String str = \"https://graph.facebook.com/\" + object.getString(\"id\") + \"/picture?type=normal\";\n Intent intent = new Intent(LoginOptionActivity.this, HomeActivity.class);\n intent.putExtra(\"name\", first_name + \" \" + last_name + \"\\n\" + email);\n intent.addFlags(268468224);\n LoginOptionActivity.this.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(GraphRequest.FIELDS_PARAM, \"first_name,last_name,email,id\");\n request.setParameters(parameters);\n request.executeAsync();\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<Map<String, Object>>> callback);", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n if(Constants.mAuth==null){\n Constants.mAuth= FirebaseAuth.getInstance();\n Log.d(Constants.TAG,\"mAuth new Instance\");\n }\n Constants.mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(Constants.TAG, \"signInResult:google success\");\n Constants.user=Constants.mAuth.getCurrentUser();\n SharedPreferences sharedPreferences=getSharedPreferences(Constants.LoginSharedPref.SHARED_PREF_NAME,MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putBoolean(Constants.LoginSharedPref.PREVIOUSLY_STARTED,true);\n editor.putBoolean(Constants.LoginSharedPref.LOGGED_IN,true);\n String email=Constants.user.getEmail();\n String name=Constants.user.getDisplayName();\n Uri photoUrl=Constants.user.getPhotoUrl();\n editor.putString(Constants.LoginSharedPref.LOGIN_EMAIL,email);\n editor.putString(Constants.LoginSharedPref.LOGIN_URENAME,name);\n if(photoUrl!=null) {\n Log.d(Constants.TAG,\" Photo Url Extract: \"+photoUrl.toString());\n editor.putString(Constants.LoginSharedPref.PROFILE_URL, photoUrl.toString());\n }\n editor.putBoolean(Constants.LoginSharedPref.IS_EMAIL_VERIFIED,true);\n editor.commit();\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Intent intent=new Intent(HomeActivity.this,MainActivity.class);\n startActivity(intent);\n finish();\n } else {\n // If sign in fails, display a message to the user.\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Log.d(Constants.TAG, \"signInResult:google with firebase failure\", task.getException());\n Toast.makeText(HomeActivity.this, \"An error occured while signing in. Check your network connection \",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "public String getProfileUrl() {\n\t\treturn profileUrl;\n\t}", "GmailClient getGmailClient(Credential credential);", "private void signInMethod() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "@Override\n public void fetchFromSource(){\n System.out.println(\"pull the user credential from gmail\");\n }", "public java.lang.String getProfileURL() {\n java.lang.Object ref = profileURL_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileURL_ = s;\n return s;\n }\n }", "public java.lang.String getProfileURL() {\n java.lang.Object ref = profileURL_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n profileURL_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private ProfileRestClient getProfileRestClient() {\n if (mProfileRestClient == null && mHsConfig != null) {\n mProfileRestClient = new ProfileRestClient(mHsConfig);\n }\n return mProfileRestClient;\n }", "public UserProfile getUserProfile() {return userProfile;}", "@java.lang.Override\n public com.google.protobuf.StringValue getProfilePictureUrl() {\n return profilePictureUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : profilePictureUrl_;\n }", "public URI getProfile() { \n\t\treturn getProfileElement().getValue();\n\t}", "private void FirebaseGoogleAuth(GoogleSignInAccount acct) {\n if (acct != null) {\n AuthCredential authCredential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(authCredential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Successful\", Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n\n updateUI(user);\n\n } else {\n Toast.makeText(MainActivity.this, \"Failed\", Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n }\n });\n }\n else{\n Toast.makeText(MainActivity.this, \"acc failed\", Toast.LENGTH_SHORT).show();\n }\n }", "public UserInfo(GoogleSignInAccount acct) {\n if (acct != null) {\n name = acct.getDisplayName();\n givenName = acct.getGivenName();\n familyName = acct.getFamilyName();\n email = acct.getEmail();\n id = acct.getId();\n profilePhoto = acct.getPhotoUrl();\n }\n }", "@Override\n public GetServiceProfileResult getServiceProfile(GetServiceProfileRequest request) {\n request = beforeClientExecution(request);\n return executeGetServiceProfile(request);\n }", "private void setupGoogleSignin() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API and the\n // options specified by gso.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public UserProfile getUserProfile(String username);", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n mGoogleSignInClient.signOut();\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }", "void getProfile(@NonNull final String profileId, @Nullable Callback<ComapiResult<ComapiProfile>> callback);", "public final void signInWithGoogle() {\n ActivityResult.startGoogleLogin(activity, googleApiClient);\n }", "private void retrieveProfile() {\r\n\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n String userId = user.getUid();\r\n String email = user.getEmail();\r\n DocumentReference reference = mFirebaseFirestore.collection(\"users\").document(userId);\r\n reference.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n DocumentSnapshot documentSnapshot = task.getResult();\r\n mTextViewName.setText((CharSequence) documentSnapshot.get(\"name\"));\r\n mTextViewContact.setText((CharSequence) documentSnapshot.get(\"contact\"));\r\n mTextViewEstate.setText((CharSequence) documentSnapshot.get(\"estate\"));\r\n mTextViewHouseNo.setText((CharSequence) documentSnapshot.get(\"houseno\"));\r\n }\r\n Toast.makeText(Testing.this, \"Profile data loaded successfully!\", Toast.LENGTH_LONG).show();\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Toast.makeText(Testing.this, \"Error fetching profile data. Check your internet connection!\" + e.toString(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n }", "public static Profile getProfile() {\n return profile;\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n // [START_EXCLUDE silent]\n// showProgressDialog();\n // [END_EXCLUDE]\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n Toast.makeText(current,\"Sign \"+user.getEmail(),Toast.LENGTH_LONG).show();\n\n updateUI(user);\n updateCurrentUser(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(current,\"Failed\"+task.getException().toString(),Toast.LENGTH_LONG).show();\n updateUI(null);\n }\n\n // [START_EXCLUDE]\n// hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n // [START_EXCLUDE silent]\n showProgressDialog();\n // [END_EXCLUDE]\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n Intent intent = new Intent(SplashActivity.this, MainIntoActivity.class);\n startActivity(intent);\n finish();\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(SplashActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n Log.d(\"FAILED\", \"FAILED\");\n }\n\n // [START_EXCLUDE]\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "private void configureGoogleSignIn() {\n // Configure sign-in to request the user's ID, email address, and basic\n // profile. ID and basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n\n // Check for existing Google Sign In account, if the user is already signed in\n // the GoogleSignInAccount will be non-null.\n// GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n\n // Set the dimensions of the sign-in button.\n// googleSignInButton = findViewById(R.id.sign_in_button);\n// googleSignInButton.setSize(SignInButton.SIZE_STANDARD);\n// googleSignInButton.setOnClickListener(this);\n\n btn_google_login = navigationView.getHeaderView(1).findViewById(R.id.btn_google_login);\n btn_google_login.setOnClickListener(this);\n }", "public void UserSignInMethod(){\n // Passing Google Api Client into Intent.\n Intent AuthIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(AuthIntent, REQUEST_SIGN_IN_CODE);\n }", "com.google.protobuf2.Any getProfile();", "public void getGoogleToken() {\n String googleEmail = sharedpreferences.getString(\"GoogleEmail\", \"\");\n String scopes = sharedpreferences.getString(\"GoogleScopes\", \"\");\n if (!\"\".equals(googleEmail)) {\n MyAsyncTask asyncTask = new MyAsyncTask(googleEmail, scopes, this.getBaseContext());\n asyncTask.delegate = this;\n asyncTask.execute();\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RC_SIGN_IN) {\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n\n System.out.println(\"result status code\" + result.getStatus());\n if (result.isSuccess()) {\n onSucessGoogleLogin(result);\n\n } else {\n // Google Sign In failed, update UI appropriately\n Utility.logData(\"Login unsuccessful\");\n Utility.showShortToast(\"Login unsuccessful\");\n }\n\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void getProfileInformation() {\n\n\t\t mAsyncRunner.request(\"me\", new RequestListener() {\n\t\t\t @Override\n\t\t\t public void onComplete(String response, Object state) {\n\t\t\t\t Log.d(\"Profile\", response);\n\t\t\t\t String json = response;\n\t\t\t\t try {\n\t\t\t\t\t // Facebook Profile JSON data\n\t\t\t\t\t JSONObject profile = new JSONObject(json);\n\n\t\t\t\t\t uName = profile.getString(\"name\");\n\t\t\t\t\t uMail = profile.getString(\"email\");\n\t\t\t\t\t //uGender=profile.getString(\"gender\");\n\n\n\t\t\t\t\t //final String birthday=profile.getString(\"birthday\");\n\t\t\t\t\t runOnUiThread(new Runnable() {\n\t\t\t\t\t\t @Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t //Toast.makeText(getApplicationContext(), \"Name: \" + name + \"\\nEmail: \" + email+\"\\nGender: \"+gender, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }\n\t\t\t\t\t });\n\t\t\t\t } \n\t\t\t\t catch (JSONException e) \n\t\t\t\t {\n\t\t\t\t\t errorMessage = \"JSON Error Occured\";\n\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onIOException(IOException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Data read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Image read Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onMalformedURLException(MalformedURLException e,\n\t\t\t\t\t Object state) {\n\t\t\t\t errorMessage = \"Facebook URL Error Occured\";\n\t\t\t }\n\n\t\t\t @Override\n\t\t\t public void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t errorMessage = \"Facebook Error Occured OnFacebook\";\n\t\t\t }\n\t\t });\n\t }", "public HashMap<String, String> getUserDetails(){\n HashMap<String, String> user = new HashMap<String, String>();\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n return user;\n }", "TasteProfile.UserProfile getUserProfile (String user_id);", "public Profile getProfile() {\n return _profile;\n }", "public Profile getProfile() {\n return m_profile;\n }", "public static UserInfo getAccountInfoFromProfile(Context context) {\n Cursor dc = null;\n ContentResolver resolver= context.getContentResolver();\n Cursor pc = resolver.query(Profile.CONTENT_URI, PROFILE_PROJECTION, null, \n null, null);\n if (pc == null) {\n return null;\n }\n UserInfo acctInfo = null;\n try {\n while (pc.moveToNext()) {\n String displayName = pc.getString(COLUMN_DISPLAY_NAME);\n if (displayName == null || displayName.isEmpty()) {\n continue;\n }\n if (acctInfo == null) {\n acctInfo = new UserInfo();\n }\n acctInfo.setDisplayName(displayName);\n long rawContactsId = pc.getLong(COLUMN_RAW_CONTACTS_ID);\n \n Uri profileDataUri = Uri.withAppendedPath(Profile.CONTENT_URI, \"data\");\n dc = resolver.query(profileDataUri, PROFILE_DATA_PROJECTION,\n Data.RAW_CONTACT_ID+\"=? AND \"+Data.MIMETYPE+\" IN (?,?)\", \n new String[] { String.valueOf(rawContactsId), \n Phone.CONTENT_ITEM_TYPE, Email.CONTENT_ITEM_TYPE }, null);\n boolean firstEmail = true, firstPhone = true;\n while (dc != null && dc.moveToNext()) {\n String data;\n int type = dc.getInt(COLUMN_TYPE);\n int isPrimary = dc.getInt(COLUMN_ISPRIMARY);\n boolean isPhone = Phone.CONTENT_ITEM_TYPE.equals(dc.getString(COLUMN_MIMETYPE));\n if (isPhone) {\n data = dc.getString(COLUMN_PHONENUM);\n if (isPrimary == 1 || firstPhone) {\n // TODO: phone number is not supported yet.\n// acctInfo.setPhone(data);\n firstPhone = false;\n }\n } else {\n data = dc.getString(COLUMN_EMAILADDR);\n if (isPrimary == 1 || firstEmail) {\n acctInfo.setEmail(data);\n firstEmail = false;\n }\n }\n }\n }\n return acctInfo;\n } finally {\n pc.close();\n if (dc != null) {\n dc.close();\n }\n }\n }", "@java.lang.Override\n public com.google.protobuf2.Any getProfile() {\n return profile_ == null ? com.google.protobuf2.Any.getDefaultInstance() : profile_;\n }", "private void signIn()\n {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n // If user was already signed in earlier, log them out first\n if(signOutCode != 0)\n {\n signOut();\n }\n\n // Runtime permission for locations and network\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{\n android.Manifest.permission.INTERNET,\n android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_NETWORK_STATE,\n android.Manifest.permission.SYSTEM_ALERT_WINDOW,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE\n\n }, PERMISSION);\n }\n startActivityForResult(intent, IntentConstants.INTENT_GOOGLE_REQUEST_CODE);\n\n }", "public String getGoogleUserFirstName(){\n return (String) attributes.get(GOOGLE_USER_FIRST_NAME);\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n fbAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n UserModel userModel=new UserModel();\n userModel.setEmail(user.getEmail());\n userModel.setDisplayName(user.getDisplayName());\n userModel.setPhotoUrl(user.getPhotoUrl().toString());\n userModel.setUid(user.getUid());\n UserFBDB userFBDB = new UserFBDB();\n userFBDB.save(userModel);\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Exception ex=task.getException();\n signupWithGoogleBtn.setVisibility(View.VISIBLE);\n mProgress.setVisibility(View.INVISIBLE);\n Toast.makeText(SignupActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // ...\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"singn\", e.getMessage());\n }\n });\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnSuccessListener(this, authResult -> {\n FirebaseUser user = mAuth.getCurrentUser();\n googleSignIn = 1;\n startActivity(new Intent(LoginActivity.this, HomeMainActivity.class));\n finish();\n })\n .addOnFailureListener(this, e -> Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show());\n }", "private void signIn() {\n mGoogleSignInClient = buildGoogleSignInClient();\n startActivityForResult(mGoogleSignInClient.getSignInIntent(), REQUEST_CODE_SIGN_IN);\n }", "@NonNull\n public Task<AuthResult> silentSignIn(@NonNull Context context,\n @NonNull List<IdpConfig> configs) {\n if (mAuth.getCurrentUser() != null) {\n throw new IllegalArgumentException(\"User already signed in!\");\n }\n\n final Context appContext = context.getApplicationContext();\n final IdpConfig google =\n ProviderUtils.getConfigFromIdps(configs, GoogleAuthProvider.PROVIDER_ID);\n final IdpConfig email =\n ProviderUtils.getConfigFromIdps(configs, EmailAuthProvider.PROVIDER_ID);\n\n if (google == null && email == null) {\n throw new IllegalArgumentException(\"No supported providers were supplied. \" +\n \"Add either Google or email support.\");\n }\n\n final GoogleSignInOptions googleOptions;\n if (google == null) {\n googleOptions = null;\n } else {\n GoogleSignInAccount last = GoogleSignIn.getLastSignedInAccount(appContext);\n if (last != null && last.getIdToken() != null) {\n return mAuth.signInWithCredential(GoogleAuthProvider.getCredential(\n last.getIdToken(), null));\n }\n\n googleOptions = google.getParams()\n .getParcelable(ExtraConstants.GOOGLE_SIGN_IN_OPTIONS);\n }\n\n // If Play services are not available we can't attempt to use the credentials client.\n if (!GoogleApiUtils.isPlayServicesAvailable(context)) {\n return Tasks.forException(\n new FirebaseUiException(ErrorCodes.PLAY_SERVICES_UPDATE_CANCELLED));\n }\n\n return GoogleApiUtils.getCredentialsClient(context)\n .request(new CredentialRequest.Builder()\n // We can support both email and Google at the same time here because they\n // are mutually exclusive. If a user signs in with Google, their email\n // account will automatically be upgraded (a.k.a. replaced) with the Google\n // one, meaning Smart Lock won't have to show the picker UI.\n .setPasswordLoginSupported(email != null)\n .setAccountTypes(google == null ? null :\n ProviderUtils.providerIdToAccountType(GoogleAuthProvider\n .PROVIDER_ID))\n .build())\n .continueWithTask(task -> {\n Credential credential = task.getResult().getCredential();\n String email1 = credential.getId();\n String password = credential.getPassword();\n\n if (TextUtils.isEmpty(password)) {\n return GoogleSignIn.getClient(appContext,\n new GoogleSignInOptions.Builder(googleOptions)\n .setAccountName(email1)\n .build())\n .silentSignIn()\n .continueWithTask(task1 -> {\n AuthCredential authCredential = GoogleAuthProvider\n .getCredential(\n task1.getResult().getIdToken(), null);\n return mAuth.signInWithCredential(authCredential);\n });\n } else {\n return mAuth.signInWithEmailAndPassword(email1, password);\n }\n });\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void getUserDetailsFromFB() {\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"email,name,picture,first_name,last_name,gender,timezone,verified\");\n new GraphRequest(\n AccessToken.getCurrentAccessToken(),\n \"/me\",\n parameters,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n //Handle the result here\n try {\n email = response.getJSONObject().getString(\"email\");\n name = response.getJSONObject().getString(\"name\");\n timezone = response.getJSONObject().getString(\"timezone\");\n firstName = response.getJSONObject().getString(\"first_name\");\n lastName = response.getJSONObject().getString(\"last_name\");\n gender = response.getJSONObject().getString(\"gender\");\n isVerified = response.getJSONObject().getBoolean(\"verified\");\n\n JSONObject picture = response.getJSONObject().getJSONObject(\"picture\");\n JSONObject data = picture.getJSONObject(\"data\");\n\n //get the 50X50 profile pic they send us\n String pictureURL = data.getString(\"url\");\n\n new ProfilePicAsync(pictureURL,1).execute();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }\n ).executeAsync();\n }", "public String getGmail() {\n\t\treturn user.getAuthEmail();\n\t}", "public UserProfile getUserProfile() {\n\t\tif (user == null) {\n\t\t\tUserProfileInterface intf;\n\t\t\tswitch (imsAuthentMode) {\n\t\t\tcase GIBA:\n//\t\t\t\tif (logger.isActivated()) {\n//\t\t\t\t\tlogger.debug(\"Load user profile derived from IMSI (GIBA)\");\n//\t\t\t\t}\n\t\t\t\tintf = new GibaUserProfileInterface();\n\t\t\t\tbreak;\n\t\t\tcase DIGEST:\n\t\t\tdefault:\n//\t\t\t\tif (logger.isActivated()) {\n//\t\t\t\t\tlogger.debug(\"Load user profile from RCS settings database\");\n//\t\t\t\t}\n\t\t\t\tintf = new SettingsUserProfileInterface();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tuser = intf.read();\n\t\t}\n \t\n \treturn user; \t\n\t}", "public EntityProfile getProfile()\n\t{\n\t\treturn m_profile;\n\t}", "@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getProfilePictureUrlOrBuilder() {\n return getProfilePictureUrl();\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException, ServletException {\n\t\tCredential credential = getCredential();\n\n\t\t// Build the Plus object using the credentials\n\t\tPlus plus = new Plus.Builder(transport, jsonFactory, credential)\n\t\t\t\t.setApplicationName(GoogleOAuth2.APPLICATION_NAME).build();\n\t\t// Make the API call\n\t\tPerson profile = plus.people().get(\"me\").execute();\n\t\t// Send the results as the response\n\t\tPrintWriter respWriter = resp.getWriter();\n\t\tresp.setStatus(200);\n\t\tresp.setContentType(\"text/html\");\n\t\trespWriter.println(\"<img src='\" + profile.getImage().getUrl() + \"'>\");\n\t\trespWriter.println(\"<a href='\" + profile.getUrl() + \"'>\" + profile.getDisplayName() + \"</a>\");\n\n\t\tUserService userService = UserServiceFactory.getUserService();\n\t\trespWriter.println(\"<div class=\\\"header\\\"><b>\" + req.getUserPrincipal().getName() + \"</b> | \"\n\t\t\t\t+ \"<a href=\\\"\" + userService.createLogoutURL(req.getRequestURL().toString())\n\t\t\t\t+ \"\\\">Log out</a> | \"\n\t\t\t\t+ \"<a href=\\\"http://code.google.com/p/google-api-java-client/source/browse\"\n\t\t\t\t+ \"/calendar-appengine-sample?repo=samples\\\">See source code for \"\n\t\t\t\t+ \"this sample</a></div>\");\n\t}", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n showHideProgressDialog(false);\n onAuthSuccess(mAuth.getCurrentUser());\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n showHideProgressDialog(false);\n updateUI(null);\n }\n }\n });\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "GoogleAuthenticatorKey createCredentials();", "public String getSelectedProfile() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"SELECTED_PROFILE\", null);\n\t}", "ValueMap getProfileMap(\n Authorizable authorizable,\n Session session) throws RepositoryException, StorageClientException, AccessDeniedException;", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n mCallbackManager.onActivityResult(requestCode, resultCode, data); // DATA CALLBACK FOR FACEBOOK\n if (data != null) {\n progressDialog.show();\n progressDialog.setMessage(\"Logging you in...\");\n if (requestCode == 9001 && resultCode == RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n assert account != null;\n firebaseAuthWithGoogle(account.getIdToken());\n } catch (ApiException e) {\n e.printStackTrace();\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n }else {\n progressDialog.dismiss();\n }\n }", "CertprofileQa getCertprofile(String certprofileName);", "public com.google.protobuf.StringValue getProfilePictureUrl() {\n if (profilePictureUrlBuilder_ == null) {\n return profilePictureUrl_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : profilePictureUrl_;\n } else {\n return profilePictureUrlBuilder_.getMessage();\n }\n }", "public com.google.protobuf.ByteString\n getProfileURLBytes() {\n java.lang.Object ref = profileURL_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n profileURL_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "private void googleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // add to shared preferences\n GoogleSignInAccount account = result.getSignInAccount();\n userName = account.getDisplayName();\n userEmail = account.getEmail();\n userGoogleId = account.getId();\n userPhotoUrl = account.getPhotoUrl();\n\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.putString(getString(R.string.shared_prefs_key_email), userEmail);\n editor.putString(getString(R.string.shared_prefs_key_google_id), userGoogleId);\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrl.toString());\n\n editor.apply();\n\n // add to firebase users\n member = new Member();\n member.setUsername(userName);\n member.setEmail(userEmail);\n member.setId(userGoogleId);\n member.setPhotoUrl(userPhotoUrl.toString());\n member.setLoginType(getString(R.string.login_type_google));\n\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(member.getEmail()).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String key;\n if (dataSnapshot.exists()) {\n key = dataSnapshot.getChildren().iterator().next().getKey();\n firebaseKey = key;\n getUserDetailsFromFirebase();\n } else {\n // new user\n key = rref.push().getKey();\n }\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n editor.apply();\n\n Map<String, Object> userUpdates = new HashMap<>();\n\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_username), userName);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_google_id), userGoogleId);\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_photo_url), userPhotoUrl.toString());\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_login_type), getString(R.string.login_type_google));\n userUpdates.put(key + \"/\" + getString(R.string.firebase_key_email), userEmail);\n\n rref.updateChildren(userUpdates);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n\n } else {\n gotoMainActivity();\n }\n }" ]
[ "0.6969862", "0.67185396", "0.64642006", "0.62573594", "0.6185595", "0.617921", "0.614174", "0.60776407", "0.60764146", "0.6051935", "0.6022234", "0.6017609", "0.5985996", "0.5983912", "0.5937732", "0.5903281", "0.5898916", "0.5898879", "0.5857925", "0.58249474", "0.5813772", "0.58061606", "0.5802358", "0.5794286", "0.5785932", "0.578065", "0.57794863", "0.5767767", "0.5765002", "0.57507133", "0.5744329", "0.574375", "0.57412654", "0.5718293", "0.57081544", "0.5708142", "0.57080775", "0.5707718", "0.5707551", "0.5699375", "0.56879187", "0.56752473", "0.56731886", "0.5670781", "0.56582856", "0.565765", "0.5653004", "0.56485075", "0.5640968", "0.5640434", "0.56384426", "0.56237364", "0.56167936", "0.5609286", "0.56048185", "0.55967367", "0.55669695", "0.55665445", "0.55596495", "0.5555548", "0.55353403", "0.55336267", "0.5532359", "0.5519481", "0.55185944", "0.5517062", "0.5504424", "0.55039966", "0.54990214", "0.5487331", "0.5484572", "0.5482294", "0.5477208", "0.5471088", "0.54672855", "0.5466904", "0.54666317", "0.5451167", "0.5451167", "0.5451167", "0.54394484", "0.54364395", "0.54359037", "0.5421861", "0.5412739", "0.5396", "0.5392429", "0.538813", "0.538813", "0.538813", "0.538813", "0.5374178", "0.5369422", "0.5364896", "0.53569883", "0.5343526", "0.53359914", "0.5331743", "0.53290105", "0.532804" ]
0.79646206
0
probably won't have to use this function either
public static void findWumpus(GameTile[][] visibleMap) { //method to find the position of the Wumpus //this will be used to determine where the beast is and to kill it for(int i=0; i<visibleMap.length; i++) { for(int j=0; j<visibleMap[i].length; j++) { if(visibleMap[i][j].hasWumpus()) { wumpusX = i; wumpusY = j; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private void strin() {\n\n\t}", "public void method_4270() {}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void kk12() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "protected boolean func_70041_e_() { return false; }", "private void m50366E() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "protected abstract Set method_1559();", "public void skystonePos4() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void skystonePos6() {\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo12628c() {\n }", "private void parseData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void level7() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n public int describeContents() { return 0; }", "public abstract void mo27385c();", "public abstract void mo6549b();", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "void unableToListContents();", "private void m50367F() {\n }", "public abstract void mo27386d();", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "public void redibujarAlgoformers() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void skystonePos2() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo21877s() {\n }", "static void feladat4() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public abstract int mo9754s();", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "public void skystonePos5() {\n }", "public void skystonePos3() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "StackManipulation cached();", "public void identify() {\n\n\t}", "@Override\n public void preprocess() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "void mo57277b();", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override public int describeContents() { return 0; }", "public abstract String mo41079d();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "public void Exterior() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "static void feladat9() {\n\t}", "@Override\n public void preprocess() {\n }" ]
[ "0.56414336", "0.5529691", "0.5417027", "0.53309745", "0.5330721", "0.53233266", "0.53216803", "0.53207964", "0.52877545", "0.5282024", "0.5252832", "0.5214639", "0.52093947", "0.51916283", "0.5173966", "0.51706296", "0.5164613", "0.5164613", "0.51577944", "0.5144722", "0.5143944", "0.51178545", "0.51127565", "0.5102025", "0.509786", "0.5092036", "0.5063525", "0.50366586", "0.5033895", "0.5011857", "0.501005", "0.4969745", "0.496683", "0.49649143", "0.49611947", "0.49606055", "0.495435", "0.49516013", "0.49315897", "0.49256802", "0.491758", "0.49143115", "0.49111593", "0.49085015", "0.49047136", "0.4870172", "0.48607016", "0.48548377", "0.4853361", "0.48520395", "0.4849595", "0.48476115", "0.48284268", "0.48219895", "0.48216718", "0.48109865", "0.4807327", "0.48064432", "0.48039195", "0.48029867", "0.47942", "0.47848755", "0.47735643", "0.47621888", "0.4753358", "0.47511697", "0.47423968", "0.4740211", "0.4740211", "0.4740211", "0.4740211", "0.4740211", "0.4740211", "0.4740211", "0.4737183", "0.4734529", "0.47332096", "0.47311172", "0.47311172", "0.4728174", "0.47271782", "0.4725419", "0.47240165", "0.47214425", "0.47191116", "0.47191116", "0.47185892", "0.4715216", "0.47148198", "0.4714629", "0.47111323", "0.47083575", "0.47077036", "0.47038516", "0.47029564", "0.46963024", "0.46960446", "0.46894398", "0.46874732", "0.46868345", "0.46812293" ]
0.0
-1
probably won't have to use this function. Need to change what arguments go into the wumpus state class
public void setStartingPosition(GameTile [][] visibleMap) { //method to set the starting position of our player. for(int i=0; i<visibleMap.length; i++) { for(int j=0; j<visibleMap[i].length; j++) { if(visibleMap[i][j] != null && visibleMap[i][j].hasPlayer()) { playerX = i; playerY = j; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo15871a(StateT statet);", "@Override\n protected void incrementStates() {\n\n }", "void setState(Object sender, ConditionT condition, Params params, StateT state);", "private StateUtils() {}", "@Override public void setTime(UpodWorld w)\n{\n StateRepr sr = getState(w);\n sr.checkAgain(0);\n}", "abstract public void updateState();", "protected abstract int newState();", "public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }", "Object getState();", "public void updateState();", "public void getState();", "public ModuleStateManagerState(Collection<ModuleStateData> stateData)\r\n {\r\n myStateData = stateData;\r\n }", "public State getState(){return this.state;}", "private Object getState() {\n\treturn null;\r\n}", "private SyncState() {}", "@Override\n public void updateState(Perception p) {\n \n //TODO: Complete Method\n }", "@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }", "StatePac build();", "@Override\n\tpublic void setState(STATE state) {\n\n\t}", "Update withState(String state);", "private State5() {\n\t}", "LabState state();", "State(Main aMain) {\n\tmain = aMain;\n\tback = Integer.parseInt(main.myProps.getProperty(\"yesterdays\"));\n\tfront = Integer.parseInt(main.myProps.getProperty(\"tomorrows\"));\n\tmaps = new Hashtable();\n availWeath = new Hashtable();\n\n main.myFrw.listen(new MapListener(), ScaledMap.TYPE, null);\n main.myFrw.announce(this);\n stateDoc = Framework.parse(main.myPath + \"state.xml\", \"state\");\n availWeath = loadFromDoc();\n }", "public abstract S createWindowState();", "@Override\n\tpublic void stateChanged() {\n\t\t\n\t}", "public abstract State getSourceState ();", "java.lang.String getState();", "private GameStatePresets()\n {\n\n }", "public abstract void setState(String sValue);", "@Override\n public int getState() {\n return myState;\n }", "public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }", "protected S state() {\n return state;\n }", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "void beforeState();", "public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}", "public int getState() {return state;}", "public int getState() {return state;}", "public interface State {\r\n\r\n}", "@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}", "private void setState(WFDState s) {\n Log.d(TAG, \"Moving from \" + sState + \" --> \" + s);\n sState = s;\n }", "State(String name)\n\t\t{\n\t\t\tthis.name = name;\n\t\t}", "public abstract String getState();", "int getStateValue2();", "void stateUpdate(String msg);", "int mo5866a(State state, String... strArr);", "void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}", "ESMFState getState();", "State getState();", "State getState();", "State getState();", "State getState();", "public State state();", "OperationalState operationalState();", "OperationalState operationalState();", "@Test\n public void Test_Maintain_State() {\n Map<String, Integer> inMap = new HashMap<>();\n calc = new StomaStateCalculator(3, 800);\n\n inMap.put(\"UrineColour\", 2);\n inMap.put(\"UrineFrequency\", 3);\n inMap.put(\"Volume\", 600);\n inMap.put(\"Consistency\", 2);\n inMap.put(\"PhysicalCharacteristics\", 6);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n\n calc.Calculate_New_State(inMap);\n\n assertEquals(\"Green\", calc.getState());\n assertEquals(3.0, calc.getStateVal(), 0.0);\n }", "public void setStateOfMovement(int movementState){stateOfMovement = movementState; }", "public State(GameStateManager gameStateManager){ //constructor\n this.gameStateManager = gameStateManager;\n camera = new OrthographicCamera();\n mouse = new Vector3();\n }", "public void\ninit(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n data = getDefault().getValue();\n}", "public abstract ExplicitMachineState convertToExplicitMachineState(MachineState state);", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "@Override\n\tpublic int getState() {\n\t\treturn 0;\n\t}", "public S getCurrentState();", "@Override\n\tpublic void setState(State state) \n\t\t{ current = new PuzzleState(state.getString(state.getState()),\n\t\t\t\t\t\t\t\t\tstate.getString(state.getGoalState())); \n\t\t}", "S getInitialState();", "IfaceState createState(int nlocal,IfaceSafetyStatus sts);", "@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }", "public State(){}", "public interface ThingState\n{\n\n}", "void create( State state );", "public WorldState ()\n\t{\n\t\tproperties = new HashMap<String, WorldStateProperty>();\n\t}", "private ModalityState(int value) { this.value = value; }", "public State (){\n for ( int i = 0 ; i < 5; i ++){\n philosopherNum[i] = i;\n currentState[i] = \"thinking\";\n conditions[i] = mutex.newCondition();\n }\n }", "void setState(int state);", "@Override\n public void updateState(Map<String, String> information) {\n String startTimeString = information.get(\"Start Time\");\n Date startTime = parseDate(startTimeString);\n\n // Integer smartStart = parseTime(information.get(\"Smart Start\"));\n\n String currentProgram = information.get(\"Program\");\n // String phase = information.get(\"Phase\");\n // Integer remainingTime = parseTime(information.get(\"Remaining Time\"));\n // Integer duration = parseTime(information.get(\"Duration\"));\n\n currentState = new State(startTime, currentProgram);\n publishMieleState(currentState);\n }", "public BSState() {\n this.playerTurn=1;\n this.p1TotalHits=0;\n this.p2TotalHits=0;\n this.shipsAlive=10;\n this.shipsSunk=0;\n this.isHit=false;\n this.phaseOfGame=\"SetUp\";\n this.shotLocations=null;\n this.shipLocations=null;\n this.shipType=1;\n this.board=new String[10][20];\n //this.player1=new HumanPlayer;\n //this.player2=new ComputerPlayer;\n\n }", "private Transition(State sourceState) {\r\n \t\t\tthis.sourceState = sourceState;\r\n \t\t\tthis.nextStateInfo = new ArrayList<NextStateInfo>();\r\n \t\t}", "long getStateChange();", "public TransactionStateUpdater() {\n super();\n }", "public void SetState(int s) {\n this.state=LS[s];\n }", "PowerState getState();", "int getStateValue1();", "public GameState(State.StateView state) {\n }", "public ExecuteState() {\r\n PrevPC = 0;\r\n ChangedLoc = -1;\r\n OldInst = new CodeBlueInstruction();\r\n }", "public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }", "public abstract void stateChanged(STATE state);", "private void setGameState() // Convert the string version of the game state to the GameState version.\n\t{\n\t\tif (gameStateString.equalsIgnoreCase(\"waitingForStart\"))\n\t\t{\n\t\t\tgameState = GameState.waitingForStart;\n\t\t}\n\t\telse if (gameStateString.equalsIgnoreCase(\"gameWelcome\"))\n\t\t{\n\t\t\tgameState = GameState.gameWelcome;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"decideWhoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerOneGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerTwoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerOnesTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerTwosTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"aPlayerHasWon\"))\n\t\t{\n\t\t\tgameState = GameState.aPlayerHasWon;\n\t\t} \n\n\t}", "protected abstract Value execute(final State state, final HashMap<ParameterDef, Value> args) throws SetlException;", "public State(String state_rep) {\n\t\tthis.state_rep = state_rep;\n\t}", "public StateHeader() { // for externalization\r\n }", "StatePacBuilder operationalState(OperationalState operationalState);", "@Override\n public String getState()\n {\n return state;\n }", "interface WithState {\n /**\n * Specifies the state property: If specified, the value must be Shipping, which tells the Import/Export\n * service that the package for the job has been shipped. The ReturnAddress and DeliveryPackage properties\n * must have been set either in this request or in a previous request, otherwise the request will fail. .\n *\n * @param state If specified, the value must be Shipping, which tells the Import/Export service that the\n * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been\n * set either in this request or in a previous request, otherwise the request will fail.\n * @return the next definition stage.\n */\n Update withState(String state);\n }", "void update( State state );", "int getStateValue3();", "private State(String name, int index) {\r\n \t\t\tthis.index = index;\r\n \t\t\tthis.name = name;\r\n \t\t}", "@Test\n\tpublic void validState_changeState() {\n\t\tString testState = \"OFF\";\n\t\tItem testItem = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\ttestItem.changeState(testItem.getName(), testState);\n\t\tSystem.out.println(testItem.getState());\n\t\tassertEquals(testItem.getState(), testState);\n\t\t\n\t}" ]
[ "0.68462044", "0.6534638", "0.65336394", "0.6532271", "0.6417674", "0.6390407", "0.63666296", "0.6270003", "0.61970556", "0.61748666", "0.6148404", "0.61260915", "0.60913646", "0.6083229", "0.6082864", "0.603202", "0.6021356", "0.60175514", "0.6001062", "0.5996934", "0.598074", "0.5973789", "0.59722984", "0.5958081", "0.5937021", "0.5932774", "0.5922143", "0.5910926", "0.5906366", "0.58930683", "0.586751", "0.58642477", "0.586378", "0.58567977", "0.5856202", "0.58460766", "0.58460766", "0.5845342", "0.58304113", "0.5829189", "0.5827542", "0.58263946", "0.58195955", "0.5817765", "0.5815593", "0.581044", "0.58081895", "0.5806286", "0.5806286", "0.5806286", "0.5806286", "0.579572", "0.57951146", "0.57951146", "0.57879764", "0.5787949", "0.57661617", "0.57628703", "0.57537425", "0.57525915", "0.57525915", "0.57525915", "0.57525915", "0.57525915", "0.57525915", "0.57521105", "0.5745091", "0.57433045", "0.5737591", "0.5732907", "0.57309", "0.57274646", "0.5721708", "0.57177293", "0.57100075", "0.5709135", "0.5702153", "0.5692897", "0.56890076", "0.5667148", "0.56669605", "0.56602514", "0.56514156", "0.565099", "0.56455076", "0.5644036", "0.5634066", "0.56286013", "0.56249243", "0.56245106", "0.5624213", "0.5620483", "0.56198823", "0.5613275", "0.56121695", "0.5611985", "0.56017566", "0.5598617", "0.5598051", "0.55957514", "0.5594543" ]
0.0
-1
new search function for its in here our goal state would be getting the closest unknown state before this, need to probably check if the the tile were standing on is safe. If it is safe, then generate children. Our first state tile will be known(starting position) lets see what we can do.
public WumpusState wellItsDarkNow(GameTile[][] visibleMap) { Queue<WumpusState> queue = new LinkedList<WumpusState>(); HashMap<String, Boolean> visitedStates = new HashMap<String, Boolean>(); WumpusState state = new WumpusState(visibleMap, playerX, playerY); long nodesExpanded = 0; queue.add(state); if(state.getParent()!=null) { queue.add(state.getParent()); } while(!queue.isEmpty()) { WumpusState currentState = queue.remove(); System.out.println(currentState.toString()); if(currentState.getGoldCollected()) { ArrayList<AgentAction> actions = currentState.getAllActions(); for(int i=1;i<actions.size(); i++) { System.out.println("gold"); System.out.println(actions.get(i)); nextMoves.add(actions.get(i)); } goldCollected = true; return currentState; } if(currentState.spaceNotVisited()) { ArrayList<AgentAction> actions = currentState.getAllActions(); for(int i=1;i<actions.size(); i++) { System.out.println("null"); System.out.println(actions.get(i)); nextMoves.add(actions.get(i)); } return currentState; } if(visitedStates.containsKey(currentState.toString())) { continue; } else { visitedStates.put(currentState.toString(), true); WumpusState[] childrenOfCurrentChild = currentState.generateChildrenStates(); for(int j=0; j<childrenOfCurrentChild.length; j++) { if(childrenOfCurrentChild[j]!=null) { queue.add(childrenOfCurrentChild[j]); } } } } goldCollected = true; return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "public void addToNextMoves(GameTile[][] visibleMap) {\r\n\t\t\r\n\t\t//Breadth First Search Code\r\n//\t\tWumpusState state = new WumpusState(visibleMap, playerX, playerY, wumpusX, wumpusY);\r\n\r\n\t\tQueue<WumpusState> queue = new LinkedList<WumpusState>();\t\t\t\t//use the queue in the same way\t\r\n\t\tHashMap<String, Boolean> visitedStates = new HashMap<String, Boolean>();\t//add all children to the queue, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//add all the children to the hash and set values to true.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//once all the children have been visited, generate children sequentially for the children that already been added \r\n\t\tWumpusState state = new WumpusState(visibleMap, playerX, playerY);\r\n\t\tlong nodesExpanded = 0;\r\n\t\t\r\n\t\tqueue.add(state);\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tWumpusState currentState = queue.remove();\r\n\t\t\tSystem.out.println(currentState.toString());\r\n\t\t\tif(currentState.getPlayerX() == 4 && currentState.getPlayerY() == 1) {\r\n\t\t\t\tnodesExpanded = visitedStates.size();\r\n\t\t\t\tSystem.out.println(\"Nodes Expanded: \"+nodesExpanded);\r\n\t\t\t\tArrayList<AgentAction> actions = currentState.getAllActions();\r\n\t\t\t\tfor(int i=1;i<actions.size(); i++) {\r\n\t\t\t\t\tSystem.out.println(actions.get(i));\r\n\t\t\t\t\tnextMoves.add(actions.get(i));\r\n\t\t\t\t}\r\n\t\t\t\tnextMoves.add(AgentAction.declareVictory);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(visitedStates.containsKey(currentState.toString())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvisitedStates.put(currentState.toString(), true);\r\n\t\t\t\tWumpusState[] childrenOfCurrentChild = currentState.generateChildrenStates();\r\n\t\t\t\tfor(int j=0; j<childrenOfCurrentChild.length; j++) {\r\n\t\t\t\t\tif(childrenOfCurrentChild[j]!=null) {\r\n\t\t\t\t\t\tqueue.add(childrenOfCurrentChild[j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private Stack<MapLocation> findPath(State.StateView state)\n {\n Unit.UnitView townhallUnit = state.getUnit(townhallID);\n Unit.UnitView footmanUnit = state.getUnit(footmanID);\n \n MapLocation startLoc = new MapLocation(footmanUnit.getXPosition(), footmanUnit.getYPosition(), null, 0);\n \n MapLocation goalLoc = new MapLocation(townhallUnit.getXPosition(), townhallUnit.getYPosition(), null, 0);\n \n MapLocation footmanLoc = null;\n if(enemyFootmanID != -1) {\n Unit.UnitView enemyFootmanUnit = state.getUnit(enemyFootmanID);\n footmanLoc = new MapLocation(enemyFootmanUnit.getXPosition(), enemyFootmanUnit.getYPosition(), null, 0);\n }\n \n // get resource locations\n List<Integer> resourceIDs = state.getAllResourceIds();\n Set<MapLocation> resourceLocations = new HashSet<MapLocation>();\n for(Integer resourceID : resourceIDs)\n {\n ResourceNode.ResourceView resource = state.getResourceNode(resourceID);\n \n resourceLocations.add(new MapLocation(resource.getXPosition(), resource.getYPosition(), null, 0));\n }\n \n return AstarSearch(startLoc, goalLoc, state.getXExtent(), state.getYExtent(), footmanLoc, resourceLocations);\n }", "private void GreedySearch(){\n\n Queue<Node> expanded = new LinkedList<>();\n ArrayList<Node> fringe = new ArrayList<>();\n ArrayList<Node> fringeTemp = new ArrayList<>();\n\n\n Node current = startNode;\n\n while(expanded.size() < 1000){\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal is reached.\n solutionPath(current);\n expanded.add(current);\n printExpanded(expanded);\n System.exit(0);\n }\n\n\n boolean b = cycleCheck(current,expanded);\n\n if(!b) {\n expanded.add(current);\n }\n\n if(!b){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n\n }\n }\n\n if(current.getDigit().last_changed != 1){\n\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString())){\n fringe.add(child_node);\n }\n }\n }\n\n }\n\n\n\n for(Node n : fringe){\n heuristicSetter(n);\n\n }\n\n fringeTemp.addAll(fringe);\n //now all the nodes in fringe have the heuristic value.\n //We can get the last added minm\n Node minm;\n if(fringeTemp.size() != 0){\n minm = fringeTemp.get(0);\n }else{\n break;\n }\n for(int i = 1; i<fringeTemp.size(); i++){\n if(fringeTemp.get(i).getHeuristic() <= minm.getHeuristic()){\n minm = fringeTemp.get(i);\n }\n }\n\n //now we have the minm for the next stage.\n current = minm;\n fringeTemp.remove(minm);\n fringe.clear();\n }\n\n //While loop ends\n System.out.println(\"No solution found.\");\n printExpanded(expanded);\n\n\n\n }", "private void gameTree(MinimaxNode<GameState> currentNode, int depth, int oIndex){\n currentNode.setNodeIndex(oIndex); \n if (depth == 0) {\n return;\n }\n else{\n if (currentNode.getState().isDead(oIndex)){ //checks to see if current player is dead, if so, just skips their moves\n int newIndex = (oIndex + 1) % currentNode.getState().getNrPlayers();\n/* if(oIndex == 3){\n newIndex = 0;\n }\n else{\n newIndex = oIndex + 1;\n }*/\n gameTree(currentNode, depth-1, newIndex);\n }\n else{\n //this if statement sets up chance nodes, if the target has been met it will create 5 children nodes with randomly generated new target postitions \n if(!currentNode.getState().hasTarget()){\n currentNode.setChanceNode();\n for(int i = 1; i <= 5; i++){\n try{\n GameState newState = (GameState)currentNode.getState().clone();\n newState.chooseNextTarget();\n MinimaxNode<GameState> childNode = new MinimaxNode(newState);\n childNode.setProbability(0.2);\n currentNode.addChild(childNode); \n }\n catch (CloneNotSupportedException e){\n System.out.println(\"Clone not excepted\");\n }\n \n }\n for (int i = 0; i < currentNode.getNumberOfChildren(); i++){\n gameTree(currentNode.getChildren().get(i), depth, oIndex);\n }\n\n }\n else{\n List<Integer> options = new ArrayList();\n for (int i = 1; i <= 4; i++) {\n if (currentNode.getState().isLegalMove(oIndex, i)){\n options.add(i);\n }\n }\n for (int i = 0; i < options.size(); i++){\n try{\n GameState newState = (GameState)currentNode.getState().clone();\n newState.setOrientation(oIndex, options.get(i));\n newState.updatePlayerPosition(oIndex);\n MinimaxNode<GameState> childNode = new MinimaxNode(newState);\n currentNode.addChild(childNode);\n }\n catch (CloneNotSupportedException e){\n System.out.println(\"Clone not excepted\");\n }\n }\n int newIndex = (oIndex + 1) % currentNode.getState().getNrPlayers();\n /* if(oIndex == 3){\n newIndex = 0;\n }\n else{\n newIndex = oIndex + 1;\n }*/\n for (int i = 0; i < currentNode.getNumberOfChildren(); i++){\n gameTree(currentNode.getChildren().get(i), depth-1, newIndex);\n }\n } \n } \n }\n }", "private void depthFirstSearch(Slot start, ArrayList<Pair<Slot, Slot>> moves, HashMap<Slot, Slot> parents) {\n boolean[][] visitedSlots = new boolean[Board.MAX_ROW][Board.MAX_COLUMN];\n\n setSlotsAsNotVisited(visitedSlots);\n\n Stack<Slot> dfsStack = new Stack<>();\n int color = start.getColor();\n\n dfsStack.push(start);\n Slot previous = start;\n\n boardObject.setSlotColor(boardObject.getSlot(start.getRow(), start.getColumn()), Slot.EMPTY);\n\n while (!dfsStack.empty()) {\n Pair<Slot, Slot> next;\n Slot current = dfsStack.pop();\n\n if (!visitedSlots[current.getRow()][current.getColumn()] && !current.equals(previous)) {\n if (!current.equals(start)) {\n visitedSlots[current.getRow()][current.getColumn()] = true;\n }\n\n next = new Pair<>(start, current);\n\n moves.add(next);\n }\n\n Slot up = getUp(current);\n Slot down = getDown(current);\n Slot left = getLeft(current);\n Slot right = getRight(current);\n\n if (left != null && !visitedSlots[left.getRow()][left.getColumn()]) {\n if (!isChild(current, left, parents)) {\n dfsStack.push(left);\n parents.put(left, current);\n }\n }\n\n if (down != null && !visitedSlots[down.getRow()][down.getColumn()]) {\n if (!isChild(current, down, parents)) {\n dfsStack.push(down);\n parents.put(down, current);\n }\n }\n\n if (right != null && !visitedSlots[right.getRow()][right.getColumn()]) {\n if (!isChild(current, right, parents)) {\n dfsStack.push(right);\n parents.put(right, current);\n }\n }\n\n if (up != null && !visitedSlots[up.getRow()][up.getColumn()]) {\n if (!isChild(current, up, parents)) {\n dfsStack.push(up);\n parents.put(up, current);\n }\n }\n\n previous = current;\n }\n\n boardObject.setSlotColor(boardObject.getSlot(start.getRow(), start.getColumn()), color);\n }", "@Override\n List<NodeData> pathFind() throws NoPathException {\n System.out.println(\"Starting Scenic\");\n\n frontier.add(start);\n\n while(!frontier.isEmpty()) {\n StarNode current = frontier.getLast();\n frontier.removeLast(); // pop the priority queue\n if(current.getXCoord() == goal.getXCoord() && current.getYCoord() == goal.getYCoord()) {\n // If we are at the goal, we need to backtrack through the shortest path\n System.out.println(\"At target!\");\n finalList.add(current); // we have to add the goal to the path before we start backtracking\n while(!(current.getXCoord() == start.getXCoord() && current.getYCoord() == start.getYCoord())) {\n finalList.add(current.getPreviousNode());\n current = current.getPreviousNode();\n System.out.println(current.getNodeID());\n }\n return finalList;\n }\n else {\n // we need to get all the neighbor nodes, identify their costs, and put them into the queue\n LinkedList<StarNode> neighbors = current.getNeighbors();\n // we also need to remove the previous node from the list of neighbors because we do not want to backtrack\n neighbors.remove(current.getPreviousNode());\n\n for (StarNode newnode : neighbors) {\n int nodePlace = this.listContainsId(frontier, newnode);\n if(nodePlace > -1) {\n if (frontier.get(nodePlace).getF() > actionCost(newnode) + distanceToGo(newnode, goal)) {\n System.out.println(\"Here\");\n frontier.remove(frontier.get(nodePlace));\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n }\n else {\n newnode.setPreviousNode(current);\n frontier.add(newnode);\n newnode.setF(actionCost(newnode) + distanceToGo(newnode, goal));\n }\n\n // This fixes the problem with infinitely looping elevators (I hope)\n if(current.getNodeType().equals(\"ELEV\") && newnode.getNodeType().equals(\"ELEV\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"ELEV\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n if(current.getNodeType().equals(\"STAI\") && newnode.getNodeType().equals(\"STAI\")) {\n for (Iterator<StarNode> iterator = newnode.neighbors.iterator(); iterator.hasNext();) {\n StarNode newneighbor = iterator.next();\n if (newneighbor.getNodeType().equals(\"STAI\")) {\n // Remove the current element from the iterator and the list.\n iterator.remove();\n }\n }\n }\n // this is where the node is put in the right place in the queue\n Collections.sort(frontier);\n }\n }\n }\n throw new NoPathException(start.getLongName(), goal.getLongName());\n }", "public ArrayList<SearchNode> search(Problem p) {\n\tfrontier = new NodeQueue();\t// The frontier is a queue of expanded SearchNodes not processed yet\n\texplored = new HashSet<SearchNode>();\t/// The explored set is a set of nodes that have been processed \n\tGridPos startState = (GridPos) p.getInitialState();\t// The start state is given\n\tfrontier.addNodeToFront(new SearchNode(startState));\t// Initialize the frontier with the start state \n\n\t\n\tpath = new ArrayList<SearchNode>();\t// Path will be empty until we find the goal\n\t\t\n\n\n\twhile(!frontier.isEmpty()){\n\n\t SearchNode s = frontier.removeFirst(); \n\t GridPos g = s.getState(); \n\n\t if ( p.isGoalState(g) ) {\n\t\tpath = s.getPathFromRoot();\t\n\t\tbreak; \n\t }\n\t \n\t explored.add(s); \t \n\t ArrayList<GridPos> childStates = p.getReachableStatesFrom(g);\n\n\t while(!childStates.isEmpty()){\n\n\t\tSearchNode child = new SearchNode(childStates.get(0), s); \n\n\t\tif(!explored.contains(child) && !frontier.contains(child)){\n\n\t\t if ( p.isGoalState(child.getState()) ) {\n\t\t\n\t\t\tpath = child.getPathFromRoot();\t\n\t\t\treturn path; \n\t\t }\n\n\t\t if(insertFront) \n\t\t\tfrontier.addNodeToFront(child); \t\t \t\t\n\t\t else\t\n\t\t\tfrontier.addNodeToBack(child); \t \n\n\n\n\t\t}\n\n\t\tchildStates.remove(0);\n\t }\t \n\t}\n\n\n\treturn path;\n\n }", "private MoveTree generateTree() {\n\n\t\tArrayList<MoveTree> leaves = new ArrayList<>();\n\n\t\tMoveTree tree = new MoveTree(Main.getSWController().getGame().getCurrentGameState());\n\t\tleaves.add(tree);\n\n\t\tfinal Flag flag = new Flag(), finished = new Flag();\n\n\t\tTimer timer = new Timer(true);\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (flag) {\n\t\t\t\t\tif (!finished.value)\n\t\t\t\t\t\tflag.value = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}, 9000);\n\n\t\twhile (true) {\n\t\t\tArrayList<MoveTree> newLeaves = new ArrayList<>();\n\t\t\tfor (MoveTree leaf : leaves) {\n\t\t\t\tGameState state = leaf.getState();\n\t\t\t\tPlayer currentPlayer = state.getPlayer();\n\n\t\t\t\tfor (Card handcard : currentPlayer.getHand()) {\n\t\t\t\t\tBuildCapability capability = Main.getSWController().getPlayerController().canBuild(currentPlayer, handcard, state);\n\t\t\t\t\tswitch (capability) {\n\t\t\t\t\tcase FREE:\n\t\t\t\t\tcase OWN_RESOURCE:\n\t\t\t\t\t\tMove move = new Move(handcard, Action.BUILD);\n\t\t\t\t\t\tMoveTree newTree = new MoveTree(move, doMove(move, currentPlayer, state));\n\t\t\t\t\t\tnewLeaves.add(newTree);\n\t\t\t\t\t\tleaf.addChild(newTree);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\tTradeOption trade = Main.getSWController().getPlayerController().getTradeOptions(currentPlayer, handcard.getRequired(), state).get(0);\n\t\t\t\t\t\tMove tradeMove = new Move(handcard, Action.BUILD);\n\t\t\t\t\t\ttradeMove.setTradeOption(trade);\n\t\t\t\t\t\tMoveTree newTree2 = new MoveTree(tradeMove, doMove(tradeMove, currentPlayer, state));\n\t\t\t\t\t\tnewLeaves.add(newTree2);\n\t\t\t\t\t\tleaf.addChild(newTree2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (currentPlayer.getBoard().nextSlot() != -1) {\n\t\t\t\t\t\tArrayList<Resource> slotRequirements = new ArrayList<>(Arrays.asList(currentPlayer.getBoard().getNextSlotRequirement()));\n\t\t\t\t\t\tcapability = Main.getSWController().getPlayerController().hasResources(currentPlayer, slotRequirements, state);\n\t\t\t\t\t\tswitch (capability) {\n\t\t\t\t\t\tcase OWN_RESOURCE:\n\t\t\t\t\t\t\tMove move = new Move(handcard, Action.PLACE_SLOT);\n\t\t\t\t\t\t\tMoveTree newTree = new MoveTree(move, doMove(move, currentPlayer, state));\n\t\t\t\t\t\t\tnewLeaves.add(newTree);\n\t\t\t\t\t\t\tleaf.addChild(newTree);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\t\tTradeOption trade = Main.getSWController().getPlayerController().getTradeOptions(currentPlayer, slotRequirements, state).get(0);\n\t\t\t\t\t\t\tMove tradeMove = new Move(handcard, Action.PLACE_SLOT);\n\t\t\t\t\t\t\ttradeMove.setTradeOption(trade);\n\t\t\t\t\t\t\tMoveTree newTree2 = new MoveTree(tradeMove, doMove(tradeMove, currentPlayer, state));\n\t\t\t\t\t\t\tnewLeaves.add(newTree2);\n\t\t\t\t\t\t\tleaf.addChild(newTree2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tMove sellmove = new Move(handcard, Action.SELL);\n\t\t\t\t\tMoveTree selltree = new MoveTree(sellmove, doMove(sellmove, currentPlayer, state));\n\t\t\t\t\tnewLeaves.add(selltree);\n\t\t\t\t\tleaf.addChild(selltree);\n \n\t\t\t\t\tif (!currentPlayer.isOlympiaUsed() && !Main.getSWController().getCardController().hasCard(currentPlayer, handcard.getInternalName())) {\n\t\t\t\t\t\tMove olympiamove = new Move(handcard, Action.OLYMPIA);\n\t\t\t\t\t\tMoveTree olympiatree = new MoveTree(olympiamove, doMove(olympiamove, currentPlayer, state));\n\t\t\t\t\t\tnewLeaves.add(olympiatree);\n\t\t\t\t\t\tleaf.addChild(olympiatree);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsynchronized (flag) {\n\t\t\t\t\tif (flag.value) {\n\t\t\t\t\t\tfor (MoveTree child : leaves)\n\t\t\t\t\t\t\tchild.getChildren().clear();\n\t\t\t\t\t\treturn tree;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tboolean breakAfterwards = false;\n\n\t\t\tfor (MoveTree newLeaf : newLeaves) {\n\t\t\t\tfor (Player player : newLeaf.getState().getPlayers()) {\n\t\t\t\t\tif (player.isMausoleum()) {\n\t\t\t\t\t\tCard card = getHalikarnassusCard(player, newLeaf.getState().getTrash(), newLeaf.getState());\n\t\t\t\t\t\tif (card == null)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tnewLeaf.getState().getTrash().remove(card);\n\t\t\t\t\t\tplayer.getBoard().addCard(card);\n\t\t\t\t\t\tif (card.getEffects() != null)\n\t\t\t\t\t\t\tfor (Effect effect : card.getEffects())\n\t\t\t\t\t\t\t\tif (effect.getType() == EffectType.WHEN_PLAYED)\n\t\t\t\t\t\t\t\t\teffect.run(player, Main.getSWController().getGame());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnewLeaf.getState().setCurrentPlayer((newLeaf.getState().getCurrentPlayer() + 1) % newLeaf.getState().getPlayers().size());\n\n\t\t\t\tif (newLeaf.getState().getCurrentPlayer() == newLeaf.getState().getFirstPlayer()) {\n\t\t\t\t\tif (newLeaf.getState().getRound() < GameController.NUM_ROUNDS)\n\t\t\t\t\t\tMain.getSWController().getGameController().nextRound(Main.getSWController().getGame(), newLeaf.getState());\n\t\t\t\t\telse // stop look-ahead at the end of age\n\t\t\t\t\t\tbreakAfterwards = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tleaves.clear();\n\t\t\tleaves.addAll(newLeaves);\n\n\t\t\tif (breakAfterwards)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfinished.value = true;\n\n\t\treturn tree;\n\t}", "public String[] search() {\n\t\t\n\t\troot.setScore(0);\n\t\tleaves = 0;\n\t\t\n\t\t/*\n\t\t * Interrupt the think() thread so we can have the updated game tree\n\t\t */\n\t\t\n\t\tString[] move = new String[2];\n\t\t\n\t\t// Find the max or min value for the white or black player respectively\n\t\tfloat val = alphaBeta(root, max_depth, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, player);\n\t\t\n\t\t// Retrieve the move that has the min/max vlaue\n\t\tArrayList<Node> moves = root.getChildren();\n\t\tfor(Node n : moves) {\n\t\t\tif(Float.compare(n.value, val) == 0) {\n\t\t\t\tint[] m = new int[6];\n\t\t\t\tint encodedM = n.move;\n\t\t\t\t\n\t\t\t\t// Decode the move\n\t\t\t\tfor(int i = 0; i < 6; i++) {\n\t\t\t\t\tm[i] = encodedM & 0xf;\n\t\t\t\t\tencodedM >>= 4;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Convert the array into a string array with the format [0] => \"a7-b7\", [1] => \"b5\"\n\t\t\t\tmove[0] = ((char)(m[0] + 97)) + \"\" + (m[1]) + \"-\" + ((char)(m[2] + 97)) + \"\" + (m[3]);\n\t\t\t\tmove[1] = ((char)(m[4] + 97)) + \"\" + (m[5]);\n\t\t\t\t\n\t\t\t\t// Play the move on the AI's g_board, set the root to this node and break out of the loop\n\t\t\t\tg_board.doMove(n.move);\n\t\t\t\t\n\t\t\t\t// Reset the root rather than set it to a branch since we can currently only achieve a depth of 2-ply\n\t\t\t\troot.getChildren().clear();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(leaves <= 2000) {\n\t\t\tmax_depth++;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Start the think() thread\n\t\t */\n\t\t\n\t\treturn move;\n\t}", "public List<Node> findPath(Vector2i start, Vector2i goal) {\n\t\tList<Node> openList = new ArrayList<Node>(); //All possible Nodes(tiles) that could be shortest path\n\t\tList<Node> closedList = new ArrayList<Node>(); //All no longer considered Nodes(tiles)\n\t\tNode current = new Node(start,null, 0, getDistance(start, goal)); //Current Node that is being considered(first tile)\n\t\topenList.add(current);\n\t\twhile(openList.size() > 0) {\n\t\t\tCollections.sort(openList, nodeSorter); // will sort open list based on what's specified in the comparator\n\t\t\tcurrent = openList.get(0); // sets current Node to first possible element in openList\n\t\t\tif(current.tile.equals(goal)) {\n\t\t\t\tList<Node> path = new ArrayList<Node>(); //adds the nodes that make the path \n\t\t\t\twhile(current.parent != null) { //retraces steps from finish back to start\n\t\t\t\t\tpath.add(current); // add current node to list\n\t\t\t\t\tcurrent = current.parent; //sets current node to previous node to strace path back to start\n\t\t\t\t}\n\t\t\t\topenList.clear(); //erases from memory since algorithm is finished, ensures performance is not affected since garbage collection may not be called\n\t\t\t\tclosedList.clear();\n\t\t\t\treturn path; //returns the desired result shortest/quickest path\n\t\t\t}\n\t\t\topenList.remove(current); //if current Node is not part of path to goal remove\n\t\t\tclosedList.add(current); //and puts it in closedList, because it's not used\n\t\t\tfor(int i = 0; i < 9; i++ ) { //8-adjacent tile possibilities\n\t\t\t\tif(i == 4) continue; //index 4 is the middle tile (tile player currently stands on), no reason to check it\n\t\t\t\tint x = (int)current.tile.getX();\n\t\t\t\tint y = (int)current.tile.getY();\n\t\t\t\tint xi = (i % 3) - 1; //will be either -1, 0 or 1\n\t\t\t\tint yi = (i / 3) - 1; // sets up a coordinate position for Nodes (tiles)\n\t\t\t\tTile at = getTile(x + xi, y + yi); // at tile be all surrounding tiles when iteration is run\n\t\t\t\tif(at == null) continue; //if empty tile skip it\n\t\t\t\tif(at.solid()) continue; //if solid cant pass through so skip/ don't consider this tile\n\t\t\t\tVector2i a = new Vector2i(x + xi, y + yi); //Same thing as node(tile), but changed to a vector\n\t\t\t\tdouble gCost = current.gCost + (getDistance(current.tile, a) == 1 ? 1 : 0.95); //*calculates only adjacent nodes* current tile (initial start is 0) plus distance between current tile to tile being considered (a)\n\t\t\t\tdouble hCost = getDistance(a, goal);\t\t\t\t\t\t\t\t// conditional piece above for gCost makes a more realist chasing, because without it mob will NOT use diagonals because higher gCost\n\t\t\t\tNode node = new Node(a, current, gCost, hCost);\n\t\t\t\tif(vecInList(closedList, a) && gCost >= node.gCost) continue; //is node has already been checked \n\t\t\t\tif(!vecInList(openList, a) || gCost < node.gCost) openList.add(node);\n\t\t\t}\n\t\t}\n\t\tclosedList.clear(); //clear the list, openList will have already been clear if no path was found\n\t\treturn null; //a default return if no possible path was found\n\t}", "public static List<MapTile> findPath(MovableObject mO, GameObject destination) {\n List<MapTile> openList = new LinkedList<>();\n List<MapTile> closedList = new LinkedList<>();\n List<MapTile> neighbours = new ArrayList<>();\n Point objectTileCoord = mO.getGridCoordinates();\n Point destinationTileCoord = destination.getGridCoordinates();\n MapTile currentTile;\n try {\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.print(\"Error while getting current tile for pathfinding. Trying to adapt coords.\");\n if (mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight()) {\n objectTileCoord.y -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight() && mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n objectTileCoord.y -= 1;\n }\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n }\n\n currentTile.setParentMapTile(null);\n currentTile.totalMovementCost = 0;\n openList.add(currentTile);\n\n boolean notDone = true;\n\n while (notDone) {\n neighbours.clear();\n currentTile = getLowestCostTileFromOpenList(openList, currentTile);\n closedList.add(currentTile);\n openList.remove(currentTile);\n\n //ReachedGoal?\n if ((currentTile.xTileCoord == destinationTileCoord.x) && (currentTile.yTileCoord == destinationTileCoord.y)) {\n try {\n return getResultListOfMapTiles(currentTile);\n } catch (Exception e) {\n System.out.println(\"closed list size: \" + closedList.size());\n throw e;\n }\n }\n\n neighbours.addAll(currentTile.getNeighbourTiles());\n neighbours.removeAll(closedList);\n\n for (MapTile mapTile : neighbours) {\n if (openList.contains(mapTile)) {\n // compare total movement costs.\n if (mapTile.totalMovementCost > currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost) {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost;\n }\n } else {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.totalMovementCost + currentTile.getMovementCostToTile(mapTile);\n openList.add(mapTile);\n }\n }\n }\n return null;\n }", "public ArrayList<State> childStates(){\n boolean hasExpanded = false;\n this.childStates = new ArrayList<>();\n Successor successor = new Successor(); //for calling the successors functions\n //cases for this\n for (int i = 0; i < boardRows ; i++) {\n for (int j = 0; j < boardColumns; j++) {\n if(!hasExpanded){\n if(currentBoardState[i][j] == 0){\n\n if( i - 1 >= 0){\n //call moveDown()\n //System.out.println(i + \" \" + j);\n //System.out.println(\"calling moveDown()\");\n State newState = successor.moveDown(i, j, this.getCurrentBoardState(), this.getGoalBoardState());\n\n //newState.printBoard();\n childStates.add(newState);\n }\n\n if( i + 1 <= boardRows-1){\n //call moveUp()\n //System.out.println(i + \" \" + j);\n //System.out.println(\"calling moveUp()\");\n //this.printBoard();\n State newState = successor.moveUp(i, j, this.getCurrentBoardState(), this.getGoalBoardState());\n //newState.printBoard();\n childStates.add(newState);\n }\n\n if(j - 1 >= 0){\n //System.out.println(i + \" \" + j);\n //System.out.println(\"calling moveRight()\");\n //this.printBoard();\n State newState = successor.moveRIght(i, j, this.getCurrentBoardState(), this.getGoalBoardState());\n //newState.printBoard();\n childStates.add(newState);\n }\n\n if( j + 1 <= boardColumns - 1){\n //System.out.println(i + \" \" + j);\n //System.out.println(\"calling moveLeft()\");\n //this.printBoard();\n State newState = successor.moveLeft(i,j,this.getCurrentBoardState(), this.getGoalBoardState());\n //newState.printBoard();\n childStates.add(newState);\n }\n hasExpanded = true;\n }\n }\n }\n }\n return childStates;\n }", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "private static Point findFarthestState(Cells[][] wallBoard, int column, int row)\n\t{\n\t\tint tries = 100;\n\t\tint farthest = 0;\n\t\tint farthestX = 0;\n\t\tint farthestY = 0;\n\t\tPoint farthestPos = new Point();\n\n\t\t_DF = new DeadlocksFinder(wallBoard);\n\n\t\tint[][] staticDLMap = _DF.getStaticDLMap();\n\n\t\tdo\n\t\t{\n\t\t\tint i = rn.nextInt(rows);\n\t\t\tint j = rn.nextInt(columns);\n\n\t\t\tif(board[i][j]==Cells.FLOOR && staticDLMap[i][j]!=1 && canStillReachEveryCrates(wallBoard, j, i))\n\t\t\t{\n\t\t\t\tArrayList<Point> path = _PF.findAReversedWay(column, row, j, i);\n\t\t\t\tint distance = path.size();\n\n\t\t\t\tif(distance==0)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tPoint ppos = new Point((int)path.get(path.size()-1).getX(), (int)path.get(path.size()-1).getY());\n\n\t\t\t\tif(distance > farthest)\n\t\t\t\t{\n\t\t\t\t\tfarthestX=j;\n\t\t\t\t\tfarthestY=i;\n\t\t\t\t\tfarthest=distance;\n\t\t\t\t\tfarthestPos=ppos;\n\t\t\t\t}\n\t\t\t}\n\t\t} while(tries-->0);\n\t\t\t\t\n\n\n\t\t/*for(int i=0; i<rows; i++)\n\t\t{\n\t\t\tfor(int j=0; j<columns; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR && staticDLMap[i][j]!=1)// && canStillReachEveryCrates(wallBoard, j, i))\n\t\t\t\t{\n\t\t\t\t\tArrayList<Point> path = _PF.findAReversedWay(column, row, j, i);\n\t\t\t\t\tint distance = path.size();\n\n\t\t\t\t\tif(distance==0)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tPoint ppos = new Point((int)path.get(path.size()-1).getX(), (int)path.get(path.size()-1).getY());\n\n\t\t\t\t\tif(distance > farthest)\n\t\t\t\t\t{\n\t\t\t\t\t\tfarthestX=j;\n\t\t\t\t\t\tfarthestY=i;\n\t\t\t\t\t\tfarthest=distance;\n\t\t\t\t\t\tfarthestPos=ppos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\n\t\tplayerPos.add(farthestPos);\n\t\treturn new Point(farthestX, farthestY);\n\t}", "@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}", "public WumpusState huntTheWumpus(GameTile[][] visibleMap) {\r\n\t\tWumpusState state = new WumpusState(visibleMap, playerX, playerY, wumpusX, wumpusY);\r\n\r\n\t\tQueue<WumpusState> queue = new LinkedList<WumpusState>();\t\t\t\t//use the queue in the same way\t\r\n\t\tHashMap<String, Boolean> visitedStates = new HashMap<String, Boolean>();\t//add all children to the queue, \r\n\t\t\r\n\t\tqueue.add(state);\r\n\t\t\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\tWumpusState currentState = queue.remove();\r\n\t\t\tSystem.out.println(currentState.toString());\r\n\t\t\t//check whether the wumpus can be shot\r\n\t\t\tif(canShootWumpus(currentState)) {\r\n\t\t\t\t//need a function to check where the agent needs to shoot his arrow\r\n\t\t\t\tArrayList<AgentAction> actions = currentState.getAllActions();\r\n\t\t\t\t//maybe just not run this for loop\r\n\t\t\t\t//we don't know\r\n\t\t\t\tfor(int i=1;i<actions.size(); i++) {\r\n\t\t\t\t\tSystem.out.println(actions.get(i));\r\n\t\t\t\t\tnextMoves.add(actions.get(i));\r\n\t\t\t\t}\r\n\t\t\t\tnextMoves.add(shootTheWumpus(currentState));\r\n\t\t\t\twumpusHunted = true;\r\n\t\t\t\treturn currentState;\r\n\t\t\t}\r\n\t\t\tif(visitedStates.containsKey(currentState.toString())) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvisitedStates.put(currentState.toString(), true);\r\n\t\t\t\tWumpusState[] childrenOfCurrentChild = currentState.generateChildrenStates();\r\n\t\t\t\tfor(int j=0; j<childrenOfCurrentChild.length; j++) {\r\n\t\t\t\t\tif(childrenOfCurrentChild[j]!=null) {\r\n\t\t\t\t\t\tqueue.add(childrenOfCurrentChild[j]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn null;\r\n\t}", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "private Cell breadthFirstSearch(WorldMap worldMap, Cell startCell, CELLTYPE goalType, Hashtable<Cell, Cell> prev) {\n\n\t\t// Using markedSet to avoid re-checking already visited nodes\n\t\tHashSet<Cell> markedSet = new HashSet<Cell>();\n\t\tLinkedList<Cell> queue = new LinkedList<Cell>();\n\n\t\tmarkedSet.add(startCell);\n\t\tqueue.add(startCell);\n\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell cell = queue.remove();\n\t\t\tif (cell.getCellType() == goalType)\n\t\t\t\treturn cell;\n\t\t\tLinkedList<Cell> neighbors = generateSuccessors(worldMap, cell, goalType);\n\n\t\t\t/*\n\t\t\t * If looking for unexplored, shuffle list. Since the neighbors are\n\t\t\t * always returned NESW, it's best to shuffle the list if ant wants\n\t\t\t * to explore a random portion of the map.\n\t\t\t */\n\t\t\tif (goalType == CELLTYPE.UNEXPLORED)\n\t\t\t\tCollections.shuffle(neighbors, new Random(System.currentTimeMillis()));\n\n\t\t\tfor (Cell neighbor : neighbors)\n\t\t\t\tif (!markedSet.contains(neighbor)) {\n\t\t\t\t\tmarkedSet.add(neighbor);\n\t\t\t\t\tqueue.add(neighbor);\n\t\t\t\t\tprev.put(neighbor, cell);\n\t\t\t\t}\n\t\t}\n\t\t// If reached here, goal type doesn't exist\n\t\treturn null;\n\t}", "private int heuristic(Node node, int currentDepth) {\n\n int ef, w1 = 1, w2 = 1, w3 = 0, w4 = 10, w5 = 1, w6 = 35, e1 = 0, e2 = 0, e3 = 0, e4 = 0, e5 = 0, e6 = 0;\n\n int ourSeedsInStore = node.getBoard().getSeedsInStore(ourSide);\n int oppSeedsInStore = node.getBoard().getSeedsInStore(ourSide.opposite());\n\n\n // hardcode fix.\n int parentOurSeedsInStore = 0;\n int parentOppSeedsInStore = 0;\n int parentMove = 0;\n int parentOurSeedsInHouse = 0;\n int parentOppSeedsInHouse = 0;\n\n if (currentDepth != 1) {\n parentOurSeedsInStore = node.getParent().getBoard().getSeedsInStore(ourSide);\n parentOppSeedsInStore = node.getParent().getBoard().getSeedsInStore(ourSide.opposite());\n parentMove = node.getName();\n parentOurSeedsInHouse = node.getParent().getBoard().getSeeds(ourSide, parentMove);\n parentOppSeedsInHouse = node.getParent().getBoard().getSeeds(ourSide.opposite(), parentMove);\n }\n\n int ourFreeHouse = 0;\n int oppFreeHouse = 0;\n int ourSeeds = ourSeedsInStore;\n int oppSeeds = oppSeedsInStore;\n\n int asdf1 = ourSeedsInStore - parentOurSeedsInStore;\n int asdf2 = oppSeedsInStore - parentOppSeedsInStore;\n\n e6 = asdf1 - asdf2;\n\n for (int i = 1; i <= 7; i++) {\n ourSeeds += node.getBoard().getSeeds(ourSide, i);\n oppSeeds += node.getBoard().getSeeds(ourSide.opposite(), i);\n }\n\n for (int i = 1; i <= 7; i++) {\n if (node.getBoard().getSeeds(ourSide, i) == 0)\n ourFreeHouse++;\n if (node.getBoard().getSeeds(ourSide.opposite(), i) == 0)\n oppFreeHouse++;\n }\n\n e1 = ourSeeds - oppSeeds;\n e2 = ourFreeHouse - oppFreeHouse;\n\n // hardcode fix.\n if (currentDepth != 1) {\n if (node.getParent().getPlayerSide() == this.getOurSide()) {\n // if last move puts seed into store\n if ((parentMove + parentOurSeedsInHouse) % 8 == 0) {\n e4 = 1;\n e3 = (parentMove + parentOurSeedsInHouse) / 8;\n } else if (parentMove + parentOurSeedsInStore > 8) {\n e4 = 0;\n e3 = (parentMove + parentOurSeedsInStore) / 8;\n }\n\n for (int i = 1; i <= 7; i++) {\n int parentOurSeedsInCurrentHouse = node.getParent().getBoard().getSeeds(ourSide, i);\n int parentOppSeedsInFrontHouse = node.getParent().getBoard().getSeeds(ourSide.opposite(), 8 - i);\n int oppSeedsInFrontHouse = node.getBoard().getSeeds(ourSide.opposite(), 8 - i);\n // if there's no seed in current house && there is seed right in front of us\n if ((parentOurSeedsInCurrentHouse == 0 || parentOurSeedsInCurrentHouse == 15) && parentOppSeedsInFrontHouse != 0 && oppSeedsInFrontHouse == 0) {\n if (currentDepth != 2) {\n if (node.getParent().getParent().getPlayerSide() == this.getOurSide()) {\n w5 = 5;\n e5 = parentOppSeedsInFrontHouse;\n break;\n }\n }\n e5 = parentOppSeedsInFrontHouse;\n break;\n }\n\n }\n } else if (node.getParent().getPlayerSide() == this.getOurSide().opposite()) {\n\n if (parentMove + parentOppSeedsInHouse == 8) {\n e4 = -1;\n e3 = -1 * (parentMove + parentOppSeedsInHouse) / 8;\n } else if (parentMove + parentOppSeedsInStore > 8) {\n e4 = 0;\n e3 = -(parentMove + parentOppSeedsInStore) / 8;\n }\n\n\n for (int i = 1; i <= 7; i++) {\n int parentOppSeedsInCurrentHouse = node.getParent().getBoard().getSeeds(ourSide.opposite(), i);\n int parentOurSeedsInFrontHouse = node.getParent().getBoard().getSeeds(ourSide, 8 - i);\n int oppSeedsInCurrentHouse = node.getBoard().getSeeds(ourSide, 8 - i);\n\n if ((parentOppSeedsInCurrentHouse == 0 || parentOppSeedsInCurrentHouse == 15) && parentOurSeedsInFrontHouse != 0 && oppSeedsInCurrentHouse == 0) {\n if (currentDepth != 2) {\n if (node.getParent().getParent().getPlayerSide() == this.getOurSide()) {\n w5 = 5;\n e5 = -parentOurSeedsInFrontHouse;\n break;\n }\n }\n w5 = 5;\n e5 = -parentOurSeedsInFrontHouse;\n break;\n }\n }\n }\n }\n ef = w1 * e1 + w2 * e2 + w3 * e3 + w4 * e4 + w5 * e5 + w6 * e6;\n return ef;\n }", "public MahjongSolitaireMove findMove()\n {\n // MAKE A MOVE TO FILL IN \n MahjongSolitaireMove move = new MahjongSolitaireMove();\n\n // GO THROUGH THE ENTIRE GRID TO FIND A MATCH BETWEEN AVAILABLE TILES\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[i][j];\n if (stack1.size() > 0)\n {\n // GET THE FIRST TILE\n MahjongSolitaireTile testTile1 = stack1.get(stack1.size()-1);\n for (int k = 0; k < gridColumns; k++)\n {\n for (int l = 0; l < gridRows; l++)\n {\n if (!((i == k) && (j == l)))\n { \n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[k][l];\n if (stack2.size() > 0) \n {\n // AND TEST IT AGAINST THE SECOND TILE\n MahjongSolitaireTile testTile2 = stack2.get(stack2.size()-1);\n \n // DO THEY MATCH\n if (testTile1.match(testTile2))\n {\n // YES, FILL IN THE MOVE AND RETURN IT\n move.col1 = i;\n move.row1 = j;\n move.col2 = k;\n move.row2 = l;\n return move;\n }\n }\n }\n }\n }\n }\n }\n }\n // WE'VE SEARCHED THE ENTIRE GRID AND THERE\n // ARE NO POSSIBLE MOVES REMAINING\n return null;\n }", "protected boolean func_225557_a_(IWorldGenerationReader worldgen, Random rand, BlockPos position, Set<BlockPos> changedBlocks, Set<BlockPos> changedBlocks2, MutableBoundingBox bbox, BaseTreeFeatureConfig conf) {\n/* 114 */ if (!(worldgen instanceof IWorld))\n/* 115 */ return false; \n/* 116 */ IWorld world = (IWorld)worldgen;\n/* 117 */ int height = rand.nextInt(5) + 4;\n/* 118 */ boolean spawnTree = true;\n/* 119 */ if (position.func_177956_o() >= 1 && position.func_177956_o() + height + 1 <= world.func_217301_I()) {\n/* 120 */ for (int j = position.func_177956_o(); j <= position.func_177956_o() + 1 + height; j++) {\n/* 121 */ int k = 1;\n/* 122 */ if (j == position.func_177956_o())\n/* 123 */ k = 0; \n/* 124 */ if (j >= position.func_177956_o() + height - 1)\n/* 125 */ k = 2; \n/* 126 */ for (int px = position.func_177958_n() - k; px <= position.func_177958_n() + k && spawnTree; px++) {\n/* 127 */ for (int pz = position.func_177952_p() - k; pz <= position.func_177952_p() + k && spawnTree; pz++) {\n/* 128 */ if (j >= 0 && j < world.func_217301_I()) {\n/* 129 */ if (!isReplaceable(world, new BlockPos(px, j, pz))) {\n/* 130 */ spawnTree = false;\n/* */ }\n/* */ } else {\n/* 133 */ spawnTree = false;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* 138 */ if (!spawnTree) {\n/* 139 */ return false;\n/* */ }\n/* 141 */ Block ground = world.func_180495_p(position.func_177982_a(0, -1, 0)).func_177230_c();\n/* 142 */ Block ground2 = world.func_180495_p(position.func_177982_a(0, -2, 0)).func_177230_c();\n/* 143 */ if ((ground != Blocks.field_196658_i.func_176223_P().func_177230_c() && ground != Blocks.field_150346_d.func_176223_P().func_177230_c()) || (ground2 != Blocks.field_196658_i\n/* 144 */ .func_176223_P().func_177230_c() && ground2 != Blocks.field_150346_d.func_176223_P().func_177230_c()))\n/* 145 */ return false; \n/* 146 */ BlockState state = world.func_180495_p(position.func_177977_b());\n/* 147 */ if (position.func_177956_o() < world.func_217301_I() - height - 1) {\n/* 148 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, position.func_177977_b(), Blocks.field_150346_d.func_176223_P(), bbox); int genh;\n/* 149 */ for (genh = position.func_177956_o() - 3 + height; genh <= position.func_177956_o() + height; genh++) {\n/* 150 */ int i4 = genh - position.func_177956_o() + height;\n/* 151 */ int j1 = (int)(1.0D - i4 * 0.5D);\n/* 152 */ for (int k1 = position.func_177958_n() - j1; k1 <= position.func_177958_n() + j1; k1++) {\n/* 153 */ for (int i2 = position.func_177952_p() - j1; i2 <= position.func_177952_p() + j1; i2++) {\n/* 154 */ int j2 = i2 - position.func_177952_p();\n/* 155 */ if (Math.abs(position.func_177958_n()) != j1 || Math.abs(j2) != j1 || (rand.nextInt(2) != 0 && i4 != 0)) {\n/* 156 */ BlockPos blockpos = new BlockPos(k1, genh, i2);\n/* 157 */ state = world.func_180495_p(blockpos);\n/* 158 */ if (state.func_177230_c().isAir(state, (IBlockReader)world, blockpos) || state.func_185904_a().func_76230_c() || state\n/* 159 */ .func_203425_a(BlockTags.field_206952_E) || state.func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c() || state\n/* 160 */ .func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c()) {\n/* 161 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, blockpos, Blocks.field_150350_a.func_176223_P(), bbox);\n/* */ }\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* 167 */ for (genh = 0; genh < height; genh++) {\n/* 168 */ BlockPos genhPos = position.func_177981_b(genh);\n/* 169 */ state = world.func_180495_p(genhPos);\n/* 170 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, genhPos, Blocks.field_196619_M.func_176223_P(), bbox);\n/* 171 */ if (state.func_177230_c().isAir(state, (IBlockReader)world, genhPos) || state.func_185904_a().func_76230_c() || state.func_203425_a(BlockTags.field_206952_E) || state\n/* 172 */ .func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c() || state\n/* 173 */ .func_177230_c() == Blocks.field_150350_a.func_176223_P().func_177230_c());\n/* */ } \n/* */ \n/* 176 */ if (rand.nextInt(4) == 0 && height > 5) {\n/* 177 */ for (int hlevel = 0; hlevel < 2; hlevel++) {\n/* 178 */ for (Direction Direction : Direction.Plane.HORIZONTAL) {\n/* 179 */ if (rand.nextInt(4 - hlevel) == 0) {\n/* 180 */ Direction dir = Direction.func_176734_d();\n/* 181 */ setTreeBlockState(changedBlocks, (IWorldWriter)world, position.func_177982_a(dir.func_82601_c(), height - 5 + hlevel, dir.func_82599_e()), Blocks.field_150350_a\n/* 182 */ .func_176223_P(), bbox);\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 187 */ return true;\n/* */ } \n/* 189 */ return false;\n/* */ } \n/* */ \n/* */ \n/* 193 */ return false;\n/* */ }", "public Stack<MazePoint> DepthFirstSearch(int row, int column)\n {\n //cMaze[row][column].wasVisited()\n if(cMaze[row][column].isExit())\n {\n sPath.push(cMaze[row][column]);\n //print out the path\n PrintPath(sPath, true);\n return sPath;\n }\n else\n {\n //when not visit\n if(!cMaze[row][column].wasVisited())\n {\n if(cMaze[row][column].hasItem())\n {\n String itemName = cMaze[row][column].pickUpItem();\n Item item = new Item(itemName);\n //check if the item is in the hashmap\n if(availableItemsHashMap.get(item) != null)\n {\n inventoryList.insert(itemName);\n }\n else\n {\n cMaze[row][column].dropItem();\n }\n }\n //mark as vist\n cMaze[row][column].markVisited();\n //push into stack\n sPath.push(cMaze[row][column]);\n }\n //determine where to traverse next (S, E, W, N)\n //recursively\n if(cMaze[row+1][column].canBeNavigated() || cMaze[row+1][column].isExit())// or (cMaze[row+1][column] != VISITED_MARKER && cMaze[row+1][column] != 'W')\n {\n return DepthFirstSearch(row+1, column);\n }\n else if(cMaze[row][column+1].canBeNavigated() || cMaze[row][column+1].isExit())\n {\n return DepthFirstSearch(row, column+1);\n }\n else if(cMaze[row][column-1].canBeNavigated() || cMaze[row][column-1].isExit())\n {\n return DepthFirstSearch(row, column-1);\n }\n else if(cMaze[row-1][column].canBeNavigated() || cMaze[row-1][column].isExit())\n {\n return DepthFirstSearch(row-1, column);\n }\n //no where could go, then return\n else\n {\n sPath.pop();\n if(sPath.isEmpty())\n {\n //print nothing found\n PrintPath(sPath, false);\n return sPath;\n }\n MazePoint mp = sPath.top();\n int mpRow = mp.getRow();\n int mpColumn = mp.getColumn();\n return DepthFirstSearch(mpRow, mpColumn);\n }\n }\n }", "public ArrayList<UUSearchNode> getSuccessors() {\n\n ArrayList<UUSearchNode> successors = new ArrayList<UUSearchNode>();//this will be returned\n ArrayList<CannibalNode> helper = new ArrayList<CannibalNode>();\n\n if (this.state[2]==1){ //if the boat is on the starting shore\n helper.add(new CannibalNode(this.state[0] - 2, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 2,\n this.state[2] - 1, this.depth + 1)); //subtracting <021>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <111>\n helper.add(new CannibalNode(this.state[0] - 1, this.state[1],\n this.state[2] - 1, this.depth + 1)); //subtracting <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] - 1,\n this.state[2] - 1, this.depth + 1)); //subtracting <011>\n }else{ //if the boat is on the opposite shore\n helper.add(new CannibalNode(this.state[0] + 2, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <201>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 2,\n this.state[2] + 1, this.depth + 1)); //adding <021>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <111>\n helper.add(new CannibalNode(this.state[0] + 1, this.state[1],\n this.state[2] + 1, this.depth + 1)); //adding <101>\n helper.add(new CannibalNode(this.state[0], this.state[1] + 1,\n this.state[2] + 1, this.depth + 1)); //adding <011>\n }\n\n //now we check for feasibility and legality\n for(CannibalNode n : helper){\n if(isFeasibleState(n.state) && isLegalState(n.state)){\n successors.add(n);\n }\n }\n return successors;\n }", "private Board DLS(Board start, Board goal, int depth) {\n Board found = null;\n // Paso base: Si start es la solucion y esta en el ultimo nivel, regresa\n if((depth == 0) && start.equals(goal)) {\n return start;\n }\n // Si el nivel aun no es el ultimo, se obtienen los nodos hijos\n // y se vuelve a llamar la funcion en ellos\n else if(depth > 0) {\n // Obtiene los nodos hijos\n // Todas las posibles configuraciones del tablero que se pueden\n // hacer a partir de la actual\n ArrayList<Board> children = start.expand();\n\n expandedNodes++;\n\n // Para cada hijo vuelve a hacer lo mismo\n for(Board child : children) {\n found = DLS(child, goal, depth - 1);\n if(found != null)\n return found;\n }\n }\n return null;\n }", "private void reachAllValidPoint(int[][] tempMap, int i, int j) {\n\n\t\ttempMap[i][j] = 0;\n\t\t\n\t\t//moving in edge\n\t\tif (j > 0\n\t\t\t\t&& tempMap[i][j - 1] == 1\n\t\t\t\t&& (mapElementArray[i][j - 1] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i][j - 1] instanceof Teleporter || mapElementArray[i][j - 1] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, j - 1);\n\t\t}\n\t\tif (j + 1 < width\n\t\t\t\t&& tempMap[i][j + 1] == 1\n\t\t\t\t&& (mapElementArray[i][j + 1] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i][j + 1] instanceof Teleporter || mapElementArray[i][j + 1] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, j + 1);\n\t\t}\n\t\tif (i - 1 >= 0\n\t\t\t\t&& tempMap[i - 1][j] == 1\n\t\t\t\t&& (mapElementArray[i - 1][j] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i - 1][j] instanceof Teleporter || mapElementArray[i][j - 1] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i - 1, j);\n\t\t}\n\t\tif (i + 1 < height\n\t\t\t\t&& tempMap[i + 1][j] == 1\n\t\t\t\t&& (mapElementArray[i + 1][j] instanceof Item\n\t\t\t\t\t\t|| mapElementArray[i + 1][j] instanceof Teleporter || mapElementArray[i + 1][j] instanceof PlayerSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i + 1, j);\n\t\t}\n\t\t\n\t\t//moving at edge, must consider if this point is a RandPaar\n\t\tif (i == 0 && tempMap[height - 1][j] == 1\n\t\t\t\t&& !(mapElementArray[height - 1][j] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[height - 1][j] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[height - 1][j] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, height - 1, j);\n\t\t} else if (i == height - 1 && tempMap[0][j] == 1\n\t\t\t\t&& !(mapElementArray[0][j] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[0][j] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[0][j] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, 0, j);\n\t\t} else if (j == 0 && tempMap[i][width - 1] == 1\n\t\t\t\t&& !(mapElementArray[i][width - 1] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[i][width - 1] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[i][width - 1] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, width - 1);\n\t\t} else if (j == width - 1 && tempMap[i][0] == 1\n\t\t\t\t&& !(mapElementArray[i][0] instanceof Wall)\n\t\t\t\t&& !(mapElementArray[i][0] instanceof InvisibleWall)\n\t\t\t\t&& !(mapElementArray[i][0] instanceof GhostSpawnPoint)) {\n\t\t\treachAllValidPoint(tempMap, i, 0);\n\t\t}\n\t}", "private Queue<Position> pathToClosest(MyAgentState state, Position start, int goal) {\n\t\tQueue<Position> frontier = new LinkedList<Position>();\n\t\tSet<String> enqueued = new HashSet<String>();\n\t\tMap<Position, Position> preceedes = new HashMap<Position, Position>();\n\t\tfrontier.add(start);\n\t\tenqueued.add(start.toString());\n\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tPosition pos = frontier.remove();\n\t\t\tif (state.getTileData(pos) == goal) {\n\t\t\t\treturn toQueue(preceedes, pos, start);\n\t\t\t}\n\t\t\t\n\t\t\tfor (Position neighbour : pos.neighbours()) {\n\t\t\t\tif (!enqueued.contains(neighbour.toString()) && state.getTileData(neighbour) != state.WALL) {\n\t\t\t\t\tpreceedes.put(neighbour, pos);\n\t\t\t\t\tfrontier.add(neighbour);\n\t\t\t\t\tenqueued.add(neighbour.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean step(){\n\t\tboolean ret=false;\n\t\tif(!isFollowing()){\n\t\t\t//80% valoszinuseggel leptet egy szomszedra\n\t\t\tRandom rng=new Random();\n\t\t\tboolean doAStep =rng.nextInt(10)>1;\n\t\t\tif(doAStep){\n\t\t\t\tif(tile != null){\n\t\t\t\tint bound=tile.getNeighbors().size();\n\t\t\t\t//System.out.println(\"bound :\"+bound);\n\t\t\t\t//System.out.println(\"ez lett a bound: \"+rng.nextInt(bound));\n\t\t\t\tret=step(tile.getNeighbors().get(rng.nextInt(bound)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private void CreatingBeautyContentTopK() {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \tbestBranches=objGrapB.relativePositionDepthSearchTopK(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,maxScreens,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \r\n\t \tBranch objBranch=new Branch();\r\n\t \t//bestBranches=objBranch.sortBranches(bestBranches);\r\n\t \t\r\n\t \t//System.out.print( \"CounterStates\"+objGrapB.getCounterIDs() );\r\n\t \r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branches foundeded\r\n\t \r\n\t Iterator<Branch> nombreIterator = bestBranches.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBranch elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getHeuristicValue()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t \t//Just here to implement the n screens!\r\n\t for(int i=0;i<maxScreens;i++)\r\n\t {//block from Lelis and Reis (>class GeradorDeFasses)\r\n/*\t \ttry {\r\n\t \t\tLevel levelScreen=PaintElements(((Branch)bestBranches.get(i)).getStates(),this.clone());\t\t\t\t\t\r\n\t\t\t\t\tScreen objScreen=new Screen();\r\n\t\t\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n\t \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t\t\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t\t\t \r\n\t\t\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\t\t\tcopiador.copy(\"\" + i, \"Screens/\");\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}*/\r\n\t }\r\n\t \r\n\t\t\t\r\n\t\t}", "private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }", "public void findTheWay(int x, int y) {\n\n Queue<Tile> elements = new LinkedList<Tile>();\n\n if (!getTile(x, y).canTileMove()) {\n System.out.println(\"Impossible to move\");\n return;\n }\n\n elements.add(getTile(x, y));\n getTile(x, y).setVisited(true);\n\n System.out.println(\"The starting tile is \" + getTile(x, y).getX() + \" \" + getTile(x, y).getY());\n\n while (!elements.isEmpty()) {\n Tile current = elements.poll();\n System.out.println(\"Current tile \" + current.getX() + \" \" + current.getY() + \" from the queue\");\n if (current.getX() == MAX && current.getY() == MAX) {\n System.out.println(\"Reached bottom right corner\");\n return;\n }\n\n for (int i = 0; i < ALLX.length; i++) {\n int newX = current.getX() + ALLX[i];\n int newY = current.getY() + ALLY[i];\n\n if (isInside(newX, newY)) {\n if (!getTile(newX, newY).isVisited()) {\n\n getTile(newX, newY).setVisited(true);\n System.out.println(\"Next added tile to the queue is \" + newX + \" \" + newY);\n\n elements.add(getTile(newX, newY));\n }\n }\n }\n }\n\n }", "@Override\n public ArrayList<AState> getAllPossibleStates(AState state){\n MazeState s = (MazeState)state;\n ArrayList<AState> moves = new ArrayList<AState> ();\n\n\n int row = s.getState().getRowIndex();\n int col = s.getState().getColumnIndex();\n int [][] matrix = mySearchableMaze.getMazeMatrix();\n\n\n if(row+1 < matrix.length){\n if( matrix[row+1][col]==0 ){\n moves.add(new MazeState(new Position(row+1,col),false,s.getCost()+1));\n\n }\n }\n if(row-1 >= 0 ){\n if( matrix[row-1][col]==0){\n moves.add(new MazeState(new Position(row-1,col),false,s.getCost()+1));\n\n }\n }\n if(col+1 < matrix[0].length ){\n if( matrix[row][col+1]==0 ){\n moves.add(new MazeState(new Position(row,col+1),false,s.getCost()+1));\n\n }\n }\n if(col-1 >= 0 ){\n if( matrix[row][col-1]==0 ){\n moves.add(new MazeState(new Position(row,col-1),false,s.getCost()+1));\n }\n }\n return moves;\n }", "public State hillClimbing(){\r\n\t\tState currentState = start;\r\n\t\t\r\n\t\twhile(true){\r\n\t\t\tArrayList<State> successors = currentState.generateNeighbours(currentState);\r\n\t\t\tStatesGenerated= StatesGenerated + successors.size();\r\n\t\t\t\r\n\t\t\tState nextState = null;\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<successors.size(); i++){\r\n\t\t\t\tif(successors.get(i).compareTo(currentState) < 0){\r\n\t\t\t\t\tnextState = successors.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(nextState==null)\r\n\t\t\t\treturn currentState;\r\n\t\t\t\r\n\t\t\tcurrentState = nextState;\r\n\t\t}\r\n\t}", "@Override\n\t//loc1 is the start location,loc2 is the destination\n\tpublic ArrayList<MapCoordinate> bfsSearch(MapCoordinate loc1, MapCoordinate loc2, Map m) {\n\t\tSystem.out.println(\"come into bfsSearch\");\n\t\tif(m.isAgentHasAxe() && m.isAgentHasKey()){\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add to visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){ //this is important else if(cTemp!='~'), not barely else,\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' &&s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasAxe()){ //only have axe\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasKey()){ //only have key\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation());\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head,in this fashion, return the right order of route\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY()); \n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY()); //state that move west\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1); //state move north\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1); //state move south\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * \n\t\t **/\t\t\n\t\telse{ //have no key and axe\n\t\t\tSystem.out.println(\"come into the last elas clause\");\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\tVisited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\t//int i=0;\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\t//i++;\n\t\t\t\t//System.out.println(\"come into while: \"+i);\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited, let program won't stuck in \n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tSystem.out.println(\"return computed route\");\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\tfor(MapCoordinate mc:route){\n\t\t\t\t\t\t//System.out.println(\"print returned route in bfssearch\");\n\t\t\t\t\t\tSystem.out.print(\"mc:\"+mc.getX()+\" \"+mc.getY()+\"->\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\t//System.out.println(\"1 if\");\n\t\t\t\t\tif(s.getPrevState()!=null &&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if\");\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 if\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 if\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 else\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.add(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*'&&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "private Vector2d generateNewPositionForChild()\n {\n\n Random generator = new Random();\n List<Vector2d> freePositions = new LinkedList<>(); //tutaj przechowywane sa wolne pozycje wokol\n Vector2d position;\n Directions directionToAdd;\n\n for(int i = 0; i<8; i++)\n {\n directionToAdd = new Directions(i); //wykorzystujemy klase directions do generowania pozycji wokol\n position = this.position.add(directionToAdd.move());\n if(map.animalsAt(position).isEmpty())\n {\n freePositions.add(position);\n }\n }\n\n if(freePositions.isEmpty()) //jezeli nie ma wolnych pozycji\n {\n //jesli nie ma wolnych pozycji\n int x = generator.nextInt(8);\n directionToAdd = new Directions(x);\n return this.position.add(directionToAdd.move());\n }\n\n //jezeli mamy wolne pozycje to generujemy dowolna z listy\n int x = generator.nextInt(freePositions.size());\n Vector2d newPosition = freePositions.get(x);\n\n return newPosition;\n }", "@Override\r\n\tpublic int move(int lastMove, int[] takenList, int depthLimit) \r\n\t{\r\n\t\tGameState myState = new GameState(takenList, lastMove);\r\n\t\tdouble maxValue = max_value(myState, depthLimit);\r\n\t\tint myBestMove = myState.bestMove;\r\n\t\tif (myState.leaf) //why did i do this\r\n\t\t{\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn myBestMove;\r\n\t}", "private ProblemModel findCheapestNode(){\n\t\tProblemModel ret = unvisitedPM.peek();\n\t\t\n\t\tfor(ProblemModel p : unvisitedPM){ \n\t\t\t//f(s) = depth + cost to make this move\n\t\t\tif(p.getCost() + p.getDepth() <= ret.getCost() + ret.getDepth()) ret = p;\n\t\t}\n\t\tunvisitedPM.remove(ret);\n\t\treturn ret;\n\t}", "public boolean bestFirstSearch() {\n\t\twhile(!soloution){\n\t\t\tif(open.isEmpty()){\n\t\t\t\tSystem.out.println(\"No more choices to explore\");\n\t\t\t\tSystem.out.println(\"SolutionId: \" + solutionId);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//chooses the most optimal X\n\t\t\tNode x = popNode();\n\t\t\tclosed.add(x);\n\t\t\tSystem.out.println(\"X:\\t\\t\" + x.state + \" \" + x.h + \" + \" + x.g + \" = \" + x.f);\n\t\t\t//checks if it is a soulution\n\t\t\tif(solution(x)){\n\t\t\t\tSystem.out.println(\"SOLUTION:\\t\" + x.state);\n\t\t\t\tSystem.out.println(\"nodes created: \" + open.size() + closed.size());\n\t\t\t\tprintSolution(x);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t//handles the possible moves from the state x\n\t\t\tsucc = generateAllSuccesors(x);\n\t\t\tfor (Node s : succ) {\n\t\t\t\t//if this state already exist, we will use the node keeping it instead\n\t\t\t\tNode old = findOld(s);\n\t\t\t\tif(old != null)\n\t\t\t\t\ts = old;\n\t\t\t\t//makes the new node a child of x\n\t\t\t\tx.kids.add(s);\n\t\t\t\t//if its a new state it will be inserted to open after evaluation\n\t\t\t\tif(!open.contains(s) && !closed.contains(s)){\n\t\t\t\t\tattachAndEval(s,x);\n\t\t\t\t\tinsert(s);\n\t\t\t\t}\n\t\t\t\t//if its an old node and x is a better parent it will be evalueted again.\n\t\t\t\telse if(x.g + arcCost(x, s) < s.g){\n\t\t\t\t\tattachAndEval(s, x);\n\t\t\t\t\tif(closed.contains(s)){\n\t\t\t\t\t\t//if its closed all children will be evaluated with the new score of \"s\"\n\t\t\t\t\t\tpropagatePathImprovements(s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private TakTree<TakPiece> treeBuilder(TakTree<TakPiece> tree, Point startingPoint, ArrayList<Point> visited){\n if(containsWinningPath(visited)){\n // Did white or black win?\n if(getTop(startingPoint).isWhite()){\n whiteWins = true;\n } else {\n blackWins = true;\n }\n\n // return our tree because this is certainly a leaf node\n return tree;\n }\n\n Point right = new Point(startingPoint.x + 1, startingPoint.y);\n Point left = new Point(startingPoint.x - 1, startingPoint.y);\n Point up = new Point(startingPoint.x, startingPoint.y - 1);\n Point down = new Point(startingPoint.x, startingPoint.y + 1);\n\n\n // Check for backtracking right\n if(isValidAndSimilar(right, startingPoint) && !visitedContains(visited, right)){\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(right));\n //Add this position to the visited array\n visited.add(right);\n // Attach subtree to right position\n tree.attachRight(treeBuilder(treeToAttach, right, visited));\n }\n\n // Try to build left subtree\n if(isValidAndSimilar(left, startingPoint) && !visitedContains(visited, left)){\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(left));\n //Add this position to the visited array\n visited.add(left);\n // Attach subtree to right position\n tree.attachLeft(treeBuilder(treeToAttach, left, visited));\n }\n\n // Try to build up subtree\n if(isValidAndSimilar(up, startingPoint) && !visitedContains(visited, up)){\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(up));\n //Add this position to the visited array\n visited.add(up);\n // Attach subtree to right position\n tree.attachUp(treeBuilder(treeToAttach, up, visited));\n }\n\n // Try to build down subtree\n if(isValidAndSimilar(down, startingPoint) && !visitedContains(visited, down)){\n\n // Create new subtree with our right as root\n TakTree<TakPiece> treeToAttach = new TakTree<>();\n treeToAttach.addRoot(getTop(down));\n //Add this position to the visited array\n visited.add(down);\n // Attach subtree to right position\n tree.attachDown(treeBuilder(treeToAttach, down, visited));\n }\n\n return tree;\n }", "public void RecursiveExpansion() throws TreeTooBigException {\r\n int transIndex; //Index to count transitions\r\n int[] newMarkup; //markup used to create new node\r\n boolean aTransitionIsEnabled = false; //To check for deadlock\r\n //Attribute used for assessing whether a node has occured before\r\n boolean repeatedNode = false; \r\n \r\n boolean allOmegas = false;\r\n \r\n boolean[] enabledTransitions = \r\n tree.dataLayer.getTransitionEnabledStatusArray(markup);\r\n\r\n //For each transition\r\n for (int i = 0; i < enabledTransitions.length; i++) {\r\n if (enabledTransitions[i] == true) {\r\n //Set transArray of to true for this index\r\n transArray[i] = true;\r\n \r\n //System.out.println(\"\\n Transition \" + i + \" Enabled\" );\r\n aTransitionIsEnabled = true;\r\n \r\n //print (\"\\n Old Markup is :\", markup);//debug\r\n \r\n //Fire transition to produce new markup vector\r\n newMarkup = fire(i);\r\n \r\n //print (\"\\n New Markup is :\", newMarkup);//debug\r\n \r\n //Check for safeness. If any of places have > 1 token set variable.\r\n for (int j = 0; j < newMarkup.length; j++) {\r\n if (newMarkup[j] > 1 || newMarkup[j] == -1) {\r\n tree.moreThanOneToken = true;\r\n break;\r\n }\r\n } \r\n \r\n //Create a new node using the new markup vector and attach it to\r\n //the current node as a child.\r\n children[i] = \r\n new myNode(newMarkup, this, tree, depth + 1);\r\n \r\n /* Now need to (a) check if any omegas (represented by -1) need to \r\n * be inserted in the markup vector of the new node, and (b) if the \r\n * resulting markup vector has appeared anywhere else in the tree. \r\n * We must do (a) before (b) as we need to know if the new node \r\n * contains any omegas to be able to compare it with existing nodes. \r\n */ \r\n allOmegas = children[i].InsertOmegas();\r\n \r\n //check if the resulting markup vector has occured anywhere else in the tree\r\n repeatedNode = (tree.root).FindMarkup(children[i]);\r\n \r\n if (tree.nodeCount >= Pipe.MAX_NODES && !tree.tooBig) {\r\n tree.tooBig = true;\r\n throw new TreeTooBigException();\r\n }\r\n \r\n if (!repeatedNode && !allOmegas) {\r\n children[i].RecursiveExpansion();\r\n }\r\n }\r\n }\r\n \r\n if (!aTransitionIsEnabled) {\r\n System.err.println(\"No transition enabled\");\r\n if (!tree.noEnabledTransitions || tree.pathToDeadlock.length < depth-1) {\r\n RecordDeadlockPath();\r\n tree.noEnabledTransitions = true;\r\n } else {\r\n System.err.println(\"Deadlocked node found, but path is not shorter\"\r\n + \" than current path.\");\r\n }\r\n } else {\r\n //System.out.println(\"Transitions enabled.\");\r\n }\r\n }", "private StatusEnum stepInternal()\n {\n if (initialStep)\n {\n this.tail = map.getStart();\n this.openSet.push(map.getStart());\n initialStep = false;\n }\n\n if (status != StatusEnum.RUNNING)\n return status;\n\n cursor = openSet.pop(); // Pull the cursor off the open set min-heap\n if (cursor == null)\n {\n // The open set was empty, so although we have not reached the goal, there are no more points to investigate\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n\n while (closedSet.contains(cursor) || !map.isTraversable(cursor))\n {\n // The cursor is in the closed set (meaning it was already investigated) or the cursor point is non traversable on the map\n cursor = openSet.pop();\n if (cursor == null)\n {\n return StatusEnum.COMPLETED_NOT_FOUND;\n }\n }\n\n // The goal has been reached, the path is complete\n if (cursor.equals(map.getGoal()))\n {\n tail = cursor; // Set the member tail to be used in the reconstruction done in getPath()\n return StatusEnum.COMPLETED_FOUND;\n }\n\n // Add the cursor point to the closed set\n closedSet.add(cursor);\n\n // Get the list of neighboring points\n List<WeightedPoint> neighbors = neighborSelector.getNeighbors(map, cursor, heuristic);\n\n // Link the neighbors to the cursor (for backtracking the path when the goal is reached) and calculate their weight\n for (WeightedPoint wp : neighbors)\n {\n if (map.isTraversable(wp.getRow(), wp.getCol()) && !closedSet.contains(wp))\n {\n wp.setFromCost(cursor.getFromCost() + heuristic.distance(cursor, wp));\n\n if (dijkstra)\n {\n wp.setToCost(0);\n }\n else\n {\n wp.setToCost(heuristic.distance(wp, map.getGoal()));\n }\n wp.setPrev(cursor);\n }\n }\n\n if (shuffle)\n {\n // Shuffle the neighbors to randomize the order of testing nodes with the same cost value\n Collections.shuffle( neighbors );\n }\n Collections.sort( neighbors );\n\n // Put the neighbors on the open set\n for (WeightedPoint wp : neighbors)\n {\n if (!openSet.contains(wp))\n openSet.push(wp);\n }\n\n return StatusEnum.RUNNING;\n }", "public MoveNode ab(PentagoBoardState pbs,int myscore, int alpha, int beta,int amimaxplayer, int depth,int requireddepth){\n\n int bestmovescore;\n PentagoMove bestmove;\n\n ArrayList<PentagoMove> legalmoves = pbs.getAllLegalMoves();\n Collections.shuffle(legalmoves); //helps avoid worst run time if all good moves are at the end of array list\n\n MoveNode moveNode =new MoveNode(new PentagoMove(0,0,0,0,0),0);\n\n if (depth==requireddepth){\n bestmovescore= evaluate(pbs);\n moveNode.MyMove = null;\n moveNode.value = evaluate(pbs);\n return moveNode;\n\n }\n else if (pbs.getWinner() != Board.NOBODY){ //check win since we are at leafnode\n bestmovescore= evaluate(pbs);\n moveNode.MyMove = null;\n int movescore = evaluate(pbs);\n if (movescore<-1200000){\n moveNode.value = -999999999; //assign loss value\n } //Losing Move\n else if (movescore>1200000){\n moveNode.value = 999999999; //assign win value\n } // Winning Move\n return moveNode;\n\n }\n //do max player\n if (amimaxplayer ==1){\n int currentvalue = -999999999;\n PentagoMove currentmove =legalmoves.get(0);\n MoveNode currentmovenode = new MoveNode(currentmove,currentvalue);\n for (int i = 0; i < legalmoves.size(); i++) {\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n PentagoMove movetoprocess = legalmoves.get(i);\n newboard.processMove(movetoprocess);\n\n\n MoveNode scoreAfterMove = ab(newboard, currentvalue, alpha, beta, 0, depth + 1, requireddepth); // run recursion till leaf node or depth reached\n if (scoreAfterMove.value > currentvalue) { //see if current best value is lower than the new value if so replace\n currentvalue = scoreAfterMove.value;\n currentmove = movetoprocess;\n currentmovenode.value = currentvalue;\n currentmovenode.MyMove = currentmove;\n\n //System.out.println(\"I am max plyaer at depth:\" + depth + \"\\n current move is: \" + currentmove + \"\\ncurrentvalue is: \" + currentvalue);\n\n }\n\n alpha = Math.max(alpha,currentvalue);\n if (alpha>=beta){ // break loop if alpha more than beta\n //System.out.println(\"Get pruned my alpha is \" + alpha + \" my beta is \" + beta );\n break;\n }\n }\n //System.out.println(\"I am max plyaer at depth:\" + depth + \"\\n current move is: \" + currentmove + \"\\ncurrentvalue is: \" + currentvalue+\" my alpha is \" + alpha + \" my beta is \" + beta);\n\n return currentmovenode;\n }\n //do min player\n else if (amimaxplayer==0){\n int currentvalue = 999999999;\n PentagoMove currentmove =legalmoves.get(0);\n MoveNode currentmovenode = new MoveNode(currentmove,currentvalue);\n for (int i = 0; i < legalmoves.size(); i++) {\n PentagoBoardState newboard = (PentagoBoardState) pbs.clone();\n PentagoMove movetoprocess = legalmoves.get(i);\n newboard.processMove(movetoprocess);\n\n MoveNode scoreAfterMove = ab(newboard, currentvalue, alpha, beta, 1, depth + 1, requireddepth);\n if (scoreAfterMove.value < currentvalue) {\n currentvalue = scoreAfterMove.value;\n currentmove = movetoprocess;\n currentmovenode.value = currentvalue;\n currentmovenode.MyMove = currentmove;\n //System.out.println(\"I am min plyaer at depth:\" + depth + \"\\n current move is: \" + currentmove + \"\\ncurrentvalue is: \" + currentvalue);\n }\n beta = Math.min(beta,currentvalue);\n if (alpha>=beta){\n //System.out.println(\"Get pruned my alpha is \" + alpha + \" my beta is \" + beta );\n break;\n }\n }\n return currentmovenode;\n }\n //System.out.println(\"move val \" + moveNode.value);\n return moveNode;\n }", "private void spawnTrees() {\n int spawnNum = this.random.nextInt(10) + 20;\n if (this.treeTiles.size() >= 30) { // max 30 trees\n spawnNum = 0;\n }\n for (int i = 0; i < spawnNum; i++) {\n String tree = trees[this.random.nextInt(trees.length)];\n int y = this.random.nextInt(this.getMap().length);\n Tile spawnTile = this.getMapAt(this.random.nextInt(this.getMap()[y].length), y);\n Tile centerTile;\n if ((spawnTile != null) && this.inMap(spawnTile.getX()-2, spawnTile.getY()-1)) {\n centerTile = this.getMapAt(spawnTile.getX()-2, spawnTile.getY()-1);\n } else {\n centerTile = null;\n }\n if ((spawnTile != null) && (spawnTile instanceof GroundTile)\n && (centerTile != null) && (centerTile instanceof GroundTile)\n && (spawnTile.getContent() == null)) {\n ExtrinsicTree newTree = new ExtrinsicTree(tree);\n newTree.setStage(17);\n spawnTile.setContent(newTree);\n this.treeTiles.add(spawnTile);\n }\n }\n }", "public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }", "public void processMove(MahjongSolitaireMove move)\n {\n // REMOVE THE MOVE TILES FROM THE GRID\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[move.col1][move.row1];\n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[move.col2][move.row2]; \n MahjongSolitaireTile tile1 = stack1.remove(stack1.size()-1);\n MahjongSolitaireTile tile2 = stack2.remove(stack2.size()-1);\n \n // MAKE SURE BOTH ARE UNSELECTED\n tile1.setState(VISIBLE_STATE);\n tile2.setState(VISIBLE_STATE);\n \n // SEND THEM TO THE STACK\n tile1.setTarget(TILE_STACK_X + TILE_STACK_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile1.startMovingToTarget(MAX_TILE_VELOCITY);\n tile2.setTarget(TILE_STACK_X + TILE_STACK_2_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile2.startMovingToTarget(MAX_TILE_VELOCITY);\n stackTiles.add(tile1);\n stackTiles.add(tile2); \n \n // MAKE SURE THEY MOVE\n movingTiles.add(tile1);\n movingTiles.add(tile2);\n \n // AND MAKE SURE NEW TILES CAN BE SELECTED\n selectedTile = null;\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.MATCH_AUDIO_CUE.toString(), false);\n \n // NOW CHECK TO SEE IF THE GAME HAS EITHER BEEN WON OR LOST\n \n // HAS THE PLAYER WON?\n if (stackTiles.size() == NUM_TILES)\n {\n // YUP UPDATE EVERYTHING ACCORDINGLY\n endGameAsWin();\n }\n else\n {\n // SEE IF THERE ARE ANY MOVES LEFT\n MahjongSolitaireMove possibleMove = this.findMove();\n if (possibleMove == null)\n {\n // NOPE, WITH NO MOVES LEFT BUT TILES LEFT ON\n // THE GRID, THE PLAYER HAS LOST\n endGameAsLoss();\n }\n }\n }", "public void runAStar() \n\t{\n\t\tLinkedList<GameState> que = new LinkedList<GameState>();//new liked list to hold all the legal moves\n\t\topen.add(startS);//add the start node to the open queue so the while loop can start\n\t\tcountOpen++;\n\t\tint c = 0;\n\t\t//while the open que is not empty and it has not reached its max then run the algorithm\n\t\t//this also prevents the code from running forever if the goal state is not reachable\n\t\twhile(countOpen<1000 && !open.isEmpty())//&& c<6) \n\t\t{\n\t\t\tGameState curr = open.peek();//set the curr node to what we think is the games tate with the loewst F(n)\n\t\t\t//GameState temp = open.remove();\n\t\t\tfor(GameState v : open)//this goes through all the gamestates in the open lists \n\t\t\t{\n\t\t\t\tif(v.getPriority()<curr.getPriority()) //this checks to see if there are any other gamestates in the open list with a lower f(n)\n\t\t\t\t{\n\t\t\t\t\tcurr = v;//if there is set curr to that gamestate\n\t\t\t//\t\tSystem.out.println(\"this is the small curr node:\");\n\t\t\t//\t\tcurr.printGameState();\n\t\t\t\t}\n\t\t\t}\n\t\t\topen.remove(curr);////set the current node to the beingin of open and remove curr node from open\n\t\t\t//System.out.println(\"this is the curr node:\");\n\t\t\t//curr.printGameState();\n\t\t\tcountOpen--;\n\t\t\tclosed.add(curr);//add curr node to the closed list\n\t\t\tcountClosed++;\n\t\t\tif(isGoalState(curr, goalS)) //check to see if the current games state is the goal\n\t\t\t{\n\t\t\t\tprintAns(closed);//print the order of how it got to the goal state\n\t\t\t\tbreak;//get out of the loop\n\t\t\t}\n\t\t\telse //if curr is not the goal state\n\t\t\t{\n\t\t\t\tque = successor(curr);//find all of the legal moves from the current game state\n\t\t\t\t//System.out.println(\"This is the curr\");\n\t\t\t\t//printClosed(que);\n\t\t\t\t//printOpen(open);\n\t\t\t\t//System.out.println(\"This is the closed\");\n\t\t\t\t//printClosed(closed);\n\t\t\t\t//open.\n\t\t\t\tboolean bk = false;//this is a booklean to determine if we need to break out of the loop\n\t\t\t\tfor(GameState i: que) //go through all of the legal moves\n\t\t\t\t{\n\t\t\t\t\tif(isGoalState(i, goalS)) //if any of the legal moves is the goal state then\n\t\t\t\t\t{\n\t\t\t\t\t\tclosed.add(i);//add the legal move to the closed\n\t\t\t\t\t\tcountClosed++;\n\t\t\t\t\t\tprintAns(closed);//print the order of how it got to the goal state\n\t\t\t\t\t\tbk = true;//set the need to break to true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bk) {break;}//break out of the loop\n\t\t\t\t//this is where we check to see if any of the legal moves are already in closed\n\t\t\t\tfor(GameState i: closed) //loop through the closed \n\t\t\t\t{\n\t\t\t\t\tfor(GameState z: que) //loop thorugh the legal moves\n\t\t\t\t\t{\n\t\t\t\t\t\tif(same(i, z)) //if the two are the same then\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tz.setVisited(true);//set visited to true so we dont accidentally add it to the open list\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(GameState i: que) ///lets loop though the legal moves again\n\t\t\t\t{\n\t\t\t\t\tif(i.getVisited()!=true )//&& !same(i, z))if the gamestate not in closed\n\t\t\t\t\t{\n\t\t\t\t\t\topen.add(i);//add the game state to the open queue\n\t\t\t\t\t\tcountOpen++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t}", "private static ArrayList<String> searchPath(MazeProblem problem, SearchTreeNode initial,\n\t\t\tHashSet<MazeState> goalType) {\n\t\tPriorityQueue<SearchTreeNode> frontier = new PriorityQueue<>(compare);\n\t\tSet<MazeState> graveyard = new HashSet<>();\n\t\tfrontier.add(initial);\n\t\twhile (!frontier.isEmpty()) {\n\t\t\tSearchTreeNode expanding = frontier.poll();\n\t\t\tgraveyard.add(expanding.state);\n\t\t\tif (problem.KEY_STATES == goalType) {\n\t\t\t\tif (problem.isKey(expanding.state)) {\n\t\t\t\t\treturn getPath(expanding);\n\t\t\t\t}\n\t\t\t} else if (problem.GOAL_STATES == goalType) {\n\t\t\t\tif (problem.isGoal(expanding.state)) {\n\t\t\t\t\treturn getPath(expanding);\n\t\t\t\t}\n\t\t\t}\n\t\t\tMap<String, MazeState> transitions = problem.getTransitions(expanding.state);\n\t\t\tfor (Map.Entry<String, MazeState> transition : transitions.entrySet()) {\n\t\t\t\tSearchTreeNode generated = new SearchTreeNode(transition.getValue(), transition.getKey(), expanding,\n\t\t\t\t\t\tgetHeuristic(expanding.state, goalType), getHistory(expanding, transition.getValue(), problem));\n\t\t\t\tif (!graveyard.contains(generated.state)) {\n\t\t\t\t\tfrontier.add(generated);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static LocNode intialState() {\n\n\t \n\t char[][] newMatrix =copyMatrix(matrix);\n\t \n\t \n\n\t \n\twhile(true) {\n\t\t\t\n\t\t\t\n\t\tint i=getRandomIndex(size);\n\t\tint j=getRandomIndex(size);\n\t\t\n\t if(newMatrix[i][j]=='-') {\n\t \t\n\t \n\t \t newMatrix[i][j]='c' ;\n\t \t \n\t \t \n\t \t updateVisibility(i, j, newMatrix);\n\t \t \n\t \t\n\t \t LocNode intialState= new LocNode(newMatrix, calculateOpjectiveFunction(newMatrix));\n\t \t \n\t \t\n\t \t return intialState;\n\t }\n\t \n\t }\n }", "public void getSolution(TaskState state){\n\n if(state.isNew) {\n state.isNew = false;\n state.hasSolution = true;\n }\n else {\n if(!(state.hasSolution = rollBack(state)))\n return;\n }\n\n while (state.moveStack.size() < 64 ||\n !state.moveStack.peek().getStandElement().hasNeighbour(state.graph.getFirst())){\n\n if(state.moveStack.size() == 64 && !rollBack(state)) {\n state.hasSolution = false;\n return;\n }\n\n if(state.moveStack.peek().hasNextMove())\n state.moveStack.push(\n new HorseMove(state.moveStack.peek().getNextMove())\n );\n\n else if(!rollBack(state)){\n state.hasSolution = false;\n return;\n }\n\n }\n\n }", "public Vector<PuzzleState> aStarSearch() {\r\n System.out.println(\"Starting A*\");\r\n long startTime = (new Date()).getTime();\r\n Vector<PuzzleState> solution = new Vector<PuzzleState>();\r\n HashSet<PuzzleState> closedList = new HashSet<PuzzleState>();\r\n PriorityQueue<PuzzleState> openList = new PriorityQueue<PuzzleState>();\r\n \r\n PuzzleState searchState = state.copy();\r\n searchState.prevState = null;\r\n searchState.depth = 0;\r\n openList.add(searchState);\r\n\r\n while (!openList.isEmpty() && !isGoal(searchState)) {\r\n searchState = openList.poll();\r\n if (!closedList.contains(searchState)) {\r\n closedList.add(searchState);\r\n Vector<PuzzleState> nextStates = possibleNextStates(searchState);\r\n for (PuzzleState s : nextStates)\r\n s.depth = searchState.depth + 1;\r\n openList.addAll(nextStates);\r\n }\r\n }\r\n \r\n // If the goal has been reached, construct the solution\r\n if (isGoal(searchState)) {\r\n for (PuzzleState s = searchState; s.prevState != null; s = s.prevState) {\r\n solution.add(s);\r\n }\r\n Collections.reverse(solution);\r\n }\r\n \r\n long endTime = (new Date()).getTime();\r\n System.out.println(\"A* search ended after \" + (endTime - startTime) + \" ms\");\r\n //for (PuzzleState s : solution)\r\n // System.out.println(s);\r\n return solution;\r\n }", "private List<Path> expandExecution(Path input) {\n\t\tList<Path> childInputs = new ArrayList<>(); //store the paths generated from given path\n\t\t\n\t\t//search from the top node which have not been searched before\n\t\tfor(int j = input.bound; j < input.path.size() - 1; j++){\n\t\t\tdouble[] probabilityArray = cfg.getTransition_matrix().getRow(input.path.get(j));\n\t\t\tfor(int i = 0; i < probabilityArray.length; i++){\n\t\t\t\t//the node been visited before only have two situation:1.has been searched,2.the path contains it in the workList \n\t\t\t\tif(probabilityArray[i] > 0 && i != input.path.get(j + 1) && unvisited.contains(i)){\n\t\t\t\t\tList<Integer> tempPath = new ArrayList<>();\n\t\t\t\t\tfor(int index = 0; index < j + 1; index++)\n\t\t\t\t\t\ttempPath.add(input.path.get(index));\n\t\t\t\t\ttempPath.add(i);\n\t\t\t\t\t\n\t\t\t\t\tPath newInput = new Path(tempPath, j + 1);\n\t\t\t\t\tchildInputs.add(newInput);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn childInputs;\n\t}", "public void walkRandom(Cell start) {\n //2.1 mark start as visited\n start.visit();\n //2.2 find unvisited neighbors of start cell\n Cell[] unvisitedNeighborsOfStart = getNeighbors(start, false);\n //2.3 if there are no unvisited neighbors, go hunting --> maybe delete this step here\n if (unvisitedNeighborsOfStart.length == 0) {\n return;\n }\n //3.1 choose random univisited neighbor\n Cell randomUnvisitedNeighbor = randomUnvisitedNeighbor(start);\n //3.2 connect start and random unvisited neighbot\n start.carveThrough(randomUnvisitedNeighbor);\n //4.1 choose random unvisited neighbor as new start\n walkRandom(randomUnvisitedNeighbor);\n }", "public ArrayList<Action> findShortestPath(int startX, int startY, int endX, int endY, int numKeys, boolean toUnknown){\n\t\t\tHashSet<SearchNode> visited = new HashSet<SearchNode>();\n\t\t\tHashSet<SearchNode> work = new HashSet<SearchNode>();\n\t\t\t\n\t\t\tSearchNode start = new SearchNode();\n\t\t\tstart.posX = startX;\n\t\t\tstart.posY = startY;\n\t\t\tstart.gScore = 0;\n\t\t\tif (toUnknown)\n\t\t\t\tstart.fScore = 0;\n\t\t\telse\n\t\t\t\tstart.fScore = Math.abs(startX - endX) + Math.abs(startY - endY);\n\t\t\tstart.keysLeft = numKeys;\n\t\t\tstart.cameFrom = null;\n\t\t\twork.add(start);\n\t\t\t\n\t\t\twhile(work.size() > 0){\n\t\t\t\tSearchNode current = findFirstNode(work);\n\t\t\t\tif (!toUnknown && current.posX == endX && current.posY == endY){\n\t\t\t\t\t//We've found the end node, reconstruct the path\n\t\t\t\t\treturn recoverPath(current);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (toUnknown && getElement(current.posX, current.posY) == BoxContainer.Unkown){\n\t\t\t\t\treturn recoverPath(current);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twork.remove(current);\n\t\t\t\tvisited.add(current);\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < 4; i++){\n\t\t\t\t\tint newX, newY;\n\t\t\t\t\tAction direction;\n\t\t\t\t\tif (i == 0){\n\t\t\t\t\t\tnewX = current.posX + 1;\n\t\t\t\t\t\tnewY = current.posY;\n\t\t\t\t\t\tdirection = Action.East;\n\t\t\t\t\t}\n\t\t\t\t\telse if (i == 1){\n\t\t\t\t\t\tnewX = current.posX;\n\t\t\t\t\t\tnewY = current.posY + 1;\n\t\t\t\t\t\tdirection = Action.North;\n\t\t\t\t\t}\n\t\t\t\t\telse if (i == 2){\n\t\t\t\t\t\tnewX = current.posX - 1;\n\t\t\t\t\t\tnewY = current.posY;\n\t\t\t\t\t\tdirection = Action.West;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tnewX = current.posX;\n\t\t\t\t\t\tnewY = current.posY - 1;\n\t\t\t\t\t\tdirection = Action.South;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Check to make sure we can move into this node\n\t\t\t\t\tBoxContainer newBox = getElement(newX, newY);\n\t\t\t\t\tif (newBox == BoxContainer.Blocked || (!toUnknown && newBox == BoxContainer.Unkown))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (newBox == BoxContainer.Door && current.keysLeft == 0){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint new_gScore = current.gScore + 1;\n\t\t\t\t\tif (newBox == BoxContainer.Door || newBox == BoxContainer.Key)\n\t\t\t\t\t\tnew_gScore++;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//try to find the node if we've already searched it, otherwise create it\n\t\t\t\t\tSearchNode newNode = findNodeWithCoords(visited, newX, newY);\n\t\t\t\t\tif (newNode == null){\n\t\t\t\t\t\tnewNode = findNodeWithCoords(work, newX, newY);\n\t\t\t\t\t\tif (newNode == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnewNode = new SearchNode();\n\t\t\t\t\t\t\tnewNode.posX = newX;\n\t\t\t\t\t\t\tnewNode.posY = newY;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (visited.contains(newNode) && new_gScore >= newNode.gScore)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\tif (!work.contains(newNode) || new_gScore < newNode.gScore){\n\t\t\t\t\t\tnewNode.cameFrom = current;\n\t\t\t\t\t\tnewNode.direction = direction;\n\t\t\t\t\t\tnewNode.gScore = new_gScore;\n\t\t\t\t\t\tif (toUnknown)\n\t\t\t\t\t\t\tnewNode.fScore = newNode.gScore;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnewNode.fScore = newNode.gScore + Math.abs(newNode.posX - endX) + Math.abs(newNode.posY - endY);\n\t\t\t\t\t\tnewNode.keysLeft = current.keysLeft;\n\t\t\t\t\t\tif (newBox == BoxContainer.Door)\n\t\t\t\t\t\t\tnewNode.keysLeft--;\n\t\t\t\t\t\tif (newBox == BoxContainer.Key)\n\t\t\t\t\t\t\tnewNode.keysLeft++;\n\t\t\t\t\t\tif (!work.contains(newNode))\n\t\t\t\t\t\t\twork.add(newNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "private void identifySuccessors(T node, T goal, Set<T> goals, Queue<T> open, Set<T> closed, Map<T, T> parentMap,\n Map<T, Double> fMap, Map<T, Double> gMap, Map<T, Double> hMap) {\n // get all neighbors to the current node\n Collection<T> neighbors = findNeighbors(node, parentMap);\n\n double d;\n double ng;\n for (T neighbor : neighbors) {\n // jump in the direction of our neighbor\n T jumpNode = jump(neighbor, node, goals);\n\n // don't add a node we have already gotten to quicker\n if (jumpNode == null || closed.contains(jumpNode)) continue;\n\n // determine the jumpNode's distance from the start along the current path\n d = graph.getDistance(jumpNode, node);\n ng = gMap.getOrDefault(node, 0d) + d;\n\n // if the node has already been opened and this is a shorter path, update it\n // if it hasn't been opened, mark as open and update it\n if (!open.contains(jumpNode) || ng < gMap.getOrDefault(jumpNode, 0d)) {\n gMap.put(jumpNode, ng);\n hMap.put(jumpNode, graph.getHeuristicDistance(jumpNode, goal));\n fMap.put(jumpNode, gMap.getOrDefault(jumpNode, 0d) + hMap.getOrDefault(jumpNode, 0d));\n //System.out.println(\"jumpNode: \" + jumpNode.x + \",\" + jumpNode.y + \" f: \" + fMap.get(jumpNode));\n parentMap.put(jumpNode, node);\n\n if (!open.contains(jumpNode)) {\n open.offer(jumpNode);\n }\n }\n }\n }", "public Cell hunt() {\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n if (cells[i][j].isVisited() == false && getNeighbors(cells[i][j], true).length >= 1) {\n //mark the found cell as visited\n cells[i][j].visit();\n //find all visited neighbors\n Cell[] visitedNeighbors = getNeighbors(cells[i][j], true);\n //connect this cell and one of the visited neighbors (choose randomly)\n cells[i][j].carveThrough(visitedNeighbors[numberGenerator.nextInt(visitedNeighbors.length)]);\n return cells[i][j];\n }\n }\n }\n return null;\n }", "public String findCheese(Place startingPoint) {\nif (startingPoint==null)\n\treturn null;\n\nvisited.add(startingPoint);\nStack<Place> vstdstack=new Stack<Place>();\nvstdstack.add(startingPoint);\n//Stack<c> pather=\"start->\";\nwhile(!vstdstack.isEmpty())\n{\n\tPlace curpos=getNextPlace(vstdstack.peek());\n if (curpos==null)\n {\n vstdstack.pop();\n soln.deleteCharAt(soln.length()-1);\n continue;\n }\n if(curpos.isCheese())\n return soln.toString();\n else \n vstdstack.push(curpos);\n \n}\nreturn null;\n}", "@Override\n\tpublic Stack<Cell> makePlan(WorldMap worldMap, Cell start, CELLTYPE goalCellType) {\n\t\tHashtable<Cell, Cell> prev = new Hashtable<Cell, Cell>();\n\n\t\tCell target = breadthFirstSearch(worldMap, start, goalCellType, prev);\n\n\t\t// If target is null, the search wasn't able to find desired goal type\n\t\tif (target == null)\n\t\t\treturn null;\n\n\t\t// Returning a Stack<Cell> for the route plan\n\t\treturn constructPlan(worldMap, target, prev);\n\n\t}", "public void bfs(Pair<Integer, Integer> current, Pair<Integer, Integer> goal) {\n var visited = new HashSet<Pair<Integer, Integer>>(300);\n var queue = new LinkedList<Pair<Integer, Integer>>();\n \n visited.add(current);\n queue.add(current);\n \n while (!queue.isEmpty()) {\n var toVisit = queue.poll();\n if (goal.equals(toVisit)) {\n goal.setParent(toVisit);\n toVisit.setChild(goal);\n break;\n }\n var neighbors = Utils.getNeighbors(toVisit);\n neighbors.forEach(p -> {\n // only move through SAFE tiles!\n // unless the neighbor is goal node!\n if (p.equals(goal) ||\n (!visited.contains(p) &&\n grid[p.getA()][p.getB()].getTileTypes().contains(Tile.SAFE)))\n {\n visited.add(p);\n p.setParent(toVisit);\n toVisit.setChild(p);\n queue.add(p);\n }\n });\n }\n }", "void animalMove(int x,int y, Living[][] map,int gridLength, int gridWidth){\r\n \r\n boolean age=map[x][y].getAge();\r\n boolean gender=map[x][y].getGender();\r\n boolean checkRight=false;\r\n boolean checkLeft=false;\r\n boolean checkUp=false;\r\n boolean checkDown=false;\r\n boolean up=false;\r\n boolean down=false;\r\n boolean right=false;\r\n boolean left=false;\r\n boolean baby=false;\r\n boolean turn=map[x][y].getMovement(); //Check to see if it moved before in the array\r\n \r\n double random=Math.random();\r\n \r\n \r\n \r\n \r\n //Checks to see if it is possible to even see to the left first\r\n if(y-1>=0){\r\n left=true;\r\n \r\n if(turn && (map[x][y-1] instanceof Plant) ){ //Check to see if there is plants and goes to plants\r\n map[x][y].gainHealth((map[x][y-1].getHealth()));\r\n map[x][y].setMovement(false); \r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n if(turn && (map[x][y-1] instanceof Sheep) && (age==map[x][y-1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y-1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y-1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){ \r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null)&& !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null)&& !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if((y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){\r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y-1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n //If it can move to the left need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y-2>=0){\r\n checkLeft=true;\r\n }\r\n }\r\n \r\n //Checks to see if it is possible to even see to the right first \r\n if(y+1<gridWidth){\r\n right=true;\r\n \r\n //Check to move on towards plants\r\n if(turn && (map[x][y+1] instanceof Plant)){\r\n map[x][y].gainHealth(map[x][y+1].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n turn=false; \r\n }\r\n \r\n if(turn && (map[x][y+1] instanceof Sheep && age==map[x][y+1].getAge()) ){ \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x][y+1].getGender()) && (map[x][y].getHealth()>19) && (map[x][y+1].getHealth()>19) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n \r\n if( (x-1>=0) && (map[x-1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheeps will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x][y+1].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x][y+1].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to the right need to check if it can foresee more incase there wasn't any place for it to go\r\n if(y+2<gridWidth){ \r\n checkRight=true;\r\n }\r\n } \r\n \r\n //Check to see if it can go up\r\n if(x-1>=0){\r\n up=true;\r\n \r\n //Check for plant to go on to upwards \r\n if(turn && (map[x-1][y] instanceof Plant) ){\r\n map[x][y].gainHealth(map[x-1][y].getHealth()); \r\n map[x][y].setMovement(false); \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n }\r\n \r\n if(turn && (map[x-1][y] instanceof Sheep) && (age==map[x-1][y].getAge()) ){ \r\n //If the ages match age must be false to be adults and both be opposite genders and have more then 19 health\r\n if(turn && !age && !(gender==map[x-1][y].getGender()) &&map[x][y].getHealth()>19 &&map[x-1][y].getHealth()>19){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep\r\n \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if( (x+1<gridLength) && (map[x+1][y]==null) && !(baby) ){\r\n map[x+1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n \r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x-1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x-1][y].setMovement(false);\r\n turn=false; \r\n baby=false;\r\n }\r\n }\r\n } \r\n }\r\n \r\n //If it can move to upwards need to check if it can foresee more incase there wasn't any place for it to go\r\n if(x-2>=0){\r\n checkUp=true; \r\n }\r\n } \r\n //Check to see where to go downwards\r\n if(x+1<gridLength){\r\n down=true; \r\n \r\n //Check to see if any plants are downwards\r\n if(turn && (map[x+1][y] instanceof Plant) ){\r\n map[x][y].gainHealth( (map[x+1][y].getHealth()));\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n turn=false;\r\n } \r\n \r\n if(turn && (map[x+1][y] instanceof Sheep) && (age==map[x+1][y].getAge()) ){ \r\n \r\n //If the ages match they must be false to be adults and both be opposite genders\r\n if(turn && !(age) && !(gender==map[x+1][y].getGender()) && (map[x][y].getHealth()>=20) && (map[x+1][y].getHealth()>=20) ){\r\n \r\n //Success rate of conceiving\r\n if( (Math.random()<=0.85) ){\r\n if( (y+1<gridLength) && (map[x][y+1]==null) && !(baby) ){ //Following ifs check to see if a baby can be made surrounding the intitiating sheep \r\n map[x][y+1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true; \r\n }\r\n if( (y-1>=0) && (map[x][y-1]==null) && !(baby) ){\r\n map[x][y-1]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if( (x-1>=0) && (map[x+1][y]==null) && !(baby) ){\r\n map[x-1][y]=new Sheep(10,0,true,true,(Math.random()>0.5)); \r\n baby=true;\r\n }\r\n if(baby){ //If baby is made then sheep will lose health and turn is therefore over \r\n map[x][y].lowerHealth(10);\r\n map[x+1][y].lowerHealth(10);\r\n map[x][y].setMovement(false);\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n baby=false;\r\n }\r\n }\r\n } \r\n } \r\n if(x+2<gridLength){\r\n checkDown=true;\r\n }\r\n } \r\n \r\n //Movement towards plant only if no immediate sheep/plants are there to move to\r\n if(turn && checkRight && (map[x][y+2] instanceof Plant) ){\r\n if(map[x][y+1]==null){\r\n \r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y+1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n if(turn && checkDown && (map[x+2][y] instanceof Plant) ){\r\n if(map[x+1][y]==null){\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x+1][y].setMovement(false);\r\n turn=false;\r\n }\r\n } \r\n if(turn && checkUp && (map[x-2][y] instanceof Plant) ){\r\n if(map[x-1][y]==null){\r\n \r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n map[x-1][y].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n if(turn && checkLeft && (map[x][y-2] instanceof Plant) ){\r\n if(map[x][y-1]==null){\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n map[x][y-1].setMovement(false);\r\n turn=false;\r\n }\r\n }\r\n \r\n //Random Movement if there are no plants to move towards \r\n if(turn && right && (random<=0.2) ){\r\n if(map[x][y+1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y+1]=map[x][y];\r\n map[x][y]=null; \r\n }\r\n }\r\n if(turn && left && (random>0.2) && (random<=0.4) ){\r\n if(map[x][y-1]==null){\r\n map[x][y].setMovement(false);\r\n map[x][y-1]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && up && (random>0.4) && (random<=0.6) ){\r\n if(map[x-1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x-1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n if(turn && down && (random>0.6) && (random<=0.8) ){\r\n if(map[x+1][y]==null){\r\n map[x][y].setMovement(false);\r\n map[x+1][y]=map[x][y];\r\n map[x][y]=null;\r\n }\r\n }\r\n }", "private Leaf minimax(AI_Domain game,boolean turn,int depth, boolean flag,String path) {\r\n\t\t\t\r\n\t\t\t// if the depth is zero or the game is over,\r\n\t\t\t// return the heuristic value of this state\r\n\t\t\tif(depth == 0 || game.gameOver()){\r\n\t\t\t\tLeaf L = new Leaf(H.calculateScore(game));\r\n\t\t\t\tL.insertPath(path);\r\n\t\t\t\treturn L;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tArrayList<String> moves = new ArrayList<String>();\r\n\t\t\t\r\n\t\t\t// get all the possible moves\r\n\t\t\tmoves = game.allPossibleMoves(turn);\r\n\r\n\t\t\tLeaf val;\r\n\t\t\tLeaf bestVal = new Leaf(0);\r\n\t\t\t\r\n\t\t\t// its the maximizing player turn\r\n\t\t\tif(turn) {\r\n\t\t\t\t// \tset the best value to be 0 (minus infinity)\r\n\t\t\t\t\tbestVal.setValue(0);\r\n\t\t\t\t\r\n\t\t\t\t// for each possible move\r\n\t\t\t\tfor(String str : moves){\r\n\t\t\t\t\t\r\n\t\t\t\t\t//create a copy of the given problem\r\n\t\t\t\t\tAI_Domain copy = game.clone();\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//execute possible move\r\n\t\t\t\t\tcopy.executeCommand(str,\"MiniMax\");\r\n\t\t\t\t\r\n\t\t\t\t\t\t// if it's the first enter to the minimax :\r\n\t\t\t\t\t\t// set the path of the this root to be the first move that executed\r\n\t\t\t\t\t\t// and lead to the next leaves\r\n\t\t\t\t\t\tif(flag) {\r\n\t\t\t\t\t\t\tpath = str;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//recursive check the best move for the copied problem after executed the move\r\n\t\t\t\t\t\t\tval = minimax(copy,!turn,depth-1,false,path);\r\n\t\t\t\t\t\t\t// set the bestval to be the move that has higher heuristic score\r\n\t\t\t\t\t\t\tif( val.getValue() >= bestVal.getValue())\r\n\t\t\t\t\t\t\t\tbestVal = val.clone();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// not the first time entered to minimax\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//recursive check the best move for the copied problem after executed the move\r\n\t\t\t\t\t\t\tval = minimax(copy,!turn,depth-1,false,path);\r\n\t\t\t\t\t\t\t// set the bestval to be the move that has higher heuristic score\r\n\t\t\t\t\t\t\tif( val.getValue() >= bestVal.getValue())\r\n\t\t\t\t\t\t\tbestVal = val.clone();\r\n\t\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t// it's the other player turn\r\n\t\t\t else { \r\n\t\t\t\t // set the best value to be plus infinity\r\n\t\t\t\t\tbestVal.setValue(Integer.MAX_VALUE-1);\r\n\t\t\t\t\tfor(String str : moves){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//create a copy of the given problem\r\n\t\t\t\t\t\tAI_Domain copy = game.clone();\r\n\t\t\t\t\t\t//execute possible move\r\n\t\t\t\t\t\tcopy.executeCommand(str,\"MiniMax\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//recursive check the best move for the copied problem after executed the move\r\n\t\t\t\t\t\tval = minimax(copy,!turn,depth-1,false,path);\r\n\t\t\t\t\t\t// we assume that the other player will try to maximize his score too\r\n\t\t\t\t\t\t//and therefore it will minimize our score\r\n\t\t\t\t\t\tif(val.getValue() < bestVal.getValue())\r\n\t\t\t\t\t\t bestVal = val.clone();\r\n\r\n\t\t\t \t}\t\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn bestVal;\t\t\r\n\t}", "private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }", "public abstract List<Direction> searchForCheese(Maze maze);", "@Override\n\tpublic void determineNextState(Cell cell)\n\t{\n\t\tMap<String, Cell> neighbors = cell.getNeighborsWrap();\n\t\tif (!cell.nextStateFinalized()) {\n\t\t\tList<Cell> emptyNeighbors = getEligibleNeighborsOfState(neighbors, EMPTY);\n\t\t\tif (cell.getState() == FISH) {\n\t\t\t\tupdateGenericSpeciesTraits(cell);\n\t\t\t\tif (emptyNeighbors.size() != 0) {\n\t\t\t\t\tif (readyToReproduce(cell)) {\n\t\t\t\t\t\treproduce(cell, emptyNeighbors);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmove(cell, emptyNeighbors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cell.getState() == SHARK) {\n\t\t\t\tupdateGenericSpeciesTraits(cell);\n\t\t\t\tincrementStarveTime(cell);\n\t\t\t\tList<Cell> fishNeighbors = new ArrayList<Cell>();\n\t\t\t\tfishNeighbors = getEligibleNeighborsOfState(neighbors, FISH);\n\t\t\t\tif (readyToStarve(cell)) {\n\t\t\t\t\tkill(cell);\n\t\t\t\t} else if (fishNeighbors.size() != 0) {\n\t\t\t\t\teat(fishNeighbors, cell);\n\t\t\t\t} else if (emptyNeighbors.size() != 0) {\n\t\t\t\t\tif (readyToReproduce(cell)) {\n\t\t\t\t\t\treproduce(cell, emptyNeighbors);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCell movedTo = move(cell, emptyNeighbors);\n\t\t\t\t\t\tincrementStarveTime(movedTo);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "ArrayList<Cell> getChildren(Integer[][] level){\n int[][] values={{0,1},{0,-1},{1,0},{-1,0}};\n ArrayList<Cell> children = new ArrayList<>();\n for (int i = 0; i < values.length; i++){\n if (isLegalMove(this.getI()+values[i][0], this.getJ()+values[i][1],level)){\n children.add(new Cell(this.getI()+values[i][0], this.getJ()+values[i][1]));\n }\n }\n //the code below achieves the same goal; still here for clarity\n\n// if (isLegalMove(this.getI(), this.getJ()+1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()+1));\n// }\n// if (isLegalMove(this.getI(), this.getJ()-1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()-1));\n// }\n// if (isLegalMove(this.getI()+1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()+1, this.getJ()));\n// }\n// if (isLegalMove(this.getI()-1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()-1, this.getJ()));\n// }\n return children;\n }", "public Stack<Node> findPath(Node initial_node, Node end_node) {\r\n\r\n // TODO: check for hardcoded value 3\r\n int size = 3;\r\n boolean is_start_node = true;\r\n\r\n PriorityList priority_list = new PriorityList();\r\n LinkedList linked_list = new LinkedList();\r\n\r\n // Initialise start node\r\n initial_node.total_path_cost = 0;\r\n initial_node.cost_estimated_to_goal_node = initial_node.pathCost(end_node);\r\n initial_node.parent_node_in_path = null;\r\n priority_list.add(initial_node);\r\n\r\n // Begin exploration of grid map\r\n while (!priority_list.isEmpty()) {\r\n\r\n // Get node from head of list\r\n Node node = (Node) priority_list.removeFirst();\r\n\r\n // Determine if node is Start node\r\n if (node == initial_node)\r\n is_start_node = true;\r\n else\r\n is_start_node = false;\r\n\r\n ((Node) node).setFacing();\r\n\r\n // Determine if node is goal node\r\n if (node == end_node) {\r\n return constructPath(end_node);\r\n }\r\n\r\n // Get list of node neighbours\r\n List neighbors_list = node.getNeighbors();\r\n\r\n // Iterate through list of node neighbours\r\n for (int i = 0; i < neighbors_list.size(); i++) {\r\n\r\n // Extract neighbour node information\r\n Node node_neighbour = (Node) neighbors_list.get(i);\r\n boolean isOpen = priority_list.contains(node_neighbour);\r\n boolean isClosed = linked_list.contains(node_neighbour);\r\n boolean isObs = (node_neighbour).isObs();\r\n int clearance = node_neighbour.getClearance();\r\n float total_path_cost = node.getCost(node_neighbour, end_node, is_start_node) + 1;\r\n\r\n // Check 1. if node neighbours have not been explored OR 2. if shorter path to\r\n // neighbour node exists\r\n if ((!isOpen && !isClosed) || total_path_cost < node_neighbour.total_path_cost) {\r\n node_neighbour.parent_node_in_path = node;\r\n node_neighbour.total_path_cost = total_path_cost;\r\n node_neighbour.cost_estimated_to_goal_node = node_neighbour.pathCost(end_node);\r\n\r\n // Add neighbour node to priority_list if 1. node not in\r\n // priority_list/linked_list AND 2.\r\n // robot can reach\r\n if (!isOpen && !isObs && size == clearance) {\r\n priority_list.add(node_neighbour);\r\n }\r\n }\r\n }\r\n linked_list.add(node);\r\n }\r\n\r\n // priority_list empty; no path found\r\n\r\n return new Stack<Node>();\r\n }", "public int smell() {\n\t\tsynchronized (this) {\n\t\t\tNode[][] AllHexNode = new Node[world.worldArray.length][world.worldArray[0].length];\n\t\t\tint HexAmount = 0;\n\t\t\tfor (int i = 0; i < world.worldArray.length; i++)\n\t\t\t\tfor (int j = 0; j < world.worldArray[0].length; j++) {\n\t\t\t\t\tif (world.isValidHex(i, j)) {\n\t\t\t\t\t\tAllHexNode[i][j] = new Node(i, j, Integer.MAX_VALUE, -1, -1);\n\t\t\t\t\t\tHexAmount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tPriorityQueue<Node> frontier = new PriorityQueue<Node>(HexAmount, new Node(c, r, 0, 0, 0));\n\t\t\t// Place the six hex around it first\n\t\t\tif (world.isValidHex(c, r + 1))\n\t\t\t\tif (world.worldArray[c][r + 1] instanceof EmptySpace || world.worldArray[c][r + 1] instanceof Food) {\n\t\t\t\t\tif (direction == 0) {\n\t\t\t\t\t\tAllHexNode[c][r + 1].setddd(0, 0, 0);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 1) {\n\t\t\t\t\t\tAllHexNode[c][r + 1].setddd(1, 0, 5);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 2) {\n\t\t\t\t\t\tAllHexNode[c][r + 1].setddd(2, 0, 4);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 3) {\n\t\t\t\t\t\tAllHexNode[c][r + 1].setddd(3, 0, 3);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 4) {\n\t\t\t\t\t\tAllHexNode[c][r + 1].setddd(2, 0, 2);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 5) {\n\t\t\t\t\t\tAllHexNode[c][r + 1].setddd(1, 0, 1);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif (world.isValidHex(c + 1, r + 1))\n\t\t\t\tif (world.worldArray[c + 1][r + 1] instanceof EmptySpace\n\t\t\t\t\t\t|| world.worldArray[c + 1][r + 1] instanceof Food) {\n\t\t\t\t\tif (direction == 0) {\n\t\t\t\t\t\tAllHexNode[c + 1][r + 1].setddd(1, 1, 1);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 1) {\n\t\t\t\t\t\tAllHexNode[c + 1][r + 1].setddd(0, 1, 0);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 2) {\n\t\t\t\t\t\tAllHexNode[c + 1][r + 1].setddd(1, 1, 5);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 3) {\n\t\t\t\t\t\tAllHexNode[c + 1][r + 1].setddd(2, 1, 4);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 4) {\n\t\t\t\t\t\tAllHexNode[c + 1][r + 1].setddd(3, 1, 3);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 5) {\n\t\t\t\t\t\tAllHexNode[c + 1][r + 1].setddd(2, 1, 2);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r + 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif (world.isValidHex(c + 1, r))\n\t\t\t\tif (world.worldArray[c + 1][r] instanceof EmptySpace || world.worldArray[c + 1][r] instanceof Food) {\n\t\t\t\t\tif (direction == 0) {\n\t\t\t\t\t\tAllHexNode[c + 1][r].setddd(2, 2, 2);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 1) {\n\t\t\t\t\t\tAllHexNode[c + 1][r].setddd(1, 2, 1);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 2) {\n\t\t\t\t\t\tAllHexNode[c + 1][r].setddd(0, 2, 0);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 3) {\n\t\t\t\t\t\tAllHexNode[c + 1][r].setddd(1, 2, 5);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 4) {\n\t\t\t\t\t\tAllHexNode[c + 1][r].setddd(2, 2, 4);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 5) {\n\t\t\t\t\t\tAllHexNode[c + 1][r].setddd(3, 2, 3);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c + 1][r]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif (world.isValidHex(c, r - 1))\n\t\t\t\tif (world.worldArray[c][r - 1] instanceof EmptySpace || world.worldArray[c][r - 1] instanceof Food) {\n\t\t\t\t\tif (direction == 0) {\n\t\t\t\t\t\tAllHexNode[c][r - 1].setddd(3, 3, 3);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 1) {\n\t\t\t\t\t\tAllHexNode[c][r - 1].setddd(2, 3, 2);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 2) {\n\t\t\t\t\t\tAllHexNode[c][r - 1].setddd(1, 3, 1);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 3) {\n\t\t\t\t\t\tAllHexNode[c][r - 1].setddd(0, 3, 0);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 4) {\n\t\t\t\t\t\tAllHexNode[c][r - 1].setddd(1, 3, 5);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 5) {\n\t\t\t\t\t\tAllHexNode[c][r - 1].setddd(2, 3, 4);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif (world.isValidHex(c - 1, r - 1))\n\t\t\t\tif (world.worldArray[c - 1][r - 1] instanceof EmptySpace\n\t\t\t\t\t\t|| world.worldArray[c - 1][r - 1] instanceof Food) {\n\t\t\t\t\tif (direction == 0) {\n\t\t\t\t\t\tAllHexNode[c - 1][r - 1].setddd(2, 4, 4);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 1) {\n\t\t\t\t\t\tAllHexNode[c - 1][r - 1].setddd(3, 4, 3);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 2) {\n\t\t\t\t\t\tAllHexNode[c - 1][r - 1].setddd(2, 4, 2);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 3) {\n\t\t\t\t\t\tAllHexNode[c - 1][r - 1].setddd(1, 4, 1);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 4) {\n\t\t\t\t\t\tAllHexNode[c - 1][r - 1].setddd(0, 4, 0);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 5) {\n\t\t\t\t\t\tAllHexNode[c - 1][r - 1].setddd(1, 4, 5);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r - 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif (world.isValidHex(c - 1, r))\n\t\t\t\tif (world.worldArray[c - 1][r] instanceof EmptySpace || world.worldArray[c - 1][r] instanceof Food) {\n\t\t\t\t\tif (direction == 0) {\n\t\t\t\t\t\tAllHexNode[c - 1][r].setddd(1, 5, 5);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 1) {\n\t\t\t\t\t\tAllHexNode[c - 1][r].setddd(2, 5, 4);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 2) {\n\t\t\t\t\t\tAllHexNode[c - 1][r].setddd(3, 5, 3);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 3) {\n\t\t\t\t\t\tAllHexNode[c - 1][r].setddd(2, 5, 2);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 4) {\n\t\t\t\t\t\tAllHexNode[c - 1][r].setddd(1, 5, 1);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r]);\n\t\t\t\t\t}\n\t\t\t\t\tif (direction == 5) {\n\t\t\t\t\t\tAllHexNode[c - 1][r].setddd(0, 5, 0);\n\t\t\t\t\t\tfrontier.add(AllHexNode[c - 1][r]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\twhile (!frontier.isEmpty()) {\n\t\t\t\tNode v = frontier.poll(); // extracts element with smallest\n\t\t\t\t\t\t\t\t\t\t\t// v.dist on the queue\n\t\t\t\tif (world.worldArray[v.col][v.row] instanceof Food) {\n\t\t\t\t\treturn v.distance * 1000 + v.directionResult;\n\t\t\t\t}\n\t\t\t\tif (world.isValidHex(v.col, v.row + 1))\n\t\t\t\t\tif (world.worldArray[v.col][v.row + 1] instanceof EmptySpace\n\t\t\t\t\t\t\t|| world.worldArray[v.col][v.row + 1] instanceof Food) {\n\t\t\t\t\t\tif (v.direction == 0)\n\t\t\t\t\t\t\tif (AllHexNode[v.col][v.row + 1].distance > v.distance + 1 && v.distance + 1 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col][v.row + 1].setddd(v.distance + 1, 0, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col][v.row + 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 1)\n\t\t\t\t\t\t\tif (AllHexNode[v.col][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col][v.row + 1].setddd(v.distance + 2, 0, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col][v.row + 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 5)\n\t\t\t\t\t\t\tif (AllHexNode[v.col][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col][v.row + 1].setddd(v.distance + 2, 0, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col][v.row + 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (world.isValidHex(v.col + 1, v.row + 1))\n\t\t\t\t\tif (world.worldArray[v.col + 1][v.row + 1] instanceof EmptySpace\n\t\t\t\t\t\t\t|| world.worldArray[v.col + 1][v.row + 1] instanceof Food) {\n\t\t\t\t\t\tif (v.direction == 0)\n\t\t\t\t\t\t\tif (AllHexNode[v.col + 1][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col + 1][v.row + 1].setddd(v.distance + 2, 1, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col + 1][v.row + 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 1)\n\t\t\t\t\t\t\tif (AllHexNode[v.col + 1][v.row + 1].distance > v.distance + 1 && v.distance + 1 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col + 1][v.row + 1].setddd(v.distance + 1, 1, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col + 1][v.row + 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 2)\n\t\t\t\t\t\t\tif (AllHexNode[v.col + 1][v.row + 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col + 1][v.row + 1].setddd(v.distance + 2, 1, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col + 1][v.row + 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (world.isValidHex(v.col + 1, v.row))\n\t\t\t\t\tif (world.worldArray[v.col + 1][v.row] instanceof EmptySpace\n\t\t\t\t\t\t\t|| world.worldArray[v.col + 1][v.row] instanceof Food) {\n\t\t\t\t\t\tif (v.direction == 1)\n\t\t\t\t\t\t\tif (AllHexNode[v.col + 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col + 1][v.row].setddd(v.distance + 2, 2, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col + 1][v.row]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 2)\n\t\t\t\t\t\t\tif (AllHexNode[v.col + 1][v.row].distance > v.distance + 1 && v.distance + 1 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col + 1][v.row].setddd(v.distance + 1, 2, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col + 1][v.row]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 3)\n\t\t\t\t\t\t\tif (AllHexNode[v.col + 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col + 1][v.row].setddd(v.distance + 2, 2, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col + 1][v.row]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (world.isValidHex(v.col, v.row - 1))\n\t\t\t\t\tif (world.worldArray[v.col][v.row - 1] instanceof EmptySpace\n\t\t\t\t\t\t\t|| world.worldArray[v.col][v.row - 1] instanceof Food) {\n\t\t\t\t\t\tif (v.direction == 2)\n\t\t\t\t\t\t\tif (AllHexNode[v.col][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col][v.row - 1].setddd(v.distance + 2, 3, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col][v.row - 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 3)\n\t\t\t\t\t\t\tif (AllHexNode[v.col][v.row - 1].distance > v.distance + 1 && v.distance + 1 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col][v.row - 1].setddd(v.distance + 1, 3, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col][v.row - 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 4)\n\t\t\t\t\t\t\tif (AllHexNode[v.col][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col][v.row - 1].setddd(v.distance + 2, 3, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col][v.row - 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (world.isValidHex(v.col - 1, v.row - 1))\n\t\t\t\t\tif (world.worldArray[v.col - 1][v.row - 1] instanceof EmptySpace\n\t\t\t\t\t\t\t|| world.worldArray[v.col - 1][v.row - 1] instanceof Food) {\n\t\t\t\t\t\tif (v.direction == 3)\n\t\t\t\t\t\t\tif (AllHexNode[v.col - 1][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col - 1][v.row - 1].setddd(v.distance + 2, 4, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col - 1][v.row - 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 4)\n\t\t\t\t\t\t\tif (AllHexNode[v.col - 1][v.row - 1].distance > v.distance + 1 && v.distance + 1 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col - 1][v.row - 1].setddd(v.distance + 1, 4, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col - 1][v.row - 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 5)\n\t\t\t\t\t\t\tif (AllHexNode[v.col - 1][v.row - 1].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col - 1][v.row - 1].setddd(v.distance + 2, 4, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col - 1][v.row - 1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (world.isValidHex(v.col - 1, v.row))\n\t\t\t\t\tif (world.worldArray[v.col - 1][v.row] instanceof EmptySpace\n\t\t\t\t\t\t\t|| world.worldArray[v.col - 1][v.row] instanceof Food) {\n\t\t\t\t\t\tif (v.direction == 0)\n\t\t\t\t\t\t\tif (AllHexNode[v.col - 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col - 1][v.row].setddd(v.distance + 2, 5, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col - 1][v.row]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 4)\n\t\t\t\t\t\t\tif (AllHexNode[v.col - 1][v.row].distance > v.distance + 2 && v.distance + 2 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col - 1][v.row].setddd(v.distance + 2, 5, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col - 1][v.row]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (v.direction == 5)\n\t\t\t\t\t\t\tif (AllHexNode[v.col - 1][v.row].distance > v.distance + 1 && v.distance + 1 <= 10) {\n\t\t\t\t\t\t\t\tAllHexNode[v.col - 1][v.row].setddd(v.distance + 1, 5, v.directionResult);\n\t\t\t\t\t\t\t\tfrontier.add(AllHexNode[v.col - 1][v.row]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\treturn 1000000;\n\t\t}\n\t}", "@Override\n protected Move makeDecision() {\n myTurn = index();\n /* block the nearest + most effective player (as in, people who arent blocked) */\n ArrayList<Move> pathMoves = new ArrayList<>();\n ArrayList<Move> playMoves = new ArrayList<>();\n ArrayList<Move> discardMoves = new ArrayList<>();\n Map<Integer, Card> destroyCards = new HashMap<Integer, Card>();\n Map<Integer, Card> repairCards = new HashMap<Integer, Card>();\n Map<Integer, Card> blockCards = new HashMap<Integer, Card>();\n Map<Integer, Card> pathCards = new HashMap<Integer, Card>();\n Set<Position> reachable = game().board().getReachable();\n canSee=false;\n canMove=false;\n canBlock=false;\n canRockfall=false;\n canRepair=false;\n int len = hand().size();\n for (int i = 0; i < len; ++i) {\n Card c = hand().get(i);\n if (c instanceof PathCard && !isSabotaged()) {\n pathCards.put(i,c);\n// pathMoves.addAll(generatePossiblePaths(i, (PathCard) c));\n canMove = true;\n }\n if (c instanceof PlayerActionCard) {\n// playMoves.addAll(generatePossiblePlayerActions(i, (PlayerActionCard) c));\n if(c.type()== Card.Type.BLOCK) {\n blockCards.put(i, c);\n canBlock=true;\n }\n else if(c.type()== Card.Type.REPAIR) {\n repairCards.put(i, c);\n canRepair=true;\n }\n }\n if (c.type() == Card.Type.MAP) {\n// playMoves.addAll(generatePossibleMap(i));\n mapIndex = i;\n canSee = true;\n }\n if (c.type() == Card.Type.ROCKFALL) {\n destroyCards.put(i,c);\n// playMoves.addAll(generatePossibleRockfall(i));\n canRockfall = true;\n }\n discardMoves.add(Move.NewDiscardMove(index(), i));\n }\n\n if(canSee) {\n //sum of all heuristics\n double sumGoal[] = new double[3];\n for (Position h : reachable) {\n sumGoal[0]+=(9-(8-h.x)+ 5-(4-h.y));\n sumGoal[1]+=(9-(8-h.x)+ 5-(2-h.y));\n sumGoal[2]+=(9-(8-h.x)+ 5-(-h.y));\n }\n //update goldProb\n for(int i=0; i<3; i++) {\n int seenSum=0;\n for(int j=0; j<numPlayers; j++) {\n if(j!=myTurn) {\n if(haveSeen.get(j)[i]==1) seenSum++;\n }\n }\n goldProb[i] = (i==1?0.5:1)*(1-haveSeen.get(myTurn)[i])*(mapRate*(seenSum/numPlayers)+(sumGoal[i]/10));\n }\n }\n\n// System.out.println(hand());\n// System.out.println(pathMoves);\n\n\n if (role() == Role.GOLD_MINER) {\n //Path\n if(canSee && !goldFound) {\n int selection=0;\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0;\n double oldH;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n oldH = getClosest(board);\n// System.out.print(getClosest(board)+\" : \");\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n// System.out.println(oldH+\": \"+maxH+\" (\"+abs(maxH-oldH)+\")\");\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n //heal self\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n// System.out.println(Arrays.toString(game().playerAt(index()).sabotaged()));\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(index()).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n// System.out.println(Arrays.toString(game().playerAt(i).sabotaged()));\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = Probability[i]+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1 - Probability[i]) * ((1 - Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Fix (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosest(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //See map\n\n //Conserve (Find the best card to discard)\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n } else if (role() == Role.SABOTEUR) {\n //See map\n if(canSee && !goldFound) {\n int selection=0;\n //specific for saboteurs\n double maxProb=goldProb[0];\n for(int i=0; i<3; i++) {\n if(goldProb[i]>maxProb) {\n maxProb = goldProb[i];\n selection=i;\n }\n }\n Move look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n switch(selection) {\n case 0:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.TOP);\n break;\n case 1:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.MIDDLE);\n break;\n case 2:\n look = Move.NewMapMove(index(), mapIndex, Board.GoalPosition.BOTTOM);\n break;\n }\n return look;\n }\n //Path\n if(canMove) {\n int globalIndex = 0;\n double maxH = 0.0;\n Position bp = new Position(0,0);\n boolean rotate = false;\n //Find best path to place;\n Board board = game().board().copy();\n double oldH = getClosestSabotage(board);\n for( Map.Entry<Integer, Card> p : pathCards.entrySet()) {\n int index = p.getKey();\n Card path = p.getValue();\n ((PathCard)path).setRotated(false);\n Set<Position> placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n rotate=false;\n }\n }\n ((PathCard) path).setRotated(true);\n placeable = game().board().getPlaceable((PathCard)path);\n for (Position h : placeable) {\n Board simulated = board.simulatePlaceCardAt((PathCard)path, h.x, h.y);\n// System.out.println(simulated);\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n rotate=true;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0 && abs(maxH-oldH)>0.01)\n return Move.NewPathMove(index(), globalIndex, bp.x, bp.y, rotate);\n }\n //Unblock Friend\n if(canRepair) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for(int i=0; i<numPlayers; i++) {\n if(i == myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(myTurn).isRepairable(repair.effects())) {\n return Move.NewPlayerActionMove(index(),index, index());\n }\n }\n }\n else if(i!=myTurn) {\n for(Map.Entry<Integer, Card> r : repairCards.entrySet()) {\n int index = r.getKey();\n PlayerActionCard repair = (PlayerActionCard) r.getValue();\n if (game().playerAt(i).isRepairable(repair.effects())) {\n //calculate the should i repair? function\n double shouldIBlockMore = (1-Probability[i])+(0.03*(numPlayers-i));\n if(blockMore<shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.75 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Block Enemy\n if(canBlock) {\n double blockMore = 0.0;\n int targetPlayer = -1;\n int cardIndex = 0;\n for (int i = 0; i < numPlayers; i++) {\n if (i != myTurn) {\n for (Map.Entry<Integer, Card> b : blockCards.entrySet()) {\n int index = b.getKey();\n PlayerActionCard block = (PlayerActionCard) b.getValue();\n if (game().playerAt(i).isSabotageable(block.effects()[0])) {\n //calculate the should i repair? function\n double shouldIBlockMore = (Probability[i]) * ((Probability[i]) + 0.2 * (numPlayers - i));\n if (blockMore < shouldIBlockMore) {\n blockMore = shouldIBlockMore;\n targetPlayer = i;\n cardIndex = index;\n }\n }\n }\n }\n }\n if(blockMore>0.6 && targetPlayer>=0)\n return Move.NewPlayerActionMove(index(), cardIndex, targetPlayer);\n }\n //Sabotage (Rockfall)\n if(canRockfall) {\n int globalIndex = 0;\n double maxH = 0;\n Position bp = new Position(0,0);\n //Find best path to place;\n Board board = game().board().copy();\n for( Map.Entry<Integer, Card> d : destroyCards.entrySet()) {\n int index = d.getKey();\n Set<Position> destroyable = game().board().getDestroyable();\n for (Position h : destroyable) {\n Board simulated = board.simulateRemoveCardAt(h.x, h.y);\n// System.out.println(path.type());\n double cH = getClosestSabotage(simulated);\n if(maxH<cH) {\n bp=h;\n globalIndex = index;\n maxH = cH;\n }\n }\n }\n oldBoard = game().board().copy();\n if(maxH>0)\n return Move.NewRockfallMove(index(), globalIndex, bp.x, bp.y);\n }\n //Conserve (Find the best card to discard\n\n //calculate the heuristics and adjust accordingly,\n //choose between playing a card or discarding.\n }\n return discardMoves.get(0);\n }", "public void createWorldMap() {\r\n\t\tdo {\r\n\t\t\t//\t\t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Recursive map generation method over here@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n\t\t\t//Generation loop 1 *ADDS VEIN STARTS AND GRASS*\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif (Math.random()*10000>9999) { //randomly spawn a conore vein start\r\n\t\t\t\t\t\ttileMap[i][j] = new ConoreTile (conore, true);\r\n\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t}else if (Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new KannaiteTile(kanna, true);\r\n\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new FuelTile(fuel, true);\r\n\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999) {\r\n\t\t\t\t\t\ttileMap[i][j] = new ForestTile(forest, true);\r\n\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new OilTile(oil,true);\r\n\t\t\t\t\t}else if(Math.random()*10000>9997) {\r\n\t\t\t\t\t\ttileMap[i][j] = new MountainTile(mountain, true);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\ttileMap[i][j] = new GrassTile(dirt);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} // End for loop \r\n\t\t\t} // End for loop\r\n\t\t\t//End generation loop 1\r\n\r\n\t\t\t//Generation loop 2 *EXPANDS ON THE VEINS*\r\n\t\t\tdo {\r\n\t\t\t\tif (conoreCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ConoreTile (conore,true);\r\n\t\t\t\t\tconoreCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tconorePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (kannaiteCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new KannaiteTile (kanna,true);\r\n\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (fuelCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new FuelTile (fuel,true);\r\n\t\t\t\t\tfuelCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (forestCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ForestTile (forest,true);\r\n\t\t\t\t\tforestCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tforestPass = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 2\r\n\r\n\t\t\t//Generation loop 3 *COUNT ORES*\r\n\t\t\tint loop3Count = 0;\r\n\t\t\tconorePass = false;\r\n\t\t\tkannaitePass = false;\r\n\t\t\tfuelPass = false;\r\n\t\t\tforestPass = false;\r\n\t\t\tdo {\r\n\t\t\t\tconoreCount = 0;\r\n\t\t\t\tkannaiteCount = 0;\r\n\t\t\t\tfuelCount = 0;\r\n\t\t\t\tforestCount = 0;\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (tileMap[i][j] instanceof ConoreTile) {\r\n\t\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof KannaiteTile) {\r\n\t\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof FuelTile) {\r\n\t\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof ForestTile) {\r\n\t\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (conoreCount < 220) {\r\n\t\t\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tconorePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (kannaiteCount < 220) {\r\n\t\t\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (fuelCount< 220) {\r\n\t\t\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (forestCount < 220) {\r\n\t\t\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tforestPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tloop3Count++;\r\n\t\t\t\tif (loop3Count > 100) {\r\n\t\t\t\t\tSystem.out.println(\"map generation failed! restarting\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\t\t\t//END OF LOOP 3\r\n\r\n\t\t\t//LOOP 4: THE MOUNTAIN & OIL LOOP\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildMountain(i,j);\r\n\t\t\t\t\tbuildOil(i,j);\r\n\t\t\t\t}\r\n\t\t\t}//End of THE Mountain & OIL LOOP\r\n\r\n\t\t\t//ADD MINIMUM AMOUNT OF ORES\r\n\r\n\t\t\t//Generation Loop 5 *FINAL SETUP*\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif(i == 1 || j == 1 || i == tileMap.length-2 || j == tileMap[i].length-2) {\r\n\t\t\t\t\t\ttileMap[i][j] = new DesertTile(desert);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i == 0 || j == 0 || i == tileMap.length-1 || j == tileMap[i].length-1) {\r\n\t\t\t\t\t\ttileMap[i][j] = new WaterTile(water);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 5\r\n\t\t\t//mapToString();//TEST RUN\r\n\t\t} while(!conorePass || !kannaitePass || !fuelPass || !forestPass); // End createWorldMap method\r\n\t}", "public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }", "public LinkedList<GameState> successor(GameState a)\n\t{\n\t\t//temperary gamestates that will be used for the legal moves\n\t\tGameState w = new GameState();\n\t\tGameState x = new GameState();\n\t\tGameState y = new GameState();\n\t\tGameState z = new GameState();\n\t\t//System.out.println(\"THIS IS THE CURR NODE\");\n\t\t//a.printGameState();\n\t\t//System.out.println(a);\n\t\t//create a linked list to return all of the legal moves as game states\n\t\tLinkedList<GameState> ans = new LinkedList<GameState>();\n\t\t//these are arrays that will be used to populate gamestates above\n\t\tint[] d = a.moveDown();\n\t\tint[] r = a.moveRight();\n\t\tint[] u = a.moveUp();\n\t\tint[] l = a.moveLeft();\n\t\t//System.out.println(\"hello\");\n\t\t//this is for the down move\n\t\t//System.out.println(\"DOWN\");\n\t\tif(!same1(d,check)) //make sure that moving down is a legall move\n\t\t{\n\t\t\t//System.out.println(\"hello\");\n\t\t\t//if it is a legal move poplate the fieds with \n\t\t\tw.setBoard(d);\n\t\t\tw.setStateID(count);//giving unique id\n\t\t\tw.setG();\n\t\t\tw.setH(this.h(goalS.getBoard(), w));//passing in the empty space index of the goal node\n\t\t\tw.setF();\n\t\t\tw.setVisited(false);\n\t\t\tw.setParentStateID(a.getStateID());//set the parent id to that of the current game state\n\t\t\t//System.out.println(a.getStateID());\n\t\t\t//w.printGameState();\n\t\t\tw.setPriority(w.getF());//the priority is the f(n)\n\t\t\t \n\t\t\tans.add(w);//add new gamestate to the linked list of legal moves\n\t\t}\n\t\tcount++;//increment count so all the games states have unique ids\n\t\t//this is for the up move\n\t\t//System.out.println(\"UP\");\n\t\tif(!same1(u,check)) //make sure that moving up is a legall move\n\t\t{\n\t\t\tx.setBoard(u);\n\t\t\tx.setStateID(count);//giving unique id\n\t\t\tx.setG();\n\t\t\tx.setH(this.h(goalS.getBoard(), x));//passing in the empty space index of the goal node\n\t\t\tx.setF();\n\t\t\tx.setParentStateID(a.getStateID());//set the parent id to that of the current game state\n\t\t\tx.setVisited(false);\n\t\t\t//x.printGameState();\n\t\t\tx.setPriority(x.getF());//the priority is the f(n)\n\t\t\tans.add(x);//add new gamestate to the linked list of legal moves\n\t\t}\n\t\tcount++;//increment count so all the games states have unique ids\n\t\t//\tSystem.out.println(\"RIGHT\");\n\t\t//this is for the right move\n\t\tif(!same1(r,check)) //make sure that moving right is a legall move\n\t\t{\n\t\t\t//System.out.println(\"hello\");\n\t\t\ty.setBoard(r);\n\t\t\ty.setStateID(count);//giving unique id\n\t\t\ty.setG();\n\t\t\ty.setH(this.h(goalS.getBoard(), y));//passing in the empty space index of the goal node\n\t\t\ty.setF();\n\t\t\ty.setParentStateID(a.stateID);//set the parent id to that of the current game state\n\t\t\ty.setVisited(false);\n\t\t\t//y.printGameState();\n\t\t\ty.setPriority(y.getF());//the priority is the f(n)\n\t\t\tans.add(y);//add new gamestate to the linked list of legal moves\n\t\t}\n\t\tcount++;//increment count so all the games states have unique ids\n\t\t//this is for the left move\n\t\t//System.out.println(\"LEFT\");\n\t\tif(!same1(l,check)) //make sure that moving left is a legall move\n\t\t{\n\t\t\tz.setBoard(l);\n\t\t\tz.setStateID(count);//giving unique id\n\t\t\tz.setG();\n\t\t\tz.setH(this.h(goalS.getBoard(), z));//passing in the empty space index of the goal node\n\t\t\tz.setF();\n\t\t\tz.setVisited(false);\n\t\t\tz.setParentStateID(a.getStateID());//set the parent id to that of the current game state\n\t\t\t//z.printGameState();\n\t\t\tz.setPriority(z.getF());//the priority is the f(n)r\n\t\t\t//count++;\n\t\t\tans.add(z);//add new gamestate to the linked list of legal moves\n\t\t}\n\t\tcount++;//increment count so all the games states have unique ids\n\t\treturn ans;\n\t}", "@SuppressWarnings(\"ConstantConditions\")\n private void moveToNest() throws AntArtException {\n AntArea.Cell forward = getCellInDirection(directionVector);\n AntArea.Cell left = getCellInDirection(AntDirections.moveCounterClockwise(directionVector));\n AntArea.Cell right = getCellInDirection(AntDirections.moveClockWise(directionVector));\n\n //Try to move to a nest cell\n List<AntArea.Cell> cellList = Arrays.asList(forward, left, right);\n if (moveToNestCell(cellList)) {\n return;\n }\n\n //Sort according to home pheremone levels\n cellList.sort((o1, o2) -> {\n float hp1 = o1.getHomePheromone();\n float hp2 = o2.getHomePheromone();\n if (hp1 == hp2) {\n return 0;\n }\n return hp1 > hp2 ? -1 : 1;\n });\n //Do a random action based on a probability\n if (random.nextInt(Configuration.ANT_SELECTION_SEED) == 0) {\n Collections.shuffle(cellList);\n }\n //Try to move to a cell\n for (AntArea.Cell cell : cellList) {\n if (moveTo(cell)) {\n break;\n }\n }\n }", "@Override\n\tpublic boolean startSearch() {\n\t\tString str = \"\";\n\t\t\n\t\tDimension d = view.getInit();\n\t\tif (d == null) {\n\t\t\tstr = str + \"Falta la posicion de inicio.\\n\";\n\t\t} else {\n\t\t\ty0 = (int) d.getHeight();\n\t\t\tx0 = (int) d.getWidth();\n\t\t}\n\t\t\n\t\td = view.getGoal();\n\t\tif (d == null) {\n\t\t\tstr = str + \"Falta la posicion de meta.\\n\";\n\t\t} else {\n\t\t\tyf = (int) d.getHeight();\n\t\t\txf = (int) d.getWidth();\n\t\t}\n\t\t\n\t\tif (view.isBreadth()) {\n\t\t\tstrategy = new Breadth();\n\t\t} else if (view.isDepth()) {\n\t\t\tstrategy = new Depth();\n\t\t} else if (view.isAStar()) {\n\t\t\tstrategy = new AStar();\n\t\t\tif (view.isH0()) {\n\t\t\t\theuristic = Horse.H0;\n\t\t\t} else if (view.isH1()) {\n\t\t\t\theuristic = Horse.H1;\n\t\t\t} else if (view.isH2()) {\n\t\t\t\theuristic = Horse.H2;\n\t\t\t} else\n\t\t\t\tstr = str + \"Falta por escoger el tipo de heur’stica.\\n\";\n\t\t} else\n\t\t\tstr = str + \"Falta la estrategia de bœsqueda.\\n\";\n\t\t\n\t\tboard = view.getBoard();\n\t\t\n\t\tif (str.equals(\"\")) {\n\t\t\trootNode = new Node(new Horse(x0,y0,xf,yf, board, heuristic));\n\t\t}\n\t\t\n\t\tif (view.isTree()) {\n\t\t\tif (str.equals(\"\"))\n\t\t\t\tsearch = new Tree(rootNode, strategy);\n\t\t} else if (view.isGraph()) {\n\t\t\tif (str.equals(\"\"))\n\t\t\t\tsearch = new Graph(rootNode, strategy);\n\t\t} else \n\t\t\tstr = str + \"Falta el algoritmo de bœsqueda.\\n\";\n\t\t\n\t\tif (!str.equals(\"\")) {\n\t\t\tview.showError(str);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tgoSearch();\n\t\treturn true;\n\t}", "public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean step(Tile newTile) {\n\t\tif(newTile==null) return false;\n\t\tTile temp=tile;\n\n\t\tboolean success = newTile.receiveAnimal(this); //NULLPTR\n\t\tif(success) {\n\t\t\ttile.removePandaFromNeighborSubbedPandas(this); //Panda eltavolitasa a szomszedokrol.\n\t\t\tsubbedTiles.clear(); //Panda feliratkozasainak torlese\n\t\t\tfor(Tile newTileNeighbor:newTile.getNeighbors()) {\n\t\t\t\tif(map.getSpecificTiles(hatesEntity).contains(newTileNeighbor)) {\n\t\t\t\t\taddSubbedTile(newTileNeighbor); //Az uj helyen szomszedok felirasa pandara\n\t\t\t\t\tnewTileNeighbor.addSubbedPanda(this); //Az uj helyen szomszedokra feliratkozasok\n\t\t\t\t}\n\t\t\t}\n\t\t\t//animate(temp,newTile);\n\t\t\tif(isFollowedBy())\n\t\t\t\tfollowedBy.step(temp);\n\t\t}\n\n\t\treturn success;\n\t}", "Pair<String,LeafNode> chooseNode(T i){\n Set<Map.Entry<String, Identifier>> s= leafInfos.entrySet();\n Identifier page=null;\n LeafNode ln = null;\n for(Map.Entry<String,Identifier> p: s){\n TriangleShape t = triangleEncoder.parse(p.getKey());\n if(Geom2DSuits.contains(t,i.getLowerBound(),i.getUpperBound())){\n ln = readNode(p.getValue());\n return new Pair<String,LeafNode>(p.getKey(),ln);\n }\n\n// int r = test(t,(Interval)i);\n// if(r==0)\n// continue;\n// else{\n// page = p.getValue();\n// if(page.longValue()!=-1)\n// ln = readNode(page);\n// else{\n// ln = new LeafNode();\n// }\n// return new Pair<String,LeafNode>(p.getKey(),ln);\n// }\n }\n\n //2. there is no leaf node that contains i, scan the emptyNodes only when the insertion is running\n int k=0;\n for(String str: emptyNodes){\n TriangleShape t = triangleEncoder.parse(str);\n if(Geom2DSuits.contains(t,i.getLowerBound(),i.getUpperBound())){\n String sss = emptyNodes.remove(k);\n ln = new LeafNode();\n ln.triangle = t;\n return new Pair<String,LeafNode>(sss,ln);\n }\n ++k;\n }\n\n //3. error\n assert false;\n return new Pair<String,LeafNode>(null,null);\n }", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "private boolean searchBoardForTarget(BoardSquareInfo start, BoardSquareInfo target, int state, boolean backwards, ArrayList<BoardSquareInfo> path) {\n\t\tLog.d(LOG_TAG, \"Search board for target\");\n\t\tLog.d(LOG_TAG, String.format(\"*****start: %s\",start));\n\t\tLog.d(LOG_TAG, String.format(\"*****target: %s\",target));\n\t\tLog.d(LOG_TAG, String.format(\"*****state: %s\",state));\n\t\tLog.d(LOG_TAG, String.format(\"*****backwards: %s\",backwards));\n\t\t\n\t\t// NOTE: Revisit code to ensure logic correct, especially if \n\t\t// I continue to add checks for cases not handled\n\t\t\n\t\t// See note at class level\n\t\tint row = (state == PLAYER1_STATE) ? -1 : +1;\n\t\tint col = (backwards)? -1: +1;\n\t\t\n\t\t// Check side\n\t\tBoardSquareInfo square = getData(start.row + row, start.column + col);\n\t\tif (square == null) {\n\t\t\tLog.d(LOG_TAG, \"*****square evaluate to null\");\n\t\t\treturn false;\n\t\t}\n\n\t\tLog.d(LOG_TAG, String.format(\"*****square evaluated: %s\", square));\n\t\t\n\t\t// Found it\n\t\tif (target.equals(square)) {\n\t\t\tLog.d(LOG_TAG, \"*****target found\");\n\t\t\treturn true;\n\t\t} // end if\n\n\t\t// STOP, square states are the same\n\t\tif(square.state == activeState)\n\t\t\treturn false;\n\t\t\n\t\t// Peek at next square. \n\t\tBoardSquareInfo peek = getData(square.row + row, square.column + col);\n\t\tif(peek == null) {\n\t\t\tLog.d(LOG_TAG, \"*****peek is null\");\n\t\t\t\t\t\t\n\t\t\treturn false;\n\t\t} // end if\n\t\t\n\t\t// We know now that we can't jump move to peek\n\t\t// STOP, we can never find target on this path\n\t\tif(peek.state == activeState) {\n\t\t\tLog.d(LOG_TAG, \"*****stop, we can never move pass a square with same state\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// King allow to move over two consecutive empty squares\n \t\tif(activeSquare.isKing \n\t\t\t\t&& peek.state == EMPTY_STATE \n\t\t\t\t&& peek.state == square.state \n\t\t\t\t&& moveActiveSquare(square,target,state,path)) {\n \t\t\tLog.d(LOG_TAG, \"*****king moved over two or more consecutive emtpy squares complete\");\n \t\t\tpath.add(square);\n\t\t\treturn true;\n \t\t}\n\t\t\n\t\t// We know peek isn't an empty square\n\t\t// STOP, never jump over two square with same state \n\t\tif(peek.state == square.state) {\n\t\t\tLog.d(LOG_TAG, \"*****stop, never jump over two squares with same state\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Remove opponent\n\t\tif (square.state != EMPTY_STATE && moveActiveSquare(square, target, state,path)) {\n\t\t\tLog.d(LOG_TAG, String.format(\"*****removing opponent square: %s\", square));\n\t\t\tpath.add(square);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Continue moving\n\t\tif(square.state == EMPTY_STATE && moveActiveSquare(square,target,state,path)) {\n\t\t\tLog.d(LOG_TAG, \"*****continue moving done\");\n\t\t\tpath.add(square);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tLog.d(LOG_TAG, \"*****target not found on this path\");\n\t\treturn false;\n\t}", "private void generateFirstMap(Node parent, int[] board, int player){\n\t\tint qCount = 0, i = -1;\n\t\ttry{\n\t\t\tint[][] queenPos = new int[4][2];\n\t\t\tfor(i = 0; i < board.length; i++){\n\t\t\t\tif(board[i] == player){\n\t\t\t\t\tqueenPos[qCount][0] = i%10; // X\n\t\t\t\t\tqueenPos[qCount][1] = i/10; // Y\n\t\t\t\t\tgenQueenMovesMap(generateFirstMapList[qCount++], board, i);\n\t\t\t\t\tif(qCount > 3){break;}\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count = 0;\n\t\t\tfor(int[] movemap : generateFirstMapList){\n\t\t\t\tboard[queenPos[count][1]*GRID+queenPos[count][0]] = 0;\n\t\t\t\tfor(int x = 0; x <= 9; x++){\n\t\t\t\t\tfor(int y = 0; y <= 9; y++){\n\t\t\t\t\t\tif(movemap[y*GRID+x] != 0){\n\t\t\t\t\t\t\tgenShotMap(shotMapGlob, board, x, y);\n\t\t\t\t\t\t\tmultiply_shotmap(parent,movemap[y*GRID+x],shotMapGlob);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboard[queenPos[count][1]*GRID+queenPos[count][0]] = player;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t} catch (Exception e){\n\t\t\tSystem.out.println(\"q \"+qCount+\" i\"+i);\n\t\t\t//System.out.println(printMap(board));\n\t\t}\n\t}", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private void performInsideCheck() {\n if (checkInsideDone) {\n return;\n }\n \n checkInsideDone = true;\n \n final Location playerLoc = World.getPlayer().getLocation();\n final int currX = playerLoc.getScX();\n final int currY = playerLoc.getScY();\n int currZ = playerLoc.getScZ();\n boolean nowOutside = false;\n boolean isInside = false;\n \n for (int i = 0; i < 2; ++i) {\n currZ++;\n if (isInside || parent.isMapAt(currX, currY, currZ)) {\n if (!insideStates[i]) {\n insideStates[i] = true;\n synchronized (unchecked) {\n unchecked.add(Location.getKey(currX, currY, currZ));\n }\n }\n isInside = true;\n } else {\n if (insideStates[i]) {\n insideStates[i] = false;\n nowOutside = true;\n }\n }\n }\n \n /*\n * If one of the values turned from inside to outside, all tiles are added to the list to be checked again.\n */\n if (nowOutside) {\n synchronized (unchecked) {\n unchecked.clear();\n parent.processTiles(this);\n }\n }\n \n World.getWeather().setOutside(!isInside);\n }", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "public final Tile selectComputerMove() {\r\n Tile tile = null;\r\n int count = 0;\r\n String tileName = null;\r\n boolean continueLoop = true;\r\n \r\n // First try to find a winning move\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"0\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0; \r\n }\r\n \r\n // If none found, try to block \"X\"\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"X\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0;\r\n }\r\n \r\n // If no blocking move, try to play the center which gives \"O\"\r\n // a statistical advantage\r\n if (!tiles[R2C2].isSelected()) {\r\n return tiles[R2C2];\r\n }\r\n \r\n \r\n // If center move is not available, try to find an open corner tile, \r\n // which might set up an winning combination\r\n if (!tiles[R1C1].isSelected()) {\r\n return tiles[R1C1];\r\n } else if (!tiles[R3C3].isSelected()) {\r\n return tiles[R3C3];\r\n } else if (!tiles[R3C1].isSelected()) {\r\n return tiles[R3C1];\r\n } else if (!tiles[R1C3].isSelected()) {\r\n return tiles[R1C3];\r\n }\r\n \r\n // If none found just pick an empty tile at random\r\n if(tileName == null) {\r\n int row = rand.nextInt(3) + 1;\r\n int col = rand.nextInt(3) + 1;\r\n tileName = \"r\" + row + \"c\" + col;\r\n for (Tile btn: tiles) {\r\n if (btn.getName().equals(tileName)) {\r\n tile = btn;\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return tile;\r\n }", "private void bfs(Dungeon d, Site s) {\n\t\t\n\t\t// use a queue to do BFS, and initialize instance variables\n\t\tQueue<Site> q = new LinkedList<Site>();\n\t\tfor (int x = 0; x < d.size(); x++)\n\t\t\tfor (int y = 0; y < d.size(); y++)\n\t\t\t\tdistTo[x][y] = INFINITY; \n\t\tdistTo[s.getX()][s.getY()] = 0;\n\t\tmarked[s.getX()][s.getY()] = true;\n\t\t\n\t\t// pop site from queue until it's empty\n\t\tq.offer(s);\n\t\twhile (!q.isEmpty()) {\n\t\t\t\n\t\t\t// pop the next site in the queue\n\t\t\tSite v = q.poll(); \t \n\t\t\tint x = v.getX();\n\t\t\tint y = v.getY();\n\n\t\t\t// 4 adjacent sites\n\t\t\tSite east = new Site(x + 1, y);\n\t\t\tSite west = new Site(x - 1, y);\n\t\t\tSite north = new Site(x, y - 1);\n\t\t\tSite south = new Site(x, y + 1);\n\n\t\t\t// BFS the rest of the dungeon\n\t\t\tif (d.isLegalMove(v, east) && !marked[east.getX()][east.getY()]) {\n\t\t\t\tedgeTo[east.getX()][east.getY()] = v;\n\t\t\t\tdistTo[east.getX()][east.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[east.getX()][east.getY()] = true;\n\t\t\t\tq.offer(east);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, west) && !marked[west.getX()][west.getY()]) {\n\t\t\t\tedgeTo[west.getX()][west.getY()] = v;\n\t\t\t\tdistTo[west.getX()][west.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[west.getX()][west.getY()] = true;\n\t\t\t\tq.offer(west);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, north) && !marked[north.getX()][north.getY()]) {\n\t\t\t\tedgeTo[north.getX()][north.getY()] = v;\n\t\t\t\tdistTo[north.getX()][north.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[north.getX()][north.getY()] = true;\n\t\t\t\tq.offer(north);\n\t\t\t}\n\t\t\tif (d.isLegalMove(v, south) && !marked[south.getX()][south.getY()]) {\n\t\t\t\tedgeTo[south.getX()][south.getY()] = v;\n\t\t\t\tdistTo[south.getX()][south.getY()] = distTo[x][y] + 1;\n\t\t\t\tmarked[south.getX()][south.getY()] = true;\n\t\t\t\tq.offer(south);\n\t\t\t}\n\n\t\t}\n\n\t}", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "public void addRandoms() {\n //Add random boulders on tiles that aren't Lava\n int tileNumber;\n int selector;\n Tile t;\n String tileTexture;\n Random random = new Random();\n SquareVector playerPos = getPlayerEntity().getPosition();\n int tileCount = GameManager.get().getWorld().getTiles().size();\n AbstractWorld world = GameManager.get().getWorld();\n int randIndex;\n\n for (int i = 0; i < 20; i++) {\n //Get respective volcano tile (5 <= Lava tiles Index <= 8\n do {\n randIndex = random.nextInt(tileCount);\n t = world.getTile(randIndex);\n } while (t.getCoordinates().isCloseEnoughToBeTheSame(playerPos));\n\n tileTexture = t.getTextureName();\n tileNumber = Integer.parseInt(tileTexture.split(\"_\")[1]);\n\n selector = random.nextInt(2);\n if (tileNumber < 5 && tileNumber > 1 && selector == 1 && !t.hasParent()) {\n entities.add(new Rock(t, true));\n } else if (t != null && (tileNumber == 3 || tileNumber == 4) &&\n selector == 0 && !t.hasParent()) {\n entities.add(new VolcanoBurningTree(t, true));\n } else {\n i--;\n }\n }\n }", "public Queen[] lowestHeuristic(Queen[] state){\n Queen[] min = new Queen[n];\n int minHeuristic = general.getHeuristic(state);\n Queen[] curr = new Queen[n];\n\n //Copy the state in min and curr\n for(int i = 0; i < n; i++){\n min[i] = new Queen(state[i].getRow(), state[i].getColumn());\n curr[i] = new Queen(state[i].getRow(), state[i].getColumn());\n }\n\n //Iterate all columns\n for(int i = 0; i < n; i++){\n if (i>0)\n curr[i-1] = new Queen (state[i-1].getRow(), state[i-1].getColumn());\n curr[i] = new Queen (0, curr[i].getColumn());\n //Iterate rows\n for(int j = 0; j < n; j++){\n\n //Check if a minimum is found\n if(general.getHeuristic(curr) < minHeuristic){\n minHeuristic = general.getHeuristic(curr);\n\n for(int k = 0; k < n; k++)\n min[k] = new Queen(curr[k].getRow(), curr[k].getColumn());\n }\n\n //Move the queen\n if(curr[i].getRow() != n-1)\n curr[i].move();\n }\n }\n return min;\n }", "public List<Tile> findTargets() {\n List<Tile> targets = new ArrayList<>(); // our return value\n int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.\n int foodDistance = 3; // We look at a distance 3 for food.\n\n // If fearDistance gets this big, then its just GG i guess\n while (targets.size() == 0 && fearDistance < 15) {\n // Get the tiles around the Enemy's head\n targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);\n fearDistance += 1;\n }\n\n // Get the food tiles near us\n for (int i=0; i < foodDistance; i++) {\n List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);\n for (Tile t : nearBy) {\n if (t.isFood() && !targets.contains(t)) targets.add(t);\n }\n }\n return targets;\n }", "private void prepare()\n {\n treespawn treespawn2 = new treespawn();\n addObject(treespawn2,30,486);\n\n hantu hantu = new hantu();\n addObject(hantu,779,359);\n \n hantu hantu2 = new hantu();\n addObject(hantu2,88,84);\n \n bergerak bergerak2 = new bergerak();\n addObject(bergerak2,745,423);\n\n bergerak bergerak3 = new bergerak();\n addObject(bergerak3,266,566);\n \n bergerak bergerak4 = new bergerak();\n addObject(bergerak4,564,566);\n\n hantu hantu3 = new hantu();\n addObject(hantu3,671,490);\n \n hantu hantu4 = new hantu();\n addObject(hantu4,371,499);\n\n bergerak bergerak = new bergerak();\n addObject(bergerak,150,148);\n\n lantai lantai = new lantai();\n addObject(lantai,561,577); \n addObject(lantai,419,579); \n\n player player = new player();\n addObject(player,882,498);\n\n lantai3 lantai3 = new lantai3();\n addObject(lantai3,120,148);\n\n flyinglantai flyinglantai = new flyinglantai();\n addObject(flyinglantai,292,148);\n\n treespawn treespawn = new treespawn();\n addObject(treespawn,30,291);\n\n lantai4 lantai4 = new lantai4();\n addObject(lantai4,235,536);\n \n lantai4 lantai42 = new lantai4();\n addObject(lantai42,275,508);\n \n lantai4 lantai43 = new lantai4();\n addObject(lantai43,323,480);\n \n lantai4 lantai44 = new lantai4();\n addObject(lantai44,369,454);\n\n lantai2 lantai2 = new lantai2();\n addObject(lantai2,680,424);\n\n \n lantai3 lantai32 = new lantai3();\n addObject(lantai32,938,146);\n \n lantai4 lantai45 = new lantai4();\n addObject(lantai45,21,370);\n\n lantai4 lantai46 = new lantai4();\n addObject(lantai46,210,180);\n \n lantai4 lantai47 = new lantai4();\n addObject(lantai47,257,201);\n \n lantai4 lantai48 = new lantai4();\n addObject(lantai48,302,229);\n \n lantai4 lantai49 = new lantai4();\n addObject(lantai49,354,255);\n \n lantai4 lantai410 = new lantai4();\n addObject(lantai410,402,281);\n \n lantai4 lantai411 = new lantai4();\n addObject(lantai411,444,302);\n \n lantai4 lantai412 = new lantai4();\n addObject(lantai412,491,334);\n \n lantai4 lantai413 = new lantai4();\n addObject(lantai413,546,364);\n \n lantai4 lantai414 = new lantai4();\n addObject(lantai414,582,397);\n \n doorlv3 doorlv3 = new doorlv3();\n addObject(doorlv3,910,45);\n\n \n }", "private void analyzeForObstacles() {\n \t\n \t\n \tStack<Rect> bestFound = new Stack<Rect>();//This is a stack as the algorithm moves along x linearly\n \tboolean[][] blackWhiteGrid = getBlackWhiteGrid();\n \tint[] cache = new int[grid.length];\n \t\n \twhile (true) {\n\t\t\tboolean noneFound = true;\n\t\t\t\n\t\t\tfor (int i = 0; i<cache.length; i++)\n\t\t\t\tcache[i] = 0;\n\t\t\tfor (int llx = grid.length -1; llx >= 0; llx--) {\n\t\t\t\tupdate_cache(blackWhiteGrid,cache, llx);\n\t\t\t\tfor (int lly = 0; lly < grid.length; lly++) {\n\t\t\t\t\tRect bestOfRound = new Rect(llx,lly,llx,lly);\n\t\t\t\t\tint y = lly;\n\t\t\t\t\tint x_max = 9999;\n\t\t\t\t\tint x = llx;\n\t\t\t\t\twhile (y+1<grid.length && blackWhiteGrid[llx][y]) {\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tx = Math.min(llx+cache[y]-1, x_max);\n\t\t\t\t\t\tx_max = x;\n\t\t\t\t\t\tRect tryRect = new Rect(llx,lly-1,x,y);\n\t\t\t\t\t\tif (tryRect.area() > bestOfRound.area()) {\n\t\t\t\t\t\t\tbestOfRound = tryRect;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (bestOfRound.area() > 40) {\n\t\t\t\t\t\tif (noneFound) {\n\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\tnoneFound = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tRect lastRect = bestFound.peek();\n\t\t\t\t\t\t\tif (lastRect.area() < bestOfRound.area()) {\n\t\t\t\t\t\t\t\tbestFound.pop();\n\t\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (noneFound)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tclearFoundRectangle(blackWhiteGrid, bestFound.peek());\n \t}\n \t\n \t//add found rectanlges\n \tobstacles.clear();\n \tobstacles.addAll(bestFound);\n \tSystem.out.println(\"Sweep done:\");\n \tfor (Rect r : bestFound){\n \t\tSystem.out.println(\"Rect: llx=\" + (r.llx-400) + \"\\tlly=\" + (r.lly-400) + \"\\turx=\" + (r.urx-400) + \"\\tury=\" + (r.ury-400));\n \t\tList<Point2D.Double> corners = new ArrayList<Point2D.Double>();\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.ury-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.ury-400)));\n \t\tobstaclesF.add(new Obstacle(corners));\n \t}\n \t\n \ttoExplore.clear();\n \tint i = 0;\n \tRandom rand = new Random();\n \twhile (toExplore.size() < 10 && i < 1000) {\n \t\tint x = rand.nextInt(grid.length);\n \t\tint y = rand.nextInt(grid.length);\n \t\tif (grid[x][y] == .5) {\n \t\t\ttoExplore.add(new Flag(\"blue\",x,y));\n \t\t}\n \t}\n }", "@Override\n public void runMovingTest() {\n long now;\n int count, search;\n elapsedTime.clear();\n expandedCells.clear();\n GraphPath<Integer,DefaultWeightedEdge> agentPath=null;\n GraphPath<Integer,DefaultWeightedEdge> targetPath=null;\n //Integer agentNode, targetNode;\n List<Integer> pathToFollow = null;\n for(Point[] p : points){\n pathfinder = new LazyMovingTargetAdaptiveAStarShortestPath<Integer, DefaultWeightedEdge>(map);\n count=0;\n search=0;\n agentNode = p[0].toNode();\n targetNode = p[1].toNode();\n LinkedList<Integer> movingExpCell = new LinkedList<>();\n LinkedList<Long> movingElapsTime = new LinkedList<>();\n targetThread r = new targetThread();\n evadeThread = new Thread(r);\n evadeThread.start();\n while(!agentNode.equals(targetNode)){\n if(pathToFollow==null || !agentPath.getEndVertex().equals(targetNode)) {\n agentPath = pathfinder.getShortestPath(agentNode, targetNode, new OctileDistance());\n if(pathfinder.getElapsedTime() > Long.valueOf(1900))\n continue;\n movingElapsTime.add(pathfinder.getElapsedTime());\n movingExpCell.add(pathfinder.getNumberOfExpandedNodes());\n search++;\n }\n Integer targetNext = null;\n Integer agentNext = null;\n if(count%2==0) {\n /*targetPath = new Trailmax<Integer,DefaultWeightedEdge>(map).getShortestPath(agentNode,targetNode,null);\n pathToFollow = Graphs.getPathVertexList(targetPath);\n if (!pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n if (targetNext.equals(targetNode) && !pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n targetNode = targetNext;*/\n synchronized(moveTarget) {\n moveTarget = new Boolean(true);\n }\n\n try {\n Thread.sleep(12);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n pathToFollow=Graphs.getPathVertexList(agentPath);\n if(!pathToFollow.isEmpty()){\n int i = pathToFollow.lastIndexOf(agentNode);\n agentNext=pathToFollow.remove(i+1);\n }\n agentNode = agentNext;\n count++;\n //System.out.println(agentNode+\",\"+targetNode);\n\n }\n\n r.terminate();\n try {\n evadeThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n pathToFollow=null;\n movingElapsedTime.put(p, movingElapsTime);\n movingExpandedCells.put(p, movingExpCell);\n movesMap.put(p, count);\n searchesMap.put(p, search);\n if(verbose) {\n Long totElaps = Long.valueOf(0);\n Integer totExp = 0;\n for (Long l : movingElapsTime) totElaps += l;\n for (Integer i : movingExpCell) totExp += i;\n System.out.println(\"total elapsed: \" + totElaps + \" total expanded \" + totExp);\n }\n }\n }", "private Location generateRandomStartLocation() {\n\t\tif (!atLeastOneNonWallLocation()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There is no free tile available for the player to be placed\");\n\t\t}\n\n\t\twhile (true) {\n\t\t\t// Generate a random location\n\t\t\tfinal Random random = new Random();\n\t\t\tfinal int randomRow = random.nextInt(this.map.getMapHeight());\n\t\t\tfinal int randomCol = random.nextInt(this.map.getMapWidth());\n\n\t\t\tfinal Location location = new Location(randomCol, randomRow);\n\n\t\t\tif (this.map.getMapCell(location).isWalkable()\n\t\t\t\t\t&& !otherPlayerOnTile(location, -1)) {\n\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\treturn location;\n\t\t\t}\n\t\t}\n\t}", "public boolean compute() {\n\t\tif(this.startNode.equals(goalNode)) {\r\n\t\t\tSystem.out.println(\"Goal Node Found :)\");\r\n\t\t\tSystem.out.println(startNode);\r\n\t\t}\r\n\t\r\n\t\tQueue<Node> queue = new LinkedList<>();\r\n\t\tArrayList<Node> explored = new ArrayList<>();\r\n\t\tqueue.add(this.startNode);\r\n\t\texplored.add(startNode);\r\n\t\t\r\n\t\t//while queue is not empty\r\n\t\twhile(!queue.isEmpty()) {\r\n\t\t\t//remove and return the first node in the queue\r\n\t\t\tNode current = queue.remove();\r\n\t\t\tif(current.equals(this.goalNode)) {\r\n\t\t\t\tSystem.out.println(\"Explored: \" + explored + \"\\nQueue: \" + queue);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//dead end\r\n\t\t\t\tif(current.getChildren().isEmpty()){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t//add to queue the children of the current node\r\n\t\t\t\telse {\r\n\t\t\t\t\tqueue.addAll(current.getChildren());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\texplored.add(current);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public Iterable<Board> solution() {\n\t\tif (goal == null)\n\t\t\treturn null;\n\t\telse {\n\t\t\tfinal Stack<Board> trace = new Stack<Board>();\n\t\t\tSearchNode iter = goal;\n\t\t\twhile (iter != null) {\n\t\t\t\ttrace.push(iter.getBoard());\n\t\t\t\titer = iter.getParent();\n\t\t\t}\n\t\t\treturn trace;\n\t\t}\n\t}", "public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}", "private void findPath(int current){\r\n // remove current from OPEN\r\n int index = insideArray(_openSet,current);\r\n if(index == -1){\r\n System.out.println(\"findPath method returns -1.\");\r\n }\r\n _openSet.remove(index);\r\n\r\n // add current to CLOSED\r\n _closedSet.add(current);\r\n\r\n // if current is the target node\r\n if(current == _endIndex){\r\n return;\r\n }\r\n\r\n int neighborNum = _map.get_grid(current).get_neighborNum();\r\n int[] neighbors = _map.get_grid(current).get_neighbors();\r\n\r\n //for each neighbor of the current node\r\n for(int i=0;i<neighborNum;i++){\r\n Grid neighborGrid = _map.get_grid(neighbors[i]);\r\n // if neighbor is not traversable or neighbor is in CLOSED\r\n // SKIP THIS NEIGHBOR\r\n if(!neighborGrid.get_type().equals(\"|\") && insideArray(_closedSet,neighbors[i]) == -1){\r\n int currentNeighborF = neighborGrid.get_Fnum();\r\n int neighborF = findF(neighbors[i]);\r\n if(neighborF < currentNeighborF || insideArray(_closedSet,neighbors[i]) == -1){\r\n neighborGrid.set_Fnum(neighborF);\r\n neighborGrid.set_parent(current);\r\n if(insideArray(_closedSet,neighbors[i]) == -1){\r\n _openSet.add(neighbors[i]);\r\n }\r\n }\r\n }\r\n }\r\n int currentIndex = smallestF();\r\n // RECURSIVE CALL\r\n findPath(_map.get_grid(_openSet.get(currentIndex)).get_index());\r\n }", "private static BoardNode startGreedyDepthFirst(int steps, BoardNode node){\n count = 1;\n return greedyDepthFirst(steps, node);\n }", "public LinkedList<State> getNextAvailableStates() {\n LinkedList<Integer> currentSide = new LinkedList<>();\n LinkedList<Integer> otherSide = new LinkedList<>();\n LinkedList<State> newStates = new LinkedList<>();\n if(isLeft) {\n if(leftSide != null) currentSide = new LinkedList<>(leftSide);\n if(rightSide != null) otherSide = new LinkedList<>(rightSide);\n } else {\n if (rightSide != null) currentSide = new LinkedList<>(rightSide);\n if (leftSide != null) otherSide = new LinkedList<>(leftSide);\n }\n\n // add one people to the other side of the bridge\n for (int index=0; index< currentSide.size(); index++) {\n LinkedList<Integer> newCurrentSide = new LinkedList<>(currentSide);\n LinkedList<Integer> newOtherSide = new LinkedList<>(otherSide);\n int firstPeopleMoved = newCurrentSide.remove(index);\n newOtherSide.add(firstPeopleMoved);\n State state = (isLeft) ? new State(newCurrentSide, newOtherSide, !isLeft,timeTaken+firstPeopleMoved, depth+1, highestSpeed) :\n new State(newOtherSide, newCurrentSide, !isLeft, timeTaken+firstPeopleMoved, depth+1, highestSpeed);\n state.setReward(state.calculateReward(firstPeopleMoved));\n // add this as parent to the child\n state.parents = new LinkedList<>(this.parents);\n state.addParent(this);\n // set the action that get to this state\n String currentAction = \"move \" + firstPeopleMoved;\n currentAction += (isLeft) ? \" across\" : \" back\";\n state.copyActions(this); // copy all the previous actions from the parent\n state.addActions(currentAction); // add new action to state generated by parent\n // add to the new states of list\n newStates.add(state);\n // add two people to the other side of the bridge\n for (int second=0; second < newCurrentSide.size(); second++) {\n LinkedList<Integer> newSecondCurrentSide = new LinkedList<>(newCurrentSide);\n LinkedList<Integer> newSecondOtherSide = new LinkedList<>(newOtherSide);\n int secondPeopleMoved = newSecondCurrentSide.remove(second);\n newSecondOtherSide.add(secondPeopleMoved);\n int slowerSpeed = (firstPeopleMoved > secondPeopleMoved) ? firstPeopleMoved : secondPeopleMoved;\n state = (isLeft) ? new State(newSecondCurrentSide, newSecondOtherSide, !isLeft, timeTaken+slowerSpeed, depth+1, highestSpeed) :\n new State(newSecondOtherSide, newSecondCurrentSide, !isLeft, timeTaken+slowerSpeed, depth+1, highestSpeed);\n state.setReward(state.calculateReward(firstPeopleMoved, secondPeopleMoved));\n // add this as parent to the child\n state.parents = new LinkedList<>(this.parents);\n state.addParent(this);\n // set the action that get to this state\n currentAction = \"move \"+ firstPeopleMoved + \" \" + secondPeopleMoved;\n currentAction += (isLeft) ? \" across\" : \" back\";\n state.copyActions(this);\n state.addActions(currentAction);\n // add to the new states of list\n newStates.add(state);\n }\n\n }\n return newStates;\n }", "private void generateRandomPosition() {\r\n int indexX, indexY;\r\n boolean collidesWithPlayers;\r\n playerState.position.x = Integer.MIN_VALUE; // While we trying...\r\n playerState.position.y = Integer.MIN_VALUE;\r\n final ExtensiveMovingObject testObject = new ExtensiveMovingObject( 0.0f, 0.0f, 0.0f, 0.0f, GeneralConsts.WORM_WIDTH, GeneralConsts.WORM_HEIGHT );\r\n int positionGenerationTrialFailureCounter = 0;\r\n do {\r\n do {\r\n indexX = 1 + (int) ( Math.random() * ( map.getWidth () - 1 ) );\r\n indexY = 1 + (int) ( Math.random() * ( map.getHeight() - 1 ) );\r\n if ( positionGenerationTrialFailureCounter++ == MAX_POSITION_GENERATION_TRIAL_FAILURE_COUNT )\r\n if ( map.getWall( indexX, indexY ) == Map.WALL_STONE )\r\n map.setWall( indexX, indexY, Map.WALL_BRICK ); // Not to empty: it can be under water!!\r\n } while( map.getWall( indexX, indexY ) == Map.WALL_STONE ); // Stone can't be cleared: it can be part of swimming pool boundaries. (But if there isn't other places where to start, we clear it!)\r\n testObject.position.x = ( indexX << GeneralConsts.WALL_WIDTH_SHIFT ) + GeneralConsts.WALL_WIDTH / 2;\r\n testObject.position.y = ( indexY << GeneralConsts.WALL_HEIGHT_SHIFT ) + GeneralConsts.WALL_HEIGHT / 2;\r\n collidesWithPlayers = false;\r\n for ( int playerIndex = 0; playerIndex < players.length && !collidesWithPlayers; playerIndex++ )\r\n if ( playerIndex != ownIndex && players[ playerIndex ] != null && testObject.hitsExtensiveObject( players[ playerIndex ].playerState ) )\r\n collidesWithPlayers = true;\r\n try {\r\n Thread.sleep( 0, 100 );\r\n }\r\n catch( InterruptedException ie ) {\r\n }\r\n } while ( collidesWithPlayers );\r\n playerState.position.x = testObject.position.x;\r\n playerState.position.y = testObject.position.y;\r\n map.clearMapForEnteringPlayer( indexX, indexY );\r\n }", "private void createChamber() {\n\n // Give all tiles coordinates for map and temp map\n int CurrentY = 0;\n for (Tile[] tiles : map) {\n int CurrentX = 0;\n for (Tile tile : tiles) {\n tile.setPosition(new Coordinates(CurrentX, CurrentY));\n tile.setTerrain(Terrain.WALL);\n CurrentX++;\n }\n CurrentY++;\n }\n\n for (int y = 0; y < CAST_HEIGHT; y++) {\n for (int x = 0; x < CAST_WIDTH; x++) {\n tempMap[y][x].setPosition(new Coordinates(x, y));\n }\n }\n\n // Initialize algorithm at starting position (0, 0)\n tempMap[0][0].setVisited(true);\n numberOfCellsVisited = 1; //setting number of cells visited to 1 because I have visited one now!\n mapStack.push(tempMap[0][0]); //Chamber start position\n createMaze(tempMap[0][0]); //Chamber start position\n\n // Reveal top edge, sides, and bottom edge\n for (Tile tile : map[0]) {\n tile.setVisible(true);\n }\n for (Tile[] tiles : map) {\n tiles[0].setVisible(true);\n tiles[CHAMBER_WIDTH].setTerrain(Terrain.WALL);\n tiles[CHAMBER_WIDTH].setVisible(true);\n }\n for (Tile tile : map[CHAMBER_HEIGHT]) {\n tile.setVisible(true);\n }\n\n // Clear bugged walls\n for (int i = 1; i < MAP_HEIGHT - 2; i += 2)\n map[i][MAP_WIDTH - 2].setTerrain(Terrain.EMPTY);\n\n // Randomly make regulated holes in walls to create cycles\n Random rand = new Random(); // Preset rng for performance purposes\n for (int i = 1; i < MAP_HEIGHT - 1; i++) {\n for (int j = 1; j < MAP_WIDTH - 1; j++) {\n Tile tile = map[i][j];\n if (tile.getTerrain().equals(Terrain.WALL)) {\n\n // Neighbourhood Check\n int neighbourCount = 0, index = 0;\n boolean[] neighbourhood = new boolean[]{false, false, false, false}; // validity flags\n\n for (Direction direction : Direction.cardinals) {\n Coordinates targetCoordinates = Utility.locateDirection(tile.getPosition(), direction);\n Tile neighbour = getTileAtCoordinates(targetCoordinates);\n if (neighbour.getTerrain().equals(Terrain.WALL)) {\n neighbourCount++;\n neighbourhood[index] = true;\n }\n index++;\n }\n\n // Corner exclusion test, tests vertical NS and horizontal EW\n boolean isStraight = false;\n if (neighbourhood[0] && neighbourhood[1]) isStraight = true;\n if (neighbourhood[2] && neighbourhood[3]) isStraight = true;\n\n if (neighbourCount == 2 && isStraight) {\n if (rand.nextInt(5) == 4) tile.setTerrain(Terrain.EMPTY);\n }\n }\n }\n }\n\n // Check for enclosed spaces and create openings\n for (int i = 1; i < MAP_HEIGHT - 2; i++) probe(map[i][MAP_WIDTH - 2], Direction.EAST);\n }" ]
[ "0.64466894", "0.6435464", "0.624812", "0.6224093", "0.62071353", "0.6206119", "0.6199273", "0.6140004", "0.611651", "0.6085592", "0.60560733", "0.5996624", "0.59746987", "0.59703857", "0.59506994", "0.5943485", "0.593737", "0.59371996", "0.5934632", "0.59196156", "0.587561", "0.5867826", "0.5860473", "0.5858605", "0.5856158", "0.5847096", "0.5835391", "0.582351", "0.5818701", "0.5800376", "0.5780284", "0.5761437", "0.5746185", "0.57461566", "0.57359475", "0.57148284", "0.5712157", "0.5711979", "0.5675132", "0.56603926", "0.56527543", "0.56487644", "0.5634218", "0.56273437", "0.5614815", "0.56122494", "0.56003624", "0.5598151", "0.55905306", "0.55623245", "0.5556317", "0.5554222", "0.5545351", "0.55234903", "0.54878575", "0.5487278", "0.548664", "0.54774183", "0.5473282", "0.54715306", "0.5464327", "0.54617774", "0.545928", "0.5458805", "0.5456067", "0.54479766", "0.5446893", "0.5434348", "0.5428942", "0.5416381", "0.5415984", "0.5412329", "0.5412304", "0.5410516", "0.540423", "0.5399851", "0.53954107", "0.5394259", "0.5389406", "0.53875285", "0.53821874", "0.53755283", "0.5367072", "0.5361874", "0.53572446", "0.5352091", "0.53478587", "0.5338672", "0.5331678", "0.5330482", "0.53266525", "0.5325869", "0.5323545", "0.53221476", "0.5321111", "0.5318962", "0.5318085", "0.5316218", "0.53143495", "0.53141403" ]
0.6100195
9